MPLS NOTES
TODO
MPLS SEGMENT ROUTING NOTES (SRv6)
think of SRv6–using IPv6 addresses as segment IDs, and breaking the least significant /64 to create microsids for service differentiation
Is mostly MPLS but:
Options:
MPLS FOR ARISTA:
Review limitations here specially regarding next-hop-self in RR topologies.
!! PE CONFIGURATION
ip routing vrf BLUE
ip routing vrf RED
vrf instance RED
vrf instance BLUE
interface Ethernet4
description pe1 -> c12
mac-address 52:dc:ca:fe:03:04
no switchport
vrf BLUE
ip address 10.1.12.1/24
!
router bgp 65000
router-id 10.0.0.3
bgp advertise-inactive
neighbor 10.0.0.1 remote-as 65000
neighbor 10.0.0.1 next-hop-self
neighbor 10.0.0.1 update-source Loopback0
neighbor 10.0.0.1 description rr1
neighbor 10.0.0.1 send-community standard extended
!
address-family ipv4
neighbor 10.0.0.1 activate
!
address-family vpn-ipv4
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 encapsulation mpls next-hop-self source-interface Loopback0
!
vrf BLUE
rd 1.1.1.1:200
route-target import vpn-ipv4 200:0
route-target export vpn-ipv4 200:0
redistribute connected
redistribute static
redistribute ospf
!
vrf RED
rd 1.1.1.1:100
route-target import vpn-ipv4 100:0
route-target export vpn-ipv4 100:0
redistribute connected
redistribute static
redistribute ospf
!! P CONFIGURATION configure terminal
! note we don't need to enable ldp in each interface individually interface Loopback0 mpls ip mpls ldp router-id interface Loopback0 no shutdown
!! ROUTE REFLECTOR:
router bgp 65000
router-id 10.0.0.1
bgp cluster-id 10.0.0.1
bgp route-reflector preserve-attributes
bgp advertise-inactive
neighbor 10.0.0.2 remote-as 65000
! neighbor 10.0.0.2 next-hop-self
neighbor 10.0.0.2 update-source Loopback0
neighbor 10.0.0.2 description rr2
neighbor 10.0.0.2 send-community standard extended
!
address-family ipv4
neighbor 10.0.0.2 activate
!
address-family vpn-ipv4
neighbor 10.0.0.3 activate
neighbor 10.0.0.3 encapsulation mpls next-hop-self source-interface Loopback0
IMPLICIT/EXPLICIT NULL
SHOW COMMANDS:
show ip bgp vrf red
show ip route vrf red | begin Gateway
show mpls lfib route # arista only labels for lo. You'll only see transport labels here
show bgp vpn-ipv4 172.16.0.0/24 detail # this is for the vpnv4 of the customer prefix 172
!
pe1#show bgp vpn-ipv4 172.16.2.0/24 detail
BGP routing table information for VRF default
Router identifier 10.0.0.1, local AS number 65000
BGP routing table entry for IPv4 prefix 172.16.2.0/24, Route Distinguisher: 65000:2
Paths: 1 available
Local
10.0.0.2 from 10.0.0.2 (10.0.0.2)
Origin IGP, metric -, localpref 100, weight 0, valid, internal, best
Extended Community: Route-Target-AS:65000:2
Remote MPLS label: 100001 <<< the vpnv4 label for 172.16.2.0/24
!
traceroute mpls ldp ip 10.0.0.1/32 # this shows the swapping of the transport label
show mpls ldp neighbor # luk lesson 2.3
show mpls ldp bindings # luk lesson 2.3
In the shortest-path mode the label encodes the destination it stays the same (the last router label) the entire journey. Eg: P2 router receives the last router's label (doesn't change) looks it up in its LFIB, finds “next hop toward the last router is P3, outgoing label (same label)”, forwards it. Each P router has a LFIB that has been synchronized via ISIS so they know what is the next hop as soon as they check the label
Configure explicit TE:
PE1
management te
mpls traffic-eng
router traffic-engineering
segment-routing
policy endpoint 10.0.0.6 color 100
name TO-PE2-EXPLICIT
binding-sid 1000100
path-group preference 100
segment-list label-stack 900007 900008 900009 900010 900006
route-map SET-COLOR-100 permit 10
set extcommunity color 100
router bgp 65001
neighbor 10.0.0.6 route-map SET-COLOR-100 in
show traffic-engineering segment-routing policy
Endpoint 10.0.0.6 Color 100, Name: TO-PE2-EXPLICIT, Counters: not available
Path group: State: active (for 00:02:05), modified: 00:02:05 ago
Protocol: Static
Originator: 0.0.0.0(AS0)
Preference: 100
IGP metric: 0 (static)
Binding SID: 1000100
Explicit null label policy: IPv6 (system default)
Segment List: State: Valid, ID: 1, Counters: not available
Protected: No, Reason: The top label is not protected
Label Stack: [900007 900008 900009 900010 900006], Weight: 1
Resolved Label Stack: [900008 900009 900010 900006], Next hop: 10.1.0.2, Interface: Ethernet1
show traffic-engineering segment-routing policy
show isis segment-routing prefix-segments
show ip route vrf t1 172.16.1.0/24 detail
<ios-xr commands> show mpls forwarding labels <label> show segment-routing traffic-eng policy summary show source-routing sr-te policy color 100 endpoint <IP> detail show segment-routing traffic-eng policy endpoint ipv4