multiprotocol label switching - arista.com · 2097 chapter 33 multiprotocol label switching (mpls)...

26
2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of a larger frame for delivery within networks utilizing the encapsulating protocol. Tunneling facilitates the delivery of payload over an incompatible delivery network and creates a secure path through an untrusted network. Protocols that this chapter describes include MPLS, Decap Groups, and Nexthop Groups. Sections in this chapter include: Section 33.1: MPLS Section 33.2: Decap Groups Section 33.3: Nexthop Groups Section 33.4: MPLS Command Descriptions 33.1 MPLS These sections describe the Arista MPLS implementation: Section 33.1.1: MPLS Description Section 33.1.2: MPLS Configuration 33.1.1 MPLS Description 33.1.1.1 MPLS Overview Multiprotocol Label Switching (MPLS) is a networking process that replaces complete network addresses with short path labels for directing data packets to network nodes. The labels identify virtual links (paths) between distant nodes rather than endpoints. MPLS is scalable and protocol-independent. Data packets are assigned labels, which are used to determine packet forwarding destinations without examining the packet. Arista switches utilize MPLS to improve efficiency and control from servers through data centers and to the WAN. The MPLS implementation supports static MPLS tunneling that is manually configured on each switch or established over a network by an SDN controller. The configuration is specified by a set of rules that filter packets based on matching criteria. Each rule applies MPLS-related actions to packets that match the rule's criteria. Each rule includes a metric that the switch uses to select an action when multiple rules match a packet.

Upload: vuonganh

Post on 05-Jul-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2097

Chapter 33

Multiprotocol Label Switching (MPLS)Tunneling protocols encapsulate packets of a different protocol as the payload of a larger frame fordelivery within networks utilizing the encapsulating protocol. Tunneling facilitates the delivery ofpayload over an incompatible delivery network and creates a secure path through an untrustednetwork. Protocols that this chapter describes include MPLS, Decap Groups, and Nexthop Groups.

Sections in this chapter include:

• Section 33.1: MPLS

• Section 33.2: Decap Groups

• Section 33.3: Nexthop Groups

• Section 33.4: MPLS Command Descriptions

33.1 MPLSThese sections describe the Arista MPLS implementation:

• Section 33.1.1: MPLS Description

• Section 33.1.2: MPLS Configuration

33.1.1 MPLS Description

33.1.1.1 MPLS Overview

Multiprotocol Label Switching (MPLS) is a networking process that replaces complete networkaddresses with short path labels for directing data packets to network nodes. The labels identify virtuallinks (paths) between distant nodes rather than endpoints. MPLS is scalable and protocol-independent.Data packets are assigned labels, which are used to determine packet forwarding destinations withoutexamining the packet.

Arista switches utilize MPLS to improve efficiency and control from servers through data centers andto the WAN. The MPLS implementation supports static MPLS tunneling that is manually configured oneach switch or established over a network by an SDN controller. The configuration is specified by a setof rules that filter packets based on matching criteria. Each rule applies MPLS-related actions topackets that match the rule's criteria. Each rule includes a metric that the switch uses to select anaction when multiple rules match a packet.

Page 2: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2098

MPLS Chapter 33: Multiprotocol Label Switching (MPLS)

33.1.1.2 MPLS Implementation

MPLS static rule parameters contain the following:

• A 20-bit value that is compared to the top header label of each MPLS packet. Other ruleparameters may be applied to packets whose top label match this value.

• A nexthop location that specifies the packet’s next destination (IPv4 or IPv6) and the interfacethrough which the switch forwards the packet.

• An MPLS label stack management action that is performed on filtered packets:

• pop-payload: removes the top label from stack; this terminates an LSP (label-switched path).

• swap-label: replaces top label with a specified new label; this passes a packet along an LSP.

• A rule metric that the switch uses to select a rule when multiple rules match an MPLS packet.

Packets that do not match any MPLS rules are dropped.

33.1.2 MPLS Configuration

MPLS routing is enabled through the mpls ip command.

• This command enables MPLS routing.

switch(config)#mpls ipswitch(config)#show running-config

Example

mpls ip!

endswitch(config)#

MPLS rules are created by the mpls static command. MPLS static rules identify a set of MPLS packetsby a common top label and defines the method of handling these packets.

Examples

• These commands create an MPLS rule that matches packets with a top label value of 3400 andcauses the removal of the top label from the header stack. The nexthop destination of the IPv4payload is IP address 10.14.4.4 through Ethernet interface 3/3/3. This rule has a metric value of100.

switch(config)#mpls static top-label 3400 ethernet 3/3/3 10.14.4.4 pop payload-type ipv4switch(config)#show running-config

!mpls static top-label 3400 Ethernet3/3/3 10.14.4.4 pop payload-type ipv4!

endswitch(config)#

Page 3: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) MPLS

2099

• These commands create a backup rule that forwards the packet through Ethernet interface 4/3.This rule’s metric value of 150 assigns it backup status prior to the first rule.

switch(config)#mpls static top-label 3400 ethernet 4/3 10.14.4.4 pop payload-type ipv4 metric 150switch(config)#show running-config

!mpls static top-label 3400 Ethernet4/3 10.14.4.4 pop payload-type ipv4 metric 150mpls static top-label 3400 Ethernet3/3/3 10.14.4.4 pop payload-type ipv4!

endswitch(config)#

• These commands create an MPLS rule that forwards the packet to the nexthop address throughany interface.

switch(config)#mpls static top-label 4400 10.15.46.45 pop payload-type ipv4switch(config)#show running-config

