净——策略路由

净——

1。


AXYTOSAXY IP


思科(Cisco IOS) 11.0 linux2.1



2。linux


2.1多个路由表)



2.2(规则)


192.16.152.24IP101500

25332767


3

SELECTORfilter行动



3。linux



linuxrouteiproute2


Linux2553

255名当地tableNAT

254年主要tableroute

253默认表

0


用法:ip路由listSELECTOR



# ip规则列表

0:从所有查找当地的

32766:从所有主要查找

32767:从所有查找默认


0 local254

32766

主要32766默认


032766; 32767年




4。


Source-Sensitive路由ADSL


的服务质量IP



负载共享



5。linux



192.168.122.10/24

Client --------------->


Linux GW eth0 192.168.122.20/24----------------- eth2 2.2.2.1/24 10M

------------------ eth3 3.3.3.1/24 2M


Client:

# ip route add 0/0 via 192.168.122.20


Linux GW:


2test1test2

# vim/etc/iproute2/rt_tables

255 local

254 main

253 default

200 test2

100 test1

0 unspec


# ip route add default via 2.2.2.1 tabletest1

# ip route add default via 3.3.3.1 tabletest2

# ip route list table test1

default via 2.2.2.1 dev eth2

# ip route list table test2

default via 3.3.3.1 dev eth2


mangle

# iptables -t mangle -A PREROUTING -miprange --src-range 192.168.122.1-192.168.122.100 -j MARK --set-mark 1

# iptables -t mangle -A PREROUTING -miprange --src-range 192.168.122.101-192.168.122.200 -j MARK --set-mark 2


ip

# ip rule add fwmark 1 table test1

# ip rule add fwmark 2 table test2





/

Client ---------------------------> Linux GW ------------------------- eth2 2.2.2.1/24 10M

192.168.122.10/24 eth0 192.168.122.254/24 ------------eth3 3.3.3.1/24 2M



Client:

# ip route add 0/0 via 1.1.1.2


Linux GW:

# ip route add default nexthop via 2.2.2.1dev eth2 nexthop via 3.3.3.1 dev eth3











净——策略路由