Tuesday, January 19, 2016

MPLS task #2. MPLS LDP labels

Topology:




Use configuration from MPLS task #1 as initial configuration for this task.

Requirements: 

1. Routers R1 should only  advertise labels for Loopback0 addresses to neighbors. 
2. Router R4 should only allocate and advertise labels for loopback0 addresses to neighbors. 
3. Router R7 should receive only labels for loopback0 interfaces from router R6. 
4. Router R7 should accept only labels for Loopback0 interfaces from router R5. 
5. Routers R1 should accept only labels for Loopback0 addresses from its neighbors.

Solution:

Highlight the text below to reveal the solution.

This task requires understanding of local, outbound and inbound label allocation filtering

Requirement #1 - on R1, control advertisement of locally assigned labels to all neighbors using 

                             "mpls ldp advertise-labels" configuration - outbound filtering
Requirement #2 - on R4, configure label allocation for host routes only. 
Requirement #3 - on R6, control advertisement towards R7 using "mpls ldp advertise-labels". 
Requirement #4 & 5 - on R7 and R1, control which labels are accepted from neighbors using 
                              "mpls ldp neighbor X.X.X.X labels accept" command - inbound filtering


R1:


!
mpls ldp neighbor 16.0.2.2 labels accept 11
mpls ldp neighbor 16.0.6.6 labels accept 11
no mpls ldp advertise-labels
mpls ldp advertise-labels for 11
!
access-list 11 permit 16.0.1.1
access-list 11 permit 16.0.2.2
access-list 11 permit 16.0.3.3
access-list 11 permit 16.0.4.4
access-list 11 permit 16.0.5.5
access-list 11 permit 16.0.6.6
access-list 11 permit 16.0.7.7
!

R4:


!
mpls ldp
 router-id 16.0.4.4
 address-family ipv4
  label
   local
    allocate for host-routes
   !
  !
 !
!


R6:


!
no mpls ldp advertise-labels
mpls ldp advertise-labels for 11 to 7
mpls ldp advertise-labels for 1 to 2
!
access-list 1 permit any
!
access-list 2 permit 16.0.2.2
access-list 2 permit 16.0.1.1
access-list 2 permit 16.0.5.5
!
access-list 7 permit 16.0.7.7
!
access-list 11 permit 16.0.1.1
access-list 11 permit 16.0.2.2
access-list 11 permit 16.0.3.3
access-list 11 permit 16.0.4.4
access-list 11 permit 16.0.5.5
access-list 11 permit 16.0.6.6
access-list 11 permit 16.0.7.7
!


R7:


!
access-list 11 permit 16.0.1.1
access-list 11 permit 16.0.2.2
access-list 11 permit 16.0.3.3
access-list 11 permit 16.0.4.4
access-list 11 permit 16.0.5.5
access-list 11 permit 16.0.6.6
access-list 11 permit 16.0.7.7
!
mpls ldp neighbor 16.0.5.5 labels accept 11
!

Verification:

* R1 has outgoing labels for loopback0 prefixes only due to inbound filtering.

R1#show mpls forwarding-table
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
16         explicit-n 16.0.2.2/32      0             Et0/0      16.0.12.2
17         17         16.0.3.3/32      0             Et0/0      16.0.12.2
33         18         16.0.4.4/32      0             Et0/0      16.0.12.2
           No Label   16.0.4.4/32      0             Et0/1      16.0.16.6
34         19         16.0.5.5/32      0             Et0/0      16.0.12.2
           No Label   16.0.5.5/32      0             Et0/1      16.0.16.6
35         No Label   16.0.6.6/32      0             Et0/1      16.0.16.6
36         No Label   16.0.7.7/32      0             Et0/1      16.0.16.6
37         No Label   16.0.23.0/24     0             Et0/0      16.0.12.2
38         No Label   16.0.25.0/24     0             Et0/0      16.0.12.2
39         No Label   16.0.26.0/24     0             Et0/0      16.0.12.2
           No Label   16.0.26.0/24     0             Et0/1      16.0.16.6
40         No Label   16.0.34.0/24     0             Et0/0      16.0.12.2
41         No Label   16.0.35.0/24     0             Et0/0      16.0.12.2
           No Label   16.0.35.0/24     0             Et0/1      16.0.16.6
42         No Label   16.0.45.0/24     0             Et0/0      16.0.12.2
           No Label   16.0.45.0/24     0             Et0/1      16.0.16.6
43         No Label   16.0.56.0/24     0             Et0/1      16.0.16.6
44         No Label   16.0.57.0/24     0             Et0/0      16.0.12.2
           No Label   16.0.57.0/24     0             Et0/1      16.0.16.6
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
45         No Label   16.0.67.0/24     0             Et0/1      16.0.16.6




