問題
次の経路表を持つルーターが10.10.10.3へ送る。採用する最長一致経路を作ったip routeコマンドはどれか。
S 10.0.0.0/8 is directly connected, GigabitEthernet0/0
C 10.1.1.0/24 is directly connected, GigabitEthernet0/0
L 10.1.1.1/32 is directly connected, GigabitEthernet0/0
S 10.10.0.0/22 is directly connected, GigabitEthernet0/0
S 10.10.10.0/28 is directly connected, GigabitEthernet0/0
S 10.10.10.1/32 is directly connected, GigabitEthernet0/0
S* 0.0.0.0/0 is directly connected, GigabitEthernet0/0
- A
ip route 10.10.0.0 255.255.252.0 g0/0 - B
ip route 10.10.10.0 255.255.255.240 g0/0 - C
ip route 10.0.0.0 255.0.0.0 g0/0 - D
ip route 10.10.10.1 255.255.255.255 g0/0
正解:B
理由
10.10.10.3に一致する最長の経路は10.10.10.0/28である。/28のマスクは255.255.255.240で、末尾0~15を含む。10.10.10.1/32は別のホスト、10.10.0.0/22は第3オクテット0~3なので一致しない。
選択肢ごとの説明
- A.
ip route 10.10.0.0 255.255.252.0 g0/0 10.10.0.0/22は第3オクテット0~3を含み、10.10.10.3には一致しない。
- B.
ip route 10.10.10.0 255.255.255.240 g0/0 10.10.10.0/28は末尾0~15を含み、.3に一致する候補の中で最も長いプレフィックスである。
- C.
ip route 10.0.0.0 255.0.0.0 g0/0 10.0.0.0/8にも一致するが、宛先に一致する/28の方を優先する。
- D.
ip route 10.10.10.1 255.255.255.255 g0/0 10.10.10.1/32は.1だけのホスト経路で、.3には一致しない。