<-------OUTPUT OMITTED FROM EXAMPLE-------->!mpls static top-label 3400 Ethernet4/3 10.14.4.4 pop payload-type ipv4 metric 150mpls static top-label 3400 Ethernet3/3/3 10.14.4.4 pop payload-type ipv4mpls static top-label 4400 10.15.46.45 pop payload-type ipv4!

endswitch(config)#

The switch’s MPLS static rule configuration for specified routes and rules is displayed by show mplsroute.

Example

• This command displays the MPLS rule configuration.

switch>show mpls config routeIn-Label Out-Label Metric Payload NextHop3400 pop 100 ipv4 10.14.4.4,Et3/3/33400 pop 150 ipv4 10.14.4.4,Et4/3switch>

Statistics about the configuration and implementation of MPLS rules are displayed by the show mplsroute summary command.

Example

• This command displays a summary of MPLS rule implementation.

switch>show mpls route summaryNumber of Labels: 1 (1 unprogrammed)Number of adjacencies in hardware: 0Number of backup adjacencies: 2switch>

Page 4: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2100

Decap Groups Chapter 33: Multiprotocol Label Switching (MPLS)

33.1.2.1 Egress IPv4/IPv6 over MPLS ACLs

IPv4/IPv6 over MPLS packets are now eligible for ACLs at the egress stage by default, applicable onlyto IPv4/IPv6 over MPLS packets that are MPLS label popped (i.e. if the label is at the bottom of stack).The user can override this behavior if required, thereby disabling egress ACLs for certain MPLS labelsby configuration. No special configuration is required to enable egress ACLs on IPv4/IPv6 over MPLSpackets.

Example

• This command disables egress ACLs for MPLS top-label 12000 on the egress interface 120.1.1.1nexthop address.

switch(config)#no mpls static top-label 12000 120.1.1.1 pop payload-type ipv6 switch(config)#

• This command enables egress ACLs for MPLS top-label 12000 on the egress interface 120.1.1.1nexthop address.

switch(config)#mpls static top-label 12000 120.1.1.1 pop payload-type ipv6 switch(config)#

33.2 Decap GroupsThese sections describe the Decap groups:

• Section 33.2.1: Decap Groups Description

• Section 33.2.2: Decap Groups Configuration

33.2.1 Decap Groups Description

The decap group is a data structure that receives encapsulated packets and extracts the payload. Theswitch then processes or forwards the extracted payload as required. Although packets cannot betransmitted through decap groups, nexthop groups can be used to create a packet's reverse path.Decap groups support payload extraction of packets received from GRE and IP-in-IP tunnels.

Decap groups have these limitations:

• Tunnels are terminated using destination IP address; source IP address has no influence.

• Packets matching a decap group are processed through their ingress interface and VLAN

• Ingress ACL filter each decap group packet’s outer header.

• Packet counters are not available.

• VRF is not supported.

Decap groups are defined by their tunnel type and decap IP address:

• Tunnel type specifies the tunnel protocol that the switch uses to extract payload.

• Decap IP address specifies the IP address where the switch receives decap group packets.

Decap groups support Generic Routing Encapsulation (GRE) tunnels.

Decap groups support Generic Routing Encapsulation (GRE) and IP-in-IP tunnels.

33.2.2 Decap Groups Configuration

Decap groups are configured in decap-group configuration mode. Decap-group configuration mode isnot a group change mode; running-config is changed immediately upon entering commands. Exitingdecap-group configuration mode does not affect running-config. The exit command returns theswitch to global configuration mode.

Page 5: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) Nexthop Groups

2101

• The static CLI entry for the incoming label is specified by the mpls static command.

• The tunnel type is specified by the tunnel type (Decap Group) command.

• The Decap IP address is specified by the tunnel decap-ip (Decap Group) command.

Decap groups do not define a default destination address or tunnel type and is not functional until bothparameters are configured. A decap group can contain only one tunnel decap-ip statement; asubsequent command replaces the previously configured statements.

Example

• This command defines a static CLI entry for the incoming-label.

switch(config)# #mpls static top-label 3400 ethernet 3/3/3 10.14.4.4 pop payload-type ipv4

• This command creates a decap group named DC-1 and configures the group to terminate packetsfrom GRE tunnel packets with the destination IP address of 10.14.3.2

switch(config)#ip decap-group DC-1switch(config-dg-DC-1)#tunnel type greswitch(config-dg-DC-1)#tunnel decap-ip 10.14.3.2switch(config-dg-DC-1)#show active ip decap-group DC-1 tunnel type gre tunnel decap-ip 10.14.3.2switch(config-dg-DC-1)#endswitch(config)#

33.3 Nexthop Groups

33.3.1 Nexthop Group Description

Each routing table entry provides the next hop address to its specified destination. A nexthop addressis the address of the next device on the path to the entry’s specified destination.

A nexthop group is a data structure that defines a list of nexthop addresses and a tunnel type forpackets routed to the specified address. When an IP route statement specifies a nexthop group as thenexthop address, the switch configures a static route with a nexthop group member as the nexthopaddress and encapsulates packets forwarded to that address as required by the group’s tunnel type.

The nexthop group size is a configurable parameter that specifies the number of entries that the groupcontains. Group entries that are not explicitly configured are filled with drop routes. The switch usesECMP hashing to select the address within the nexthop group when forwarding packets. When apacket’s hash selects a drop route, the packet is dropped.

Nexthop groups are supported on Trident platform switches and subject to the following restrictions:

