硬件:英贝特的beaglebone black
软件:debian-wheezy-7.2-armhf-3.8.13-bone30.img.xz
问题:
eth0采用dhcp方式获取ip,启动的时候是可以获取到的
[ 72.651170] net eth0: initializing cpsw version 1.12 (0)
[ 72.659013] net eth0: phy found : id is : 0x7c0f1
[ 72.664017] libphy: PHY 4a101000.mdio:01 not found
[ 72.669065] net eth0: phy 4a101000.mdio:01 not found on slave 1
[ 72.681191] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Listening on LPF/eth0/c8:a0:30:ac:8c:03
Sending on LPF/eth0/c8:a0:30:ac:8c:03
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
[ 75.736261] libphy: 4a101000.mdio:00 - Link is Up - 100/Full
[ 75.742301] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.1.1
DHCPACK from 192.168.1.1
bound to 192.168.1.104 -- renewal in 2988 seconds.
done.
可以ping通网关
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.488 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=64 time=0.238 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=64 time=0.213 ms
64 bytes from 192.168.1.1: icmp_req=4 ttl=64 time=0.179 ms
64 bytes from 192.168.1.1: icmp_req=5 ttl=64 time=0.207 ms
64 bytes from 192.168.1.1: icmp_req=6 ttl=64 time=0.232 ms
进入系统以后 ,执行
ifconfig eth0 down
ifconfig eth0 up
出现以下显示
[ 347.538091] net eth0: initializing cpsw version 1.12 (0)
[ 347.546628] net eth0: phy found : id is : 0x7c0f1
[ 347.552070] libphy: PHY 4a101000.mdio:01 not found
[ 347.557146] net eth0: phy 4a101000.mdio:01 not found on slave 1
[ 347.567236] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 349.554619] libphy: 4a101000.mdio:00 - Link is Up - 100/Full
[ 349.561280] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
ifconfig也能够也显示获取到了ip
eth0 Link encap:Ethernet HWaddr c8:a0:30:ac:8c:03
inet addr:192.168.1.104 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::caa0:30ff:feac:8c03/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:322 errors:0 dropped:0 overruns:0 frame:0
TX packets:179 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:91058 (88.9 KiB) TX bytes:16126 (15.7 KiB)
Interrupt:56
再执行ping
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.104 icmp_seq=1 Destination Host Unreachable
From 192.168.1.104 icmp_seq=2 Destination Host Unreachable
From 192.168.1.104 icmp_seq=3 Destination Host Unreachable
From 192.168.1.104 icmp_seq=4 Destination Host Unreachable
From 192.168.1.104 icmp_seq=5 Destination Host Unreachable
From 192.168.1.104 icmp_seq=6 Destination Host Unreachable
From 192.168.1.104 icmp_seq=7 Destination Host Unreachable
--- 192.168.1.1 ping statistics ---
8 packets transmitted, 0 received, +7 errors, 100% packet loss, time 7009ms
pipe 4
这是什么原因,有谁遇到过,请大神赐教!非常感谢!