arm板的linux系统启动后,网卡起来了,用ifconfig查看网口信息如下:
[root@HOSTNAME /]#ifconfig
eth0 Link encap:Ethernet HWaddr 10:23:45:67:89:AB
inet addr:192.168.2.88 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:358 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:28476 (27.8 KiB) TX bytes:336 (336.0 B)
Interrupt:51 Base address:0x6300
此时可以从主机通过tftp下载程序,但是ping外网却是不通的。查看路由表信息:
[root@HOSTNAME /]#route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
[root@HOSTNAME /]#
从中可以看到路由表没有默认路由路径。是否需要添加路由信息呢?如何添加路由信息呢?