EVE-NG MPLS L3VPN 基本ネットワーキング

1 トポロジ

2 構成手順

2.1 MPLS ノードでのインターフェイス IP とルーティング プロトコルの構成

PE1

interface LoopBack 0
 ip address 1.1.1.9 32 
 quit

interface GigabitEthernet4/0
 ip address 172.1.1.1 24
 quit

ospf 1
 area 1
  network 1.1.1.9 0.0.0.0
  network 172.1.1.0 0.0.0.255
  quit
 quit

P

interface LoopBack 0
 ip address 2.2.2.9 32 
 quit
 
interface GigabitEthernet4/0
 ip address 172.1.1.2 24
 quit
 
interface GigabitEthernet5/0
 ip address 172.2.1.1 24
 quit
 
ospf 1
 area 1
  network 2.2.2.9 0.0.0.0
  network 172.1.1.0 0.0.0.255
  network 172.2.1.0 0.0.0.255
  quit
 quit

PE2

interface LoopBack 0
 ip address 3.3.3.9 32 
 quit
 

interface GigabitEthernet4/0
 ip address 172.2.1.2 24
 quit

ospf 1
 area 1
  network 3.3.3.9 0.0.0.0
  network 172.2.1.0 0.0.0.255
  quit
 quit

OSPF 学習ステータスの表示

2.2 MPLSLDPの設定

PE1

mpls lsr-id 1.1.1.9
mpls label advertise non-null
mpls ldp
 quit
 
interface GigabitEthernet4/0
 mpls enable
 mpls ldp enable
 quit

P

mpls lsr-id 2.2.2.9
mpls label advertise non-null
mpls ldp
 quit
 
interface GigabitEthernet4/0
 mpls enable
 mpls ldp enable
 quit
 
interface GigabitEthernet5/0
 mpls enable 
 mpls ldp enable
 quit

PE2

mpls lsr-id 3.3.3.9
mpls label advertise non-null
mpls ldp
 quit
 
interface GigabitEthernet4/0
 mpls enable
 mpls ldp enable
 quit

LDP LSP を表示する

2.3 PE デバイスでの VPN インスタンスの構成

PE1

ip vpn-instance vpn1
 route-distinguisher 100:1
 vpn-target 111:1
 quit

interface GigabitEthernet1/0
 ip binding vpn-instance vpn1
 ip address 10.1.1.2 24
 quit


ip vpn-instance vpn2
 route-distinguisher 100:2
 vpn-target 222:2
 quit

interface GigabitEthernet2/0
 ip binding vpn-instance vpn2
 ip address 10.2.1.2 24
 quit

PE2

ip vpn-instance vpn1
 route-distinguisher 200:1
 vpn-target 111:1
 quit

interface GigabitEthernet1/0
 ip binding vpn-instance vpn1
 ip address 10.3.1.2 24
 quit


ip vpn-instance vpn2
 route-distinguisher 200:2
 vpn-target 222:2
 quit

interface GigabitEthernet2/0
 ip binding vpn-instance vpn2
 ip address 10.4.1.2 24
 quit

 構成を表示する

2.4 PE と CE の間に EBGP ピアを確立し、VPN ルートを導入する

PE1

bgp 100
 ip vpn-instance vpn1
  peer 10.1.1.1 as-number 65410
  address-family ipv4 unicast
   peer 10.1.1.1 enable
   quit
 quit
 ip vpn-instance vpn2
  peer 10.2.1.1 as-number 65420
  address-family ipv4 unicast
   peer 10.2.1.1 enable
   quit
  quit
quit

CE1

interface GigabitEthernet1/0
 ip address 10.1.1.1 24
 quit

bgp 65410
 peer 10.1.1.2 as-number 100
 address-family ipv4 unicast
  peer 10.1.1.2 enable
  import-route direct
  quit
 quit

CE2

interface GigabitEthernet1/0
 ip address 10.2.1.1 24
 quit

bgp 65420
 peer 10.2.1.2 as-number 100
 address-family ipv4 unicast
  peer 10.2.1.2 enable
  import-route direct
  quit
 quit

BGPステータスを確認する

PE2

bgp 100
 ip vpn-instance vpn1
  peer 10.3.1.1 as-number 65430
  address-family ipv4 unicast
   peer 10.3.1.1 enable
   quit
 quit
 ip vpn-instance vpn2
  peer 10.4.1.1 as-number 65440
  address-family ipv4 unicast
   peer 10.4.1.1 enable
   quit
  quit
quit

CE3

interface GigabitEthernet1/0
 ip address 10.3.1.1 24
 quit

bgp 65430
 peer 10.3.1.2 as-number 100
 address-family ipv4 unicast
  peer 10.3.1.2 enable
  import-route direct
  quit
 quit

CE4

interface GigabitEthernet1/0
 ip address 10.4.1.1 24
 quit

bgp 65440
 peer 10.4.1.2 as-number 100
 address-family ipv4 unicast
  peer 10.4.1.2 enable
  import-route direct
  quit
 quit

BGPステータスを確認する

 2.5 PE 間の MP-IBGP ピアの確立

PE1

bgp 100
 peer 3.3.3.9 as-number 100
 peer 3.3.3.9 connect-interface loopback 0
 address-family vpnv4
  peer 3.3.3.9 enable
  quit
 quit

PE2

bgp 100
 peer 1.1.1.9 as-number 100
 peer 1.1.1.9 connect-interface loopback 0
 address-family vpnv4
  peer 1.1.1.9 enable
  quit
 quit

BGPステータスを確認する

 VPN1 ルーティング テーブルを表示する

 VPN2ルーティングテーブルを表示する

VPN ルートを表示するもう 1 つの方法は、BGP ルーター テーブルを表示することです。

 VPN ラベルを表示する

 2.6 検証

CE1 ping CE3

CE2 ping CE4 

 

おすすめ

転載: blog.csdn.net/wjmasd/article/details/132480451