• Each switch can support 512 IPv4 or IPv6 Tunnels

• Nexthop groups can contain 256 nexthops.

• The switch supports 1024 nexthop groups.

• Multiple routes can share a tunnel.

• Tunnels do not support IP multicast packets.

Nexthop groups support IP-in-IP tunnels. The entry IP address family within a particular nexthop groupcannot be mixed, i.e. either they are all IPv4 or they are all IPv6 entries.

Page 6: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2102

Nexthop Groups Chapter 33: Multiprotocol Label Switching (MPLS)

33.3.2 Nexthop Group Configuration

Nexthop groups are configured and modified in nexthop-group configuration mode. After a group iscreated, it is associated to a static route through an ip route nexthop-group statement.

These tasks are required to configure a nexthop group and apply it to a static route.

• Creating and Editing Nexthop Groups

• Configuring a Group’s Encapsulation Parameters

• Configuring the Group’s Size

• Creating Nexthop Group Entries

• Displaying Nexthop Groups

• Applying a Nexthop Group to a Static Route

Creating and Editing Nexthop Groups

Nexthop groups are created by a nexthop-group command that specifies a group that isn't alreadyconfigured. The switch enters nexthop-group configuration mode for the new group. Nexthop-groupmode is also accessible for modifying existing groups. When in nexthop-group configuration mode, theshow active command displays the group’s configuration.

Example

• This command creates a nexthop group named NH-1.

switch(config)#nexthop-group NH-1switch(config-nexthop-group-NH-1)#

• These commands enter nexthop-group configuration mode for the group named NH3, thendisplays the previously configured group parameters.

switch(config)#nexthop-group NH3switch(config-nexthop-group-NH3)#show active nexthop-group NH3 size 4 ttl 10 entry 0 tunnel-destination 10.14.21.3 entry 1 tunnel-destination 10.14.21.5 entry 2 tunnel-destination 10.14.22.5 entry 3 tunnel-destination 10.14.22.6switch(config-nexthop-group-NH3)#

Configuring a Group’s Encapsulation Parameters

Packets in static routes that are associated with the nexthop group are encapsulated to support thegroup’s tunnel type. Nexthop groups support IP-in-IP tunnels. The group also defines the source IPaddress and TTL field contents that are included in the packet encapsulation.

Example

• This command configures the TTL setting to 32 for nexthop group NH-1 encapsulation packets.

switch(config)#nexthop-group NH-1switch(config-nexthop-group-NH-1)#ttl 32switch(config-nexthop-group-NH-1)#show active nexthop-group NH-1 size 128 ttl 32switch(config-nexthop-group-NH-1)#

Page 7: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) Nexthop Groups

2103

The address is inserted in the encapsulation source IP fields is specified by tunnel-source (NexthopGroup).

Example

• These commands create loopback interface 100, assign an IP address to the interface, thenspecifies that address as the tunnel source for packets designated by nexthop-group NH-1.

switch(config)#interface loopback 100switch(config-if-Lo100)#ip address 10.1.1.1/32switch(config-if-Lo100)#exitswitch(config)#nexthop-group NH-1switch(config-nexthop-group-NH-1)#tunnel-source intf loopback 100switch(config-nexthop-group-NH-1)#show active nexthop-group NH-1 size 256 ttl 32 tunnel-source intf Loopback100switch(config-nexthop-group-NH-1)#

Configuring IP-in-IP Encapsulation

Through IP-in-IP encapsulation, IP packets matching a static Nexthop-Group route are encapsulatedwithin an IP-in-IP tunnel and forwarded.

Example

• This command configures a static Nexthop-Group route and an IP-in-IP Nexthop-Group for IP-in-IPencapsulation.

switch(config)#ip route 124.0.0.1/32 nexthop-group abcswitch(config)#nexthop-group abc type ip-in-ipswitch(config-nexthop-group-abc)#size 512switch(config-nexthop-group-abc)#tunnel-source 1.1.1.1switch(config-nexthop-group-abc)#entry 0 tunnel-destination 1.1.1.2switch(config-nexthop-group-abc)#entry 1 tunnel-destination 10.1.1.1switch(config-nexthop-group-abc)#ttl 64switch(config-nexthop-group-abc)#

Configuring the Group’s Size

The group’s size specifies the number of entries in the group. A group can contain up to 256 entries,which is the default size. The group’s size is specified by size (Nexthop Group).

Example

• This command configures the nexthop group NH-1 to contain 128 entries.

switch(config)#nexthop-group NH-1switch(config-nexthop-group-NH-1)#size 128switch(config-nexthop-group-NH-1)#show active nexthop-group NH-1 size 128 ttl 64switch(config-nexthop-group-NH-1)#

Page 8: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2104

Nexthop Groups Chapter 33: Multiprotocol Label Switching (MPLS)

Creating Nexthop Group Entries

Each entry specifies a nexthop address that is used to forward packets. A nexthop group contains oneentry statement for each nexthop address. The group’s size specifies the number of entry statementsthe group may contain. Each entry statement is assigned an index number to distinguish it from otherentries within the group; entry index numbers range from zero to the group size minus one.

Nexthop group entries are configured by entry (Nexthop Group).

Example

• These commands set the nexthop group size at four entries, then create three entries. Packets thatare hashed to the fourth entry are dropped.

