GNS3+IOSでMPLS(2/2)
目的
(1/2)の続き、下記トポロジで経路の見え方とbgp update packetやicmpパケットを確認することで理解を深める。
pe1における経路の見え方
address-family ipv4 unicast
pe1#show bgp ipv4 unicast sum
BGP router identifier 1.1.1.1, local AS number 64512
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 64512 30 30 1 0 0 00:25:34 0
3.3.3.3 4 64512 8 6 1 0 0 00:04:24 0
pe1#
address-family ipv4 unicastでは経路交換をしていないため、
bgp tableは空っぽ
address-family vpnv4 unicast
pe1#show bgp vpnv4 unicast all
BGP table version is 55, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 64512:10 (default for vrf cust1) VRF Router ID 11.11.11.11
*> 10.0.1.0/31 0.0.0.0 0 32768 ?
*>i 10.0.1.2/31 4.4.4.4 0 100 0 ?
*> 11.11.11.11/32 0.0.0.0 0 32768 ?
*>i 14.14.14.14/32 4.4.4.4 0 100 0 ?
*> 192.168.0.1/32 10.0.1.1 1001 32768 ?
*>i 192.168.0.2/32 4.4.4.4 1001 100 0 ?
Route Distinguisher: 64512:20 (default for vrf cust2) VRF Router ID 21.21.21.21
*> 10.0.1.0/31 0.0.0.0 0 32768 ?
*>i 10.0.1.2/31 4.4.4.4 0 100 0 ?
*> 21.21.21.21/32 0.0.0.0 0 32768 ?
*>i 24.24.24.24/32 4.4.4.4 0 100 0 ?
*> 192.168.1.1/32 10.0.1.1 1001 32768 ?
*>i 192.168.1.2/32 4.4.4.4 1001 100 0 ?
pe1#
pe1#show bgp vpnv4 unicast all sum
BGP router identifier 1.1.1.1, local AS number 64512
BGP table version is 55, main routing table version 55
12 network entries using 1872 bytes of memory
12 path entries using 960 bytes of memory
8/8 BGP path/bestpath attribute entries using 1152 bytes of memory
4 BGP extended community entries using 160 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 4144 total bytes of memory
BGP activity 12/0 prefixes, 24/12 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
4.4.4.4 4 64512 9 9 55 0 0 00:01:24 6
pe1#
pe1#show bgp vpnv4 unicast all 192.168.0.2/32
BGP routing table entry for 64512:10:192.168.0.2/32, version 16
Paths: (1 available, best #1, table cust1)
Not advertised to any peer
Refresh Epoch 1
Local
4.4.4.4 (metric 201) from 4.4.4.4 (4.4.4.4)
Origin incomplete, metric 1001, localpref 100, valid, internal, best
Extended Community: RT:64512:10 OSPF DOMAIN ID:0x0005:0x0000000B0200
OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:14.14.14.14:0
mpls labels in/out nolabel/24
rx pathid: 0, tx pathid: 0x0
pe1#
pe1#show bgp vpnv4 unicast all 192.168.1.2/32
BGP routing table entry for 64512:20:192.168.1.2/32, version 19
Paths: (1 available, best #1, table cust2)
Not advertised to any peer
Refresh Epoch 1
Local
4.4.4.4 (metric 201) from 4.4.4.4 (4.4.4.4)
Origin incomplete, metric 1001, localpref 100, valid, internal, best
Extended Community: RT:64512:20 OSPF DOMAIN ID:0x0005:0x0000000C0200
OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:24.24.24.24:0
mpls labels in/out nolabel/27
rx pathid: 0, tx pathid: 0x0
pe1#
vrf cust1でcust1-ce1とcust1-ce2の経路が見えている
vrf cust2でcust2-ce1とcust2-ce2の経路が見えている
ラベルの見え方
pe1のラベル
pe1#show mpls ldp bindings
lib entry: 1.1.1.1/32, rev 6
local binding: label: imp-null
remote binding: lsr: 3.3.3.3:0, label: 16
remote binding: lsr: 2.2.2.2:0, label: 17
lib entry: 2.2.2.2/32, rev 14
local binding: label: 24
remote binding: lsr: 3.3.3.3:0, label: 18
remote binding: lsr: 2.2.2.2:0, label: imp-null
lib entry: 3.3.3.3/32, rev 8
local binding: label: 16
remote binding: lsr: 3.3.3.3:0, label: imp-null
remote binding: lsr: 2.2.2.2:0, label: 16
lib entry: 4.4.4.4/32, rev 18
local binding: label: 27
remote binding: lsr: 3.3.3.3:0, label: 20
remote binding: lsr: 2.2.2.2:0, label: 20
lib entry: 10.0.0.0/31, rev 2
local binding: label: imp-null
remote binding: lsr: 3.3.3.3:0, label: 17
remote binding: lsr: 2.2.2.2:0, label: imp-null
lib entry: 10.0.0.2/31, rev 4
local binding: label: imp-null
remote binding: lsr: 3.3.3.3:0, label: imp-null
remote binding: lsr: 2.2.2.2:0, label: 19
lib entry: 10.0.0.4/31, rev 12
local binding: label: 18
remote binding: lsr: 3.3.3.3:0, label: imp-null
remote binding: lsr: 2.2.2.2:0, label: imp-null
lib entry: 10.0.0.6/31, rev 16
local binding: label: 25
remote binding: lsr: 3.3.3.3:0, label: 19
remote binding: lsr: 2.2.2.2:0, label: imp-null
lib entry: 10.0.0.8/31, rev 10
local binding: label: 17
remote binding: lsr: 3.3.3.3:0, label: imp-null
remote binding: lsr: 2.2.2.2:0, label: 18
pe1#
pe1#show mpls ip binding
1.1.1.1/32
in label: imp-null
out label: 16 lsr: 3.3.3.3:0
out label: 17 lsr: 2.2.2.2:0
2.2.2.2/32
in label: 24
out label: 18 lsr: 3.3.3.3:0
out label: imp-null lsr: 2.2.2.2:0
3.3.3.3/32
in label: 16
out label: imp-null lsr: 3.3.3.3:0
out label: 16 lsr: 2.2.2.2:0
4.4.4.4/32
in label: 27
out label: 20 lsr: 3.3.3.3:0
out label: 20 lsr: 2.2.2.2:0
10.0.0.0/31
in label: imp-null
out label: 17 lsr: 3.3.3.3:0
out label: imp-null lsr: 2.2.2.2:0
10.0.0.2/31
in label: imp-null
out label: imp-null lsr: 3.3.3.3:0
out label: 19 lsr: 2.2.2.2:0
10.0.0.4/31
in label: 18
out label: imp-null lsr: 3.3.3.3:0
out label: imp-null lsr: 2.2.2.2:0
10.0.0.6/31
in label: 25
out label: 19 lsr: 3.3.3.3:0
out label: imp-null lsr: 2.2.2.2:0
10.0.0.8/31
in label: 17
out label: imp-null lsr: 3.3.3.3:0
out label: 18 lsr: 2.2.2.2:0
pe1#
pe1#show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
16 16 4.4.4.4/32 0 Et1/2 10.0.0.1
16 4.4.4.4/32 0 Et1/3 10.0.0.3
17 Pop Label 3.3.3.3/32 0 Et1/3 10.0.0.3
18 Pop Label 2.2.2.2/32 1289 Et1/2 10.0.0.1
19 Pop Label 10.0.0.8/31 0 Et1/3 10.0.0.3
20 Pop Label 10.0.0.6/31 0 Et1/2 10.0.0.1
21 Pop Label 10.0.0.4/31 0 Et1/2 10.0.0.1
Pop Label 10.0.0.4/31 0 Et1/3 10.0.0.3
22 No Label 10.0.1.0/31[V] 0 aggregate/cust1
23 Pop Label 11.11.11.11/32[V] \
0 aggregate/cust1
24 No Label 192.168.0.1/32[V] \
0 Et1/0 10.0.1.1
25 No Label 10.0.1.0/31[V] 0 aggregate/cust2
26 Pop Label 21.21.21.21/32[V] \
0 aggregate/cust2
27 No Label 192.168.1.1/32[V] \
0 Et1/1 10.0.1.1
pe1#
Local Label:このルータによって割り当てられたラベル。
Outgoing Label:ネクスト ホップまたはダウンストリーム ピアによって割り当てられたラベル。
No Labele:ネクストホップからの宛先にラベルがない、もしくは、発信インタフェースでラベルスイッチがdisableになっている
Pop Label:ネクストホップが宛先に対してimplicit-nullラベルをアドバタイズしている
疎通確認結果
cust1_ce1 to cust1_ce2
cust1-ce1#ping 192.168.0.2 source 192.168.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds:
Packet sent with a source address of 192.168.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 76/88/112 ms
cust1-ce1#
cust1-ce1#traceroute 192.168.0.2 source 192.168.0.1
Type escape sequence to abort.
Tracing the route to 192.168.0.2
VRF info: (vrf in name/id, vrf out name/id)
1 10.0.1.0 32 msec 40 msec 36 msec
2 10.0.0.1 [MPLS: Labels 20/23 Exp 0] 96 msec 96 msec 72 msec
3 10.0.1.2 [MPLS: Label 23 Exp 0] 76 msec 76 msec 72 msec
4 10.0.1.3 92 msec 96 msec 128 msec
cust1-ce1#
pingの結果は問題なく見えるけど、tracerouteの結果が気持ち悪い。
terminalだけ見ると問題なく見えるのだけどキャプチャが謎。(この見え方、知っている人いたら教えてください)
cust2_ce1 to cust2_ce2
cust2-ce1#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 104/120/152 ms
cust2-ce1#
cust2-ce1#traceroute 192.168.1.2
Type escape sequence to abort.
Tracing the route to 192.168.1.2
VRF info: (vrf in name/id, vrf out name/id)
1 10.0.1.0 16 msec 40 msec 4 msec
2 10.0.0.1 [MPLS: Labels 16/28 Exp 0] 132 msec 132 msec 148 msec
3 10.0.1.2 [MPLS: Label 28 Exp 0] 184 msec 116 msec 56 msec
4 10.0.1.3 72 msec 80 msec 80 msec
cust2-ce1#
所感
古いIOSでもMPLSのPoCできるんですね。
MPLSだとNW重畳が簡単は確かにその通りだと思う。
EVPNもそうだったけどnext-hopがloになっちゃうからトラヒック偏ったりしないのかな?(ロードバランスの方法知りたい)
設定等間違っていた李考え方間違っているなどあればご指摘いただきたい。
おまけ
各ノード間のキャプチャデータ添付します。