Note that R1 only advertise labels for loopback prefixes to neighbors, while R7 advertises labels for all known prefixes. 

R6#show mpls ldp bindings neighbor 16.0.1.1
  lib entry: 16.0.1.1/32, rev 55
        remote binding: lsr: 16.0.1.1:0, label: imp-null
  lib entry: 16.0.2.2/32, rev 56
        remote binding: lsr: 16.0.1.1:0, label: 16
  lib entry: 16.0.3.3/32, rev 57
        remote binding: lsr: 16.0.1.1:0, label: 17
  lib entry: 16.0.4.4/32, rev 58
        remote binding: lsr: 16.0.1.1:0, label: 33
  lib entry: 16.0.5.5/32, rev 59
        remote binding: lsr: 16.0.1.1:0, label: 34
  lib entry: 16.0.6.6/32, rev 60
        remote binding: lsr: 16.0.1.1:0, label: 35
  lib entry: 16.0.7.7/32, rev 61
        remote binding: lsr: 16.0.1.1:0, label: 36


R6#show mpls ldp bindings neighbor 16.0.7.7
  lib entry: 16.0.1.1/32, rev 55
        remote binding: lsr: 16.0.7.7:0, label: 16
  lib entry: 16.0.2.2/32, rev 56
        remote binding: lsr: 16.0.7.7:0, label: 17
  lib entry: 16.0.3.3/32, rev 57
        remote binding: lsr: 16.0.7.7:0, label: 18
  lib entry: 16.0.4.4/32, rev 58
        remote binding: lsr: 16.0.7.7:0, label: 19
  lib entry: 16.0.5.5/32, rev 59
        remote binding: lsr: 16.0.7.7:0, label: 20
  lib entry: 16.0.6.6/32, rev 60
        remote binding: lsr: 16.0.7.7:0, label: 21
  lib entry: 16.0.7.7/32, rev 61
        remote binding: lsr: 16.0.7.7:0, label: imp-null
  lib entry: 16.0.12.0/24, rev 62
        remote binding: lsr: 16.0.7.7:0, label: 22
  lib entry: 16.0.16.0/24, rev 63
        remote binding: lsr: 16.0.7.7:0, label: 23
  lib entry: 16.0.23.0/24, rev 64
        remote binding: lsr: 16.0.7.7:0, label: 24
  lib entry: 16.0.25.0/24, rev 65
        remote binding: lsr: 16.0.7.7:0, label: 25
  lib entry: 16.0.26.0/24, rev 66
        remote binding: lsr: 16.0.7.7:0, label: 26
  lib entry: 16.0.34.0/24, rev 67
        remote binding: lsr: 16.0.7.7:0, label: 27
  lib entry: 16.0.35.0/24, rev 68
        remote binding: lsr: 16.0.7.7:0, label: 28
  lib entry: 16.0.45.0/24, rev 69
        remote binding: lsr: 16.0.7.7:0, label: 29
  lib entry: 16.0.56.0/24, rev 70
        remote binding: lsr: 16.0.7.7:0, label: 30
  lib entry: 16.0.57.0/24, rev 71
        remote binding: lsr: 16.0.7.7:0, label: imp-null
  lib entry: 16.0.67.0/24, rev 72
        remote binding: lsr: 16.0.7.7:0, label: imp-null


* R4 has both local and outgoing labels for loopback0 prefixes only. 

RP/0/0/CPU0:R4#                    show mpls forwarding
Sun Jan  3 17:04:23.402 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
16000  Exp-Null-v4 16.0.3.3/32        Gi0/0/0/2    16.0.34.3       25547
16001  Pop         16.0.5.5/32        Gi0/0/0/0    16.0.45.5       7701
16002  20          16.0.6.6/32        Gi0/0/0/0    16.0.45.5       0
16003  21          16.0.7.7/32        Gi0/0/0/0    16.0.45.5       0
16009  16          16.0.1.1/32        Gi0/0/0/0    16.0.45.5       1040
       16000       16.0.1.1/32        Gi0/0/0/2    16.0.34.3       0
16010  17          16.0.2.2/32        Gi0/0/0/0    16.0.45.5       0
       16001       16.0.2.2/32        Gi0/0/0/2    16.0.34.3       0


* bindings received by R5 from R4 and R3, note R4 only advertises bindings for loopbacks

