Академический Документы
Профессиональный Документы
Культура Документы
PC-C
SW-C
Fe 0/0/9
Ge 0/0/1
1/0/0
1/0/4
1/0/2
2/1
1/2 1/1
2/4
2/0/2
1/0/2 1/2
1/3
2/2 2/0/4 RT-D
1/1
2/0/0 1/0/0
RT-A RT-E RT-F
RT-B
1/4
2/0/8
2/3 1/0/6
Ge0/1
Ge0/1
2/5 2/0/6 SW-D
Ge 0/0/1
SW-A Ge 0/0/1
Fe0/9 SW-B
SW-E
Fe 0/0/9
PC-A PC-B
RT-C
1/0/0 1/0/2
Interface loopback0
Ip address 192.168.255.12 255.255.255.255
# Configure RT-D.
[RT-D] bgp 65000
[RT-D-bgp] peer 10.0.0.10 as-number 65000
[RT-D-bgp] peer 10.0.0.5 as-number 65000
# Configure RT-C.
[RT-C] bgp 65000
[RT-C-bgp] peer 10.0.0.1 as-number 65000
[RT-C-bgp] peer 10.0.0.6 as-number 65000
# Configure RT-E.
[RT-E] bgp 65002
[RT-E-bgp] peer 172.16.0.2 as-number 65002
# Configure RT-F.
RT-F(config)#router bgp 65002
RT-F(config-router)#neighbor 172.16.0.1 remote-as 65002
2
Check:-
Disp bgp peer
Show bgp neighbor
Disp bgp routing-table
# Configure RT-B.
RT-B(config)#router bgp 65000
RT-B(config-router)#neighbor 192.168.255.12 remote-as 65001
RT-B(config-router)#neighbor 192.168.255.12 update-source loopback0
RT-B(config-router)#neighbor 192.168.255.12 ebgp-multihop 3
RT-B(config)#ip route 192.168.0.0 255.255.0.0 10.0.1.2
# Configure RT-D.
[RT-D] bgp 65000
[RT-D-bgp] peer 172.16.255.33 as-number 65002
[RT-D-bgp] peer 172.16.255.33 connect-interface loopback0
[RT-D-bgp] peer 172.16.255.33 ebgp-max-hop 3
[RT-D] ip route-static 172.16.0.0 16 10.0.2.2
# Configure RT-E.
[RT-E] bgp 65002
[RT-E-bgp] peer 10.0.255.31 as-number 65000
[RT-E-bgp] peer 10.0.255.31 connect-interface loopback0
[RT-E-bgp] peer 10.0.255.31 ebgp-max-hop 3
[RT-E] ip route-static 10.0.0.0 8 10.0.2.1
3
# Configure RT-F.
RT-F(config)#router bgp 65002
RT-F(config-router)#neighbor 192.168.255.12 remote-as 65001
RT-F(config-router)#neighbor 192.168.255.12 update-source loopback0
RT-F(config-router)#neighbor 192.168.255.12 ebgp-multihop 3
RT-F(config)#ip route 192.168.0.0 255.255.0.0 192.168.0.1
It should be established
RT-A(config-if)#switchport
RT-A(config-if)#switchport trunk encaspulation dot1q
RT-A(config-if)#switchport mode trunk
RT-A(config-if)#switchport trunk allow vlan all
RT-A(config-if)#no shut
RT-A(config)#vlan 100
RT-A(config)#interface vlan 100
RT-A(config-if)#ip address 100.0.0.1 255.0.0.0
RT-A(config-if)#no shut
4
# Display the routing table of RT-B.
RT-B# show ip route bgp
Check:
RT-B# ping 100.0.0.1
Reply from RT-A
Check:
[RT-C] ping 100.0.0.1
No Reply from RT-A
Check:
[RT-D] ping 100.0.0.1
No Reply from RT-A
Check:
RT-F# ping 100.0.0.1
Reply from RT-A
• In Step5 we will change the BGP route next hop and reach 100.x.x.x network
without using OSPF
• AS specific routes should be available in the ip routing table. In step3 this is
manually added in ASBR, but it should be redistributed in the entire AS. We
will do this by using OSPF in Step6
5
Step 5 Configure ASBR to change the next hop as self
# Configure RT-B for route updates from AS65001 to AS65000
RT-B(config-router)address-family ipv4
RT-B(config-router-af)neighbor 10.0.0.2 next-hop-self
RT-B(config-router-af)neighbor 10.0.0.9 next-hop-self
Check: On RT-C
Check: On RT-E
6
Step 6 Configure OSPF on each network of ASs
# Configure AS65001
RT-A(config)# router ospf 200
RT-A(config-router)# network 192.168.255.12 0.0.0.0 area 0
RT-A(config-router)# network 192.168.0.0 0.0.255.255 area 0
RT-A(config-router)# network 100.0.0.0 0.0.0.255 area 0
RT-A(config-router)# redistributed connected
RT-A(config-router)# redistributed static
# Configure AS65000
RT-B(config)# router ospf 100
RT-B(config-router)# network 10.0.255.11 0.0.0.0 area 0
RT-B(config-router)# network 10.0.0.0 0.255.255.255 area 0
RT-B(config-router)# redistributed connected
RT-B(config-router)# redistributed static
[RT-D]ospf 100
[RT-D-ospf-100]area 0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.255.31 0.0.0.0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
[RT-D-ospf-100]import-route direct
[RT-D-ospf-100]import-route static
[RT-C]ospf 100
[RT- C-ospf-100]area 0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.255.21 0.0.0.0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
[RT-C-ospf-100]import-route direct
[RT-C-ospf-100]import-route static
7
# Configure AS65002
[RT-E]ospf 300
[RT-E-ospf-300]area 0
[RT-E-ospf-300-area-0.0.0.0]network 172.16.255.33 0.0.0.0
[RT-E-ospf-300-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[RT-E-ospf-300]import-route direct
[RT-E-ospf-300]import-route static
8
Lab2- Working with BGP & IGP
2/4 1/0/4
1/0/2 2/0/2
RT-A
RT-C
RT-D
2/3
AS 65001 AS 65000
Summary IP-192.168.0.0/16 Summary IP-10.0.0.0/8
RT-A RT-C
Lo- 192.168.255.12/32 Lo- 10.0.255.11/32
2/4 -10.0.1.2/30 1/0/4 -10.0.1.1/30
2/3 - Switchport 1/0/2 -10.0.0.1/30
RT-D
Lo- 10.0.255.21/32
2/0/2 -10.0.0.2/30
1
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the OSPF protocol on RT-C and RT-D to realize the interconnection.
2. Configure the EBGP connection on RT-A and RT-C.
3. Enable BGP and OSPF to import routes from each other on RT-C, and check the routing information.
4. Configure BGP route aggregation on RT-C and simplify the BGP routing table.
Configuration Procedure
Step 1
1. Clear the Configuration
2. Change the hostname or sysname
3. Configure the IP address for each interface
Interface loopback0
Ip address 192.168.255.12 255.255.255.255
[RT-D]ospf 100
[RT-D-ospf-100]area 0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.255.21 0.0.0.0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
2
# Configure RT-C.
[RT-C]bgp 65000
[RT-C-bgp] peer 192.168.255.12 as-number 65001
[RT-C-bgp] peer 192.168.255.12 connect-interface loopback0
[RT-C-bgp]peer 192.168.255.12 ebgp-max-hop 3
[RT-C]ip route-static 192.168.255.12 255.255.255.255 10.0.1.2
It should be established
RT-A(config-if)#switchport
RT-A(config-if)#switchport trunk encaspulation dot1q
RT-A(config-if)#switchport mode trunk
RT-A(config-if)#switchport trunk allow vlan all
RT-A(config-if)#no shut
RT-A(config)#vlan 100
RT-A(config)#interface vlan 100
RT-A(config-if)#ip address 100.0.0.1 255.0.0.0
RT-A(config-if)#no shut
3
# Display the routing table of RT-C.
[RT-C] display bgp routing-table
To check:
4
Step 7 Configure the automatic route aggregation.
# Configure RT-C
[RT-C] bgp 65000
[RT-C-bgp] ipv4-family unicast
[RT-C-bgp-af-ipv4] summary automatic
You should see single route for all 10.x.x.x networks of AS 65000
5
Lab3- Configuring AS-Path Filter
EBGP connections are set up between RT-A, RT-C, and RT-D. Configure the AS-Path filter on RT-A. AS
65001 thus does not advertises routes of AS 65002 to AS 65000, or advertise routes of AS 65000 to AS 65002.
RT-C
1/0/4
2/4 1/0/2
RT-A
2/0/2
2/5
2/0/6
RT-D
Group1- RT-A
Group2- RT-C
CX600- RT-C, RT-D
Group3- RT-D
C7609-RT-A
1
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the EBGP connecting between RT-C and RT-A, RT-A and RT-D, RT-D
and RT-C respectively, and import direct routes.
2. Configure the AS-Path on RT-A, and apply the filtering rule.
Configuration Procedure
Step 1
1. Clear the Configuration
2. Change the hostname or sysname
3. Configure the IP address for each interface
# Configure RT-A
RT-A(config)#router bgp 65001
RT-A(config-router)#neighbor 10.0.255.11 remote-as 65000
RT-A(config-router)#neighbor 10.0.255.11 update-source loopback0
RT-A(config-router)#neighbor 10.0.255.11 ebgp-multihop 3
RT-A(config)#ip route 10.0.255.11 255.255.255.255 10.0.1.1
RT-A(config-router)#redistributed connected
# Configure RT-C.
[RT-C] bgp 65000
[RT-C-bgp] peer 192.168.255.12 as-number 65001
[RT-C-bgp] peer 192.168.255.12 connect-interface loopback0
[RT-C-bgp] peer 192.168.255.12 ebgp-max-hop 3
[RT-C]ip route-static 192.168.255.12 32 10.0.1.2
2
# Configure RT-D
[RT-D] bgp 65002
[RT-D-bgp] peer 192.168.255.12 as-number 65001
[RT-D-bgp] peer 192.168.255.12 connect-interface loopback0
[RT-D-bgp] peer 192.168.255.12 ebgp-max-hop 3
[RT-D]ip route-static 192.168.255.12 32 10.0.3.1
It should be established
# Check the routing table advertised by RT-A to peer RT-C. You can find that RT-A
advertises the routes for direct network between RT-C and RT-D.
Huawei command
3
Check the routing table of RT-C, and you can find that RT-C learns the two routes
advertised by RT-A.
<RT-C> display bgp routing-table
Step 3 Configure the AS-Path filter on RT-A and apply the filter in the outgoing direction of RT-A
# Create AS-Path filter 1, refusing the passing of routes carrying AS 65002 (The regular
expression _65002_ indicates any AS list that contains AS 65002 and * matches any
character.)
RT-A(config)# ip as-path access-list 1 deny _65002_
RT-A(config)# ip as-path access-list 1 permit .*
4
[RT-A] ip as-path-filter 1 permit .*
# Create AS-Path filter 2, refusing the passing of routes carrying AS 65000.
Step 4 Check the routing table advertised by RT-A, and it will not have advertised direct
routes for networks between RT-C and RT-D.
Similarly, the BGP routing table of RT-C does not have the two routes.
<RT-C> display bgp routing-table
This will not have routes coming from AS65002 via AS65001
5
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
6
Additional Info:
7
Lab4- BGP Community Attribute
Networking Requirements
RT-A creates EBGP connections with RT-C and RT-D respectively. You can configure the No_Export
community attribute on RT-C. Thus, the routes advertised from AS65000 to AS65001 are not advertised to
other ASs.
RT-C
Ge0/0/1
1/0/4
1/0/6 SW-C
2/4
RT-A
2/5
2/0/6
RT-D
Group1- RT-A
Group2- RT-C , SW-C
CX600- RT-C, RT-D
Group3- RT-D
C7609-RT-A
CX200D- SW-C
1
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the EBGP connection between RT-C and RT-A, as well as between RT-A and RT-D.
2. Configure the routing policy on RT-C, and advertise No_Export community attribute.
Configuration Procedure
Step 1
1. Clear the Configuration
2. Change the hostname or sysname
3. Configure the IP address for each interface
# Configure RT-C.
[RT-C] bgp 65000
[RT-C-bgp] peer 192.168.255.12 as-number 65001
[RT-C-bgp] peer 192.168.255.12 connect-interface loopback0
[RT-C-bgp] peer 192.168.255.12 ebgp-max-hop 3
[RT-C]ip route-static 192.168.255.12 32 10.0.1.2
[RT-C-GigabitEthernet1/0/6]portswitch
[RT-C-GigabitEthernet1/0/6]port link-type trunk
[RT-C-GigabitEthernet1/0/6]port trunk allow-pass vlan all
[RT-C-GigabitEthernet1/0/6]undo shut
[RT-C]vlan 100
[RT-C]interface Vlanif 100
[RT-C-Vlan127]ip address 100.0.0.1 255.0.0.0
2
Connect Switch to the gigaetherent interface
[SW-C-gigabitethernet0/0/1]port link-type trunk
[SW-C-gigabitethernet0/0/1]port trunk allow-pass vlan all
[SW-C-gigabitethernet0/0/1]bpdu enable
[SW-C-gigabitethernet0/0/1]undo shut
# Configure RT-A
RT-A(config)#router bgp 65001
RT-A(config-router)#neighbor 10.0.255.11 remote-as 65000
RT-A(config-router)#neighbor 10.0.255.11 update-source loopback0
RT-A(config-router)#neighbor 10.0.255.11 ebgp-multihop 3
RT-A(config)#ip route 10.0.255.11 255.255.255.255 10.0.1.1
# Configure RT-D
[RT-D] bgp 65002
[RT-D-bgp] peer 192.168.255.12 as-number 65001
[RT-D-bgp] peer 192.168.255.12 connect-interface loopback0
[RT-D-bgp] peer 192.168.255.12 ebgp-max-hop 3
[RT-D]ip route-static 192.168.255.12 32 10.0.3.1
3
# Display the routing table of RT-A.
RT-A# show ip bgp 100.0.0.0
Advertised to update-groups: 1
65000
10.0.255.11 from 10.0.255.11 (10.0.255.11)
Origin IGP, metric 0, localpref 100, valid, external, best
You can see that RT-A advertises the routes received from RT-C to RT-D in AS65002.
From the routing table, you can confirm that RT-D has learned a route to the destination
100.0.0.0/8 from RT-A
4
Additional Info: It RT-C is a Cisco router than use following commands
access-list 1 permit 100.0.0.0
Route-map RT-C permit 10
Match ip address 1
Set community no-export
Route-map RT-C permit 20
65000
10.0.255.11 from 10.0.255.11 (10.0.255.11)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: no-export
You can see the configured community attribute in the routing table of RT-A. At this time,
there are no routes to the destination 100.0.0.0/8 in the routing table of RT-D
5
Lab5- BGP Load Balancing and the MED Attribute
RT-C
1/0/4
2/4 1/0/2
RT-A
2/0/2
2/5
2/0/6
RT-D
Group1- RT-A
CX600- RT-C, RT-D
Group2- RT-C
C7609-RT-A
Group3- RT-D
AS 65001 AS 65000
Summary IP-192.168.0.0/16 Summary IP-10.0.0.0/8
RT-A RT-C
Lo- 192.168.255.12/32 Lo- 10.0.255.11/32
2/4 -192.168.1.1/30 1/0/4 -192.168.1.2/30
2/5 - 192.168.2.1/30 1/0/2 -20.0.0.1/24
RT-D
Lo- 10.0.255.21/32
2/0/2 -20.0.0.2/24
2/0/6 -192.168.2.2/30
1
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the EBGP connections between RT-A and RT-C, as well as between RT-A
and RT-D.
2. Configure the IBGP connections between RT-C and RT-D
3. Configure the load balancing on RT-A and MED value RT-C, and check the routing
information.
Configuration Procedure
Step 1
1. Clear the Configuration
2. Change the hostname or sysname
3. Configure the IP address for each interface
# Configure RT-C.
[RT-C] bgp 65000
[RT-C-bgp] peer 192.168.255.12 as-number 65001
[RT-C-bgp] peer 192.168.255.12 connect-interface loopback0
[RT-C-bgp] peer 192.168.255.12 ebgp-max-hop 3
[RT-C]ip route-static 192.168.255.12 32 192.168.1.1
# Configure RT-D.
[RT-D] bgp 65000
[RT-D-bgp] peer 192.168.255.12 as-number 65001
[RT-D-bgp] peer 192.168.255.12 connect-interface loopback0
2
[RT-D-bgp] peer 192.168.255.12 ebgp-max-hop 3
[RT-D]ip route-static 192.168.255.12 32 192.168.2.1
It should be established
As displayed in the routing table, there are two valid routes to the destination 20.0.0.0/24.
The route whose next hop is 10.0.255.11 is the optimum route. This is because the Router
ID of RT-C is smaller.
3
Step 3 Configure load balancing.
# Configure RT-A
RT-A(config)#router bgp 65001
RT-A(config-router)#address-family ipv4
RT-A(config-router-af)#maximum-paths 2
As displayed in the routing table, BGP route 20.0.0.0/24 has two next hops. They are
10.0.255.11 and 10.0.255.21. Both of them are optimum routes.
4
Step 4 Configure MED attributes.
# Set the default value of MED sent by RT-C to RT-A by using the policy.
[RT-C] route-policy 10 permit node 10
[RT-C -route-policy] apply cost 100
[RT-C] bgp 65000
[RT-C -bgp] peer 192.168.255.12 route-policy 10 export
As displayed in the routing table, the MED of the next hop 10.0.255.11 (RT-C) is 100, and
that of the next hop 10.0.255.21 is 0. Therefore, the route with the smaller MED is
selected.
5
Lab6- Basic MPLS Configuration
SW-C
Ge
0/0/1
RT-C 1/0/6
1/0/2
2/0/2
2/2 2/0/4
1/1 1/3
RT-A
RT-B
2/3 RT-D
Ge
0/1
SW-A
Interface loopback0
Ip address 10.0.255.11 255.255.255.255
[RT-C]ospf 100
[RT-C-ospf-100]area 0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.255.31 0.0.0.0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
[RT-C-ospf-100-area-0.0.0.0]network 100.0.2.0 0.0.0.255
[RT-D]ospf 100
[RT-D-ospf-100]area 0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.255.41 0.0.0.0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
2
Step 3 Configure SW-A & RT-A for 100.0.1.0/24.
Switch(config-if)# switchport mode trunk
Switch(config-if)#switchport trunk allow vlan all
Switch(config-if)#no shut
RT-A(config-if)#switchport
RT-A(config-if)#switchport trunk encaspulation dot1q
RT-A(config-if)#switchport mode trunk
RT-A(config-if)#switchport trunk allow vlan all
RT-A(config-if)#no shut
RT-A(config)#vlan 100
RT-A(config)#interface vlan 100
RT-A(config-if)#ip address 100.0.1.1 255.255.255.0
RT-A(config-if)#no shut
[RT-C-GigabitEthernet1/0/6]portswitch
[RT-C-GigabitEthernet1/0/6]port link-type trunk
[RT-C-GigabitEthernet1/0/6]port trunk allow-pass vlan all
[RT-C-GigabitEthernet1/0/6]undo shut
[RT-C]vlan 100
[RT-C]interface Vlanif 100
[RT-C-Vlan127]ip address 100.0.2.1 255.255.255.0
3
Step 5 Configure MPLS
z Configure RTA:
RT-A(config)#mpls ip
RT-A(config)#mpls ldp router-id Loopback0 force
RT-A(config-if)#mpls ip
RT-A(config-if)#mpls lable protocol ldp
z Configure RTB:
RT-B(config)#mpls ip
RT-B(config)#mpls ldp router-id Loopback0 force
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls lable protocol ldp
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls lable protocol ldp
z Configure RTC:
z Configure RTD:
4
Check:
5
[RT-D]display mpls ldp peer
3) Take FEC:100.0.2.0/24 for example to view the label switching in the whole forwarding
process:
View the MPLS LSP of RT-A:
On RT-A, the outbound label to 100.0.2.0/24 is 21. View the MPLS LSP of RT-B:
6
RT-B#show mpls forwarding-table
On RT-B, inbound labels being 21 are switched to 1028. On RT-D, view the MPLS LSP:
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
7
10.0.3.0/30 3/NULL -/-
Outbound label of the packet with inbound label 1028 is 3. It indicates that RT-D is the
penultimate hop and thus needs to pop off the label and send the IP data packet to the last
hop, RT-C, directly.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Labels allocated by RT-C to RT-D are specially 3, which indicates that RT-C is the last
hop. The MPLS LSP forwarding process for other FECs is similar.
8
Lab7 - L3 VPN (Switchport is assigned to customer)
SW-C Ge
Ge 0/0/9
PC-C
0/0/1
RT-C 1/0/6
1/0/2
2/0/2
2/2 2/0/4
1/1 1/3
RT-A
RT-B
2/3 RT-D
Ge
0/1
Ge
0/9
SW-A
As65000 RT-C
Summary IP-10.0.0.0/8 Lo- 10.0.255.31/32
RT-A 1/0/2 -10.0.3.2/30
Lo- 10.0.255.11/32 1/0/6 –switchport (100.0.2.0/24)
2/2 -10.0.1.1/30 RT-D
2/3 –switchport (100.0.1.0/24) Lo- 10.0.255.41/32
RT-B 2/0/4 -10.0.2.2/30
Lo- 10.0.255.21/32 2/0/2 -10.0.3.1/30
1/1 -10.0.1.2/30 1
1/3 -10.0.2.1/30
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure OSPF between PEs to implement interworking.
2. Configure the basic MPLS functions and MPLS LDP
3. Configure the VPN instance on the PE connected with the CE in the backbone
network, bind the PE interface connected with the CE to the corresponding VPN
instance, and then reconfigure the IP address for the PE interface connected with the
CE.
4. Configure MP IBGP to exchange the VPN routing information between the PEs.
5. Configure CEs and PEs to exchange VPN routes by using direct connection, static
routes, OSPF, or EBGP.
2
Configuration Procedure
Step 1
1. Clear the Configuration
2. Change the hostname or sysname
3. Configure the IP address for each interface
Interface loopback0
Ip address 10.0.255.11 255.255.255.255
[RT-D]ospf 100
[RT-D-ospf-100]area 0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.255.41 0.0.0.0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
[RT-C]ospf 100
[RT-C-ospf-100]area 0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.255.31 0.0.0.0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
3
After the configuration, the OSPF neighbor relationship should be established between RT-A, RT-B, RT-D and
RT-C. After running the show ip ospf neighbor & display ospf peer command, you can find that the OSPF
neighbor relationship is in Full state. Run the show ip routing-table & display ip routing-table command on
the PE (RT-A, RT-C), and you can view the Loopback0 routes imported from the peer.
Step 3 Configure basic MPLS functions and MPLS LDP on the MPLS backbone network to setup LDP
LSP.
z Configure RTA:
RT-A(config)#mpls ip
RT-A(config)#mpls ldp router-id Loopback0 force
RT-A(config-if)#mpls ip
RT-A(config-if)#mpls label protocol ldp
z Configure RTB:
RT-B(config)#mpls ip
RT-B(config)#mpls ldp router-id Loopback0 force
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls label protocol ldp
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls label protocol ldp
z Configure RTD:
4
z Configure RTC:
After the configuration, LDP sessions are set up between RT-A, RT-B, RT-D and RT-C.
After running following commands on the devices, you can find the status of the session is
"Operational" in the display result. Run the display mpls ldp lsp command, and view the
state of the LDP LSP.
RT-A(config-if)#switchport
RT-A(config-if)#switchport trunk encaspulation dot1q
RT-A(config-if)#switchport mode trunk
RT-A(config-if)#switchport trunk allowed vlan all
RT-A(config-if)#no shut
RT-A(config)#vlan 100
5
PC-A:- On the second interface card give following IP
IP- 100.0.1.2
Mask-255.255.255.0
Gateway-100.0.1.1
On Command prompt add folowing route
Route add 100.0.2.0 mask 255.255.255.0 100.0.1.1 metric 1
[RT-C-GigabitEthernet1/0/6]portswitch
[RT-C-GigabitEthernet1/0/6]port link-type trunk
[RT-C-GigabitEthernet1/0/6]port trunk allow-pass vlan all
[RT-C-GigabitEthernet1/0/6]undo shut
[RT-C]vlan 100
Step 6 Configure VPN instances on PEs (RT-A & RT-C) and bind the instance to the interfaces of CEs.
6
# Configure RT-C (PE2).
[RT-C] ip vpn-instance vpna
[RT-C-vpn-instance-vpna] route-distinguisher 200:1
[Rt-C-vpn-instance-vpna] vpn-target 111:1 both
After the configuration, view the configuration of VPN instances by running following
commands on the PEs. The PE can ping through its own CE.
Step 7 Establish MP-IBGP peering between the PEs (RT-A & RT-C).
# Configure RT-A.
RT-A(config)#router bgp 65000
RT-A(config-router)# neighbor 10.0.255.31 remote-as 65000
RT-A(config-router)# neighbor 10.0.255.31 update-source loopback0
# Configure RT-C.
[RT-C] bgp 65000
[RT-C-bgp] peer 10.0.255.11 as-number 65000
[RT-C-bgp] peer 10.0.255.11 connect-interface loopback 0
7
[RT-C-bgp] ipv4-family vpn-instance vpna
[RT-C-bgp-vpna] import-route direct
After the configuration, you can find that the BGP peer relationship has been set up
between PE1 and PE2 by running the following commands
8
RT-A#show bgp vpnv4 unicast vrf vpna
9
Check:
10
100.0.1.0/24 BGP 255 0 RD 10.0.255.11 GigabitEthernet1/0/2
100.0.2.0/24 Direct 0 0 D 100.0.2.1 Vlanif100
100.0.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
100.0.2.2/32 Direct 0 0 D 100.0.2.2 Vlanif100
100.0.2.3/32 Direct 0 0 D 100.0.2.3 Vlanif100
100.0.2.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
The CEs (PC-A & PC-C) in the same VPN can ping through each other
PC-A> ping 100.0.2.2
11
PING 100.0.1.1: 56 data bytes, press CTRL_C to break
Reply from 100.0.1.1: bytes=56 Sequence=1 ttl=253 time=1 ms
Reply from 100.0.1.1: bytes=56 Sequence=2 ttl=253 time=1 ms
Reply from 100.0.1.1: bytes=56 Sequence=3 ttl=253 time=1 ms
Reply from 100.0.1.1: bytes=56 Sequence=4 ttl=253 time=1 ms
Reply from 100.0.1.1: bytes=56 Sequence=5 ttl=253 time=1 ms
12
1) View the interface on which the LDP runs:
13
[RT-C]display mpls ldp peer
On RT-A, the outbound label to PE2 is 18. View the MPLS LSP of RT-B:
14
RT-B#sh mpls forwarding-table
On RT-B, inbound label being 18 are switched to 1027. On RT-D, view the MPLS LSP:
Outbound label of the packet with inbound label 1027 is 3. It indicates that RT-D is the
penultimate hop and thus needs to pop off the label
15
[RT-C]display mpls lsp
-------------------------------------------------------------------------------
LSP Information: BGP LSP
-------------------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
100.0.2.0/24 115712/NULL -/- vpna
-------------------------------------------------------------------------------
LSP Information: LDP LSP
-------------------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
10.0.255.31/32 3/NULL -/-
10.0.255.41/32 NULL/3 -/GE1/0/2
10.0.2.0/30 NULL/3 -/GE1/0/2
10.0.1.0/30 NULL/1024 -/GE1/0/2
10.0.255.21/32 NULL/1025 -/GE1/0/2
10.0.255.11/32 NULL/1026 -/GE1/0/2
Labels allocated by RT-C to RT-D are specially 3, which indicates that RT-C is the last
hop. The MPLS LSP forwarding process for other FECs is similar.
16
Lab 8- L3 VPN (Router port is given to customer)
RT-E
1/0/4
1/0/8
RT-C
1/0/2
2/0/2
2/2 2/0/4
1/1 1/3
RT-A
RT-B
2/1 RT-D
1/1
Group1- RT-A, RT-F
1
Configuration Roadmap
Configuration Procedure
Step 1
1. Clear the Configuration
2. Change the hostname or sysname
3. Configure the IP address for each interface
Interface loopback0
Ip address 10.0.255.11 255.255.255.255
2
[RT-D]ospf 100
[RT-D-ospf-100]area 0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.255.41 0.0.0.0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
[RT-C]ospf 100
[RT-C-ospf-100]area 0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.255.31 0.0.0.0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
After the configuration, the OSPF neighbor relationship should be established between RT-A, RT-B, RT-D and
RT-C. After running the show ip ospf neighbor & display ospf peer command, you can find that the OSPF
neighbor relationship is in Full state. Run the show ip routing-table & display ip routing-table command on
the PE (RT-A, RT-C), and you can view the Loopback0 routes imported from the peer.
Step 3 Configure basic MPLS functions and MPLS LDP on the MPLS backbone network to setup LDP
LSP.
z Configure RTA:
RT-A(config)#mpls ip
RT-A(config)#mpls ldp router-id Loopback0 force
RT-A(config-if)#mpls ip
RT-A(config-if)#mpls label protocol ldp
z Configure RTB:
RT-B(config)#mpls ip
RT-B(config)#mpls ldp router-id Loopback0 force
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls label protocol ldp
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls label protocol ldp
z Configure RTD:
3
[RT-D-gigabitethernet2/0/2]mpls ldp
[RT-D-gigabitethernet2/0/4]mpls
[RT-D-gigabitethernet2/0/4]mpls ldp
z Configure RTC:
After the configuration, LDP sessions are set up between RT-A, RT-B, RT-D and RT-C.
After running following commands on the devices, you can find the status of the session is
"Operational" in the display result. Run the display mpls ldp lsp command, and view the
state of the LDP LSP.
Step 4 Configure VPN instances on PEs (RT-A & RT-C) and bind the instance to the interfaces of CEs.
# Configure RT-A (PE1).
RT-A(config)# ip vrf vpnb
RT-A(config)# rd 100: 2
RT-A(config)# # route-target export 222:2
RT-A(config)# # route-target import 222:2
4
Step 5 Configure a routing protocol between the PE and the CE, and import routes to the VPN
routing table.
# Configure RT-E.
[RT-E] bgp 65400
[RT-E-bgp] peer 100.0.2.1 as-number 65000
[RT-E-bgp] peer 100.0.2.1 ebgp-max-hop 2
[RT-E-bgp] import-route direct
# Configure RT-C.
[RT-C] bgp 65000
[RT-C-bgp] ipv4-family vpn-instance vpnb
[RT-C-bgp-vpnb] peer 100.0.2.2 as-number 65400
[RT-C-bgp-vpnb] peer 100.0.2.2 ebgp-max-hop 2
# Configure RT-F.
RT-F(config)# ip route 0.0.0.0 0.0.0.0 100.0.1.1
After the configuration, view the configuration of VPN instances by running following
commands on the PEs. The PE can ping through its own CE.
Step 6 Establish MP-IBGP peers between the PEs (RT-A & RT-C).
# Configure RT-A.
RT-A(config)#router bgp 65000
RT-A(config-router)# neighbor 10.0.255.31 remote-as 65000
RT-A(config-router)# neighbor 10.0.255.31 update-source loopback0
5
RT-A(config-router-af)# redistributed connected
# Configure RT-C.
[RT-C] bgp 65000
[RT-C-bgp] peer 10.0.255.11 as-number 65000
[RT-C-bgp] peer 10.0.255.11 connect-interface loopback 0
After the configuration, you can find that the BGP peer relationship has been set up
between PE1 and PE2 by running the following commands
6
Route Refresh: 2 1
Total: 317 365
Default minimum time between advertisement runs is 0 seconds
7
Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv
Check:
8
[RT-C]display ip routing-table vpn-instance vpnb
The CEs (RT-F & RT-E) in the same VPN can ping through each other
RT-F> ping 100.0.2.2
9
RT-A#ping vrf vpnb 100.0.2.2
10
--- 100.0.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/1 ms
On RT-A, the outbound label to PE2 is 18. View the MPLS LSP of RT-B:
11
On RT-B, inbound label being 18 are switched to 1027. On RT-D, view the MPLS LSP:
[RT-D]disp mpls ls
-------------------------------------------------------------------------------
LSP Information: LDP LSP
-------------------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
10.0.255.41/32 3/NULL -/-
10.0.2.0/30 3/NULL -/-
10.0.255.31/32 NULL/3 -/GE2/0/2
10.0.255.31/32 1027/3 -/GE2/0/2
10.0.1.0/30 1024/3 -/GE2/0/4
10.0.1.0/30 NULL/3 -/GE2/0/4
10.0.255.11/32 1026/17 -/GE2/0/4
10.0.255.11/32 NULL/17 -/GE2/0/4
10.0.255.21/32 1025/3 -/GE2/0/4
10.0.255.21/32 NULL/3 -/GE2/0/4
10.0.3.0/30 3/NULL -/-
Outbound label of the packet with inbound label 1027 is 3. It indicates that RT-D is the
penultimate hop and thus needs to pop off the label
[RT-C]disp mpls ls
-------------------------------------------------------------------------------
LSP Information: BGP LSP
-------------------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
100.0.2.0/24 115712/NULL -/- vpna
100.0.2.0/24 115713/NULL -/- vpnb
100.0.255.1/32 115714/NULL -/- vpnb
12
-------------------------------------------------------------------------------
LSP Information: LDP LSP
-------------------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
10.0.255.31/32 3/NULL -/-
10.0.255.41/32 NULL/3 -/GE1/0/2
10.0.2.0/30 NULL/3 -/GE1/0/2
10.0.1.0/30 NULL/1024 -/GE1/0/2
10.0.255.21/32 NULL/1025 -/GE1/0/2
10.0.255.11/32 NULL/1026 -/GE1/0/2
Labels allocated by RT-C to RT-D are specially 3, which indicates that RT-C is the last
hop. The MPLS LSP forwarding process for other FECs is similar.
13
Lab 9- L2 VPN (sub-interface on 7609 and SVI on CX600)
RT-C PC-C
1/0/6 SW-C
1/0/0 Ge Fe
0/0/1 0/0/9
1/2
2/2
1/1
RT-A
RT-B
2/3
Ge
0/1
Fe SW-A
0/9
PC-A
Group1- RT-B
CX600- RT-C Group2- RT-A, SW-A
C7609-RT-A, RT-B Group3- RT-C, SW-C
C3400 – SW-A
CX200D – SW-C
Configuration Procedure
Step 1 Configure CE.
In our example CE is a PC, therefore configure
PC-A- IP- 50.0.0.1/24
PC-C- IP- 50.0.0.2/24
# Cisco
interface GigabitEthernet2/4.100
encapsulation dot1Q 100
ip address 50.0.0.1 255.255.255.0
2
SW-A(config-if)#port-type nni
SW-A(config-if)#no shut
# Configure SW-C.
[SW-C-gigabitethernet0/0/1]port link-type trunk
[SW-C-gigabitethernet0/0/1]port trunk allow-pass vlan all
[SW-C-gigabitethernet0/0/1]bpdu enable
[SW-C-gigabitethernet0/0/1]undo shut
[RT-C]ospf 100
[RT-C-ospf-100]area 0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.255.31 0.0.0.0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
After the configuration, the OSPF neighbor relationship should be established between RT-A, RT-B, RT-D and
RT-C. After running the show ip ospf neighbor & display ospf peer command, you can find that the OSPF
neighbor relationship is in Full state. Run the show ip routing-table & display ip routing-table command on
the PE (RT-A, RT-C), and you can view the Loopback0 routes imported from the peer.
Step 4 Configure MPLS basic capability and LDP on MPLS backbone network.
# Configure RT-A.
RT-A(config)#mpls ip
RT-A(config)#mpls ldp router-id Loopback0 force
RT-A(config-if)#mpls ip
3
RT-A(config-if)#mpls label protocol ldp
# Configure RT-B.
RT-B(config)#mpls ip
RT-B(config)#mpls ldp router-id Loopback0 force
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls label protocol ldp
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls label protocol ldp
# Configure RT-C.
[RT-C]mpls lsr-id 10.0.255.31
[RT-C]mpls
[RT-C]mpls ldp
[RT-C-gigabitethernet1/0/2]mpls
[RT-C-gigabitethernet1/0/2]mpls ldp
After the configuration, run the display mpls ldp session command on PE2 to check the
establishment of the LDP session. You can find that the remote LDP session between PE1
and PE2 is newly set up.
[RT-C]display mpls ldp session
4
Addresses bound to peer LDP Ident:
10.0.1.2 10.0.255.21 10.0.2.1
Peer LDP Ident: 10.0.255.31:0; Local LDP Ident 10.0.255.11:0
TCP connection: 10.0.255.31.49803 - 10.0.255.11.646
State: Oper; Msgs sent/rcvd: 510/452; Downstream
Up time: 01:47:50
LDP discovery sources:
Targeted Hello 10.0.255.11 -> 10.0.255.31, active, passive
Addresses bound to peer LDP Ident:
10.0.2.2 10.0.255.31
[RT-C]Vlan 200
[RT-C]vsi 11 static
[RT-C-vsi-11]pwsignal ldp
[RT-C-vsi-11-ldp]vsi-id 10
[RT-C-vsi-11-ldp]peer 10.0.255.11
RT-A(config)#vlan 200
RT-A(config)#interface vlan 200
RT-A(config-if)#no ip address
RT-A(config-if)#xconnect 10.0.255.11 10 encap mpls
RT-A(config-if)#no shut
5
Check:-
PC-A and PC-C can successfully ping each other.
Check the L2VPN connection on the PEs. You can find that an L2VC is set up and the VC
status is Up.
6
Lab 10- L2 VPN (sub-interface both sides) (Optional)
RT-C PC-C
1/0/6 SW-C
1/0/0 Ge Fe
0/0/1 0/0/9
1/2
2/2
1/1
RT-A
RT-B
2/3
Ge
0/1
Fe SW-A
0/9
PC-A
Group1- RT-B
CX600- RT-C Group2- RT-A, SW-A
C7609-RT-A, RT-B Group3- RT-C, SW-C
C3400 – SW-A
CX200D – SW-C
Configuration Procedure
Step 1 Configure CE.
In our example CE is a PC, therefore configure
PC-A- IP- 50.0.0.1/24
PC-C- IP- 50.0.0.2/24
# Cisco
interface GigabitEthernet2/4.100
encapsulation dot1Q 100
ip address 50.0.0.1 255.255.255.0
2
SW-A(config-if)#port-type nni
SW-A(config-if)#no shut
# Configure SW-C.
[SW-C-gigabitethernet0/0/1]port link-type trunk
[SW-C-gigabitethernet0/0/1]port trunk allow-pass vlan all
[SW-C-gigabitethernet0/0/1]bpdu enable
[SW-C-gigabitethernet0/0/1]undo shut
[RT-C]ospf 100
[RT-C-ospf-100]area 0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.255.31 0.0.0.0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
After the configuration, the OSPF neighbor relationship should be established between RT-A, RT-B, RT-D and
RT-C. After running the show ip ospf neighbor & display ospf peer command, you can find that the OSPF
neighbor relationship is in Full state. Run the show ip routing-table & display ip routing-table command on
the PE (RT-A, RT-C), and you can view the Loopback0 routes imported from the peer.
Step 4 Configure MPLS basic capability and LDP on MPLS backbone network.
# Configure RT-A.
RT-A(config)#mpls ip
RT-A(config)#mpls ldp router-id Loopback0 force
RT-A(config-if)#mpls ip
3
RT-A(config-if)#mpls label protocol ldp
# Configure RT-B.
RT-B(config)#mpls ip
RT-B(config)#mpls ldp router-id Loopback0 force
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls label protocol ldp
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls label protocol ldp
# Configure RT-C.
[RT-C]mpls lsr-id 10.0.255.31
[RT-C]mpls
[RT-C]mpls ldp
[RT-C-gigabitethernet1/0/2]mpls
[RT-C-gigabitethernet1/0/2]mpls ldp
After the configuration, run the display mpls ldp session command on PE2 to check the
establishment of the LDP session. You can find that the remote LDP session between PE1
and PE2 is newly set up.
[RT-C]display mpls ldp session
4
Addresses bound to peer LDP Ident:
10.0.1.2 10.0.255.21 10.0.2.1
Peer LDP Ident: 10.0.255.31:0; Local LDP Ident 10.0.255.11:0
TCP connection: 10.0.255.31.49803 - 10.0.255.11.646
State: Oper; Msgs sent/rcvd: 510/452; Downstream
Up time: 01:47:50
LDP discovery sources:
Targeted Hello 10.0.255.11 -> 10.0.255.31, active, passive
Addresses bound to peer LDP Ident:
10.0.2.2 10.0.255.31
5
Check:-
PC-A and PC-C can successfully ping each other.
Check the L2VPN connection on the PEs. You can find that an L2VC is set up and the VC
status is Up.
6
Lab 11- VPLS (using SVI on CX600)
RT-E
1/0/6 SW-E
1/0/0 Ge
0/0/1
2/0/0
RT-C 1/0/2
2/0/2
2/0/8
1/0/6 RT-D
Ge Ge
0/0/1 0/1
SW-C
SW-D
1
Configuration Procedure
Step 1 Configure SW & RT for access
[SW-C ]vlan 10
SW-D(config)# vlan 20
2
[SW-E ]vlan 30
[SW-E]interface vlanif 30
[SW-E-vlanif30]ip address 1.0.0.3 255.0.0.0
[SW-E- vlanif30]undo shut
[RT-D]ospf 100
[RT-D-ospf-100]area 0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.255.41 0.0.0.0
[RT-D-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
[RT-E]ospf 100
[RT-E-ospf-100]area 0
[RT-E-ospf-100-area-0.0.0.0]network 10.0.255.51 0.0.0.0
[RT-E-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
# Configure RT-C.
[RT-C]mpls lsr-id 10.0.255.31
[RT-C]mpls
[RT-C]mpls ldp
[RT-C-gigabitethernet1/0/2]mpls
[RT-C-gigabitethernet1/0/2]mpls ldp
# Configure RT-D.
[RT-D]mpls lsr-id 10.0.255.41
[RT-D]mpls
[RT-D]mpls ldp
[RT-D-gigabitethernet2/0/0]mpls
[RT-D-gigabitethernet2/0/0]mpls ldp
[RT-D-gigabitethernet2/0/2]mpls
[RT-D-gigabitethernet2/0/2]mpls ldp
# Configure RT-E.
[RT-E]mpls lsr-id 10.0.255.51
[RT-E]mpls
[RT-E]mpls ldp
[RT-E-gigabitethernet1/0/0]mpls
3
[RT-E-gigabitethernet1/0/0]mpls ldp
# Configure RT-C.
[RT-C] mpls ldp remote-peer 1
[RT-C-mpls-ldp-remote-1] remote-ip 10.0.255.51
# Configure RT-E.
[RT-E] mpls ldp remote-peer 1
[RT-E-mpls-ldp-remote-1] remote-ip 10.0.255.31
After the configuration, run the display mpls ldp session command on PEs to check the
establishment of the LDP session. You can find that the remote LDP session between PEs
are newly set up.
# Configure RT-D.
[RT-D] mpls l2vpn
# Configure RT-E.
[RT-E] mpls l2vpn
4
Step 6 Configure a VSI on each PE.
# Configure RT-C.
[RT-C]vsi 50 static
[RT-C-vsi-50]pwsignal ldp
[RT-C-vsi-50-ldp]vsi-id 25
[RT-C-vsi-50-ldp]peer 10.0.255.41
[RT-C-vsi-50-ldp]peer 10.0.255.51
# Configure RT-D.
[RT-D]vsi 50 static
[RT-D-vsi-50]pwsignal ldp
[RT-D-vsi-50-ldp]vsi-id 25
[RT-D-vsi-50-ldp]peer 10.0.255.31
[RT-D-vsi-50-ldp]peer 10.0.255.51
# Configure RT-E.
[RT-E]vsi 50 static
[RT-E-vsi-50]pwsignal ldp
[RT-E-vsi-50-ldp]vsi-id 25
[RT-E-vsi-50-ldp]peer 10.0.255.31
[RT-E-vsi-50-ldp]peer 10.0.255.41
# Configure RT-C.
[RT-C] vlan 10
[RT-C] interface vlanif 10
[RT-C-vlanif10] l2 binding vsi 50
[RT-C-vlanif10]undo shut
# Configure RT-D.
[RT-D] vlan 20
[RT-D] interface vlanif 20
[RT-D-vlanif20] l2 binding vsi 50
[RT-D-vlanif20]undo shut
# Configure RT-E.
[RT-E] vlan 30
[RT-E] interface vlanif 30
[RT-E-vlanif30] l2 binding vsi 50
[RT-E-vlanif30]undo shut
5
Step 8 Verify the configuration.
After the configuration, run the following command on PEs, and you can see that VSI named
50 establishes a PW to PE1 & PE2 and the VSI is Up.
Check:-
Ping from [SW-C]ping 1.0.0.2
6
Lab 12- VPLS (using SVI) (Optional)
Note- VFI/VSI will be UP, but will not ping because 7609 don’t have OSM card.
RT-C
1/0/6 SW-C
1/0/0 Ge Fe
0/0/1 0/0/9 PC-C
1/2
2/2
1/1
RT-A 1/4
RT-B
2/3
Ge Ge
0/1 0/0/1
Fe SW-A
0/9 PC-B
SW-B
PC-A
2
[SW-B-ethernet0/0/9]undo shut
[RT-C]ospf 100
[RT-C-ospf-100]area 0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.255.31 0.0.0.0
[RT-C-ospf-100-area-0.0.0.0]network 10.0.0.0 0.255.255.255
# Configure RT-B.
RT-B(config)#mpls ip
RT-B(config)#mpls ldp router-id Loopback0 force
RT-B(config-if)#mpls ip
3
RT-B(config-if)#mpls label protocol ldp
RT-B(config-if)#mpls ip
RT-B(config-if)#mpls label protocol ldp
# Configure RT-C.
[RT-C]mpls lsr-id 10.0.255.31
[RT-C]mpls
[RT-C]mpls ldp
[RT-C-gigabitethernet1/0/0]mpls
[RT-C-gigabitethernet1/0/0]mpls ldp
# Configure RT-C.
[PE2] mpls ldp remote-peer 1
[PE2-mpls-ldp-remote-1] remote-ip 10.0.255.11
After the configuration, run the display mpls ldp session or show mpls ldp neighbor
command on PEs to check the establishment of the LDP session. You can find that the
remote LDP session between PEs are newly set up.
4
LDP discovery sources:
GigabitEthernet1/2, Src IP addr: 10.0.2.2
Addresses bound to peer LDP Ident:
10.0.2.2 10.0.255.31
# Configure RT-A.
RT-A(config)#l2 vfi 2611 manual
RT-A(config-vfi)#vpn id 20
RT-A(config-vfi)#neighbor 10.0.255.21 encapsulation mpls
RT-A(config-vfi)#neighbor 10.0.255.31 encapsulation mpls
# Configure RT-B.
RT-B(config)#l2 vfi 2611 manual
RT-A(config-vfi)#vpn id 20
RT-A(config-vfi)#neighbor 10.0.255.11 encapsulation mpls
RT-A(config-vfi)#neighbor 10.0.255.31 encapsulation mpls
# Configure RT-C.
[RT-C]vsi 2611 static
[RT-C-vsi-2611]pwsignal ldp
5
[RT-C-vsi-2611-ldp]vsi-id 20
[RT-C-vsi-2611-ldp]peer 10.0.255.11
[RT-C-vsi-2611-ldp]peer 10.0.255.21
# Configure RT-A.
RT-A(config)#vlan 100
RT-A(config)#interface vlan 100
RT-A(config-if)#no ip address
RT-A(config-if)#xconnect vfi 2611
RT-A(config-if)#no shut
# Configure RT-B.
RT-B(config)#vlan 200
RT-B(config)#interface vlan 200
RT-B(config-if)#no ip address
RT-B(config-if)#xconnect vfi 2611
RT-B(config-if)#no shut
# Configure RT-C.
[RT-C] vlan 300
[RT-C] interface vlanif 300
[RT-C-vlanif300] l2 binding vsi 2611
[RT-C-vlanif300]undo shut
6
Peer Address VC ID S
10.0.255.31 20 Y
10.0.255.11 20 Y