MPLS OPTION A

Scenario description:
as 100 and as 300 simulate the autonomous domain systems of two companies. Now due to business cooperation requirements, the two companies need to build mpls *** to achieve mutual access to private networks, as 567 and as 8910 simulate ISPs, requiring ar1 lo0 port 172.16 .1.1 and ar3 lo0 port 172.16.3.3 communication. (Ar2 and ar4 have the same requirements)

The network segments and addresses of each broadcast domain are shown in the figure. The lo0 address of the isp router is numbered by a serial number. For example, the address of R5 lo0 is 5.5.5.5/32, and the same is true for R6-R10; the addresses of R1-R4 lo0 are 172.16.1.1/32 and 172.16 respectively. 2.2/32, 172.16.3.3/32, 172.16.4.4/32.
MPLS OPTION A

MPLS OPTION A

1. ISP internal igp intercommunication
1.1. Configure all device ip addresses, as shown in the figure (specific steps are omitted)
1.2. Establish ospf neighbors in ISP and declare loopback interface

R5:
ospf 1 router-id 5.5.5.5 
 area 0.0.0.0 
  network 5.5.5.5 0.0.0.0 
  network 56.1.1.5 0.0.0.0 

R6:
ospf 1 router-id 6.6.6.6 
 area 0.0.0.0 
  network 6.6.6.6 0.0.0.0 
  network 56.1.1.6 0.0.0.0 
  network 67.1.1.6 0.0.0.0 

R7:
ospf 1 router-id 7.7.7.7 
 area 0.0.0.0 
  network 7.7.7.7 0.0.0.0 
  network 67.1.1.7 0.0.0.0 

R8:
ospf 1 router-id 8.8.8.8 
 area 0.0.0.0 
  network 8.8.8.8 0.0.0.0 
  network 89.1.1.8 0.0.0.0 

R9:
ospf 1 router-id 9.9.9.9 
 area 0.0.0.0 
  network 9.9.9.9 0.0.0.0 
  network 89.1.1.9 0.0.0.0 
  network 91.1.1.9 0.0.0.0

R10:
ospf 1 router-id 10.10.10.10 
 area 0.0.0.0 
  network 10.10.10.10 0.0.0.0 
  network 91.1.1.10 0.0.0.0 

Check whether the ospf neighbor has been successfully established:
MPLS OPTION A
MPLS OPTION A

2. Establish an mpls tunnel inside the ISP, and use ldp to automatically distribute labels to solve future routing black holes

R5:
mpls lsr-id 5.5.5.5
mpls
interface GigabitEthernet0/0/1
 mpls
 mpls ldp

R6:
mpls lsr-id 6.6.6.6
mpls
mpls ldp
interface GigabitEthernet0/0/1
 mpls
 mpls ldp
interface GigabitEthernet0/0/0
 mpls
 mpls ldp

R7:
mpls lsr-id 7.7.7.7
mpls
mpls ldp
interface GigabitEthernet0/0/0
 mpls
 mpls ldp

R8:
mpls lsr-id 8.8.8.8
mpls
mpls ldp
interface GigabitEthernet0/0/1
 mpls
 mpls ldp

R9:
mpls lsr-id 9.9.9.9
mpls
mpls ldp
interface GigabitEthernet0/0/1
 mpls
 mpls ldp
interface GigabitEthernet0/0/0
 mpls
 mpls ldp

R10:
mpls lsr-id 10.10.10.10
mpls
mpls ldp
interface GigabitEthernet0/0/0
 mpls
 mpls ldp

Check whether the ldp neighbor is successfully established:

[R6]dis mpls ldp peer 

 LDP Peer Information in Public network
 A '*' before a peer means the peer is being deleted.
 ------------------------------------------------------------------------------
 PeerID                 TransportAddress   DiscoverySource
 ------------------------------------------------------------------------------
 5.5.5.5:0              5.5.5.5            GigabitEthernet0/0/0
 7.7.7.7:0              7.7.7.7            GigabitEthernet0/0/1
 ------------------------------------------------------------------------------
 TOTAL: 2 Peer(s) Found.

[R6]
[R8]dis mpls ldp peer 

 LDP Peer Information in Public network
 A '*' before a peer means the peer is being deleted.
 ------------------------------------------------------------------------------
 PeerID                 TransportAddress   DiscoverySource
 ------------------------------------------------------------------------------
 9.9.9.9:0              9.9.9.9            GigabitEthernet0/0/1
 ------------------------------------------------------------------------------
 TOTAL: 1 Peer(s) Found.

[R8]

3. PE equipment establishes v4 neighbors for future routing

