Yashpal Nagar wrote:

<snip>

It still show me the entry "Iface" as eth0 not eth0:1 in 'route -n'
My question is will route program should show eth0:1 or eth0:2 as the Iface
parameter?
I am using two ISPs with same linux box. Both ISPs are connected to switch
and my linux box too.
One ISP is ADSL and another one is broadband.
When i assign both IPs(one private & one public) no one can ping to my
broadband IP.

Here is details of 'route -n' & ifconfig

<snip>



Where 192.168.168.1 is my LAN IP of ADSL router. I want ip 210.x.x.14 should get pinged from anywhere in world.


Linux would always use aliases for secondary addresses. The problem here is of multiple gateways. If you run something like "tcpdump -nei eth0 icmp" while pinging your 210.x.x.14 address, you would most likely the destination ethernet address of the ICMP echo replies as the 192.168.168.1 address, i.e. Linux is trying to route the reply packets of your broadband ISP through the ADSL ISPs gateway.

You could fix it by source routing, if you can use iproute2:

#ip route add table isp1 210.x.x.14/30 dev eth0 src 210.x.x.14 proto static scope global

#ip route add table isp1 default via 210.x.x.12 dev eth0 proto static scope global

#ip rule add from 210.x.x.12/30 lookup isp1 prio 100

#ip route add table isp2 192.168.1.0/24 dev eth0 src 192.168.1. proto static scope global

#ip route add table isp2 default via 192.168.1.0/24 dev eth0 proto static scope global

#ip rule add from 192.168.168.0/24 lookup isp2 prio 100


Also, in /etc/iproute2/rt_tables, add entries for tables isp1 & isp2



I think http://lartc.org has a section on this...


BTW, I don't think 210.x.x.12 is a valid IP for a /30 subnet, since it would become the network address for that subnet.

--
Regards,
Varun Varma
---------------------------------------
Mindframe Software & Services Pvt. Ltd.
http://www.mindsw.com
---------------------------------------


_______________________________________________ ilugd mailing list [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd

Reply via email to