問題
R1のGi0/1は192.168.130.0/24のLANへ接続している。Gi0/2は172.20.40.0/30でR2へ、Gi0/3は172.20.20.0/30でR3へ接続し、R1の各ポイントツーポイントリンクのアドレスはそれぞれ.2である。192.168.130.0/24を送信元とする通信をR2へ転送するPBRの設定はどれか。
- A
access-list 1 permit 192.168.130.0 0.0.0.255 ! interface Gi0/2 ip policy route-map test exit ! route-map test permit 10 match ip address 1 set ip next-hop 172.20.20.2 - B
access-list 1 permit 192.168.130.0 0.0.0.255 ! interface Gi0/1 ip policy route-map test exit ! route-map test permit 10 match ip address 1 set ip next-hop 172.20.40.2 - C
access-list 1 permit 192.168.130.0 0.0.0.255 ! interface Gi0/2 ip policy route-map test exit ! route-map test permit 10 match ip address 1 set ip next-hop 172.20.20.1 - D
access-list 1 permit 192.168.130.0 0.0.0.255 ! interface Gi0/1 ip policy route-map test exit ! route-map test permit 10 match ip address 1 set ip next-hop 172.20.40.1
正解:D
理由
PBRを適用するのは、対象の通信が入ってくるR1のGi0/1である。R2向けの次ホップは172.20.40.0/30の相手側172.20.40.1になる。R1自身の.2やR3向けリンクのアドレスは指定しない。
選択肢ごとの説明
- A.
access-list 1 permit 192.168.130.0 0.0.0.255 ! interface Gi0/2 ip policy route-map test exit ! route-map test permit 10 match ip address 1 set ip next-hop 172.20.20.2 対象通信の受信interfaceであるGi0/1へ適用していない。次ホップの172.20.20.2もR1自身のR3側アドレスである。
- B.
access-list 1 permit 192.168.130.0 0.0.0.255 ! interface Gi0/1 ip policy route-map test exit ! route-map test permit 10 match ip address 1 set ip next-hop 172.20.40.2 受信interfaceは正しいが、次ホップの172.20.40.2はR1自身のアドレスである。
- C.
access-list 1 permit 192.168.130.0 0.0.0.255 ! interface Gi0/2 ip policy route-map test exit ! route-map test permit 10 match ip address 1 set ip next-hop 172.20.20.1 受信interfaceがGi0/1ではなく、172.20.20.1はR3へ向かうリンクの相手である。
- D.
access-list 1 permit 192.168.130.0 0.0.0.255 ! interface Gi0/1 ip policy route-map test exit ! route-map test permit 10 match ip address 1 set ip next-hop 172.20.40.1 LAN側のGi0/1で対象送信元を選び、R2側の隣接アドレス172.20.40.1へ転送する。