开发板上电后无法ping通 外网,此时可以获取到ip地址
开发板硬件连接:连接的网口1(拨码开关旁边第一个),通过USB网口连接到电脑上。
上电后
ifconfig 命令后可以查到开发板IP为 192.168.5.9
[root@100ask:/]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.5.9 netmask 255.255.255.0 broadcast 192.168.5.255
ether 00:01:1f:2d:3e:4d txqueuelen 1000 (Ethernet)
RX packets 1458 bytes 98296 (95.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8994 bytes 429236 (419.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 51
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 86:11ca:97:1d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 2949 bytes 265426 (259.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2949 bytes 265426 (259.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@100ask:/]# ping baidu.com
ping: bad address ‘baidu.com’
[root@100ask:/]#