[lug] linux network

Kevin Fenzi kevin at scrye.com
Mon Oct 2 14:56:39 MDT 2000

>>>>> "Kyle" == Kyle Moore <kmoore at trustamerica.com> writes:

Kyle> ***WARNING*** Detailed post below Basically I've got things
Kyle> working but don't understand why. I also don't know how to do it
Kyle> without rebooting. Thankfully, both times I have needed to do
Kyle> this have been perfect timing and I've been able to reboot the
Kyle> box.

Kyle> I have one network card in this Redhat 6.2 box. That card has
Kyle> three different IP's.

Kyle> eth0 => eth0:0 => eth0:1 =>

Kyle> I configured these like this:

Kyle> /sbin/ifconfig eth0:0 /sbin/ifconfig eth0:1

Kyle> I'm not sure what routes to add. When I add them how I think
Kyle> they should be it gives me a syntax error. What I ended up doing
Kyle> was adding them to /etc/sysconfig/network-scripts/ and
Kyle> rebooting. I end up with routes like this:

yeah, adding them to /etc/sysconfig/network-scripts/ifcfg-eth0:0 and
/etc/sysconfig/network-scripts/ifcfg-eth0:1 should work fine. 

Kyle> ...snip...

Kyle> On HP-UX I would set these up differently. Each different
Kyle> network or host would have a gateway listed next to it rather
Kyle> than How does a packet going to know to go
Kyle> to the gateway rather than They way I
Kyle> have it works but I had to reboot to get it this way. I guess
Kyle> the main thing I'm having trouble with is how the route command
Kyle> works with Linux and how the routes are supposed to look.

Well, these are all "Host" routes. They say that to get to that host,
you use that interface... UH        0 0          0 eth0 UH        0 0 0 eth0 UH        0 0 0 eth0

these are all "network" routes. They say to get to anything on that
network, you use that interface and gateway. A gateway of is
"I am the gateway"   U         0 0 0 eth0   U         0 0 0 eth0   U         0 0 0 eth0

These are default routes...as far as I know it will always use the
first one. So all your traffic that isn't matched by one of the routes
above is going out via You can't have more than one
default route.         UG        0 0          0 eth0         UG        0 0          0eth0         UG        0 0          0eth0

To get rid of the network and default routes for your aliases, make
sure your ifcfg-eth0:0 and ifcfg-eth0:1 files don't have a "NETWORK="
line in them and you are only listing your gateway in

Kyle> Any good books you can recommend?  --

not off hand, but I am sure there are some good oryliey ones. ;) 

Kyle> ---- Kyle Moore


More information about the LUG mailing list