バージョン: 1.5.3
オンラインユーザー数: 20
閲覧数表示 本日/トータル: 1 / 1504
最終更新:2014-12-04 (木) 01:18:07
┌───┐ ┌───┐ ┌───┐ ┌───┐ │ R1 ├──┤ R2 ├──┤ R3 ├───┤ R4 │ └───┘ └───┘ └───┘ └───┘
R1 Fe0/0:10.11.11.1/24 R1 Fe0/1:10.10.10.1/24 R2 Fe0/0:10.10.10.254/24 R2 Fe0/1:10.1.1.1/30 R3 Fe0/0:10.1.1.2/30 R3 Fe0/1:10.2.2.254/24 R4 Fe0/0:10.2.2.1/24
R2(config)# route-map RT2-MAP 10 R2(config-route-map)#match ip address 1 R2(config-route-map)# set ip next-hop 10.1.1.2 R2(config-route-map)#match ip address 2 R2(config)# route-map RT2-MAP 20 R2(config-route-map)# set ip next-hop 10.3.3.2 R2(config)# route-map RT2-MAP 30 R2(config-route-map)#set default interface null 0 R2(config)# access-list 1 permit 10.10.10.0 0.0.0.255 R2(config)# access-list 2 permit 10.11.11.0 0.0.0.255 R2(config)#interface FastEthernet0/0 R2(config-if)#ip policy route-map RT2-MAP
※複数分岐用に書いたがRTのポート不足により結果例は10のみの設定例 ※R3は普通にStaticを用意してR2に返す事とする ※NULL0は破棄
R2#show ip route Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 10.10.10.0/24 is directly connected, FastEthernet0/0 C 10.1.1.0/30 is directly connected, FastEthernet0/1
R2#show ip policy Interface Route map Fa0/0 RT2-MAP
R1#ping 10.2.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.2.2.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
R2#debug ip policy *Mar 1 15:49:29.935: IP: s=10.10.10.1 (FastEthernet0/0), d=10.2.2.1, len 100, FIB policy match *Mar 1 15:49:29.935: IP: s=10.10.10.1 (FastEthernet0/0), d=10.2.2.1, g=10.1.1.2, len 100, FIB policy routed *Mar 1 15:49:29.939: IP: s=10.10.10.1 (FastEthernet0/0), d=10.2.2.1, len 100, FIB policy match
R2#show route-map route-map RT2-MAP, permit, sequence 10 Match clauses: ip address (access-lists): 1 Set clauses: ip next-hop 10.1.1.2 Policy routing matches: 25 packets, 2850 bytes ↑合致した数 ↑送ったサイズ R2#show access-lists Standard IP access list 1 10 permit 10.10.10.0, wildcard bits 0.0.0.255 (95 matches)←95一致