switch(config)#nexthop-group NH-1switch(config-nexthop-group-NH-1)#size 4switch(config-nexthop-group-NH-1)#entry 0 tunnel-destination 10.13.4.4switch(config-nexthop-group-NH-1)#entry 1 tunnel-destination 10.15.4.22switch(config-nexthop-group-NH-1)#entry 2 tunnel-destination 10.15.5.37switch(config-nexthop-group-NH-1)#show active nexthop-group NH-1 size 4 ttl 64 entry 0 tunnel-destination 10.13.4.4 entry 1 tunnel-destination 10.15.4.22 entry 2 tunnel-destination 10.15.5.37switch(config-nexthop-group-NH-1)#

• These commands configure a nexthop group with three IPv6 nexthop entries.

switch(config)#nexthop-group nhg-v6-mpls type ipswitch(config-nhg-v6-mpls)#size 3switch(config-nhg-v6-mpls)#entry 0 nexthop 2002::6401:1switch(config-nhg-v6-mpls)#entry 1 nexthop 2002::6404:1switch(config-nhg-v6-mpls)#entry 2 nexthop 2002::6404:2switch(config-nhg-v6-mpls)#

• These commands configure an IPv4 route to point to the nexthop group nhg-v6-mpls. (Both IPv4routes and IPv6 routes can point to this nexthop group.)

switch#ip route 100.5.0.0/16 Nexthop-Group nhg-v6-mplspswitch#

Displaying Nexthop Groups

The show nexthop-group command displays a group’s configured parameters.

Example

• This command displays the properties of the nexthop group named NH-1.

switch>show nexthop-group NH-1Name Id type size ttl sourceIpNH-1 4 ipInIp 256 64 0.0.0.0switch>

Applying a Nexthop Group to a Static Route

The ip route nexthop-group associates a nexthop group with a specified destination address andconfigures the encapsulation method for packets tunneled to that address.

Page 9: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) Nexthop Groups

2105

Example

• This command creates a static route in the default VRF, using the nexthop group of NH-1 todetermine the next hop address.

switch(config)#ip route 10.17.252.0/24 nexthop-group NH-1switch(config)#

The show ip route command displays the routing table for a specified VRF. Routes that utilize anexthop group entry are noted with a route type code of NG.

Example

• This command displays a routing table that contains a static route with its nexthop specified by anexthop group.

switch>show ip routeCodes: C - connected, S - static, K - kernel, O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1, E2 - OSPF external type 2, N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type2, B I - iBGP, B E - eBGP, R - RIP, I - ISIS, A B - BGP Aggregate, A O - OSPF Summary, NG - Nexthop Group Static Route

Gateway of last resort is not set

C 10.3.3.1/32 is directly connected, Loopback0 C 10.9.1.0/24 is directly connected, Ethernet51/3 C 10.10.10.0/24 is directly connected, Ethernet51/1 S 10.20.0.0/16 [20/0] via 10.10.10.13, Ethernet51/1 C 10.10.11.0/24 is directly connected, Ethernet3 NG 10.10.3.0/24 [1/0] via ng-test1, 5 C 10.17.0.0/20 is directly connected, Management1 S 10.17.0.0/16 [1/0] via 10.17.0.1, Management1 S 10.18.0.0/16 [1/0] via 10.17.0.1, Management1 S 10.19.0.0/16 [1/0] via 10.17.0.1, Management1 S 10.20.0.0/16 [1/0] via 10.17.0.1, Management1 S 10.22.0.0/16 [1/0] via 10.17.0.1, Management1

switch>

Page 10: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2106

MPLS Command Descriptions Chapter 33: Multiprotocol Label Switching (MPLS)

33.4 MPLS Command DescriptionsMPLS Commands

• mpls ip• mpls static• show mpls route• show mpls route summary

Decap Group Commands

• ip decap-group• tunnel decap-ip (Decap Group)• tunnel type (Decap Group)

Nexthop Group Commands

• entry (Nexthop Group)• ip route nexthop-group• nexthop-group• show nexthop-group• size (Nexthop Group)• ttl (Nexthop Group)• tunnel-source (Nexthop Group)

Page 11: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) MPLS Command Descriptions

2107

entry (Nexthop Group)

The entry command defines a nexthop entry in the configuration mode nexthop group. Each nexthopentry specifies a nexthop IP address for static routes to which the nexthop group is assigned. The groupsize (size (Nexthop Group)) specifies the quantity of entries a group contains. Each entry is createdby an individual command. Entries within a group are distinguished by an index number.

The no entry and default entry commands delete the specified nexthop group entry, as referenced byindex number, by removing the corresponding entry statement from running-config.

Command ModeNexthop-group Configuration

Command Syntaxentry index tunnel-destination ipv4_addressno entry index default entry index

Parameters• index Entry index. Values range from 0 to group-size – 1.

• ipv4_address Nexthop IPv4 address.

group-size is the group’s entry capacity, as specified by the size (Nexthop Group) command.

Example• These commands sets the nexthop group size at 4 entries, then creates three nexthop entries.

Packets that are hashed to the fourth entry are dropped.

switch(config)#nexthop-group NH-1switch(config-nexthop-group-NH-1)#size 4switch(config-nexthop-group-NH-1)#entry 0 tunnel-destination 10.13.4.4switch(config-nexthop-group-NH-1)#entry 1 tunnel-destination 10.15.4.22switch(config-nexthop-group-NH-1)#entry 2 tunnel-destination 10.15.5.37switch(config-nexthop-group-NH-1)#show active nexthop-group NH-1 size 4 ttl 64 entry 0 tunnel-destination 10.13.4.4 entry 1 tunnel-destination 10.15.4.22 entry 2 tunnel-destination 10.15.5.37switch(config-nexthop-group-NH-1)#

