Q: iproute2 & multiple IPs on 1 interface

S P Arif Sahari Wibowo lists-jiQtrEI3vUxWk0Htik3J/w at public.gmane.org
Thu Mar 25 05:55:12 UTC 2004


Hi!

I have some questions about iproute2. Can you help me? TIA!

How iproute2 deal with multiple IPs on 1 interface?

The secondary (or tertiary, etc.) IP already activated using Red Hat's
ifup script (AFAIK it use iproute2 to set it up as well), how I can use
iproute2 to route traffic to & from that secondary IP?

In specific case, I have one machine having 2 different Internet
connection, and should answer to incoming connection from both of them. I
am using iproute2 to do just that. However, at least one connection will
have two or more IPs associated with it, the machine should answer
connection to all those IPs.

For example, let's say the primary connection is on eth0 with IP
101.101.101.97 in network 101.101.101.96/29 with gateway 101.101.101.102,
and the secondary connection is on eth1 in network 202.202.202.200/29,
with gateway 202.202.202.206, and the IPs are 202.202.202.201 and
202.202.202.202.

here are the iproute2 informations:

# ip route show
202.202.202.200/29 dev eth1  scope link
101.101.101.96/29 dev eth0  scope link
127.0.0.0/8 dev lo  scope link
default via 101.101.101.102 dev eth0

# ip rule show
0:      from all lookup local
32765:  from 202.202.202.200/29 lookup 8
32766:  from all lookup main
32767:  from all lookup 253

# ip route show table 8
default via 202.202.202.206 dev eth1

# ip address show dev eth1
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:40:f4:50:21:18 brd ff:ff:ff:ff:ff:ff
    inet 202.202.202.201/29 brd 202.202.202.207/29 scope global eth1
    inet 202.202.202.202/29 brd 202.202.202.207/29 scope global secondary eth1:0


Now, I can access the IP 202.202.202.201 from external machine, but I
cannot access the IP 202.202.202.202. Trial to connect to 202.202.202.202
will just hang there, waiting for answer that never come.

It is as if the answer was sent thru IP 202.202.202.201, which explain why
the answer was discarded. Am I correct?

How should I set it up so connection to 202.202.202.202 works?

Thank you!

-- 
                               Stephan Paul Arif Sahari Wibowo
  _____  _____  _____  _____ 
 /____  /____/ /____/ /____ 
_____/ /      /    / _____/       http://www.arifsaha.com/
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list