ARTICLE

Ask Dr. UN*X Continued
Contributed by Brian Wilson in Network on 2006-03-13 16:04:08
Page 8 of 8

Further resources

In learning about routing for Linux I found this book to be very useful:
Linux Routers, A Primer for Network Administrators by Tony Mancill Publisher: Prentice Hall ISBN 0-13-009026-3

Linux Advanced Routing and Traffic Control (iproute) manual: http://lartc.org/

Linux documentation project networking howto: a href="http://www.tldp.org/HOWTO/NET3-4-HOWTO.html">http://www.tldp.org/HOWTO/NET3-4-HOWTO.html

The Debian reference manual has a chapter on networking: http://www.debian.org/doc/manuals/reference/ch-gateway.en.html

Commands

Tcpdump

The 'tcpdump' command is your best friend when it comes to setting up and debugging network problems.

ping

Ping is always there for you, on any Linux or Windows system. It won't always work, sometimes firewall rules block it. But using it with tcpdump is invaluable.

Suggested use: Set up one system to ping the destination, and run 'tcpdump -n -i interface icmp' on the destination system and/or a router system in between. The interface should be something like eth0 or eth1, the '-n' turns off DNS name lookups, and 'icmp' limits the traffic dumped to icmp protocol, which is what ping uses.

It's very satisfying to see ping responses start coming back when you finally get the routing set correctly.

Traceroute

The 'traceroute' command will give you a blow by blow account of the path between your machine and a remote machine. Most Linux distros don't install it by default; install the package named 'traceroute'. Just type 'traceroute' followed by a remote hostname. You will see a listing of the route packets have to take to get to the remote location. (If you only see lines with * * * there is probably a firewall in the way.)

MS Windows has the same command renamed 'tracert'.


Article Index
Ask Dr. UN*X Continued
Just what is routing?
Where do the IP addresses come from?
Revealing your routing tables
Adding the second line
How can I have two default routes?
Making the new commands sticky
Further resources
 
Discussion(s)
Great intro - but I've having an annoyi
Written by brighton36 on 2006-03-18 00:52:00
I've been using a multipath routing setup for my office for a while now. SO far, its been largely ok. The problem is that with some types of traffic my connections that should be established, oddly cease to be . SSH and IM are the two biggies. Its very frustrating. My guess is that the route tables are cleaned up, and the existing , established connection is attempted to connect out the alternate line that it was previously set at. Does anyone have this problem? Any ideas as to how to fix this? I've seen a number of other people ask in different forums, but no great solutions have been forthcoming.
Discuss! Reply!

thanks!
Written by kris on 2006-04-07 18:16:47
I just want to thank you people for writing so comprehensive and knowledgeable. All the other guides have been great; will read this one in a bit.

thanks for the effort! :)
Discuss! Reply!

good, simple info
Written by richard on 2006-03-27 20:36:27
Good to see a simple exlanation of what's going on. I'm setting up two ADSL connections to service my network through a router running FC4. I've got the routes part working (i hope) but I'm wondering how I can firewall both connections. I get the second ADSL modem today so I can see if the routing is working but I would appreciate some help on what I need to do re the firewall. I'm currently using firewall=iptables which is working fine but only has settings for one external and one internal interface. Can I set up a second external interface in the one script and duplicate the rules as required or should I set up a second firewall script? Any tips welcome
Discuss! Reply!