testzone 发表于 2014-2-20 16:40:12

udhcpc无法自动设置的问题

本帖最后由 testzone 于 2014-3-11 08:57 编辑

各位大侠,我之前在TQ2410上可以通过udhcpc命令自动获取并设置网卡IP和系统DNS,现在在TQ6410上,能获取到IP却不能自动设置了,谁知道哪里的问题啊?

# ifconfig eth0
eth0      Link encap:EthernetHWaddr 10:23:45:67:89:AB
          inet addr:192.168.2.114Bcast:192.168.2.255Mask:255.255.255.0
          inet6 addr: fe80::1223:45ff:fe67:89ab/64 Scope:Link
          UP BROADCAST RUNNING MULTICASTMTU:1500Metric: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

# 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

# ifconfig eth0
eth0      Link encap:EthernetHWaddr 10:23:45:67:89:AB
          inet addr:192.168.2.114Bcast:192.168.2.255Mask:255.255.255.0
          inet6 addr: fe80::1223:45ff:fe67:89ab/64 Scope:Link
          UP BROADCAST RUNNING MULTICASTMTU:1500Metric: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

testzone 发表于 2014-2-21 11:50:50

192.168.2.114是通过ifconfig eth0设置的IP,
用udhcpc设置自动获取IP,获取到了192.168.2.119,但却没有自动设置到eth0,这是怎么回事呢

testzone 发表于 2014-2-22 10:35:05

没人知道吗{:2_156:},自己顶

testzone 发表于 2014-2-24 08:39:19

网上查到:
设置网卡的DHCP模式自动获得IP
netconfig -d eth0 --bootproto=dhcp

TQ6410开发板上没有netconfig工具,不想移植,有其它办法可以设置网卡的模式为DHCP吗

testzone 发表于 2014-3-11 08:54:51

KAO,原来是天嵌文件系统的BUG
页: [1]
查看完整版本: udhcpc无法自动设置的问题