Request Linux network debugging command advice

Have a question or want to start a discussion? Post it! No Registration Necessary.  Now with pictures!

Threaded View
Somehow, on Centos6, I was able to get connected to a test wireless ISP
antenna, but I'd like advice on being 'smoother' next time.

DO you have advice for better DEBUGGING networking on Linux?

Here's my saga:
- I mounted a ubiquiti rocket M2 radio outside & set it up
- I turned off my wireless adapter with a switch on the laptop
- I plugged in a cat5 cable linking the radio with the laptop
... First problem: I couldn't connect to the radio at
    # ping failed failed
- I solved the connect problem by setting my laptop to the same subnet
- $ sudo ifconfig eth0
... Second problem: The gateway was instead of
    # arp -n showed the gateway for eth0 to be
    # route -n showed the eth0 gateway to be
- I solved the gateway by running the route command
- $ sudo route del default gw eth0
- $ sudo route add default gw eth0
... Third problem: The DNS servers in the radio were not found
- I solved that by editing the /etc/resolv.conf file
- $ vi /etc/resolv.conf
  (I added these two lines)

At this point, the following commands started working:
  $ host
  $ nslookup
  $ dig
  $ traceroute

But strangely, the web still failed for a while - but then - inexplicably
- the web finally started working.

I wish I had better debugging skills as I had to look up all the steps
a) How to set the eth0 adapter to the same subnet as the radio
b) How to set the gateway on the laptop (no router is involved)
c) How to set the DNS servers on the laptop (connected directly to the

Do you have debugging suggestions?

Re: Request Linux network debugging command advice
On Fri, 10 Aug 2012, in the Usenet newsgroup alt.internet.wireless, in article

Quoted text here. Click to load it

OK, you're not configuring things.  EITHER you want to set things to
static values, _OR_ you want the radio to act as a DHCP server over
the Ethernet as well as the wireless link.  My guess is that the radio
isn't configured to offer DHCP over the Ethernet interface.  CentOS?
It's got some "let-me-do-this-for-you-you're-to-stupid-to-try-this"
helper tool, perhaps Network Manager.  The alternative would be to
configure things manually, likely involving scripts in
/etc/sysconfig/network-scripts/   (probably ifcfg-eth0).

Quoted text here. Click to load it

You did fine.  Always use '/sbin/ifconfig' and '/sbin/route' to see if
the interface has an address, and the appropriate routes exist. You
should also know the IP address of some other systems on the local LAN
and one or more "outside".  'ping' isn't as reliable as a tool, because
many people block pings. On the local LAN, try a ping, and even if you
don't get a response, look at '/sbin/arp -a' and see if the remote
host did respond with a hardware address.   No hardware address means
no route/address.  If you can ping or otherwise connect to a remote
host by IP but not name, that's pointing at /etc/resolv.conf.

Quoted text here. Click to load it

That's probably all in /etc/sysconfig/network-scripts/ifcfg-eth0
and is explained in the appropriate documentation page. I'm not running
CentOS, but try 'rpm -qdf /etc/sysconfig/network-scripts/ifcfg-lo'
which asks the package manager (rpm) to list the documentation files
related to the ifcfg-lo file.  You'll find something like
'/usr/share/doc/initscripts-*/sysconfig.txt  which describes what
each variable means.

        Old guy

Re: Request Linux network debugging command advice
On Fri, 10 Aug 2012, in the Usenet newsgroup alt.internet.wireless, in article

Quoted text here. Click to load it

Whoops! Missed that -   In *nix networking, the gateway is the IP
address of the "next hop" router/forwarder.     Lessee...

[example ~]$ /sbin/route -n
Kernel IP routing table
Destination    Gateway        Genmask         Flags Metric Ref   Use
Iface   U     0      0   89948
eth0   UG    0      0   32165
eth0         UG    0      0    2673
[example ~]$ /sbin/ifconfig -a

First line - 192.168.1.x (destination plus mask) are on eth0 and can be
reached directly.  No gateway needed.

Second line - there is another network using addresses 192.168.2.x.  To
reach those hosts, the kernel to told to deliver the packets to (a
router at), and that box will forward them.  (Hosts on the
other net have to know to reply to the 192.168.2.x address of the router
what ever that might be, to reach "this" net.)

Third line - if the first two don't match the destination address
(that is, a destination address of through 126.255.254 and thorough and through send it to the "default" router on
Addresses of 0.x.x.x, 127.x.x.x and are special cases
with other meanings.

Linux networking tools are a bit simple-minded, and when they see the
word "gateway", they assume you mean a default gateway to the world.
For many installations, that's a reasonable assumption, but it's not
always true as shown above.

        Old guy

Site Timeline