Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

Scenario 1: Incoming Three Layer Label

Step 1: Configure loopback interface

Switch A:

admin@XorPlus#set vlan-interface loopback address 28.28.28.28 prefix-length 32

Switch B:

admin@XorPlus#set vlan-interface loopback address 17.17.17.17 prefix-length 32

Switch C:

admin@XorPlus#set vlan-interface loopback address 31.31.31.31 prefix-length 32

Step 2: Configure VLAN-interface

Switch A:  

admin@XorPlus# set vlans vlan-id 200 l3-interface "vlan200"
admin@XorPlus#set vlans vlan-id 300 l3-interface "vlan300"
admin@XorPlus# set vlan-interface interface vlan200 vif vlan200 address 192.168.2.1 prefix-length 24
admin@XorPlus#set vlan-interface interface vlan300 vif vlan300 address 192.168.3.1 prefix-length 24
admin@XorPlus# set interface gigabit-ethernet te-1/1/6 family ethernet-switching native-vlan-id 300
admin@XorPlus#set interface gigabit-ethernet te-1/1/38 family ethernet-switching native-vlan-id 200

Switch B:  

admin@XorPlus#set vlans vlan-id 300 l3-interface "vlan300"
admin@XorPlus#set vlans vlan-id 500 l3-interface "vlan500"
admin@XorPlus# set vlan-interface interface vlan300 vif vlan300 address 192.168.3.2 prefix-length 24
admin@XorPlus#set vlan-interface interface vlan500 vif vlan500 address 192.168.5.2 prefix-length 24
admin@XorPlus#set interface gigabit-ethernet te-1/1/3 family ethernet-switching native-vlan-id 500
admin@XorPlus#set interface gigabit-ethernet te-1/1/2 family ethernet-switching native-vlan-id 300

Switch C:   

admin@XorPlus# set vlans vlan-id 500 l3-interface "vlan500"
admin@XorPlus# set vlans vlan-id 700 l3-interface "vlan700"
admin@XorPlus#set vlan-interface interface vlan500 vif vlan500 address 192.168.5.1 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan700 vif vlan700 address 192.168.7.1 prefix-length 24
admin@XorPlus#set interface gigabit-ethernet te-1/1/46 family ethernet-switching native-vlan-id 500
admin@XorPlus#set interface gigabit-ethernet te-1/1/48 family ethernet-switching native-vlan-id 700

Step 3: Configure static route on A, B, C so that the loopback interface is reachable.

Switch A:

admin@XorPlus#set protocols static route 17.17.17.17/32 next-hop 192.168.3.2

Switch B:   

admin@XorPlus#set protocols static route 28.28.28.28/32 next-hop 192.168.3.1
admin@XorPlus#set protocols static route 31.31.31.31/32 next-hop 192.168.5.1

Switch C:

admin@XorPlus#set protocols static route 17.17.17.17/32 next-hop 192.168.5.2

Step 4: Configure BGP

Switch A:   

admin@XorPlus#set protocols bgp bgp-id 28.28.28.28
admin@XorPlus#set protocols bgp local-as "17"
admin@XorPlus#set protocols bgp fast-external-fallover disable true
admin@XorPlus#set protocols bgp peer 17.17.17.17 local-ip "28.28.28.28"
admin@XorPlus#set protocols bgp peer 17.17.17.17 as "17"
admin@XorPlus#set protocols bgp peer 17.17.17.17 next-hop-self true

Switch B:   

admin@XorPlus#set protocols bgp bgp-id 17.17.17.17
admin@XorPlus#set protocols bgp local-as "17"
admin@XorPlus# set protocols bgp route-reflector cluster-id 17.17.17.17
admin@XorPlus#set protocols bgp peer 28.28.28.28 local-ip "17.17.17.17"
admin@XorPlus#set protocols bgp peer 28.28.28.28 as "17"
admin@XorPlus# set protocols bgp peer 28.28.28.28 next-hop-self true
admin@XorPlus#set protocols bgp peer 28.28.28.28 client true
admin@XorPlus#set protocols bgp peer 31.31.31.31 local-ip "17.17.17.17"
admin@XorPlus#set protocols bgp peer 31.31.31.31 as "17"
admin@XorPlus#set protocols bgp peer 31.31.31.31 next-hop-self true
admin@XorPlus#set protocols bgp peer 31.31.31.31 client true

Switch C:   

admin@XorPlus#set protocols bgp bgp-id 31.31.31.31
admin@XorPlus#set protocols bgp local-as "17"
admin@XorPlus#set protocols bgp peer 17.17.17.17 local-ip "31.31.31.31"
admin@XorPlus#set protocols bgp peer 17.17.17.17 as "17"
admin@XorPlus#set protocols bgp peer 17.17.17.17 next-hop-self true

Step 5: Enable Labeled-BGP on Switch A, Switch B, Switch C

Switch A:

admin@XorPlus#set protocols bgp peer 17.17.17.17 ipv4-label-unicast true

Switch B:  

admin@XorPlus#set protocols bgp peer 28.28.28.28 ipv4-label-unicast true
admin@XorPlus# set protocols bgp peer 31.31.31.31 ipv4-label-unicast true

Switch C:

admin@XorPlus#set protocols bgp peer 17.17.17.17 ipv4-label-unicast true

Step 6: Distribute a BGP route

Switch A:

admin@XorPlus#set protocols bgp network4 192.168.2.0/24

Step 7: Check BGP route table

Switch A:

admin@XorPlus# run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      0.0.0.0          nolabel/nolabel
admin@XorPlus#

Switch B:

admin@XorPlus#  run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      28.28.28.28      16/imp-null
admin@XorPlus#

Switch C:

admin@XorPlus#  run show bgp routes ipv4 l
Possible completions:
  <IPNet>                       Print BGP IPv4 routes of specified prefix
  label                         Print BGP IPv4 routes with labels
admin@XorPlus#  run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      17.17.17.17      17/16
admin@XorPlus#

Step 8: Check MPLS forwarding table on Switch A, Switch B, Switch C

Switch A:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
admin@XorPlus#

Switch B:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
16        imp-null   192.168.2.0/30      te-1/1/2            192.168.3.1
admin@XorPlus#

Switch C:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
17        16         192.168.2.0/30      te-1/1/44           192.168.5.2
admin@XorPlus#

Step 9: Configure MPLS label mapping on Switch C

Switch C:

admin@XorPlus#set protocols mpls in-label 1000 connect 192.168.2.0/30

Note : The label 1000 is the top label that is incoming to the BGP domain.

 

Step 10: Configure MPLS label mapping on Switch A

admin@XorPlus#set protocols mpls in-label 2000 next-hop 192.168.2.2

Note: The label 2000 is the second-level label that is incoming to the BGP domain, and it’s the outgoing label that is out of BGP domain. The next-hop indicates the next-hop IP address where the MPLS packet is forwarding, and with a label 2000.

 

Step 11: Check the MPLS forwarding table on Switch A, Switch B, and Switch C

Switch A:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
2000      2000       --                  te-1/1/38           192.168.2.2
admin@XorPlus#

Switch B:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
16        imp-null   192.168.2.0/30      te-1/1/2            192.168.3.1
admin@XorPlus#

Switch C:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
17        16         192.168.2.0/30      te-1/1/44           192.168.5.2
1000      16         192.168.2.0/30      te-1/1/44           192.168.5.2
admin@XorPlus#

 

Step 12: H2 sends MPLS packet with 3-level MPLS label.

Step 13: Check the packet out of Switch A. the top label 1000 will be popped at the Penultimate Hop.

Scenario 2: Incoming Two Layer Label 


Step 1: Configure loopback interface

Switch A:

admin@XorPlus# set vlan-interface loopback address 28.28.28.28 prefix-length 32

Switch B:

admin@XorPlus# set vlan-interface loopback address 17.17.17.17 prefix-length 32

Switch C:

admin@XorPlus# set vlan-interface loopback address 31.31.31.31 prefix-length 32


Step 2: Configure VLAN-interface

Switch A:

admin@XorPlus# set vlans vlan-id 200 l3-interface "vlan200"
admin@XorPlus# set vlans vlan-id 300 l3-interface "vlan300"
admin@XorPlus# set vlan-interface interface vlan200 vif vlan200 address 192.168.2.1 prefix-length 24
admin@XorPlus#  set vlan-interface interface vlan300 vif vlan300 address 192.168.3.1 prefix-length 24
admin@XorPlus# set interface gigabit-ethernet te-1/1/6 family ethernet-switching native-vlan-id 300
admin@XorPlus# set interface gigabit-ethernet te-1/1/38 family ethernet-switching native-vlan-id 200

Switch B:

admin@XorPlus#  set vlans vlan-id 300 l3-interface "vlan300"
admin@XorPlus# set vlans vlan-id 500 l3-interface "vlan500"
admin@XorPlus#  set vlan-interface interface vlan300 vif vlan300 address 192.168.3.2 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan500 vif vlan500 address 192.168.5.2 prefix-length 24
admin@XorPlus# set interface gigabit-ethernet te-1/1/3 family ethernet-switching native-vlan-id 500
admin@XorPlus# set interface gigabit-ethernet te-1/1/2 family ethernet-switching native-vlan-id 300

Switch C:

admin@XorPlus#  set vlans vlan-id 500 l3-interface "vlan500"
admin@XorPlus# set vlans vlan-id 700 l3-interface "vlan700"
admin@XorPlus# set vlan-interface interface vlan500 vif vlan500 address 192.168.5.1 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan700 vif vlan700 address 192.168.7.1 prefix-length 24
admin@XorPlus# set interface gigabit-ethernet te-1/1/46 family ethernet-switching native-vlan-id 500
admin@XorPlus# set interface gigabit-ethernet te-1/1/48 family ethernet-switching native-vlan-id 700

Step 3: Configure static route on A,B,C so that the loopback interface is reachable

Switch A:

admin@XorPlus# set protocols static route 17.17.17.17/32 next-hop 192.168.3.2

Switch B:

admin@XorPlus#  set protocols static route 28.28.28.28/32 next-hop 192.168.3.1
admin@XorPlus# set protocols static route 31.31.31.31/32 next-hop 192.168.5.1

Switch C:

admin@XorPlus# set protocols static route 17.17.17.17/32 next-hop 192.168.5.2

Step 4: Configure BGP

Switch A:

admin@XorPlus# set protocols bgp bgp-id 28.28.28.28
admin@XorPlus# set protocols bgp local-as "17"
admin@XorPlus#  set protocols bgp fast-external-fallover disable true
admin@XorPlus#  set protocols bgp peer 17.17.17.17 local-ip "28.28.28.28"
admin@XorPlus#  set protocols bgp peer 17.17.17.17 as "17"
admin@XorPlus#  set protocols bgp peer 17.17.17.17 next-hop-self true

Switch B:

admin@XorPlus#  set protocols bgp bgp-id 17.17.17.17
admin@XorPlus#  set protocols bgp local-as "17"
admin@XorPlus#  set protocols bgp route-reflector cluster-id 17.17.17.17
admin@XorPlus#  set protocols bgp peer 28.28.28.28 local-ip "17.17.17.17"
admin@XorPlus# set protocols bgp peer 28.28.28.28 as "17"
admin@XorPlus#  set protocols bgp peer 28.28.28.28 next-hop-self true
admin@XorPlus#  set protocols bgp peer 28.28.28.28 client true
admin@XorPlus#  set protocols bgp peer 31.31.31.31 local-ip "17.17.17.17"
admin@XorPlus# set protocols bgp peer 31.31.31.31 as "17"
admin@XorPlus# set protocols bgp peer 31.31.31.31 next-hop-self true
admin@XorPlus# set protocols bgp peer 31.31.31.31 client true

Switch C:

admin@XorPlus# set protocols bgp bgp-id 31.31.31.31
admin@XorPlus# set protocols bgp local-as "17"
admin@XorPlus#  set protocols bgp peer 17.17.17.17 local-ip "31.31.31.31"
admin@XorPlus#  set protocols bgp peer 17.17.17.17 as "17"
admin@XorPlus# set protocols bgp peer 17.17.17.17 next-hop-self true

Step 5: Enable Labeled-BGP on switch A,B,C

Switch A:

admin@XorPlus#  set protocols bgp peer 17.17.17.17 ipv4-label-unicast true

Switch B:

admin@XorPlus# set protocols bgp peer 28.28.28.28 ipv4-label-unicast true
admin@XorPlus# set protocols bgp peer 31.31.31.31 ipv4-label-unicast true

Switch C:

admin@XorPlus# set protocols bgp peer 17.17.17.17 ipv4-label-unicast true

Step 6: Switch A distributes a BGP route

Switch A:

admin@XorPlus# set protocols bgp network4 192.168.2.0/24

Step 7: Check BGP route table

Switch A:

admin@XorPlus# run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      0.0.0.0          nolabel/nolabel
admin@XorPlus#

Switch B:

admin@XorPlus#  run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      28.28.28.28      16/imp-null
admin@XorPlus#

Switch C:

admin@XorPlus#  run show bgp routes ipv4 l
Possible completions:
  <IPNet>                       Print BGP IPv4 routes of specified prefix
  label                         Print BGP IPv4 routes with labels
admin@XorPlus#  run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      17.17.17.17      17/16
admin@XorPlus#

Step 8: Check MPLS forwarding table on Switch A, Switch B, Switch C

Switch A:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
admin@XorPlus#

Switch B:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
16        imp-null   192.168.2.0/30      te-1/1/2            192.168.3.1
admin@XorPlus#

Switch C:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
17        16         192.168.2.0/30      te-1/1/44           192.168.5.2
admin@XorPlus#

Step 9: Configure MPLS label mapping on Switch C

Switch C:

admin@XorPlus# set protocols mpls in-label 1000 connect 192.168.2.0/30

Note : The label 1000 is the top label that is incoming to the BGP domain

Step 10: Configure MPLS label mapping on Switch A

admin@XorPlus# set protocols mpls in-label 2000 next-hop 192.168.2.2

Note : The label 2000 is the second-level label that incoming BGP domain , and it’s the outgoing label that out of BGP domain,the next-hop is indicate the next-hop ip address where the mpls packet forwarding and with a label 2000.

Step 11: Check the MPLS forwarding table on Switch A, Switch B, Switch C

Switch A:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
2000      2000       --                  te-1/1/38           192.168.2.2
admin@XorPlus#

Switch B:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
16        imp-null   192.168.2.0/30      te-1/1/2            192.168.3.1
admin@XorPlus#

Switch C:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
17        16         192.168.2.0/30      te-1/1/44           192.168.5.2
1000      16         192.168.2.0/30      te-1/1/44           192.168.5.2
admin@XorPlus#

Step 12: H2 send MPLS packet with 2-level MPLS label

Step 13: Check the packet out of Switch A, the top label 1000 will be popped at the Penultimate Hop

 

Scenario 3: Incoming One Layer Label

Step 1: Configure Loopback interface

Switch A:

admin@XorPlus# set vlan-interface loopback address 28.28.28.28 prefix-length 32

Switch B:

admin@XorPlus# set vlan-interface loopback address 17.17.17.17 prefix-length 32

Switch C:

admin@XorPlus# set vlan-interface loopback address 31.31.31.31 prefix-length 32

 

Step 2: Configure VLAN-interface

Switch A:

admin@XorPlus# set vlans vlan-id 200 l3-interface "vlan200"
admin@XorPlus# set vlans vlan-id 300 l3-interface "vlan300"
admin@XorPlus# set vlan-interface interface vlan200 vif vlan200 address 192.168.2.1 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan300 vif vlan300 address 192.168.3.1 prefix-length 24
admin@XorPlus#  set interface gigabit-ethernet te-1/1/6 family ethernet-switching native-vlan-id 300
admin@XorPlus# set interface gigabit-ethernet te-1/1/38 family ethernet-switching native-vlan-id 200

Switch B:

admin@XorPlus# set vlans vlan-id 300 l3-interface "vlan300"
admin@XorPlus# set vlans vlan-id 500 l3-interface "vlan500"
admin@XorPlus# set vlan-interface interface vlan300 vif vlan300 address 192.168.3.2 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan500 vif vlan500 address 192.168.5.2 prefix-length 24
admin@XorPlus# set interface gigabit-ethernet te-1/1/3 family ethernet-switching native-vlan-id 500
admin@XorPlus# set interface gigabit-ethernet te-1/1/2 family ethernet-switching native-vlan-id 300

Switch C:

admin@XorPlus# set vlans vlan-id 500 l3-interface "vlan500"
admin@XorPlus# set vlans vlan-id 700 l3-interface "vlan700"
admin@XorPlus#  set vlan-interface interface vlan500 vif vlan500 address 192.168.5.1 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan700 vif vlan700 address 192.168.7.1 prefix-length 24
admin@XorPlus#  set interface gigabit-ethernet te-1/1/46 family ethernet-switching native-vlan-id 500
admin@XorPlus# set interface gigabit-ethernet te-1/1/48 family ethernet-switching native-vlan-id 700

Step 3: Configure static route on Switch A, Switch B, Switch C so that the loopback interface is reachable

Switch A:

admin@XorPlus# set protocols static route 17.17.17.17/32 next-hop 192.168.3.2

Switch B:

admin@XorPlus#  set protocols static route 28.28.28.28/32 next-hop 192.168.3.1
admin@XorPlus# set protocols static route 31.31.31.31/32 next-hop 192.168.5.1

Switch C:

admin@XorPlus# set protocols static route 17.17.17.17/32 next-hop 192.168.5.2

Step 4: Configure BGP

Switch A:

admin@XorPlus# set protocols bgp bgp-id 28.28.28.28
admin@XorPlus# set protocols bgp local-as "17"
admin@XorPlus# set protocols bgp fast-external-fallover disable true
admin@XorPlus# set protocols bgp peer 17.17.17.17 local-ip "28.28.28.28"
admin@XorPlus#  set protocols bgp peer 17.17.17.17 as "17"
admin@XorPlus# set protocols bgp peer 17.17.17.17 next-hop-self true

Switch B:

admin@XorPlus#  set protocols bgp bgp-id 17.17.17.17
admin@XorPlus#  set protocols bgp local-as "17"
admin@XorPlus# set protocols bgp route-reflector cluster-id 17.17.17.17
admin@XorPlus# set protocols bgp peer 28.28.28.28 local-ip "17.17.17.17"
admin@XorPlus# set protocols bgp peer 28.28.28.28 as "17"
admin@XorPlus#  set protocols bgp peer 28.28.28.28 next-hop-self true
admin@XorPlus# set protocols bgp peer 28.28.28.28 client true
admin@XorPlus# set protocols bgp peer 31.31.31.31 local-ip "17.17.17.17"
admin@XorPlus# set protocols bgp peer 31.31.31.31 as "17"
admin@XorPlus#  set protocols bgp peer 31.31.31.31 next-hop-self true
admin@XorPlus# set protocols bgp peer 31.31.31.31 client true

Switch C:

admin@XorPlus# set protocols bgp bgp-id 31.31.31.31
admin@XorPlus# set protocols bgp local-as "17"
admin@XorPlus# set protocols bgp peer 17.17.17.17 local-ip "31.31.31.31"
admin@XorPlus#  set protocols bgp peer 17.17.17.17 as "17"
admin@XorPlus# set protocols bgp peer 17.17.17.17 next-hop-self true

Step 5: Enable Labeled-BGP on Switch A, Switch B, Switch C

Switch A:

admin@XorPlus# set protocols bgp peer 17.17.17.17 ipv4-label-unicast true

Switch B:

admin@XorPlus# set protocols bgp peer 28.28.28.28 ipv4-label-unicast true
admin@XorPlus#  set protocols bgp peer 31.31.31.31 ipv4-label-unicast true

Switch C:

admin@XorPlus# set protocols bgp peer 17.17.17.17 ipv4-label-unicast true

Step 6: Switch A distribute a BGP route

Switch A:

admin@XorPlus# set protocols bgp network4 192.168.2.0/24

Step 7: Check BGP route table

Switch A:

admin@XorPlus# run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      0.0.0.0          nolabel/nolabel
admin@XorPlus#

Switch B:

admin@XorPlus#  run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      28.28.28.28      16/imp-null
admin@XorPlus#

Switch C:

admin@XorPlus#  run show bgp routes ipv4 l
Possible completions:
  <IPNet>                       Print BGP IPv4 routes of specified prefix
  label                         Print BGP IPv4 routes with labels
admin@XorPlus#  run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      17.17.17.17      17/16
admin@XorPlus#

Step 8: Check MPLS forwarding table on Switch A, Switch B, Switch C

Switch A:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
admin@XorPlus#

Switch B:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
16        imp-null   192.168.2.0/30      te-1/1/2            192.168.3.1
admin@XorPlus#

Switch C:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
17        16         192.168.2.0/30      te-1/1/44           192.168.5.2
admin@XorPlus#

Step 9: Configure MPLS label mapping on Switch C

Switch C:

admin@XorPlus# set protocols mpls in-label 1000 connect 192.168.2.0/30

Note: The label 1000 is the top label that incoming BGP domain

Step 10: Configure MPLS label mapping on Switch A

admin@XorPlus# set protocols mpls in-label 2000 next-hop 192.168.2.2

Note: The label 2000 is the second-level label that is incoming to the BGP domain, and it’s the outgoing label that is out of BGP domain, the next-hop is indicating the next-hop IP address where the MPLS packet is forwarding and with a label 2000.

Step 11: Check the MPLS forwarding table on Switch A, Switch B, Switch C

Switch A:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
2000      2000       --                  te-1/1/38           192.168.2.2
admin@XorPlus#

Switch B:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
16        imp-null   192.168.2.0/30      te-1/1/2            192.168.3.1
admin@XorPlus#

Switch C:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
17        16         192.168.2.0/30      te-1/1/44           192.168.5.2
1000      16         192.168.2.0/30      te-1/1/44           192.168.5.2
admin@XorPlus#

Step 12: H2 send MPLS packet with 1-level MPLS label

Step 13: Check the packet out of Switch A, the top label 1000 will be popped at the Penultimate Hop

Scenario 4: Incoming IP Packet with No-label


Step 1: Configure Loopback interface

Switch A:

admin@XorPlus# set vlan-interface loopback address 28.28.28.28 prefix-length 32

Switch B:

admin@XorPlus# set vlan-interface loopback address 17.17.17.17 prefix-length 32

Switch C:

admin@XorPlus# set vlan-interface loopback address 31.31.31.31 prefix-length 32

 

Step 2: Configure VLAN-interface

Switch A:

admin@XorPlus# set vlans vlan-id 200 l3-interface "vlan200"
admin@XorPlus#  set vlans vlan-id 300 l3-interface "vlan300"
admin@XorPlus# set vlan-interface interface vlan200 vif vlan200 address 192.168.2.1 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan300 vif vlan300 address 192.168.3.1 prefix-length 24
admin@XorPlus# set interface gigabit-ethernet te-1/1/6 family ethernet-switching native-vlan-id 300
admin@XorPlus# set interface gigabit-ethernet te-1/1/38 family ethernet-switching native-vlan-id 200

Switch B:

admin@XorPlus# set vlans vlan-id 300 l3-interface "vlan300"
admin@XorPlus# set vlans vlan-id 500 l3-interface "vlan500"
admin@XorPlus# set vlan-interface interface vlan300 vif vlan300 address 192.168.3.2 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan500 vif vlan500 address 192.168.5.2 prefix-length 24
admin@XorPlus# set interface gigabit-ethernet te-1/1/3 family ethernet-switching native-vlan-id 500
admin@XorPlus# set interface gigabit-ethernet te-1/1/2 family ethernet-switching native-vlan-id 300

Switch C:

admin@XorPlus# set vlans vlan-id 500 l3-interface "vlan500"
admin@XorPlus#  set vlans vlan-id 700 l3-interface "vlan700"
admin@XorPlus# set vlan-interface interface vlan500 vif vlan500 address 192.168.5.1 prefix-length 24
admin@XorPlus# set vlan-interface interface vlan700 vif vlan700 address 192.168.7.1 prefix-length 24
admin@XorPlus# set interface gigabit-ethernet te-1/1/46 family ethernet-switching native-vlan-id 500
admin@XorPlus# set interface gigabit-ethernet te-1/1/48 family ethernet-switching native-vlan-id 700

Step 3: Configure static route on Switch A, Switch B, Switch C so that the loopback interface is reachable

Switch A:

admin@XorPlus# set protocols static route 17.17.17.17/32 next-hop 192.168.3.2

Switch B:

admin@XorPlus# set protocols static route 28.28.28.28/32 next-hop 192.168.3.1
admin@XorPlus# set protocols static route 31.31.31.31/32 next-hop 192.168.5.1

Switch C:

admin@XorPlus# set protocols static route 17.17.17.17/32 next-hop 192.168.5.2

Step 4: Configure BGP

Switch A:

admin@XorPlus# set protocols bgp bgp-id 28.28.28.28
admin@XorPlus#  set protocols bgp local-as "17"
admin@XorPlus# set protocols bgp fast-external-fallover disable true
admin@XorPlus#  set protocols bgp peer 17.17.17.17 local-ip "28.28.28.28"
admin@XorPlus# set protocols bgp peer 17.17.17.17 as "17"
admin@XorPlus# set protocols bgp peer 17.17.17.17 next-hop-self true

Switch B:

admin@XorPlus#  set protocols bgp bgp-id 17.17.17.17
admin@XorPlus# set protocols bgp local-as "17"
admin@XorPlus#  set protocols bgp route-reflector cluster-id 17.17.17.17
admin@XorPlus# set protocols bgp peer 28.28.28.28 local-ip "17.17.17.17"
admin@XorPlus# set protocols bgp peer 28.28.28.28 as "17"
admin@XorPlus#  set protocols bgp peer 28.28.28.28 next-hop-self true
admin@XorPlus# set protocols bgp peer 28.28.28.28 client true
admin@XorPlus# set protocols bgp peer 31.31.31.31 local-ip "17.17.17.17"
admin@XorPlus# set protocols bgp peer 31.31.31.31 as "17"
admin@XorPlus# set protocols bgp peer 31.31.31.31 next-hop-self true
admin@XorPlus#  set protocols bgp peer 31.31.31.31 client true

Switch C:

admin@XorPlus# set protocols bgp bgp-id 31.31.31.31
admin@XorPlus# set protocols bgp local-as "17"
admin@XorPlus#  set protocols bgp peer 17.17.17.17 local-ip "31.31.31.31"
admin@XorPlus# set protocols bgp peer 17.17.17.17 as "17"
admin@XorPlus# set protocols bgp peer 17.17.17.17 next-hop-self true

Step 5: Enable Labeled-BGP on Switch A, Switch B, Switch C

Switch A:

admin@XorPlus#  set protocols bgp peer 17.17.17.17 ipv4-label-unicast true

Switch B:

admin@XorPlus# set protocols bgp peer 28.28.28.28 ipv4-label-unicast true
admin@XorPlus# set protocols bgp peer 31.31.31.31 ipv4-label-unicast true

Switch C:

 admin@XorPlus# set protocols bgp peer 17.17.17.17 ipv4-label-unicast true

Step 6: Switch A distribute a BGP route

Switch A:

admin@XorPlus# set protocols bgp network4 192.168.2.0/24


Step 7: Check BGP route table

switchA:
admin@XorPlus# run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      0.0.0.0          nolabel/nolabel
admin@XorPlus#

Switch B:

admin@XorPlus#  run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      28.28.28.28      16/imp-null
admin@XorPlus#

Switch C:

admin@XorPlus#  run show bgp routes ipv4 l
Possible completions:
  <IPNet>                       Print BGP IPv4 routes of specified prefix
  label                         Print BGP IPv4 routes with labels
admin@XorPlus#  run show bgp routes ipv4 label
Status Codes: * valid route, > best route

   Prefix              Nexthop          In-label/Out-label
   ------------------  ---------------  ----------------------
*> 192.168.2.0/30      17.17.17.17      17/16
admin@XorPlus#

Step 8: Check MPLS forwarding table on Switch A, Switch B, Switch C

Switch A:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
admin@XorPlus#

Switch B:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
16        imp-null   192.168.2.0/30      te-1/1/2            192.168.3.1
admin@XorPlus#

Switch C:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
17        16         192.168.2.0/30      te-1/1/44           192.168.5.2
admin@XorPlus#

Step 9: Configure MPLS label mapping on Switch C

Switch C:

admin@XorPlus# set protocols mpls in-label 1000 connect 192.168.2.0/30

Note : The label 1000 is the top label that is incoming to the BGP domain


Step 10: Configure MPLS label mapping on Switch A

admin@XorPlus#set protocols mpls in-label 2000 next-hop 192.168.2.2

Note : The label 2000 is the second-level label that is incoming to the BGP domain, and it’s the outgoing label that comes out of BGP domain, the next-hop indicates the next-hop IP address where the MPLS packet forwards with a label 2000.

Step 11: Check the MPLS forwarding table on Switch A, Switch B, Switch C

Switch A:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
2000      2000       --                  te-1/1/38           192.168.2.2
admin@XorPlus#

Switch B:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
16        imp-null   192.168.2.0/30      te-1/1/2            192.168.3.1
admin@XorPlus#

Switch C:

admin@XorPlus# run show mpls forwarding-table ipv4 all
In-label  Out-label  Destination         Outgoing-Interface  Next Hop
--------  ---------  -----------         ------------------  --------
17        16         192.168.2.0/30      te-1/1/44           192.168.5.2
1000      16         192.168.2.0/30      te-1/1/44           192.168.5.2
admin@XorPlus#

Step 12: H2 send IP packet

Step 13: Check the packet out of Switch A

 





 
















  • No labels