Page 12: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2108

MPLS Command Descriptions Chapter 33: Multiprotocol Label Switching (MPLS)

ip decap-group

The ip decap-group command places the switch in decap-group configuration mode, through whichdecap groups are created or modified. A decap group is a data structure that defines a method ofextracting the payload from an encapsulated packet that the switch receives on a specified IP address.

Decap groups do not specify a default IP address group or tunnel type. These parameters must beexplicitly configured before a decap group can function.

Decap-group configuration mode is not a group change mode; running-config is changedimmediately upon entering commands. Exiting decap-group configuration mode does not affectrunning-config. The exit command returns the switch to global configuration mode.

The no ip decap-group and default ip decap-group commands delete previously configuredcommands in the specified decap-group mode.

Command ModeGlobal Configuration

Command Syntaxip decap-group group_nameno ip decap-group group_namedefault ip decap-group group_name

Parameters• group_name Decap group name.

Commands Available in Decap-group Configuration Mode• tunnel decap-ip (Decap Group) specifies the IP address of packets handled by the decap group.

• tunnel type (Decap Group) specifies the tunnel protocol for extracting payload.

Examples• This command creates a decap group named DC-1.

switch(config)#ip decap-group DC-1switch(config-dg-DC-1)#

• This command exits decap-group mode for the DC-1 decap group.

switch(config-dg-DC-1)#exitswitch(config)#

• This command delete the decap group named DC-1.

switch(config)#no ip decap-group DC-1switch(config)#

Page 13: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) MPLS Command Descriptions

2109

ip route nexthop-group

The ip route nexthop-group command creates a static route. The destination is a network segment.The nexthop address is one of the IP addresses that comprise the specified nexthop group. Packetsforwarded as a result of this command are encapsulated as specified by the tunnel-type parameter ofthe specified nexthop group.

When multiple routes exist to a destination prefix, the route with the lowest administrative distancetakes precedence. When a route created through this command has the same administrative distanceas another static route (ECMP), the route that was created earliest has preference; running-configstores static routes in the order that they are created.

By default, the administrative distance assigned to static routes is 1. Assigning a higher administrativedistance to a static route configures it to be overridden by dynamic routing data. For example, a staticroute with a distance value of 200 is overridden by OSPF intra-area routes, which have a defaultdistance of 110.

The no ip route nexthop-group and default ip route nexthop-group commands delete the specifiedroute by removing the corresponding ip route nexthop-group command from running-config. Iproute nexthop-group statements for an IP address in multiple VRFs must be removed separately.

A no ip route or default ip route command without a nexthop parameter deletes all corresponding iproute nexthop-group statements. Deleting a user-defined VRF also deletes its static routes.

Command ModeGlobal Configuration

Command Syntaxip route [VRF_INST] dest_net nexthop-group nhgp_name [dist] [TAG_OPTION] [RT_NAME]no ip route [VRF_INST] dest_net [nexthop-group nhgroup_name] [distance]default ip route [VRF_INST] dest_net [nexthop-group nhgroup_name] [distance]

Parameters• VRF_INST Specifies the VRF instance being modified.

• <no parameter> Changes are made to the default VRF.

• vrf vrf_name Changes are made to the specified VRF.

• dest_net Destination IPv4 subnet (CIDR or address-mask notation).

• nhgp_name Name of nexthop group.

• dist Administrative distance assigned to route. Options include:

• <no parameter> Route assigned default administrative distance of one.

• <1-255> The administrative distance assigned to route.

• TAG_OPTION static route tag. Options include:

• <no parameter> Assigns default static route tag of 0.

• tag t_value Static route tag value. t_value ranges from 0 to 4294967295.

• RT_NAME Associates descriptive text to the route. Options include:

• <no parameter> No text is associated with the route.

• name descriptive_text The specified text is assigned to the route.

Related Commands• ip route creates a static route that specifies the nexthop address without using nexthop groups.

Page 14: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2110

MPLS Command Descriptions Chapter 33: Multiprotocol Label Switching (MPLS)

Example• This command creates a static route in the default VRF, using the nexthop group of NH-1 to

determine the next hop address.

switch(config)#ip route 10.17.252.0/24 nexthop-group NH-1switch(config)#

Page 15: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) MPLS Command Descriptions

2111

mpls ip

The mpls ip command enables MPLS routing. Multiprotocol Label Switching (MPLS) is a networkingprocess that avoids complex lookups in a routing table by replacing complete network addresses withshort path labels for directing data packets to network nodes. MPLS data paths are serviced througha tunnel encapsulation data structure that adds four-byte label headers to packets.

The no mpls ip and default mpls ip commands disable MPLS routing by removing the mpls ipcommand from running-config. When MPLS routing is disabled, routed MPLS packets are droppedand all MPLS routes and adjacencies are removed. MPLS routing is disabled by default.

Command ModeGlobal Configuration

Command Syntaxmpls ipno mpls ipdefault mpls ip

Example• This command enables MPLS routing. Previous commands enabled IP routing and configured

MPLS static routes.

switch(config)#mpls ipswitch(config)#show running-config! Command: show running-config

!ip routing!mpls ip!mpls static top-label 3400 10.14.4.4 pop payload-type ipv4mpls static top-label 4400 10.15.46.45 pop payload-type ipv4!

!endswitch(config)#

• This command disables MPLS routing.

switch(config)#no mpls ipswitch(config)#show running-config! Command: show running-config

