天嵌 ARM开发社区

 找回密码
 注册
查看: 1985|回复: 4

udhcpc无法自动设置的问题

[复制链接]
testzone 发表于 2014-2-20 16:40:12 | 显示全部楼层 |阅读模式
本帖最后由 testzone 于 2014-3-11 08:57 编辑

各位大侠,我之前在TQ2410上可以通过udhcpc命令自动获取并设置网卡IP和系统DNS,现在在TQ6410上,能获取到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
 楼主| 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 | 显示全部楼层
没人知道吗,自己顶
 楼主| 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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-6-3 22:24 , Processed in 1.046875 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表