Issue with ip aliases and routing

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I need to get this working. I have a single interface eth0 with a primary adress of x.x.214.162 on a /30 block network. This interface is properly set up and works fine, however, I also have five aliased adresses on the same interface: eth0:1 @ x.x.6.230, eth0:2 @ x.x.6.235, eth0:3 @ x.x.6.240, eth0:4 @ x.x.6.245, and eth0:5 @ x.x.6.250. All of these adresses are on a /27 block network. After setting these adresses up I tested that they were functional ( at least to the local machine ) by pinging each adress all of which responded from the local machine. The next thing I did was I set a route statement to set the primary ( x.x.214.162 ) as the gateway for the x.x.6.224 network via this statement: route add -net x.x.6.224 netmask 255.255.255.224 gw x.x.214.162. I thought this was all I needed in order to be able to access the aliased adresses externaly from the machine. Unfortunatley this is not the case. I have ensured that ip forwarding is enabled and that the adresses are setup correctly. I have also atempted to use the same route statment with iproute2 via : ip route add 38.98.6.224/27 dev eth0  proto kernel  scope link  src 38.99.214.162 and I am still unable to access the adresses externaly from the machine. I have even brought down iptables to test that there is no conflict there. Here are the configuration files.

[root@landuconsulting ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=38.99.214.163
IPADDR=38.99.214.162
NETMASK=255.255.255.252
NETWORK=38.99.214.160
HWADDR=00:16:35:6A:85:09
> TYPE=Ethernet
[root@landuconsulting ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:1
DEVICE=eth0:1
BOOTPROTO=static
BROADCAST=38.98.6.255
IPADDR=38.98.6.230
NETMASK=255.255.255.224
NETWORK=38.98.6.224
> TYPE=Ethernet
[root@landuconsulting ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:2
DEVICE=eth0:2
BOOTPROTO=static
BROADCAST=38.98.6.255
IPADDR=38.98.6.235
NETMASK=255.255.255.224
NETWORK=38.98.6.224
> TYPE=Ethernet
[root@landuconsulting ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:3
DEVICE=eth0:3
BOOTPROTO=static
BROADCAST=38.98.6.255
IPADDR=38.98.6.240
NETMASK=255.255.255.224
NETWORK=38.98.6.224
> TYPE=Ethernet
[root@landuconsulting ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:4
DEVICE=eth0:4
BOOTPROTO=static
BROADCAST=38.98.6.255
IPADDR=38.98.6.245
NETMASK=255.255.255.224
NETWORK=38.98.6.224
> TYPE=Ethernet
[root@landuconsulting ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0:5
DEVICE=eth0:5
BOOTPROTO=static
BROADCAST=38.98.6.255
IPADDR=38.98.6.250
NETMASK=255.255.255.224
NETWORK=38.98.6.224
> TYPE=Ethernet
[root@landuconsulting ~]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 1

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
[root@landuconsulting ~]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
route add -net 38.98.6.224 netmask 255.255.255.224 gw 38.99.214.162


I'm pretty sure that I'm missing just some small detail but for some reason it evades my notice. Any assitance you can provide me with would be grately appreciated. Thank you for your time.
Jd Geier
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux