0

Im configuring centos with load balance with ip route and ip rule

Eth0 192.168.1.5
Eth1 192.168.5.128

[root@host1 testscripts]# ip route
192.168.5.0/24 dev eth1  scope link  src 192.168.5.128
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.5
169.254.0.0/16 dev eth1  scope link 
[root@host1 testscripts]# ip route show table wan2
default via 192.168.5.2 dev eth1  src 192.168.5.128
[root@host1 testscripts]# ip route show table wan1
default via 192.168.1.1 dev eth0  src 192.168.1.5
[root@host1 testscripts]# ip rule show
0:      from all lookup 255
32762:  from 192.168.5.128 lookup wan2
32763:  from all to 192.168.1.5 lookup wan1
32765:  from 192.168.1.5 lookup wan1
32766:  from all lookup main
32767:  from all lookup default

But the problem here when I use ping –I 192.168.1.5 www.google.com The ping it goes to the second interface, If the second interface is down its stick there.. What to do to fix this issue

3
  • Is ping –I 192.168.2.5 a typo? Mar 4, 2013 at 1:50
  • Yes its type mistake Ping –I 192.168.1.5 www.google.com
    – hadi
    Mar 4, 2013 at 18:47
  • The problem is solved. resolv.conf was pointing to second interface dns ip. That’s why packets travels to second interface .
    – hadi
    Mar 4, 2013 at 21:15

1 Answer 1

0

The problem is solved. resolv.conf was pointing to second interface dns ip. That’s why packets travels to second interface .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .