[Glastonbury] routing tables
Martin WHEELER
mwheeler at startext.co.uk
Sat Dec 13 23:22:57 GMT 2003
On Sat, 13 Dec 2003, Nick Irwin wrote:
> In a routing table, should it be the most specific routes first
. . .
> or the other way round?
Interesting question.
I've never really thought about it.
My own tendency (with no real reasoning behind it) is towards organising
in lowest-to-highest order, whilst retaining the order I first found in
a pre-written /etc/network/interfaces table; viz. :
***********************************************************************
# The loopback interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
# The network (ethernet card) interface
auto eth0
iface eth0 inet static
address 192.168.xxx.yyy
netmask 255.255.255.0
gateway 192.168.mmm.nnn
# to set up the multicast route automatically at system startup
# (required by cupsys)
up route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
down route del -net 224.0.0.0 netmask 240.0.0.0 dev eth0
***********************************************************************
> Also where do the default gateway and loopback addresses fit in? should they
> be at the top or the bottom?
I have a tendency to put loopback first; gateway later.
I haven't tried messing about with order to see what breaks {8-)
And my /etc/networks looks like:
root at mybox:~# less /etc/networks
loopback 127.0.0.0
localnet 192.168.0.0
eth0_netmask 255.255.255.0
/etc/networks (END)
HTH.
--
Martin Wheeler - StarTEXT / AVALONIX - Glastonbury - BA6 9PH - England
mwheeler at startext.co.uk http://www.startext.co.uk/mwheeler/
GPG pub key : 01269BEB 6CAD BFFB DB11 653E B1B7 C62B AC93 0ED8 0126 9BEB
- Share your knowledge. It's a way of achieving immortality. -
More information about the Glastonbury
mailing list