Титла: Split Access проблем ! Публикувано от: hunt3r в Mar 06, 2005, 10:45 Здравейте имам един проблем със сплита на 2 провайдъра
зачи мойта обстановка е такава: # eth0 - local network ip 192.168.115.10, network 192.168.115.0/24 # eth1 - ISP1 network ip 192.168.1.2, network 192.168.1.0/24, getaway 192.168.1.1 # eth2 - ISP2 network ip 217.10.251.222, network 217.10.251.0/24, getaway 217.10.251.1 значи пускам скрипта както е от lartc.org #!/bin/bash route add 192.168.1.2 gw 192.168.1.1 dev eth1 ip route flush table T1 ip route flush table T2 ip route add 217.10.251.0/24 dev eth2 src 217.10.251.222 table T1 ip route add default via 217.10.251.1 table T1 ip route add 192.168.1.0/24 dev eth1 src 192.168.1.2 table T2 ip route add default via 192.168.1.1 table T2 ip route add 217.10.251.0/24 dev eth2 src 217.10.251.222 ip route add 192.168.1.0/24 dev eth1 src 192.168.1.2 ip route add default via 217.10.251.1 #Refreshing ip rules ip rule del from 217.10.251.222 table T1 ip rule del from 192.168.1.2 table T2 ip rule del from 192.168.1.2 table T2 ip rule add from 217.10.251.222 table T1 ip rule add from 192.168.1.2 table T2 ip route add 192.168.115.0/24 dev eth0 table T1 ip route add 192.168.1.0/24 dev eth1 table T1 ip route add 127.0.0.0/8 dev lo table T1 ip route add 192.168.115.0/24 dev eth0 table T2 ip route add 217.10.251.0/24 dev eth2 table T2 ip route add 127.0.0.0/8 dev lo table T2 и в таблиците са ми ето така: root@ns:~# ip route show table main 192.168.1.2 via 192.168.1.1 dev eth1 217.10.251.0/24 dev eth2 proto kernel scope link src 217.10.251.222 192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.2 192.168.115.0/24 dev eth0 proto kernel scope link src 192.168.115.10 127.0.0.0/8 dev lo scope link default via 217.10.251.1 dev eth2 root@ns:~# root@ns:~# ip route show table T1 217.10.251.0/24 dev eth2 scope link src 217.10.251.222 192.168.1.0/24 dev eth1 scope link 192.168.115.0/24 dev eth0 scope link 127.0.0.0/8 dev lo scope link default via 217.10.251.1 dev eth2 root@ns:~# root@ns:~# ip route show table T2 217.10.251.0/24 dev eth2 scope link 192.168.1.0/24 dev eth1 scope link src 192.168.1.2 192.168.115.0/24 dev eth0 scope link 127.0.0.0/8 dev lo scope link default via 192.168.1.1 dev eth1 root@ns:~# и в такъв случай вижте какво ми се получава ping -I eth1 www.abv.bg PING www.abv.bg (194.153.145.77) from 192.168.1.2 eth1: 56(84) bytes of data. From 192 (192.168.1.2) icmp_seq=1 Destination Host Unreachable From 192 (192.168.1.2) icmp_seq=2 Destination Host Unreachable From 192 (192.168.1.2) icmp_seq=3 Destination Host Unreachable ping -I eth2 www.abv.bg PING www.abv.bg (194.153.145.77) from 217.10.251.222 eth2: 56(84) bytes of data. From 217 (217.10.251.222) icmp_seq=1 Destination Host Unreachable From 217 (217.10.251.222) icmp_seq=2 Destination Host Unreachable From 217 (217.10.251.222) icmp_seq=3 Destination Host Unreachable |