[KLUG Members] Routing without routing

Robert G. Brown members@kalamazoolinux.org
Thu, 05 Feb 2004 05:08:45 -0500


My ISP called me yesterday and told me they were moving my static IP
addresses, and they were giving me about 3 days' lead time before they
were thinking of cutting off the old addresses and routing.

That's fine, I don't have a LOT of domains to move, and editing the DNS
zone files took mere minutes.

One nice feature of Linux networking is IP aliasing, so we can define 
several IP addresses, even wildly different ones, on the same interface.

One one of the gateways, I have two IP addresses on the Internet side, and
they are bound to the same Ethernet card....

ifconfig eth:1 aaa.bbb.ccc.221 up ...
and
ifconfig eth:2 aaa.bbb.ccc.228 up ...

so I set up the new IP addresses as...
ifconfig eth:3 xxx.yyy.zzz.199 up ...
and
ifconfig eth:4 xxx.yyy.zzz.200 up ...

Modifying my packet filtering rules was easy, since I don't use explicit
IP addresses, but get them by sifting through ifconfig output, based on
the interface name. Since I'll be accepting traffic for the next few days 
on both IP addresses, it was necessary to apply the rules to both pairs
of interfaces. This was easily done by duplicating the files holding the
rules, then simply changing "eth:1" to "eth:3" and "eth:2" to "eth:4" in
the new file.

But the really INTERESTING part of this was some good news, namely that I 
didn't have to define a default routing to start getting traffic on the new
addresses. In fact, from what I can see, the only reason for the "default"
line in the routing table is to get outgoing traffic (that is, packets
that originate INSIDE the LAN) out onto the Internet.

Now, I thought that the default line was needed for INBOUND traffic as
well, but apparently not.... UNLESS my ISP is doing some special routing to 
keep things running. I can imagine how that's done, but I think it is
interesting that the basic networking seems to be working fine without
any explicit entries in the routing table that determines what happens.

As an example, I logged in to a machine rather far away,and did a traceroute 
to the new static address.. no problem! Then I decide to use ssh to get there
(or here) from there. Not only did it work, but I port-forward a good deal
of stuff, and that worked with the new address as well.

Further, I suppose the default routing could be deleted, and while it
would stop anything that initiates packets from getting out (using a web
browser, for example), it would not stop incoming traffic....

Anyone who knows more about networking care to comment or provide some
additional information? We don't see a lot of messages noting that things
work better than expected, but this may be a little-known set of properties
for some readers, and it may have several useful applications...

							Regards,
							---> RGB <---