This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

DHCPCD로 네트워크 관리하기

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page Network management using DHCPCD and the translation is 82% complete.
Outdated translations are marked like this.

이 게시글은 posting in the 젠투 포럼 게시글에 기반하며, 완벽한 네트워크 스택 관리에 dhcpcd를 활용하는 방법을 설명합니다.

설치

dhcpcd를 설치했는지 확인하십시오. 다음 기본 런레벨에 추가하고 서비스를 시작하십시오:

root #rc-update add dhcpcd default
root #/etc/init.d/dhcpcd start

This setup deviates from the default networking instructions in the Gentoo Handbook. It has the advantage that it provides automatic switching between wired and wireless network interfaces.

무선

For wireless use wpa_supplicant. Either

To install the hook:

root #cp /usr/share/dhcpcd/hooks/10-wpa_supplicant /lib/dhcpcd/dhcpcd-hooks
root #/etc/init.d/dhcpcd restart
중요
Do not add wpa_supplicant to any runlevel if using the hook.

To use the wpa_supplicant approach, see the wpa_supplicant's Gentoo wiki page.

시험

dhcpcdwpa_supplicant를 멈추고, 디버깅을 활성화 한 상태에서 dhcpcd를 포그라운드에서 시작하신 후 dhcpcd에서 연결을 시작하는지 확인하십시오.

root #/etc/init.d/dhcpcd stop
root #killall wpa_supplicant
root #dhcpcd -dB
dhcpcd[23772]: version 6.4.5 starting
dhcpcd[23772]: udev: starting
dhcpcd[23772]: dev: loaded udev
...
...

정적 IP 주소

네트워크 인터페이스 카드를 정적 IP 주소로 설정해야 한다면, 그래픽 사용자 인터페이스에 입력하십시오. 그래픽 사용자 인터페이스가 없으면, dhcpcd/ko#정적 IP 주소에 설명한대로 /etc/dhcpcd.conf 파일에 항목을직접 추가en할 수 있습니다.

젠투 net.* 스크립트 옮기기

젠투 net.* 스크립트에서 설정을 가져올 때 wpa_supplicantnet.* 스크립트를 런레벨에서 제거하는게 중요합니다.

user $rc-config list | grep 'wpa_supplicant\|dhcpcd\|net.'
  net.wlp8s0                default
  dhcpcd                    default
  wpa_supplicant

net.으로 시작하는 스크립트는 런레벨에 할당하면 안됩니다. 위 예제에서 net.wlp8s0 를 제거해야합니다.

root #rc-update del net.wlp8s0
root #/etc/init.d/net.wlp8s0 stop

네트워크 설정이 잘 동작한다면 이전 젠투 net.* 스크립트(불필요함)를 완전히 제거할 수 있습니다. netifrc USE 플래그를 비활성화하고 OpenRC를 다시 이머지한 후, 마지막으로 net-misc/netifrc를 언머지하십시오.

root #echo 'sys-apps/openrc -netifrc' >> /etc/portage/package.use
root #emerge --ask --newuse --oneshot sys-apps/openrc
root #emerge --ask --depclean net-misc/netifrc

이전 설정 파일과 심볼릭 링크도 제거할 수 있습니다:

root #rm /etc/conf.d/net
root #rm /etc/init.d/net.*

네트워크 의존 서비스

dhcpcd네트워크 의존 서비스 조정은 openrc-0.16.4부터 더 이상 지원하지 않습니다.

그래픽 사용자 인터페이스

net-misc/dhcpcd-ui 꾸러미에 dhcpcd 그래픽 사용자 인터페이스가 들어있습니다.

추가 참조

외부 자료