R5#show mpls ldp bindings neighbor 16.0.4.4
  lib entry: 16.0.1.1/32, rev 55
        remote binding: lsr: 16.0.4.4:0, label: 16009
  lib entry: 16.0.2.2/32, rev 56
        remote binding: lsr: 16.0.4.4:0, label: 16010
  lib entry: 16.0.3.3/32, rev 57
        remote binding: lsr: 16.0.4.4:0, label: 16000
  lib entry: 16.0.4.4/32, rev 58
        remote binding: lsr: 16.0.4.4:0, label: imp-null
  lib entry: 16.0.5.5/32, rev 59
        remote binding: lsr: 16.0.4.4:0, label: 16001
  lib entry: 16.0.6.6/32, rev 60
        remote binding: lsr: 16.0.4.4:0, label: 16002
  lib entry: 16.0.7.7/32, rev 61
        remote binding: lsr: 16.0.4.4:0, label: 16003
R5#show mpls ldp bindings neighbor 16.0.3.3
  lib entry: 16.0.1.1/32, rev 55
        remote binding: lsr: 16.0.3.3:0, label: 16000
  lib entry: 16.0.2.2/32, rev 56
        remote binding: lsr: 16.0.3.3:0, label: 16001
  lib entry: 16.0.3.3/32, rev 57
        remote binding: lsr: 16.0.3.3:0, label: exp-null
  lib entry: 16.0.4.4/32, rev 58
        remote binding: lsr: 16.0.3.3:0, label: 16002
  lib entry: 16.0.5.5/32, rev 59
        remote binding: lsr: 16.0.3.3:0, label: 16003
  lib entry: 16.0.6.6/32, rev 60
        remote binding: lsr: 16.0.3.3:0, label: 16004
  lib entry: 16.0.7.7/32, rev 61
        remote binding: lsr: 16.0.3.3:0, label: 16005
  lib entry: 16.0.12.0/24, rev 62
        remote binding: lsr: 16.0.3.3:0, label: 16009
  lib entry: 16.0.16.0/24, rev 63
        remote binding: lsr: 16.0.3.3:0, label: 16012
  lib entry: 16.0.23.0/24, rev 64
        remote binding: lsr: 16.0.3.3:0, label: exp-null
  lib entry: 16.0.25.0/24, rev 65
        remote binding: lsr: 16.0.3.3:0, label: 16007
  lib entry: 16.0.26.0/24, rev 66
        remote binding: lsr: 16.0.3.3:0, label: 16010
  lib entry: 16.0.34.0/24, rev 67
        remote binding: lsr: 16.0.3.3:0, label: exp-null
  lib entry: 16.0.35.0/24, rev 68
        remote binding: lsr: 16.0.3.3:0, label: exp-null
  lib entry: 16.0.45.0/24, rev 69
        remote binding: lsr: 16.0.3.3:0, label: 16006
  lib entry: 16.0.56.0/24, rev 70
        remote binding: lsr: 16.0.3.3:0, label: 16011
  lib entry: 16.0.57.0/24, rev 71
        remote binding: lsr: 16.0.3.3:0, label: 16008
  lib entry: 16.0.67.0/24, rev 72
        remote binding: lsr: 16.0.3.3:0, label: 16013
R5#


* R7 only contains bindings for loopback0 prefixes, due to inbound filtering from R5, and outbound filtering on R6:

R7#   show mpls forwarding-table
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
16         Pop Label  16.0.6.6/32      0             Et0/0      16.0.67.6
17         Pop Label  16.0.5.5/32      0             Et0/1      16.0.57.5
18         19         16.0.4.4/32      0             Et0/1      16.0.57.5
19         18         16.0.3.3/32      0             Et0/1      16.0.57.5
20         17         16.0.2.2/32      0             Et0/1      16.0.57.5
           17         16.0.2.2/32      0             Et0/0      16.0.67.6
21         16         16.0.1.1/32      0             Et0/0      16.0.67.6
22         No Label   16.0.34.0/24     0             Et0/1      16.0.57.5
23         No Label   16.0.12.0/24     0             Et0/1      16.0.57.5
           No Label   16.0.12.0/24     0             Et0/0      16.0.67.6
24         No Label   16.0.23.0/24     0             Et0/1      16.0.57.5
           No Label   16.0.23.0/24     0             Et0/0      16.0.67.6
25         No Label   16.0.26.0/24     0             Et0/0      16.0.67.6
26         No Label   16.0.25.0/24     0             Et0/1      16.0.57.5
27         No Label   16.0.35.0/24     0             Et0/1      16.0.57.5
28         No Label   16.0.45.0/24     0             Et0/1      16.0.57.5
29         No Label   16.0.16.0/24     0             Et0/0      16.0.67.6
30         No Label   16.0.56.0/24     0             Et0/1      16.0.57.5
           No Label   16.0.56.0/24     0             Et0/0      16.0.67.6

No comments:

Post a Comment