- 论坛徽章:
- 0
|
victor@arch:~$ cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Inform the DHCP server of our hostname for DDNS.
hostname
# To share the DHCP lease across OSX and Windows a ClientID is needed.
# Enabling this may get a different lease than the kernel DHCP client.
# Some upstream DHCP servers may also require a ClientID, such as FRITZ!Box.
#clientid
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
option interface_mtu
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
noipv4ll
noipv6rs
victor@arch:/etc$ sudo dhcpcd eth0 --debug
dhcpcd[2250]: version 5.6.0 starting
dhcpcd[2250]: eth0: using hwaddr 30:f9:ed:b6:88:4f
dhcpcd[2250]: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd[2250]: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd[2250]: eth0: broadcasting for a lease
dhcpcd[2250]: eth0: sending DISCOVER (xid 0x9ad678aa), next in 4.14 seconds
dhcpcd[2250]: eth0: sending DISCOVER (xid 0x9ad678aa), next in 7.32 seconds
dhcpcd[2250]: eth0: sending DISCOVER (xid 0x9ad678aa), next in 16.55 seconds
dhcpcd[2250]: eth0: sending DISCOVER (xid 0x9ad678aa), next in 32.73 seconds
dhcpcd[2250]: timed out
dmesg
[ 542.252364] r8169 0000:03:00.0: eth0: link up
[ 542.252759] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
victor@arch:/etc$ sudo ifconfig eth0 promisc
victor@arch:/etc$ sudo dhcpcd eth0 --debug
dhcpcd[2322]: version 5.6.0 starting
dhcpcd[2322]: eth0: using hwaddr 30:f9:ed:b6:88:4f
dhcpcd[2322]: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd[2322]: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd[2322]: eth0: broadcasting for a lease
dhcpcd[2322]: eth0: sending DISCOVER (xid 0xf4141656), next in 3.05 seconds
dhcpcd[2322]: eth0: offered 10.10.10.1 from 10.10.10.254 `锟?
dhcpcd[2322]: eth0: sending REQUEST (xid 0xf4141656), next in 4.95 seconds
dhcpcd[2322]: eth0: acknowledged 10.10.10.1 from 10.10.10.254 `锟?
dhcpcd[2322]: eth0: checking for 10.10.10.1
dhcpcd[2322]: eth0: sending ARP probe (1 of 3), next in 1.05 seconds
dhcpcd[2322]: eth0: sending ARP probe (2 of 3), next in 1.11 seconds
dhcpcd[2322]: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd[2322]: eth0: leased 10.10.10.1 for 7200 seconds
dhcpcd[2322]: eth0: adding IP address 10.10.10.1/24
dhcpcd[2322]: eth0: adding route to 10.10.10.0/24
dhcpcd[2322]: eth0: adding default route via 10.10.10.254
dhcpcd[2322]: eth0: writing lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'
dhcpcd[2322]: eth0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd[2322]: forking to background
dhcpcd[2322]: forked to background, child pid 2350
求解
|
|