Tags:
create new tag
, view all tags
A routing table is a dynamic (at least in Linux) table that controls how network packets are routed in a given machine. See Sample.

The table can be viewed and temporary changes can be made with the Route command. The Route page also mentions how changes can be made each time the interface is brought up by modifying the /etc/network/interfaces file on some *nix computers. Neither the file nor the man interfaces page exists on my Mandrake 9.0 system — IIRC, the suggestion was made on a Debian mailing list.

I realize now that the problems I had with using two NIC cards in a Windows computer, one high speed and one slow speed, could probably have been solved by adding appropriate lines to the routing table to direct packets over the proper interface to the destination computer — more discussion in Routing, below.

See also:

See:

Contents

Sample

A sample routing table:

[root@system5 dad]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.0.10    0.0.0.0         UG    0      0        0 eth0

Routing

I realize now that the problems I had with using two NIC cards in a Windows computer, one high speed and one slow speed, could probably have been solved by adding appropriate lines to the routing table to direct packets over the proper interface to the destination computer.

I now plan to use that ability as an alternate to a switch on my home LAN to keep heavy traffic between my X terminal and my workstations interfere with my wife and son's Internet access. Using the X terminal that way is an alternate to a KVM and will take advantage of a high resolution video card on the X terminal. The approach of using dedicated links between the X server and the workstations is an alternative to using an Ethernet switch for that purpose — I have a few extra Ethernet NICs, I don't have a switch.

See the sketch, but, in words, I will simply modify the routing tables in my X terminal and workstations so that they use high speed Ethernet NICs to communicate with each other, but use a separate (and slower) NIC to communicate on the coax LAN, thus gaining access to the Internet. The X terminal will have many NICs (one for each workstation, plus one for the coax network). Each workstation will have two NICs, one to communicate to the X terminal and one to communicate on the LAN.

Given this routing table for the X terminal (192.168.0.12) and the workstations (192.168.0.5, .13):

[root@system5 dad]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.0.10    0.0.0.0         UG    0      0        0 eth0

In the X terminal, after configuring eth1, eth2, and whatever else it takes to get them working, I will issue commands like:

route add 192.168.0.5 netmask 255.255.255.255 dev eth1
route add 192.168.0.13 netmask 255.255.255.255 dev eth2

To get a routing table like this:

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.5     *               255.255.255.255 U     0      0        0 eth1
192.168.0.13    *               255.255.255.255 U     0      0        0 eth2
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.0.10    0.0.0.0         UG    0      0        0 eth0

I will do something similar for the workstations, except they need routes to the X terminal (192.168.0.12) and the LAN.

Note: If I set up a DNS, I think I can issue the route add commands using the host.domain name, but I think the routing tables will be shown with IP addresses. Also, this entire scenario assumes static IP addresses — DHCP would complicate the situation (but there may be ways to make it work). In fact, I guess if I used DHCP and DNS, and added the routes in terms of domain names, the domain names would be converted to IP addresses after the dynamic assignment by DHCP. I think!

Note that this has not been tested — this is a plan.

See Route for one approach to change the table every time the interface comes up. An alternate would be to put the necessary commands in a file like rc.local.

A Sketch

Note, these are mostly old/slow machines. The fastest is a 700 MHz Duron. There is also a 650 MHz. Duron. The Gateway is a 386. The other machines are Pentiums in the 100 to 300 MHz. range.

Edit drawing `XTermLan` (requires a Java 1.1 enabled browser)

Other comments re the sketch:

  • It is not necessary that eth0 be used for all connections to the coax Ethernet, it is only necessary that the routes be properly defined in the routing table.
  • To fully replace all functions of my existing KVM switch, I need to also display the local mail / web server and Office 6 on the X terminal. The latter is the difficult one as it runs Windows (that's what it's for). Are their ways to display Windows (95) stuff on an X terminal? At what cost? Note that this would require as many as 5 NICs in the X terminal — I have a few motherboards with on board NICs — maybe I'll need to use one of those.

Contributors

  • () RandyKramer - 29 Apr 2003
  • If you edit this page: add your name here; move this to the next line; and if you've used a comment marker (your initials in parenthesis), include it before your WikiName.

Page Ratings

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdraw XTermLan.draw r6 r5 r4 r3 r2 manage 16.1 K 2003-05-02 - 13:49 RandyKramer  
GIFgif XTermLan.gif r6 r5 r4 r3 r2 manage 11.5 K 2003-05-02 - 13:49 RandyKramer  
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2003-05-02 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look