<-------OUTPUT OMITTED FROM EXAMPLE-------->!ip routing!mpls static top-label 3400 10.14.4.4 pop payload-type ipv4mpls static top-label 4400 10.15.46.45 pop payload-type ipv4!

!endswitch(config)#

Page 16: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2112

MPLS Command Descriptions Chapter 33: Multiprotocol Label Switching (MPLS)

mpls static

The mpls static command creates an MPLS rule that specifies the method of handling of inboundMPLS traffic. Multiprotocol Label Switching (MPLS) is a networking process that replaces completenetwork addresses with short path labels for directing data packets to network nodes.

Static rules specify these parameters:

• MPLS filter: The top-label parameter specifies the 20-bit value that the MPLS packet’s top headerlabel must match to be handled by the rule.

• Nexthop location: Specifies the destination nexthop address (IPv4 or IPv6) and the interfacethrough which the switch forwards the packet.

• MPLS action: Specifies the MPLS label stack management action performed on the packet:

• pop-payload: removes the top label from stack; this terminates an LSP (label-switched path).

• swap-label: replaces top label with a specified new label; this passes a packet along an LSP.

• Rule priority: Specifies the rule to be used when an MPLS packet matches multiple rules.

The no mpls static and default mpls static commands delete the specified MPLS rule fromrunning-config.

• Commands that include only a top label tag remove all MPLS rules with the matching top label.

• Commands with no PRIORITY parameter remove all matching routes of every metric value.

Command ModeGlobal Configuration

Command Syntaxmpls static top-label top_tag [DEST_INTF] NEXTHOP_ADDR ACTION [PRIORITY]no mpls static top-label top_tagno mpls static top-label top_tag [DEST_INTF] NEXTHOP_ADDR ACTION [PRIORITY]default mpls static top-label top_tagdefault mpls static top-label top_tag [DEST_INTF] NEXTHOP_ADDR ACTION [PRIORITY]

Parameters• top_tag Top header’s label field contents. Value ranges from 0 to 1048575 (20 bits).

• DEST_INTF Specifies interface through which NEXTHOP_ADDR is accessed. Options include:

• <no parameter> Any interface.

• ethernet e_num Ethernet interface specified by e_num.

• loopback l_num Loopback interface specified by l_num.

• management m_num Management interface specified by m_num.

• port-channel p_num Port-channel interface specified by p_num.

• vlan v_num VLAN interface specified by v_num.

• vxlan vx_num VXLAN interface specified by vx_num.

• NEXTHOP_ADDR Nexthop address for MPLS for filtered MPLS packets. Options include:

• ipv4_addr IPv4 address.

• ipv6_addr IPv6 address.

• ACTION MPLS header stack management action performed on packet. Options include:

• pop payload-type ipv4 Removes top layer from stack. Payload is handled as IPv4 packet.

• pop payload-type ipv6 Removes top layer from stack. Payload is handled as IPv6 packet.

Page 17: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) MPLS Command Descriptions

2113

• swap-label <0 to 1048575> Replaces header label with specified label value (20 bits).

• PRIORITY Specifies rule priority when multiple rules match a packet. Options include:

• <no parameter> Assigns a metric value of 100 to the rule.

• metric <1 to 255> Lower values denote higher priority. Value ranges from 1 to 255.

ParametersThe mpls static command does not support push label actions.

Example• These commands create an MPLS rule that matches packets with a top label value of 3400 and

causes the removal of the top label from the header stack. The nexthop destination of the IPv4payload is IP address 10.14.4.4 through Ethernet interface 3/3/3. This rule has a metric value of100.

switch(config)#mpls static top-label 3400 ethernet 3/3/3 10.14.4.4 pop payload-type ipv4switch(config)#show running-config

!mpls static top-label 3400 Ethernet3/3/3 10.14.4.4 pop payload-type ipv4!

endswitch(config)#

• These commands create a backup rule that forwards the packet through Ethernet interface 4/3.This rule’s metric value of 150 assigns it backup status prior to the first rule.

switch(config)#mpls static top-label 3400 ethernet 4/3 10.14.4.4 pop payload-type ipv4 metric 150switch(config)#show running-config

!mpls static top-label 3400 Ethernet4/3 10.14.4.4 pop payload-type ipv4 metric 150mpls static top-label 3400 Ethernet3/3/3 10.14.4.4 pop payload-type ipv4!

<-------OUTPUT OMITTED FROM EXAMPLE-------->endswitch(config)#

• These commands create an MPLS rule that forwards the packet to the nexthop address throughany interface.

switch(config)#mpls static top-label 4400 10.15.46.45 pop payload-type ipv4switch(config)#show running-config

<-------OUTPUT OMITTED FROM EXAMPLE-------->!mpls static top-label 3400 Ethernet4/3 10.14.4.4 pop payload-type ipv4 metric 150mpls static top-label 3400 Ethernet3/3/3 10.14.4.4 pop payload-type ipv4mpls static top-label 4400 10.15.46.45 pop payload-type ipv4!

endswitch(config)#

Page 18: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2114

MPLS Command Descriptions Chapter 33: Multiprotocol Label Switching (MPLS)

nexthop-group

The nexthop-group command places the switch in nexthop-group configuration mode, through whichnexthop groups are created or modified. The command also specifies the tunnel protocol for extractingpayload from encapsulated packets that arrive through an IP address upon which the group is applied.

A nexthop group is a data structure that defines a list of nexthop addresses and the encapsulationprocess for packets routed to the specified address. The command either accesses an existing nexthopgroup configuration or creates a new group if it specifies a non-existent group. Supported tunnelprotocols include IP ECMP and IP-in-IP.

