Networking Forums

Networking Forums > Computer Networking > Linux Networking > Aliasing different IP blocks to same NIC

Reply
Thread Tools Display Modes

Aliasing different IP blocks to same NIC

 
 
Lane Vance
Guest
Posts: n/a

 
      08-28-2003, 07:42 PM
Hello all,

I have two different blocks of IPs that have different gateways and
netmasks and want to alias them all to one NIC. I run RH 8.0 with the
following in /etc/sysconfig/network-scripts:

ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=64.71.173.255
IPADDR=64.71.173.98
NETMASK=255.255.255.0
NETWORK=64.71.173.0
ONBOOT=yes

ifcfg-eth0-range1:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=64.71.173.255
GATEWAY=64.71.173.1
NETMASK=255.255.255.0
NETWORK=64.71.173.0
IPADDR_START=64.71.173.112
IPADDR_END=64.71.173.114
CLONENUM_START=0
ONBOOT=yes

ifcfg-eth0-range2:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=64.71.153.175
GATEWAY=64.71.153.169
NETMASK=255.255.255.248
NETWORK=64.71.153.168
IPADDR_START=64.71.153.170
IPADDR_END=64.171.153.174
CLONENUM_START=3
ONBOOT=yes

Everything in ifcfg-eth0 and ifcfg-eth0-range1 comes up and works
fine. However, ifcfg-eth0-range2 does not come up. When I restart
networking all looks good:

# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth0-range1: [ OK ]
Bringing up interface eth0-range2: [ OK ]

but an ifconfig shows the range2 never came up:

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.173.98 Bcast:64.71.173.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:169702616 errors:0 dropped:0 overruns:0 frame:0
TX packets:1812188 errors:0 dropped:0 overruns:4 carrier:0
collisions:0 txqueuelen:100
RX bytes:209475325 (199.7 Mb) TX bytes:1468565801 (1400.5
Mb)
Interrupt:11 Base address:0x7000

eth0:0 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.173.112 Bcast:64.71.173.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

eth0:1 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.173.113 Bcast:64.71.173.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

eth0:2 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.173.114 Bcast:64.71.173.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:89351 errors:0 dropped:0 overruns:0 frame:0
TX packets:89351 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:117677790 (112.2 Mb) TX bytes:117677790 (112.2 Mb)

Any help anyone can offer will be greatly appreciated.

TIA,
Lane
 
Reply With Quote
 
 
 
 
Lane Vance
Guest
Posts: n/a

 
      08-29-2003, 01:09 PM
I found my typo in the ifcfg-etho-range2 file. Now all the IPs show
up with an ifconfig with no errors but it does not seem like they are
really aliased as I cannot ping them remotely (locally ping works). I
must have missed something - any clues are appreciated:

# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref
Use Iface
64.71.153.168 * 255.255.255.248 U 0 0
0 eth0
64.71.173.96 * 255.255.255.248 U 0 0
0 eth0
64.71.173.0 * 255.255.255.0 U 0 0
0 eth0
127.0.0.0 * 255.0.0.0 U 0 0
0 lo
default 64.71.153.169 0.0.0.0 UG 0 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 0 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 0 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 0 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 0 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 0 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 0 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 0 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 0 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 1 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 1 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 1 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 1 0
0 eth0
default 64.71.153.169 0.0.0.0 UG 1 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 1 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 1 0
0 eth0
default 64.71.173.1 0.0.0.0 UG 1 0
0 eth0


# ifconfig
eth0 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.173.98 Bcast:64.71.173.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:287833 errors:0 dropped:0 overruns:0 frame:0
TX packets:10631 errors:0 dropped:0 overruns:1 carrier:0
collisions:0 txqueuelen:100
RX bytes:17417820 (16.6 Mb) TX bytes:12559545 (11.9 Mb)
Interrupt:11 Base address:0x7000

eth0:0 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.173.112 Bcast:64.71.173.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

eth0:1 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.173.113 Bcast:64.71.173.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

eth0:2 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.173.114 Bcast:64.71.173.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

eth0:3 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.153.170 Bcast:64.71.153.175
Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

eth0:4 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.153.171 Bcast:64.71.153.175
Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

eth0:5 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.153.172 Bcast:64.71.153.175
Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

