A reasonable “diagnostic path” for checking your network config is:
- Check there’s a physical connection. Do you have a link light? Is the cable the correct configuration (xover/straight through)? Is it something that’s wrong at the other end (faulty switch/switch port etc.)?
-
ifconfig Do you have a stanza for each of lo and eth0 interfaces? If no – try bringing them up with “ifup lo” and “ifup eth0”. Check that both interfaces have an ip address assigned to them.
-
ping -c 5 127.0.0.1 Can you ping the local host on the local interface? If no – check step 1 again; check for iptables blocking.
-
ping -c 5 <eth0 ip address> Can you ping the local host on the ethernet interface? If no – check step 1 again; check for iptables blocking.
-
ping -c 5 <local network address> Can you ping another host on the local network? (router, other machine, etc) If no – you may have configured the netmask wrongly, or you’re not on the same local IP range as the other machine, or there’s a routing problem, or the other machine is firewalled.
-
ping -c 5 <remote IP address> Can you ping something outside your local network by IP address? If no – the router is misconfigured, or you have a routing problem on your machine, or something is blocking pings.
-
ping -c 5 www.google.com Can you ping something outside your local network by name? If no – you have a DNS lookup problem – start looking at /etc/resolv.conf.
Routing
-
route -n
:You should have at least two routes in the routing table: one with destination of your local network address (no gateway), and one default one with destination 0.0.0.0 (gateway = your router). If not, check your config files again.
IPTables
-
watch -n1 iptables -nvL
:Run this in a separate window, and watch the packet counts as you run a ping. See where the packets get matched, and what happens to them (the counters will increase as each ping packets gets matched).
Wireless
-
iwconfig
:Use this to see if your wireless interface is connected to an access point. It will also show you link quality, signal level, Tx power etc.
Leave a Reply
You must be logged in to post a comment.