Nexthop-group configuration mode is not a group change mode; running-config is changedimmediately upon entering commands. Exiting nexthop-group configuration mode does not affectrunning-config. The exit command returns the switch to global configuration mode.

The no nexthop-group and default nexthop-group commands delete previously configuredcommands in the specified nexthop-group mode. When the command does not specify a group, itremoves all nexthop-groups. When the command specifies a tunnel type without naming a group, itremoves all nexthop-groups of the specified type.

Command ModeGlobal Configuration

Command Syntaxnexthop-group group_name type TUNNEL_TYPEno nexthop-group [group_name] [type TUNNEL_TYPE]default nexthop-group [group_name] [type TUNNEL_TYPE]

Parameters• group_name Nexthop group name.

• TUNNEL_TYPE Tunnel protocol of the nexthop-group. Options include:

• ip ECMP nexthop.

• ip-in-ip IP in IP tunnel.

Commands Available in Nexthop-group Configuration Mode• entry (Nexthop Group)

• size (Nexthop Group)

• ttl (Nexthop Group)

• tunnel-source (Nexthop Group)

RestrictionsTunnel type availability varies by switch platform.

Examples• This command creates a nexthop group named NH-1 that specifies ECMP nexthops.

switch(config)#nexthop-group NH-1 type ipswitch(config-nexthop-group-NH-1)#

• This command exits nexthop-group mode for the NH-1 nexthop group.

switch(config-nexthop-group-NH-1)#exitswitch(config)#

Page 19: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) MPLS Command Descriptions

2115

show mpls route

The show mpls config route command displays the switch’s MPLS static rule configuration for thespecified routes and rules.

Command ModeEXEC

Command Syntaxshow mpls [INFO_LEVEL] route [header_label]

Parameters• INFO_LEVEL Specifies the filters that are used to select the routes to display. Options include:

• <no parameter> displays routes published by the forwarding agent.

• config displays all configured routes.

• lfib displays routes stored to the Label Forwarding Information Base (LFIB)

• header_label Filters routes by MPLS top header label. Options include:

• <no parameter> Displays routes for all header values.

• <0 to 1048575> Specifies header for which command displays information.

Example• This command displays the MPLS rule configuration.

switch>show mpls config routeIn-Label Out-Label Metric Payload NextHop3400 pop 100 ipv4 10.14.4.4,Et3/3/33400 pop 150 ipv4 10.14.4.4,Et4/3switch>

Page 20: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2116

MPLS Command Descriptions Chapter 33: Multiprotocol Label Switching (MPLS)

show mpls route summary

The show mpls route summary command displays statistics about the configuration andimplementation of MPLS rules.

Command ModeEXEC

Command Syntaxshow mpls route summary

Example• This command displays a summary of MPLS rule implementation.

switch>show mpls route summaryNumber of Labels: 1 (1 unprogrammed)Number of adjacencies in hardware: 0Number of backup adjacencies: 2switch>

Page 21: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) MPLS Command Descriptions

2117

show nexthop-group

The show nexthop-group command displays properties of the specified nexthop group.

Command ModeEXEC

Command Syntaxshow nhgroup_name [VRF_INST]

Parameters• nhgroup_name Name of the group displayed by command.

• VRF_INST specifies the VRF instance for which data is displayed.

• <no parameter> context-active VRF.

• vrf vrf_name specifies name of VRF instance. System default VRF is specified by default.

Related Commands• nexthop-group places the switch in nexthop-group configuration mode to create a new group or

modify an existing group.

Example• This command displays the properties of the nexthop group named NH-1.

switch>show nexthop-group NH-1Name Id type size ttl sourceIpNH-1 4 ipInIp 256 64 0.0.0.0switch>

Page 22: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2118

MPLS Command Descriptions Chapter 33: Multiprotocol Label Switching (MPLS)

size (Nexthop Group)

The size command configures the quantity of nexthop entries in the configuration mode nexthop group.Each entry specifies a nexthop IP address for static routes to which the group is assigned. Entries areconfigured with the entry (Nexthop Group) command. The default size is 256 entries.

The no size and default size commands restore the size of the configuration mode nexthop group toits default of 256 by removing the corresponding size command from running-config.

Command ModeNexthop-group Configuration

Command Syntaxsize entry_sizeno size entry_sizedefault size entry_size

Parameters• entry_size Group size (entries). Value ranges from 1 to 255. Default value is 256.

Example• This command configures the nexthop group NH-1 to contain 128 entries.

switch(config)#nexthop-group NH-1switch(config-nexthop-group-NH-1)#size 128switch(config-nexthop-group-NH-1)#show active nexthop-group NH-1 size 128 ttl 64switch(config-nexthop-group-NH-1)#

Page 23: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) MPLS Command Descriptions

2119

ttl (Nexthop Group)

The ttl command specifies the number entered into the TTL (time to live) encapsulation field of packetsthat are transmitted to the address designated by the configuration mode nexthop group. The defaultTTL value is 64.

The no ttl and default ttl commands restore the default TTL value written into TTL fields for theconfiguration mode nexthop group by deleting the corresponding ttl command from running-config.

Command ModeNexthop-group Configuration

Command Syntaxttl hop_expiryno ttl hop_expirydefault ttl hop_expiry

Parameters• hop_expiry Period that the packet remains valid (seconds or hops) Value ranges from 1 to 64.

RestrictionsThis command is available only to Nexthop groups for tunnels of type IP-in-IP, GRE, MPLS, and MPLSover GRE.

