Configuring MPLS on Provider Edge Switches

 

To implement MPLS, you must configure two provider edge (PE) switches—an ingress PE switch and an egress PE switch—and at least one provider switch. You can configure the customer edge (CE) interfaces on the PE switches of the MPLS network using IP over MPLS.

This topic describes how to configure an ingress PE switch and an egress PE switch using IP over MPLS:

Configuring the Ingress PE Switch

To configure the ingress PE switch:

  1. Configure an IP address for the loopback interface and the core interfaces:
    [edit interfaces]

    user@switch# set lo0 unit 0 family inet address 192.168.10.1/32

    user@switch# set xe-0/0/5 unit 0 family inet address 10.1.5.1/24

    user@switch# set xe-0/0/6 unit 0 family inet address 10.1.6.1/24
    Note

    You cannot use routed VLAN interfaces (RVIs) or Layer 3 subinterfaces as core interfaces.

  2. Configure OSPF on the loopback interface and the core interfaces:Note

    You can use the switch address as an alternative to the loopback interface.

    [edit protocols ospf]

    user@switch# set area 0.0.0.0 interface lo0.0

    user@switch# set area 0.0.0.0 interface xe-0/0/5.0

    user@switch# set area 0.0.0.0 interface xe-0/0/6.0

  3. Configure OSPF traffic engineering:
    [edit protocols ospf]

    user@switch# set traffic-engineering
  4. Configure RSVP on the loopback interface and the core interfaces:
    [edit protocols rsvp]

    user@switch# set interface lo0.0

    user@switch# set interface xe-0/0/5.0

    user@switch# set interface xe-0/0/6.0

  5. Configure MPLS traffic engineering.
    [edit protocols mpls]

    user@switch# set traffic-engineering
  6. Configure MPLS on the core interfaces:
    [edit protocols mpls]

    user@switch# set interface xe-0/0/5.0

    user@switch# set interface xe-0/0/6.0

  7. Configure family mpls on the logical units of the core interfaces, thereby identifying the interfaces that will be used for forwarding MPLS packets:
    [edit interfaces]

    user@switch# set xe-0/0/5 unit 0 family mpls

    user@switch# set xe-0/0/6 unit 0 family mpls
  8. Configure a customer edge interface as a Layer 3 routed interface, specifying an IP address:
    [edit interfaces]

    user@switch# set xe-0/0/3 unit 0 family inet address 121.100.10.1/16
  9. Configure this Layer 3 customer edge interface for the routing protocol:
    [edit]

    user@switch# set protocols ospf area 0.0.0 interface xe-0/0/3.0
  10. Configure an LSP on the ingress PE switch (192.168.10.1) to send IP packets over MPLS to the egress PE switch (192.168.12.1):
    [edit protocols mpls]

    user@switch# set label-switched-path lsp_1 to 192.168.12.1
  11. Disable constrained-path LSP computation for this LSP:
    [edit protocols mpls]

    user@switch# set label-switched-path lsp_1 no-cspf
  12. Configure a static route from the ingress PE switch to the egress PE switch, thereby indicating to the routing protocol that the packets will be forwarded over the MPLS LSP that has been set up to that destination:
    [edit routing-options]

    user@switch# set static route 2.2.2.0/24 next-hop 192.168.10.1

    user@switch# set static route 2.2.2.0/24 resolve

Configuring the Egress PE Switch

To configure the egress PE switch:

  1. Configure an IP address for the loopback interface and the core interfaces:
    [edit interfaces]

    user@switch# set lo0 unit 0 family inet address 192.168.12.1/32

    user@switch# set xe-0/0/5 unit 0 family inet address 10.1.20.1/24

    user@switch# set xe-0/0/6 unit 0 family inet address 10.1.21.1/24
    Note

    You cannot use routed VLAN interfaces (RVIs) or Layer 3 subinterfaces as core interfaces.

  2. Configure OSPF on the loopback interface and the core interfaces:Note

    You can use the switch address as an alternative to the loopback interface.

    [edit protocols ospf]

    user@switch# set area 0.0.0.0 interface lo0.0

    user@switch# set area 0.0.0.0 interface xe-0/0/5.0

    user@switch# set area 0.0.0.0 interface xe-0/0/6.0

  3. Configure RSVP on the loopback interface and the core interfaces:
    [edit protocols rsvp]

    user@switch# set rsvp interface lo0.0

    user@switch# set rsvp interface xe-0/0/5.0

    user@switch# set rsvp interface xe-0/0/6.0

  4. Configure MPLS on the core interfaces:
    [edit protocols mpls]

    user@switch# set interface xe-0/0/5.0

    user@switch# set interface xe-0/0/6.0
  5. Configure family mpls on the logical units of the core interfaces, thereby identifying the interfaces that will be used for forwarding MPLS packets:
    [edit interfaces]

    user@switch# set xe-0/0/5 unit 0 family mpls

    user@switch# set xe-0/0/6 unit 0 family mpls
  6. Configure a customer edge interface as a Layer 3 routed interface, specifying an IP address:
    [edit interfaces]

    user@switch# set xe-0/0/3 unit 0 family inet address 2.2.2.1/16
  7. Configure this Layer 3 customer edge interface for the routing protocol:
    [edit]

    user@switch# set protocols ospf area 0.0.0 interface xe-0/0/3
  8. Configure an LSP on the egress PE switch (192.168.12.1) to send IP packets over MPLS to the ingress PE switch (192.168.10.1):
    [edit protocols mpls]

    user@switch# set label-switched-path lsp_2 to 192.168.10.1
  9. Disable constrained-path LSP computation for this LSP:
    [edit protocols mpls]

    user@switch# set label-switched-path lsp_2 no-cspf
  10. Configure a static route from the ingress PE switch to the egress PE switch, thereby indicating to the routing protocol that the packets will be forwarded over the MPLS LSP that has been set up to that destination:
    [edit routing-options]

    user@switch# set static route 121.121.121.0/24 next-hop 192.168.12.1

    user@switch# set static route 121.121.121.0/24 resolve