R5:
bgp 567
 undo default ipv4-unicast
 peer 7.7.7.7 as-number 567 
 peer 7.7.7.7 connect-interface LoopBack0
 ipv4-family unicast
  undo synchronization
  undo peer 7.7.7.7 enable
 ipv4-family ***v4
  policy ***-target
  peer 7.7.7.7 enable

R7:
bgp 567
 undo default ipv4-unicast
 peer 5.5.5.5 as-number 567 
 peer 5.5.5.5 connect-interface LoopBack0
 ipv4-family unicast
  undo synchronization
  undo peer 5.5.5.5 enable
 ipv4-family ***v4
  policy ***-target
  peer 5.5.5.5 enable

R8:
bgp 8910
 undo default ipv4-unicast
 peer 10.10.10.10 as-number 8910 
 peer 10.10.10.10 connect-interface LoopBack0
 ipv4-family unicast
  undo synchronization
  undo peer 10.10.10.10 enable
 ipv4-family ***v4
  policy ***-target
  peer 10.10.10.10 enable

R10:
bgp 8910
 undo default ipv4-unicast
 peer 8.8.8.8 as-number 8910 
 peer 8.8.8.8 connect-interface LoopBack0
 ipv4-family unicast
  undo synchronization
  undo peer 8.8.8.8 enable
 ipv4-family ***v4
  policy ***-target
  peer 8.8.8.8 enable

Check whether the ***v4 neighbor is established normally:

[R7]dis bgp ***v4 al pe

 BGP local router ID : 7.7.7.7
 Local AS number : 567
 Total number of peers : 1                Peers in established state : 1

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv

  5.5.5.5         4         567        7        7     0 00:05:29 Established       0
[R7]
[R10]dis bgp  ***v4 al pe

 BGP local router ID : 10.10.10.10
 Local AS number : 8910
 Total number of peers : 1                Peers in established state : 1

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv

  8.8.8.8         4        8910        2        2     0 00:00:46 Established       0
[R10]

Fourth, establish the connection between CE and PE equipment
4.1. Create vrf instance on PE equipment

R5:
ip ***-instance 15
 ipv4-family
  route-distinguisher 15:15
  ***-target 57:5 export-extcommunity
  ***-target 57:7 import-extcommunity
ip ***-instance 25
 ipv4-family
  route-distinguisher 25:25
  ***-target 75:5 export-extcommunity
  ***-target 75:7 import-extcommunity

R7:
ip ***-instance 17
 ipv4-family
  route-distinguisher 17:17
  ***-target 57:7 export-extcommunity
  ***-target 57:5 import-extcommunity
ip ***-instance 27
 ipv4-family
  route-distinguisher 27:27
  ***-target 75:7 export-extcommunity
  ***-target 75:5 import-extcommunity

R8:
ip ***-instance 38
 ipv4-family
  route-distinguisher 38:38
  ***-target 810:8 export-extcommunity
  ***-target 810:10 import-extcommunity
ip ***-instance 48
 ipv4-family
  route-distinguisher 48:48
  ***-target 108:8 export-extcommunity
  ***-target 108:10 import-extcommunity

R10:
ip ***-instance 310
 ipv4-family
  route-distinguisher 310:310
  ***-target 810:10 export-extcommunity
  ***-target 810:8 import-extcommunity
ip ***-instance 410
 ipv4-family
  route-distinguisher 410:410
  ***-target 108:10 export-extcommunity
  ***-target 108:8 import-extcommunity

4.2、PE设备接口绑定vrf实例
R5:
interface GigabitEthernet0/0/0
 ip binding ***-instance 15
 ip address 15.1.1.5 255.255.255.0 
interface GigabitEthernet0/0/2
 ip binding ***-instance 25
 ip address 25.1.1.5 255.255.255.0 

R10:
interface GigabitEthernet0/0/1
 ip binding ***-instance 310
 ip address 31.1.1.10 255.255.255.0 
interface GigabitEthernet0/0/2
 ip binding ***-instance 410
 ip address 41.1.1.10 255.255.255.0 

4.3, PE and CE establish bgp ipv4 neighbor relationship

R5:
bgp 567
 ipv4-family ***-instance 15 
  peer 15.1.1.1 as-number 100 
 ipv4-family ***-instance 25 
  peer 25.1.1.2 as-number 200 

R1:
bgp 100
 peer 15.1.1.5 as-number 567 
 ipv4-family unicast
  undo synchronization
  peer 15.1.1.5 enable

R2:
bgp 200
 peer 25.1.1.5 as-number 567 
 ipv4-family unicast
  undo synchronization
  peer 25.1.1.5 enable