eth0:6 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.153.173 Bcast:64.71.153.175
Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

eth0:7 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
inet addr:64.71.153.174 Bcast:64.71.153.175
Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x7000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:36 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2999 (2.9 Kb) TX bytes:2999 (2.9 Kb)






(E-Mail Removed) (Lane Vance) wrote in message news:<(E-Mail Removed). com>...
> Hello all,
>
> I have two different blocks of IPs that have different gateways and
> netmasks and want to alias them all to one NIC. I run RH 8.0 with the
> following in /etc/sysconfig/network-scripts:
>
> ifcfg-eth0:
> DEVICE=eth0
> BOOTPROTO=static
> BROADCAST=64.71.173.255
> IPADDR=64.71.173.98
> NETMASK=255.255.255.0
> NETWORK=64.71.173.0
> ONBOOT=yes
>
> ifcfg-eth0-range1:
> DEVICE=eth0
> BOOTPROTO=static
> BROADCAST=64.71.173.255
> GATEWAY=64.71.173.1
> NETMASK=255.255.255.0
> NETWORK=64.71.173.0
> IPADDR_START=64.71.173.112
> IPADDR_END=64.71.173.114
> CLONENUM_START=0
> ONBOOT=yes
>
> ifcfg-eth0-range2:
> DEVICE=eth0
> BOOTPROTO=static
> BROADCAST=64.71.153.175
> GATEWAY=64.71.153.169
> NETMASK=255.255.255.248
> NETWORK=64.71.153.168
> IPADDR_START=64.71.153.170
> IPADDR_END=64.171.153.174
> CLONENUM_START=3
> ONBOOT=yes
>
> Everything in ifcfg-eth0 and ifcfg-eth0-range1 comes up and works
> fine. However, ifcfg-eth0-range2 does not come up. When I restart
> networking all looks good:
>
> # service network restart
> Shutting down interface eth0: [ OK ]
> Shutting down loopback interface: [ OK ]
> Setting network parameters: [ OK ]
> Bringing up loopback interface: [ OK ]
> Bringing up interface eth0: [ OK ]
> Bringing up interface eth0-range1: [ OK ]
> Bringing up interface eth0-range2: [ OK ]
>
> but an ifconfig shows the range2 never came up:
>
> # ifconfig
> eth0 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
> inet addr:64.71.173.98 Bcast:64.71.173.255
> Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:169702616 errors:0 dropped:0 overruns:0 frame:0
> TX packets:1812188 errors:0 dropped:0 overruns:4 carrier:0
> collisions:0 txqueuelen:100
> RX bytes:209475325 (199.7 Mb) TX bytes:1468565801 (1400.5
> Mb)
> Interrupt:11 Base address:0x7000
>
> eth0:0 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
> inet addr:64.71.173.112 Bcast:64.71.173.255
> Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> Interrupt:11 Base address:0x7000
>
> eth0:1 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
> inet addr:64.71.173.113 Bcast:64.71.173.255
> Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> Interrupt:11 Base address:0x7000
>
> eth0:2 Link encap:Ethernet HWaddr 00:10C:9D:B1:5E
> inet addr:64.71.173.114 Bcast:64.71.173.255
> Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> Interrupt:11 Base address:0x7000
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> UP LOOPBACK RUNNING MTU:16436 Metric:1
> RX packets:89351 errors:0 dropped:0 overruns:0 frame:0
> TX packets:89351 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:117677790 (112.2 Mb) TX bytes:117677790 (112.2 Mb)
>
> Any help anyone can offer will be greatly appreciated.
>
> TIA,
> Lane

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IP aliasing in Linux Red Hat 2.4.20-8 Prabhu Linux Networking 2 06-28-2006 03:19 PM
Need some help with multi-netting/IP aliasing wisptech@gmail.com Linux Networking 1 02-03-2006 05:21 PM
lo aliasing problem krsyoung Linux Networking 1 10-01-2005 12:10 AM
Aliasing the loopback. William D. Tallman Linux Networking 14 01-07-2004 01:50 PM
IP Aliasing, 2 networks Leland Linux Networking 3 11-10-2003 11:08 PM



1 2 3 4 5 6 7 8 9 10 11