
conf t
!
hostname RT1
!
interface Loopback0
ip address 192.0.2.1 255.255.255.255
!
interface Ethernet0/0
ip address 10.1.1.1 255.255.255.0
no shutdown
!
interface Ethernet0/1
ip address 10.1.2.1 255.255.255.0
no shutdown
!
!
logging console
!
end
conf t
!
hostname RT2
!
interface Loopback0
ip address 192.0.2.2 255.255.255.255
!
interface Ethernet0/0
ip address 10.1.1.2 255.255.255.0
no shutdown
!
interface Ethernet0/1
ip address 10.1.2.2 255.255.255.0
no shutdown
!
logging console
!
end
ネットワーク機器が Routing table を参照して転送先を決定する際、宛先 IP address を含む経路情報が複数存在する場合があります。
この際、同じネットワークに対して出力インターフェースや next-hop が異なる経路情報※1 が複数存在する場合はそれらの経路がすべて転送に使用されます。
これは ECMP (Equal Cost Multi Path) と呼びます。
今回は本構成において ECMP を実現できるよう、RT1 と RT2 に static route を設定していきます。
RT1 と RT2 に以下のよう設定を追加します。
RT1(config)#ip route 192.0.2.2 255.255.255.255 Ethernet0/0 10.1.1.2
RT1(config)#ip route 192.0.2.2 255.255.255.255 Ethernet0/1 10.1.2.2
RT2(config)#ip route 192.0.2.1 255.255.255.255 Ethernet0/0 10.1.1.1
RT2(config)#ip route 192.0.2.1 255.255.255.255 Ethernet0/1 10.1.2.1
すると Routing table はそれぞれ以下となります。
RT1 は 192.0.2.2 に対して2つの出力 I/F と next-hop が登録されています。
RT1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Ethernet0/0
L 10.1.1.1/32 is directly connected, Ethernet0/0
C 10.1.2.0/24 is directly connected, Ethernet0/1
L 10.1.2.1/32 is directly connected, Ethernet0/1
192.0.2.0/32 is subnetted, 2 subnets
C 192.0.2.1 is directly connected, Loopback0
[[red:S 192.0.2.2 [1/0] via 10.1.2.2, Ethernet0/1]]
[[red: [1/0] via 10.1.1.2, Ethernet0/0]]
RT2 は 192.0.2.1 に対して2つの出力 I/F と next-hop が登録されています。
RT2#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
& - replicated local route overrides by connected
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Ethernet0/0
L 10.1.1.2/32 is directly connected, Ethernet0/0
C 10.1.2.0/24 is directly connected, Ethernet0/1
L 10.1.2.2/32 is directly connected, Ethernet0/1
192.0.2.0/32 is subnetted, 2 subnets
[[red:S 192.0.2.1 [1/0] via 10.1.2.1, Ethernet0/1]]
[[red: [1/0] via 10.1.1.1, Ethernet0/0]]
C 192.0.2.2 is directly connected, Loopback0
続いて動作確認を行います。
RT1 (192.0.2.1) から RT2 (192.0.2.2) に trace route を実行します。
すると、複数の next-hop に対して通信していることが確認できます。
RT1#traceroute 192.0.2.2 source 192.0.2.1
Type escape sequence to abort.
Tracing the route to 192.0.2.2
VRF info: (vrf in name/id, vrf out name/id)
1 10.1.2.2 1 msec
10.1.1.2 1 msec
10.1.2.2 1 msec
RT2 (192.0.2.2) から RT1 (192.0.2.1) に対しても同様です。
RT2#traceroute 192.0.2.1 source 192.0.2.2
Type escape sequence to abort.
Tracing the route to 192.0.2.1
VRF info: (vrf in name/id, vrf out name/id)
1 10.1.1.1 1 msec
10.1.2.1 1 msec
10.1.1.1 1 msec
ECMP はネットワークの冗長性を確保する上で一般的に使用されます。
どのように Routing table が構成され、どのように処理されるかを理解して Routing の理解度を深めていきましょう。
ログインすると、進捗を保存できます。
← ロードマップ に戻る