R10:
bgp 8910
 ipv4-family ***-instance 310 
  peer 31.1.1.3 as-number 300 
 ipv4-family ***-instance 410 
  peer 41.1.1.4 as-number 400 

R3:
bgp 300
 peer 31.1.1.10 as-number 8910 
 ipv4-family unicast
  undo synchronization
  peer 31.1.1.10 enable

R4:
bgp 400
 peer 41.1.1.10 as-number 8910 
 ipv4-family unicast
  undo synchronization
  peer 41.1.1.10 enable

Check whether the ipv4 neighbor relationship is successfully established:
MPLS OPTION A
MPLS OPTION A

5. Use the sub-interface to establish a bgp connection to asbr

R7:
interface GigabitEthernet0/0/1.13
 dot1q termination vid 13
 ip binding ***-instance 17
 ip address 192.168.78.7 255.255.255.0 
 arp broadcast enable
interface GigabitEthernet0/0/1.24
 dot1q termination vid 24
 ip binding ***-instance 27
 ip address 192.168.78.7 255.255.255.0 
 arp broadcast enable
bgp 567
 ipv4-family ***-instance 17 
  peer 192.168.78.8 as-number 8910 
 ipv4-family ***-instance 27 
  peer 192.168.78.8 as-number 8910 

R8:
interface GigabitEthernet0/0/0.13
 dot1q termination vid 13
 ip binding ***-instance 38
 ip address 192.168.78.8 255.255.255.0 
 arp broadcast enable
interface GigabitEthernet0/0/0.24
 dot1q termination vid 24
 ip binding ***-instance 48
 ip address 192.168.78.8 255.255.255.0 
 arp broadcast enable
bgp 8910
 ipv4-family ***-instance 38 
  peer 192.168.78.7 as-number 567 
 ipv4-family ***-instance 48 
  peer 192.168.78.7 as-number 567

6. Use bgp to announce the route on the CE device

R1:
bgp 100
network 172.16.1.1 255.255.255.255

R2:
bgp 200
network 172.16.2.2 255.255.255.255

R3:
bgp 300
network 172.16.3.3 255.255.255.255

R4:
bgp 400
network 172.16.4.4 255.255.255.255

Seven, test
MPLS OPTION A
MPLS OPTION A

8. Note
8.1. When PE equipment is connected to CE, in addition to bgp, igp protocols such as ospf and isis can also be used, but to do so, two-way import must be implemented on both PE and CE equipment;
8.2, mpls lsr-id The route must be reachable and it needs to be a 32-bit route, because ldp only assigns labels to 32-bit routes by default;

Nine, data communication analysis
9.1, routing transmission path analysis
R1 uses bgp to transfer lo0 route 172.16.1.1/32 to R5, 172.16.1.1/32 enters vrf 15 through the g/0/0/0 port of R5, and the route is marked with RD change It is a 96-bit v4 route. Because R5 and R7 are neighbors of mp-bgp and have matching RT values, R7 can receive the 172.16.1.1/32 route from R5 and enter R7's vrf 17 (this route carries the intranet label ); R7's g0/0/1.13 is bound to vrf 17, and all devices in the right half are regarded as the CE of vrf 17 by R7, so R7 will pass the received route 172.16.1.1/32 into the ipv4 route after vrf 17 R8; R8 also regards the left half of the device as CE, so 172.16.1.1/32 will enter vrf 38 and be marked with RD to become a route, and then send it to R10 according to the inbound and outbound value of RT (this route carries an intranet label); R10 receives 1.1. After 1.1/32, join vrf 310 and send the ipv4 route to the bgp neighbor R3. R3 has received 172.16.1.1/32.
9.2. Data traffic analysis
R3 checks the global routing table and sends the data packet with the destination address of 172.16.1.1 to 31.1 .1.10; R10 view -instance 310, press the internal network label under the ip layer (used to tell R8 which routing table to check), and then press the external network label (used to solve the routing black hole of as8910); the packet arrives at R8 Then look up the -instance 38 routing table and enter R7; R7 looks up the -instance 17 routing table and presses the internal network and external network labels to reach R5; R5 looks up the -instance 15 routing table and forwards it to R1.

10.
Advantages and disadvantages Advantages: The principle is simple and easy to understand. It just takes another AS connected to the ASBR as a CE, and then establishes BGP neighbors through subinterfaces.
Disadvantages: The configuration process is cumbersome. When multiple channels need to be established , the ASBR is created There will be many sub-interfaces; and ASBR needs to maintain routes, which violates the concept of MPLS *** route delivery in accordance with the CE1-PE1-PE2-CE2 route.

Guess you like

Origin blog.51cto.com/14415904/2542714