[NBLUG/talk] Interface Aliases

Mansur, Warren warren.mansur at hp.com
Fri Apr 9 08:23:35 PDT 2004


> System RH 8.0
> Two networks conected via gateway routers
> 192.168.0.0/24
> 192.168.33.0/24
> 
> If I restart the network with these scripts it sets up 
> multiple default
> routes. If I go through and delete them manually and then put 
> up a single
> default route everything appears to work. I'm also wondering if I can
> configure two default routes (annother issue) and will it 
> ballance. Well
> not everything works. I still can't seem to reach my web server at the
> normal address and the alias address. I've got: Listen 
> 192.168.0.210:80
> Listen 192.168.33.210:80 configured in httpd.conf.
> 
> Anybody got any ideas on this one. I should be able to 
> configure my web
> server to accept requests from both networks, but I'm having 
> trouble doing
> so.

Please give a picture of your network. I can only guess it's something like this:

router1      router2
  \            /
   \          /
    \        /
     \      /
      \    /
       SWITCH
          |
          |
          |
        eth0

> 
> (route table after network restart)
> # 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
> 192.168.33.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.254   0.0.0.0         UG    0      0        0 eth0
> default         192.168.0.254   0.0.0.0         UG    0      0        0 eth0
> default         192.168.0.254   0.0.0.0         UG    1      0        0 eth0
> 
> (alias)
> # cat ifcfg-eth0\:0
> DEVICE=eth0:0
> BOOTPROTO=none
> BROADCAST=192.168.33.255
> IPADDR=192.168.33.210
> NETMASK=255.255.255.0
> NETWORK=192.168.33.0
> ONBOOT=yes
> USERCTL=no
> PEERDNS=no
> TYPE=Ethernet
> 
> (regular eth0)
> # cat ifcfg-eth0
> DEVICE=eth0
> BOOTPROTO=none
> BROADCAST=192.168.0.255
> IPADDR=192.168.0.210
> NETMASK=255.255.255.0
> NETWORK=192.168.0.0
> ONBOOT=yes
> USERCTL=no
> PEERDNS=no
> GATEWAY=192.168.0.254
> TYPE=Ethernet

I could get aliases to work fine using eth0 and eth0:0 with similar configuration files. However, I don't have the 'GATEWAY=' line in ifcfg-eth0. I have the 'GATEWAY=' line in the /etc/sysconfig/network file, like so:

[root at puma sysconfig]# cat network
NETWORKING=yes
HOSTNAME=xxxxx
GATEWAY=xx.xx.xx.xxx

(replace 'xx' with whataver is appropriate)

The 'GATEWAY=' line may be causing some of the default routes to appear multiple times.

Some useful things to try are:
- try pinging both routers and make sure it works
- use ethereal and capture the packets to ensure that packets going to the router for 192.168.0.0/24 come from 192.168.0.210, and packets going to the router for 192.168.33.0/24 come from 192.168.33.210.
- try traceroute

Regards,

Warren




More information about the talk mailing list