TI中文支持网
TI专业的中文技术问题搜集分享网站

Beaglebone black 网络不通,请帮忙。

硬件:英贝特的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:03inet 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:1000RX 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

这是什么原因,有谁遇到过,请大神赐教!非常感谢!

Gary Wu:

试过原beaglebone-black的linux跑过如何?网络是否通?

leo chen:

回复 Gary Wu:

也是不行哦,以下是log

root@beaglebone:~# ifconfigeth0 Link encap:Ethernet HWaddr C8:A0:30:B9:1A:E5 inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::caa0:30ff:feb9:1ae5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:19 errors:0 dropped:0 overruns:0 frame:0 TX packets:41 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3101 (3.0 KiB) TX bytes:6938 (6.7 KiB) Interrupt:56

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@beaglebone:~# ping 192.168.1.1PING 192.168.1.1 (192.168.1.1): 56 data bytes64 bytes from 192.168.1.1: seq=0 ttl=64 time=0.557 ms64 bytes from 192.168.1.1: seq=1 ttl=64 time=0.385 ms^C— 192.168.1.1 ping statistics —2 packets transmitted, 2 packets received, 0% packet lossround-trip min/avg/max = 0.385/0.471/0.557 msroot@beaglebone:~# ifconfig eth0 downroot@beaglebone:~# ifconfig eth0 up [ 52.735731] libphy: PHY 4a101000.mdio:01 not found[ 52.740817] net eth0: phy 4a101000.mdio:01 not found on slave 1root@beaglebone:~# ifconfigeth0 Link encap:Ethernet HWaddr C8:A0:30:B9:1A:E5 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:47 errors:0 dropped:0 overruns:0 frame:0 TX packets:51 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8117 (7.9 KiB) TX bytes:8114 (7.9 KiB) Interrupt:56

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@beaglebone:~# ifconfigeth0 Link encap:Ethernet HWaddr C8:A0:30:B9:1A:E5 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:47 errors:0 dropped:0 overruns:0 frame:0 TX packets:51 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8117 (7.9 KiB) TX bytes:8114 (7.9 KiB) Interrupt:56

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@beaglebone:~# ifconfigeth0 Link encap:Ethernet HWaddr C8:A0:30:B9:1A:E5 inet addr:169.254.28.227 Bcast:169.254.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:47 errors:0 dropped:0 overruns:0 frame:0 TX packets:51 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8117 (7.9 KiB) TX bytes:8114 (7.9 KiB) Interrupt:56

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@beaglebone:~# routeKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Ifacedefault * 0.0.0.0 U 0 0 0 eth0169.254.0.0 * 255.255.0.0 U 0 0 0 eth0root@beaglebone:~# dhclient eth0-sh: dhclient: command not foundroot@beaglebone:~# ifup eth0udhcpc (v1.20.2) startedSending discover…Sending discover…Sending discover…No lease, failingroot@beaglebone:~# ifdown eth0ifdown: interface eth0 not configuredroot@beaglebone:~# ifconfigeth0 Link encap:Ethernet HWaddr C8:A0:30:B9:1A:E5 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:47 errors:0 dropped:0 overruns:0 frame:0 TX packets:51 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8117 (7.9 KiB) TX bytes:8114 (7.9 KiB) Interrupt:56

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@beaglebone:~#

Steven Liu1:

回复 leo chen:

后面的DHCP没获取到IP啊,用Wireshark抓个包看一下,后面失败的原因是DHCP请求没法出去,还是Server端没回应,亦或者是收到回应后板子这边没应答。

Gary Wu:

回复 leo chen:

测试了TI SDK06.00在Beaglebone-Black上,可以ping通

ifconfig eth0 down

ifconfig eth0 up

ping

 

root@am335x-evm:~#root@am335x-evm:~# ifconfig eth0 downroot@am335x-evm:~# ifconfiglo        Link encap:Local Loopback          inet addr:127.0.0.1  Mask:255.0.0.0          UP LOOPBACK RUNNING  MTU:16436  Metric:1          RX packets:0 errors:0 dropped:0 overruns:0 frame:0          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@am335x-evm:~# ifconfig eth0 up[  137.743041] net eth0: CPSW phy found : id is : 0x7c0f1root@am335x-evm:~# i[  139.736083] PHY: 0:00 – Link is Up – 100/Fullfc-root@am335x-evm:~# ifconfigeth0      Link encap:Ethernet  HWaddr C8:A0:30:AB:D0:77          inet addr:10.87.1.47  Bcast:0.0.0.0  Mask:255.255.255.224          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1          RX packets:215 errors:0 dropped:76 overruns:0 frame:0          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000          RX bytes:19560 (19.1 KiB)  TX bytes:1364 (1.3 KiB)

lo        Link encap:Local Loopback          inet addr:127.0.0.1  Mask:255.0.0.0          UP LOOPBACK RUNNING  MTU:16436  Metric:1          RX packets:0 errors:0 dropped:0 overruns:0 frame:0          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@am335x-evm:~# ping 10.87.1.55PING 10.87.1.55 (10.87.1.55): 56 data bytes64 bytes from 10.87.1.55: seq=0 ttl=128 time=1.770 ms64 bytes from 10.87.1.55: seq=1 ttl=128 time=0.885 ms64 bytes from 10.87.1.55: seq=2 ttl=128 time=0.611 ms64 bytes from 10.87.1.55: seq=3 ttl=128 time=0.763 ms

 

leo chen:

回复 Gary Wu:

非常感谢你的回复,不过EVM的网络接口和beaglebone black的网络接口 硬件不一样的,一个是千兆,一个是百兆

难道是硬件设计的问题?

谁有BBB的板子,可以试一下啊,非常感谢

yongt chen:

回复 leo chen:

你好,你的问题解决了么,我重新移植的内核也出现了这个问题,然后网卡就废了,感觉像是找不到网卡配置信息?我之前用BBB是没有这个问题的,现在用的BBG才出现这个问题,而且比较频繁

yongqing wang:

回复 yongt chen:

对比一下BBB的内核配置文件,可能网络配置不同

赞(0)
未经允许不得转载:TI中文支持网 » Beaglebone black 网络不通,请帮忙。
分享到: 更多 (0)