PBR例
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[CISCO入門]]
#setlinebreak(on)
バージョン: &Version; &br;
オンラインユーザー数: &online;
閲覧数表示 本日/トータル: &counter(today); / &counter(to...
最終更新:&lastmod();&br;
*PBRのサンプル例 [#n6602cd6]
...
┌───┐ ┌───┐ ┌───┐ ┌───┐
│ 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
**PBR用ルートマップ作成 [#u97bbd1c]
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
R2(config)#ip local policy route-map R2-MAP
※複数分岐用に書いたがRTのポート不足により結果例は10のみ...
※R3は普通にStaticを用意してR2に返す事とする
※NULL0は破棄
※ip local policyはルータ自身にもPBRを適応する
**設定後のshow例 [#if16b97c]
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, FastEtherne...
C 10.1.1.0/30 is directly connected, FastEthernet0/1
R2#show ip policy
Interface Route map
Fa0/0 RT2-MAP
↑有効IF ↑適用MAP名
**pingとDebug結果例 [#v50c3015]
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...
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/ma...
R2#debug ip policy
*Mar 1 15:49:29.935: IP: s=10.10.10.1 (FastEthernet0/0)...
*Mar 1 15:49:29.935: IP: s=10.10.10.1 (FastEthernet0/0)...
*Mar 1 15:49:29.939: IP: s=10.10.10.1 (FastEthernet0/0)...
**実行後のshowコマンド確認 [#y688c0df]
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 ma...
終了行:
[[CISCO入門]]
#setlinebreak(on)
バージョン: &Version; &br;
オンラインユーザー数: &online;
閲覧数表示 本日/トータル: &counter(today); / &counter(to...
最終更新:&lastmod();&br;
*PBRのサンプル例 [#n6602cd6]
...
┌───┐ ┌───┐ ┌───┐ ┌───┐
│ 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
**PBR用ルートマップ作成 [#u97bbd1c]
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
R2(config)#ip local policy route-map R2-MAP
※複数分岐用に書いたがRTのポート不足により結果例は10のみ...
※R3は普通にStaticを用意してR2に返す事とする
※NULL0は破棄
※ip local policyはルータ自身にもPBRを適応する
**設定後のshow例 [#if16b97c]
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, FastEtherne...
C 10.1.1.0/30 is directly connected, FastEthernet0/1
R2#show ip policy
Interface Route map
Fa0/0 RT2-MAP
↑有効IF ↑適用MAP名
**pingとDebug結果例 [#v50c3015]
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...
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/ma...
R2#debug ip policy
*Mar 1 15:49:29.935: IP: s=10.10.10.1 (FastEthernet0/0)...
*Mar 1 15:49:29.935: IP: s=10.10.10.1 (FastEthernet0/0)...
*Mar 1 15:49:29.939: IP: s=10.10.10.1 (FastEthernet0/0)...
**実行後のshowコマンド確認 [#y688c0df]
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 ma...
ページ名: