「MPLS」カテゴリーアーカイブ

MPLS動作確認 -その3

MPLS動作確認 -その1
MPLS動作確認 -その2の続きになります。

検証構成

検証構成図の再掲になります。

検証Config

次は、CE1〜4になります。CEはシンプルにダイナミックルーティングは使用せず、デフォルトルートをPE側へ向けます。
※CE2〜4は割愛します。

CE1

!
 hostname CE1
 !
 !
 ip cef
 no ip domain lookup
 !
 !
 !
 !
 interface Ethernet0/0
  ip address 192.168.11.2 255.255.255.0
  full-duplex
 !
 interface Ethernet0/1
  ip address 10.1.0.1 255.255.255.0
  full-duplex
 !
 ip route 0.0.0.0 0.0.0.0 192.168.11.1
 !
 end

動作確認

通信経路

PC1 → PC2

PC-1> trace 10.2.0.2 -P 1
trace to 10.2.0.2, 8 hops max (ICMP), press Ctrl+C to stop 
1   10.1.0.1   11.507 ms  10.435 ms  10.765 ms 
2   192.168.11.1   35.814 ms  35.878 ms  24.181 ms 
3   192.168.10.1   93.991 ms  82.439 ms  82.754 ms 
4   192.168.21.1   59.543 ms  60.866 ms  58.575 ms 
5   192.168.21.2   67.757 ms  59.118 ms  59.308 ms 
6   10.2.0.2   84.460 ms  83.894 ms  82.217 ms
PC-1>

PC1 → PC3

PC-1> trace 10.3.0.2 -P 1
trace to 10.3.0.2, 8 hops max (ICMP), press Ctrl+C to stop
1 10.1.0.1 3.842 ms 10.781 ms 10.784 ms
2 192.168.11.1 35.729 ms 36.209 ms 34.284 ms
3 192.168.10.1 84.415 ms 82.378 ms 83.020 ms
4 192.168.31.1 71.119 ms 71.119 ms 72.369 ms
5 192.168.31.2 96.459 ms 82.162 ms 83.328 ms
6 10.3.0.2 115.419 ms 94.301 ms 95.545 ms
PC-1>

PC1 → PC4

PC-1> trace 10.4.0.2 -P 1
trace to 10.4.0.2, 8 hops max (ICMP), press Ctrl+C to stop
1 10.1.0.1 5.866 ms 11.687 ms 11.400 ms
2 192.168.11.1 23.240 ms 22.646 ms 23.591 ms
3 192.168.10.1 83.220 ms 81.246 ms 71.446 ms
4 192.168.41.1 46.893 ms 46.428 ms 47.173 ms
5 192.168.41.2 80.428 ms 81.728 ms 80.432 ms
6 10.4.0.2 113.855 ms 94.998 ms 94.598 ms
PC-1>

※”-P 1″ は、プロトコルとしてICMPを指定するためのオプションになります。

ルーティングテーブル

CE1

CE1#sh ip route
Codes: 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
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
o – ODR, P – periodic downloaded static route
Gateway of last resort is 192.168.11.1 to network 0.0.0.0
C 192.168.11.0/24 is directly connected, Ethernet0/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.0.0 is directly connected, Ethernet0/1
S* 0.0.0.0/0 [1/0] via 192.168.11.1
CE1#

PE1

PE1#sh ip route
Codes: 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
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
o – ODR, P – periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 4 subnets
C 1.1.1.1 is directly connected, Loopback0
O 1.1.1.3 [110/21] via 192.168.10.1, 00:26:31, Ethernet0/0
O 1.1.1.2 [110/21] via 192.168.10.1, 00:26:31, Ethernet0/0
O 1.1.1.4 [110/21] via 192.168.10.1, 00:26:31, Ethernet0/0
O 192.168.30.0/24 [110/20] via 192.168.10.1, 00:26:31, Ethernet0/0
C 192.168.10.0/24 is directly connected, Ethernet0/0
O 192.168.40.0/24 [110/20] via 192.168.10.1, 00:26:31, Ethernet0/0
O 192.168.20.0/24 [110/20] via 192.168.10.1, 00:26:32, Ethernet0/0
PE1#

PE1#sh ip route vrf CUST
Routing Table: CUST
Codes: 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
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
o – ODR, P – periodic downloaded static route
Gateway of last resort is not set
C 192.168.11.0/24 is directly connected, Ethernet0/1
10.0.0.0/24 is subnetted, 4 subnets
B 10.2.0.0 [200/0] via 1.1.1.2, 13:52:30
B 10.3.0.0 [200/0] via 1.1.1.3, 00:30:50
S 10.1.0.0 [1/0] via 192.168.11.2
B 10.4.0.0 [200/0] via 1.1.1.4, 00:26:34
PE1#

P1

P1#sh ip route
Codes: 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
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
o – ODR, P – periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 4 subnets
O 1.1.1.1 [110/11] via 192.168.10.2, 00:32:36, Ethernet0/0
O 1.1.1.3 [110/11] via 192.168.30.2, 00:32:36, Ethernet0/2
O 1.1.1.2 [110/11] via 192.168.20.2, 00:32:36, Ethernet0/1
O 1.1.1.4 [110/11] via 192.168.40.2, 00:32:36, Ethernet0/3
C 192.168.30.0/24 is directly connected, Ethernet0/2
C 192.168.10.0/24 is directly connected, Ethernet0/0
C 192.168.40.0/24 is directly connected, Ethernet0/3
C 192.168.20.0/24 is directly connected, Ethernet0/1
P1#

PE1、P1のグローバルルーティングテーブルには、BGPネイバー確立用の経路情報だけがインストールされ、VRF CUSTの経路情報は混在していないことが確認できます。

←MPLS動作確認 -その2

MPLS動作確認 -その2

MPLS動作確認 -その1の続きになります。

検証構成

検証構成図の再掲になります。

検証Config

PE3

!
 hostname PE3
 !
 ip cef
 no ip domain lookup
 !
 !
 ip vrf CUST
  rd 1:10
  route-target export 10:10
  route-target import 10:10
 !
 !
 !
 !
 interface Loopback0
  ip address 1.1.1.3 255.255.255.255
  ip ospf network point-to-point
 !
 interface Ethernet0/0
  ip address 192.168.30.2 255.255.255.0
  full-duplex
  mpls ip
 !
 interface Ethernet0/1
  ip vrf forwarding CUST
  ip address 192.168.31.1 255.255.255.0
  full-duplex
 !
 router ospf 10
  log-adjacency-changes
  network 1.1.1.3 0.0.0.0 area 0
  network 192.168.30.2 0.0.0.0 area 0
 !
 router bgp 65100
  no bgp default ipv4-unicast
  bgp log-neighbor-changes
  neighbor 1.1.1.1 remote-as 65100
  neighbor 1.1.1.1 update-source Loopback0
  neighbor 1.1.1.2 remote-as 65100
  neighbor 1.1.1.2 update-source Loopback0
  neighbor 1.1.1.4 remote-as 65100
  neighbor 1.1.1.4 update-source Loopback0
  !
  address-family vpnv4
   neighbor 1.1.1.1 activate
   neighbor 1.1.1.1 send-community both
   neighbor 1.1.1.2 activate
   neighbor 1.1.1.2 send-community both
   neighbor 1.1.1.4 activate
   neighbor 1.1.1.4 send-community both
  exit-address-family
  !
  address-family ipv4 vrf CUST
   redistribute static
   no synchronization
  exit-address-family
 !
 ip route vrf CUST 10.3.0.0 255.255.255.0 192.168.31.2
 !
 !
 !
 !
 mpls ldp router-id Loopback0
 !
 end

PE4

!
 hostname PE4
 !
 ip cef
 no ip domain lookup
 !
 !
 ip vrf CUST
  rd 1:10
  route-target export 10:10
  route-target import 10:10
 !
 !
 !
 !
 interface Loopback0
  ip address 1.1.1.4 255.255.255.255
  ip ospf network point-to-point
 !
 interface Ethernet0/0
  ip address 192.168.40.2 255.255.255.0
  full-duplex
  mpls ip
 !
 interface Ethernet0/1
  ip vrf forwarding CUST
  ip address 192.168.41.1 255.255.255.0
  full-duplex
 !
 router ospf 10
  log-adjacency-changes
  network 1.1.1.4 0.0.0.0 area 0
  network 192.168.40.2 0.0.0.0 area 0
 !
 router bgp 65100
  no bgp default ipv4-unicast
  bgp log-neighbor-changes
  neighbor 1.1.1.1 remote-as 65100
  neighbor 1.1.1.1 update-source Loopback0
  neighbor 1.1.1.2 remote-as 65100
  neighbor 1.1.1.2 update-source Loopback0
  neighbor 1.1.1.3 remote-as 65100
  neighbor 1.1.1.3 update-source Loopback0
  !
  address-family vpnv4
   neighbor 1.1.1.1 activate
   neighbor 1.1.1.1 send-community both
   neighbor 1.1.1.2 activate
   neighbor 1.1.1.2 send-community both
   neighbor 1.1.1.3 activate
   neighbor 1.1.1.3 send-community both
  exit-address-family
  !
  address-family ipv4 vrf CUST
   redistribute static
   no synchronization
  exit-address-family
 !
 ip route vrf CUST 10.4.0.0 255.255.255.0 192.168.41.2
 !
 !
 !
 !
 mpls ldp router-id Loopback0
 !
 end

P1

!
 hostname P1
 !
 ip cef
 no ip domain lookup
 !
 !
 !
 !
 interface Ethernet0/0
  ip address 192.168.10.1 255.255.255.0
  full-duplex
  mpls ip
 !
 interface Ethernet0/1
  ip address 192.168.20.1 255.255.255.0
  full-duplex
  mpls ip
 !
 interface Ethernet0/2
  ip address 192.168.30.1 255.255.255.0
  full-duplex
  mpls ip
 !
 interface Ethernet0/3
  ip address 192.168.40.1 255.255.255.0
  full-duplex
  mpls ip
 !
 router ospf 10
  log-adjacency-changes
  network 192.168.10.1 0.0.0.0 area 0
  network 192.168.20.1 0.0.0.0 area 0
  network 192.168.30.1 0.0.0.0 area 0
  network 192.168.40.1 0.0.0.0 area 0
 !
 !
 !
 !
 mpls ldp router-id Loopback0
 !
 end

MPLS動作確認 -その3に続きます。

MPLS動作確認 -その1

業務でMPLS網を使用したNW構築案件にアサインされましたが、「MPLSって何?」状態のため、復習も含めた動作確認検証になります。

検証目的

本検証の目的を以下に記載します。

  • MPLS網を作成すること
  • 拠点数を4とし、MPLS網に接続すること
  • 拠点を網へ接続する際は、Staticを使用すること
  • 拠点間で双方向で通信が可能なこと

検証構成

本検証における構成図を以下に記載します。

検証Config

まずは、PE1〜4のConfigからです。PEではユーザVRFとして”CUST”を設定し、仮にMPLS網に他ユーザが接続されたとしても、ユーザ間でルーティング情報が混在しないようにします。

また、各拠点間で双方向の通信を実現するために、PE間でMP-BGPによる経路交換を実施します。MP-BGPでは、Loopbackインタフェースを送信元としてBGPネイバーを確立し、各ネイバーでVPNv4プレフィックスを交換可能にするため、send-community bothを設定します。

なお、BGPネイバーを確立する際は、IP疎通性があることが前提のため、OSPFを使用しLoopbackインタフェースのセグメント情報を交換します。

ちなみに、PE側では拠点内セグメントに対し、ネクストホップをCEとしたStatic Routeを設定します。

PE1

!
 hostname PE1
 !
 ip cef
 no ip domain lookup
 !
 !
 ip vrf CUST
  rd 1:10
  route-target export 10:10
  route-target import 10:10
 !
 !
 !
 !
 interface Loopback0
  ip address 1.1.1.1 255.255.255.255
  ip ospf network point-to-point
 !
 interface Ethernet0/0
  ip address 192.168.10.2 255.255.255.0
  full-duplex
  mpls ip
 !
 interface Ethernet0/1
  ip vrf forwarding CUST
  ip address 192.168.11.1 255.255.255.0
  full-duplex
 !
 router ospf 10
  log-adjacency-changes
  network 1.1.1.1 0.0.0.0 area 0
  network 192.168.10.2 0.0.0.0 area 0
 !
 router bgp 65100
  no bgp default ipv4-unicast
  bgp log-neighbor-changes
  neighbor 1.1.1.2 remote-as 65100
  neighbor 1.1.1.2 update-source Loopback0
  neighbor 1.1.1.3 remote-as 65100
  neighbor 1.1.1.3 update-source Loopback0
  neighbor 1.1.1.4 remote-as 65100
  neighbor 1.1.1.4 update-source Loopback0
  !
  address-family vpnv4
   neighbor 1.1.1.2 activate
   neighbor 1.1.1.2 send-community both
   neighbor 1.1.1.3 activate
   neighbor 1.1.1.3 send-community both
   neighbor 1.1.1.4 activate
   neighbor 1.1.1.4 send-community both
  exit-address-family
  !
  address-family ipv4 vrf CUST
   redistribute static
   no synchronization
  exit-address-family
 !
 ip route vrf CUST 10.1.0.0 255.255.255.0 192.168.11.2
 !
 !
 mpls ldp router-id Loopback0
 !
 end

PE2

!
 hostname PE2
 !
 ip cef
 no ip domain lookup
 !
 !
 ip vrf CUST
  rd 1:10
  route-target export 10:10
  route-target import 10:10
 !
 !
 !
 !
 interface Loopback0
  ip address 1.1.1.2 255.255.255.255
  ip ospf network point-to-point
 !
 interface Ethernet0/0
  ip address 192.168.20.2 255.255.255.0
  full-duplex
  mpls ip
 !
 interface Ethernet0/1
  ip vrf forwarding CUST
  ip address 192.168.21.1 255.255.255.0
  full-duplex
 !
 router ospf 10
  log-adjacency-changes
  network 1.1.1.2 0.0.0.0 area 0
  network 192.168.20.2 0.0.0.0 area 0
 !
 router bgp 65100
  no bgp default ipv4-unicast
  bgp log-neighbor-changes
  neighbor 1.1.1.1 remote-as 65100
  neighbor 1.1.1.1 update-source Loopback0
  neighbor 1.1.1.3 remote-as 65100
  neighbor 1.1.1.3 update-source Loopback0
  neighbor 1.1.1.4 remote-as 65100
  neighbor 1.1.1.4 update-source Loopback0
  !
  address-family vpnv4
   neighbor 1.1.1.1 activate
   neighbor 1.1.1.1 send-community both
   neighbor 1.1.1.3 activate
   neighbor 1.1.1.3 send-community both
   neighbor 1.1.1.4 activate
   neighbor 1.1.1.4 send-community both
  exit-address-family
  !
  address-family ipv4 vrf CUST
   redistribute static
   no synchronization
  exit-address-family
 !
 ip route vrf CUST 10.2.0.0 255.255.255.0 192.168.21.2
 !
 !
 !
 !
 mpls ldp router-id Loopback0
 !
 end

MPLS動作確認 -その2に続きます。