dhcpcd를 사용하여 수동으로 설정된 인터페이스 재설정

dhcpcd를 사용하여 수동으로 설정된 인터페이스 재설정
  1. dhcpcd를 사용하여 IP 주소 가져오기( dhcpcd -p eth0)
  2. IP 주소 수동 변경( ifconfig eth0 x.x.x.x)
  3. dhcpcd 종료( dhcpcd -k eth0)
  4. dhcpcd 다시 시작( dhcpcd -p eth0)

이 경우 dhcpcd는 인터페이스의 IP 주소를 설정하지 않으며 인터페이스는 수동으로 설정된 IP 주소를 나타냅니다. 인터페이스를 구성하지 않는 이유는 무엇입니까?

dhcpcd -d eth0쇼:

eth0: dhcpcd 4.0.0-beta6 starting
eth0: hardware address = ##:##:##:##:##:##
eth0: broadcasting for a lease
eth0: sending DHCP_DISCOVER with xid 0x25fc838b
eth0: waiting for 3.241 seconds
eth0: offered 192.168.228.180 from 192.168.50.10
eth0: sending DHCP_REQUEST with xid 0x25fc838b
eth0: waiting for 7.224 seconds
eth0: lease of 192.168.228.180 acknowledged
eth0: sending ARP probe #1
eth0: waiting for 1.563 seconds
eth0: sending ARP probe #2
eth0: waiting for 1.442 seconds
eth0: sending ARP probe #3
eth0: waiting for 2.000 seconds
eth0: leased 192.168.228.180 for 691200 seconds
eth0: renew in 345600 seconds
eth0: rebind in 604800 seconds
eth0: adding IP address 192.168.228.180/23
eth0: adding route to 0.0.0.0/0 via 192.168.228.1
eth0: exec `/libexec/dhcpcd-run-hooks'
eth0: forking to background

답변1

인터페이스에 유효한 고정 IP 주소가 할당되어 있으면 dhcpcd가 인터페이스를 구성하지 않는 것으로 나타났습니다.

단계를 추가하면 다음과 같습니다. 3b. eth0 IP를 잘못된 값으로 변경합니다(ifconfig eth0 0.0.0.0).

인터페이스는 dhcpcd가 다시 시작될 때 DHCP가 할당한 IP 주소로 구성됩니다.

관련 정보