1841-1#
ip cef
1841-2#
ip cef
3825-1#
ip cef
Step 2: Configure IGP
1841-1#
router ospf 1
router-id 11.11.11.11
log-adjacency-changes
passive-interface default
no passive-interface FastEthernet0/0
network 192.168.0.1 0.0.0.0 area 0
3825-1#
router ospf 1
router-id 22.22.22.22
log-adjacency-changes
passive-interface default
no passive-interface GigabitEthernet0/0
no passive-interface GigabitEthernet0/1
network 192.168.0.2 0.0.0.0 area 0
network 192.168.0.5 0.0.0.0 area 0
1841-2#
router ospf 1
router-id 33.33.33.33
log-adjacency-changes
passive-interface default
no passive-interface FastEthernet0/1
network 192.168.0.6 0.0.0.0 area 0
Step 3: Enable MPLS label forwarding on interface
1841-1#
interface FastEthernet0/0
ip address 192.168.0.1 255.255.255.252
ip ospf network point-to-point
duplex auto
speed auto
mpls ip
end
3825-1#
interface GigabitEthernet0/0
ip address 192.168.0.2 255.255.255.252
ip ospf network point-to-point
duplex auto
speed auto
media-type rj45
mpls ip
end
interface GigabitEthernet0/1
ip address 192.168.0.5 255.255.255.252
ip ospf network point-to-point
duplex auto
speed auto
media-type rj45
mpls ip
end
1841-2#
interface FastEthernet0/1
ip address 192.168.0.6 255.255.255.252
ip ospf network point-to-point
duplex auto
speed auto
mpls ip
end
Note:
1. Default label switching protocol is LDP, hence it is not necessary to explicitly enable LDP in global configuration mode.
mpls label protocol ?
ldp Use LDP (default)
tdp Use TDP
2. MPLS router-id uses the highest loopback address as its router-id, if no loopback interface exists the highest physical interface ip address will be used as router-id.
In this lab, I have defined the loopback interface for each router.
3. The ingress LSR will impose a label and swap the label with the next hop router.
4. The egress LSR will pop the label and send out the packet entered from the ingress LSR.
5. The penultimate LSR is the router before the egress (popping) LSR.
MPLS verification
1841-1#sh mpls interfaces
Interface IP Tunnel BGP Static Operational
FastEthernet0/0 Yes (ldp) No No No Yes
3825-1#sh mpls interface
Interface IP Tunnel Operational
GigabitEthernet0/0 Yes (ldp) No Yes
GigabitEthernet0/1 Yes (ldp) No Yes
1841-2#sh mpls interface
Interface IP Tunnel BGP Static Operational
FastEthernet0/1 Yes (ldp) No No No Yes