免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2726 | 回复: 0
打印 上一主题 下一主题

[系统管理] dhcpcd在混杂模式下才能分配IP [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-09-18 12:30 |只看该作者 |倒序浏览
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

求解
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP