当前位置: 技术问答>linux和unix
udhcpc无法自动设置IP的问题
来源: 互联网 发布时间:2017-05-13
本文导语: 各位大侠,我之前在TQ2410上可以通过udhcpc命令自动获取并设置网卡IP和系统DNS,但现在在TQ6410上,能获取到IP却不能自动设置网卡的IP了,谁知道哪里的问题啊? [root@EmbedSky /]# ifconfig eth0 eth0 Link encap:Ethernet...
各位大侠,我之前在TQ2410上可以通过udhcpc命令自动获取并设置网卡IP和系统DNS,但现在在TQ6410上,能获取到IP却不能自动设置网卡的IP了,谁知道哪里的问题啊?
[root@EmbedSky /]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 10:23:45:67:89:AB
inet addr:192.168.2.114 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::1223:45ff:fe67:89ab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20313 errors:0 dropped:0 overruns:0 frame:0
TX packets:6489 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4699394 (4.4 MiB) TX bytes:299924 (292.8 KiB)
Interrupt:108 Base address:0x8000
[root@EmbedSky /]# udhcpc -i eth0
udhcpc (v1.16.0) started
Sending discover...
Sending select for 192.168.2.119...
Lease of 192.168.2.119 obtained, lease time 7200
[root@EmbedSky /]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 10:23:45:67:89:AB
inet addr:192.168.2.114 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::1223:45ff:fe67:89ab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20358 errors:0 dropped:0 overruns:0 frame:0
TX packets:6491 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4703778 (4.4 MiB) TX bytes:301104 (294.0 KiB)
Interrupt:108 Base address:0x8000
192.168.2.114是通过ifconfig eth0设置的IP,
用udhcpc设置自动获取IP,获取到了192.168.2.119,但却没有自动设置到eth0,这是怎么回事呢
[root@EmbedSky /]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 10:23:45:67:89:AB
inet addr:192.168.2.114 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::1223:45ff:fe67:89ab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20313 errors:0 dropped:0 overruns:0 frame:0
TX packets:6489 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4699394 (4.4 MiB) TX bytes:299924 (292.8 KiB)
Interrupt:108 Base address:0x8000
[root@EmbedSky /]# udhcpc -i eth0
udhcpc (v1.16.0) started
Sending discover...
Sending select for 192.168.2.119...
Lease of 192.168.2.119 obtained, lease time 7200
[root@EmbedSky /]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 10:23:45:67:89:AB
inet addr:192.168.2.114 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::1223:45ff:fe67:89ab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20358 errors:0 dropped:0 overruns:0 frame:0
TX packets:6491 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4703778 (4.4 MiB) TX bytes:301104 (294.0 KiB)
Interrupt:108 Base address:0x8000
192.168.2.114是通过ifconfig eth0设置的IP,
用udhcpc设置自动获取IP,获取到了192.168.2.119,但却没有自动设置到eth0,这是怎么回事呢
|
设置网卡的DHCP模式自动获得IP
netconfig -d eth0 --bootproto=dhcp
netconfig -d eth0 --bootproto=dhcp
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。