Related Commands• nexthop-group places the switch in Nexthop-group configuration mode.

Example• This command configures the ttl setting to 32 for nexthop group NH-1 packets.

switch(config)#nexthop-group NH-1switch(config-nexthop-group-NH-1)#ttl 32switch(config-nexthop-group-NH-1)#show active nexthop-group NH-1 size 128 ttl 32switch(config-nexthop-group-NH-1)#

• This command restores the default ttl setting for nexthop group NH-1 packets.

switch(config-nexthop-group-NH-1)#no ttlswitch(config-nexthop-group-NH-1)#show active nexthop-group NH-1 size 128 ttl 64switch(config-nexthop-group-NH-1)#

Page 24: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2120

MPLS Command Descriptions Chapter 33: Multiprotocol Label Switching (MPLS)

tunnel decap-ip (Decap Group)

The tunnel decap-ip command specifies the IP address of packets that are handled by theconfiguration mode decap group. A decap group is a data structure that defines a method of extractingthe payload from an encapsulated packet that the switch receives on a specified IP address.

Decap groups do not define a default decap-ip address. A decap group is not functional until an IPaddress is specified. Decap groups can contain only one tunnel decap-ip statement; subsequentcommands replace any previously configured statements.

Command ModeDecap-Group Configuration

Command Syntaxtunnel decap-ip ipv4_address

Parameters• ipv4_addr An IPv4 address.

Related Commands• ip decap-group places the switch in decap-group configuration mode.

• tunnel type (Decap Group) specifies the tunnel protocol for extracting payload.

GuidelinesA decap group does not specify a default IP address group or tunnel type. These parameters must beexplicitly configured before a decap group can function.

Example• These commands configure 10.14.3.2 as the decap-IP address for the DC-1 decap group.

switch(config)#ip decap-group DC-1switch(config-dg-DC-1)#tunnel decap-ip 10.14.3.2switch(config-dg-DC-1)#show active ip decap-group DC-1 tunnel decap-ip 10.14.3.2switch(config-dg-DC-1)#

Page 25: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

Chapter 33: Multiprotocol Label Switching (MPLS) MPLS Command Descriptions

2121

tunnel-source (Nexthop Group)

The tunnel-source command specifies the address that is entered into the source IP addressencapsulation field of packets that are transmitted as designated by the configuration mode nexthopgroup. The command may directly specify an IP address or specify an interface from which an IPaddress is derived. The default source address IP address is 0.0.0.0.

The no tunnel-source and default tunnel-source commands remove the source IP address settingfrom the configuration mode nexthop group by deleting the tunnel-source command fromrunning-config.

Command ModeNexthop-group Configuration

Command Syntaxtunnel-source SOURCEno tunnel-source SOURCEdefault tunnel-source SOURCE

Parameters• SOURCE IP address or derivation interface. Options include:

• ipv4_addr An IPv4 address.

• intf ethernet e_num Ethernet interface specified by e_num.

• intf loopback l_num Loopback interface specified by l_num.

• intf management m_num Management interface specified by m_num.

• intf port-channel p_num Port-channel interface specified by p_num.

• intf vlan v_num VLAN interface specified by v_num.

RestrictionsThis command is available only to Nexthop groups for tunnels of type ip-in-ip.

Related Commands• nexthop-group places the switch in Nexthop-group configuration mode.

Example• These commands create loopback interface 100, assign an IP address to the interface, then

specifies that address as the tunnel source for packets designated by nexthop-group NH-1.

switch(config)#interface loopback 100switch(config-if-Lo100)#ip address 10.1.1.1/32switch(config-if-Lo100)#exitswitch(config)#nexthop-group NH-1switch(config-nexthop-group-NH-1)#tunnel-source intf loopback 100switch(config-nexthop-group-NH-1)#show active nexthop-group NH-1 size 256 ttl 64 tunnel-source intf Loopback100switch(config-nexthop-group-NH-1)#show nexthop-group NH-1Name Id type size ttl sourceIpNH-1 2 ipInIp 256 64 10.1.1.1switch(config-nexthop-group-NH-1)#

Page 26: Multiprotocol Label Switching - arista.com · 2097 Chapter 33 Multiprotocol Label Switching (MPLS) Tunneling protocols encapsulate packets of a different protocol as the payload of

2122

MPLS Command Descriptions Chapter 33: Multiprotocol Label Switching (MPLS)

tunnel type (Decap Group)

The tunnel type command specifies the tunnel protocol for extracting payload from encapsulatedpackets that arrive on the IP address specified for the configuration mode decap group. Supportedtunnel protocols include GRE (General Routing Encapsulation) and IP-in-IP.

Decap groups do not define a default tunnel type. A decap group is not functional until an IP addressis specified. Decap groups can contain only one tunnel decap-ip statement; subsequent commandsreplace any previously configured statements.

Command ModeDecap-group Configuration

Command Syntaxtunnel type gre

Related Commands• ip decap-group places the switch in decap-group configuration mode.

• tunnel decap-ip (Decap Group) specifies the IP address of packets handled by the decap group.

GuidelinesA decap group does not specify a default IP address group or tunnel type. These parameters must beexplicitly configured before a decap group can function.

Example• This command configures decap group DC-1 to terminate packets from GRE tunnel packets.

switch(config)#ip decap-group DC-1switch(config-dg-DC-1)#tunnel type greswitch(config-dg-DC-1)#show active ip decap-group DC-1 tunnel type greswitch(config-dg-DC-1)#