2010年11月7日星期日

网络问题的检查 - Linux Network Check


One day, I encountered a problem that the STB had got the IP address, but it could not access the internet.
So, I decided to check the following:
1. DNS Configuration
cat /etc/resolv.conf

gateway 10.192.208.254
nameserver 10.194.128.15

2. Route Table

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0

You see, the Gateway was wrong. So, I used the command route to add a default gateway.
/sbin/route add default gw 192.168.1.1
3. Ping www.baidu.com. Ok. It worked.

没有评论: