policy rule routing problem - help me
Hi all,
This is my current configuration on CentOS 4.4
[root@t106centos ~]# ip route list table 1
default via 192.168.1.9 dev eth1.501
[root@t106centos ~]# ip route list table 2
default via 192.168.1.17 dev eth1.500
[root@t106centos ~]# ip rule list
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
32900: from 192.168.1.14 lookup 1
32901: from 192.168.1.10 lookup 1
32902: from 192.168.1.18 lookup 1
32903: from 10.199.9.250 lookup 1
32904: from 172.16.255.1 lookup 1
32905: from 192.168.2.250 lookup 1
32910: from all lookup 2
[root@t106centos ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.1.16 0.0.0.0 255.255.255.248 U 0 0 0 eth1.500
192.168.1.8 0.0.0.0 255.255.255.248 U 0 0 0 eth1.501
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1.200
10.199.9.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1.109
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
172.16.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1.170
172.16.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1.171
172.16.255.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1.501
[root@t106centos ~]# ip addr list
1: lo: 127.0.0.1/8
2: eth1: 172.16.255.1/24
3: eth1.109: 10.199.9.250/24
4: eth1.170: 172.16.0.1/24
5: eth1.171: 172.16.1.1/24
6: eth1.200: 192.168.2.250/24
7: eth1.500: 192.168.1.18/29
8: eth1.501: 192.168.1.10/29
- Now the package from this host ( t106centos ) will match the rule 32910, get route from route table 2 , pass the gateway 192.168.1.17 for external destination
- How can we force the packages from this host ( t106centos ) go to external by passing the gateway 192.168.1.9 - get route from route table 1???
- Pls help me to solve this case. Tks so much
|