09-Segment Routing Command Reference

HomeSupportSwitchesS7500X-G SeriesReference GuidesCommand ReferencesH3C S7500X-G Switch Series Command References-R7761Pxx-6W10009-Segment Routing Command Reference
04-SRv6 VPN commands
Title Size Download
04-SRv6 VPN commands 125.53 KB

SRv6 VPN commands

encapsulation source-address

Use encapsulation source-address to specify a source address for the outer IPv6 header of SRv6 VPN packets.

Use undo encapsulation source-address to restore the default.

Syntax

encapsulation source-address ipv6-address [ ip-ttl ttl-value ]

undo encapsulation source-address

Default

No source address is specified for the outer IPv6 header of SRv6 VPN packets.

Views

SRv6 view

Predefined user roles

network-admin

mdc-admin

Parameters

ipv6-address: Specifies a source IPv6 address. The IPv6 address cannot be a loopback address (0:0:0:0:0:0:0:0 or ::), link-local address, multicast address, or unspecified address.

ip-ttl ttl-value: Specifies the TTL of the outer IPv6 header, in the range of 1 to 255. The default value is 255.

Usage guidelines

To ensure correct VPN traffic forwarding in an SRv6 VPN network, you must specify a source address for the outer IPv6 header of SRv6 VPN packets.

You must specify an IPv6 address of the local device as the source IPv6 address, and make sure the IPv6 address has been advertised by a routing protocol. As a best practice, specify a loopback interface address of the local device as the source IPv6 address.

Examples

# Specify 1::1 as the source address of SRv6 VPN packets in the outer IPv6 header and set the TTL of the outer IPv6 header to 200.

<Sysname> system-view

[Sysname] segment-routing ipv6

[Sysname-segment-routing-ipv6] encapsulation source-address 1::1 ip-ttl 200

nexthop interface (BGP IPv4 SR next hop view/BGP-VPN IPv4 SR next hop view/BGP-VPN IPv4 EVPN SR next hop view)

Use nexthop interface to specify a next hop to which an End.DX4 SID can be dynamically allocated and specify the output interface of the next hop.

Use undo nexthop to restore the default.

Syntax

nexthop nexthop-address interface interface-type interface-number

undo nexthop nexthop-address

Default

No End.DX4 SID is allocated to a next hop.

Views

BGP-VPN IPv4 SR next hop view

BGP-VPN IPv4 EVPN SR next hop view

BGP IPv4 SR next hop view

Predefined user roles

network-admin

mdc-admin

Parameters

nexthop-address: Specifies a next hop by its IPv4 address.

interface-type interface-number: Specifies an output interface by its type and number.

Usage guidelines

This command is applicable to the IPv4 MPLS L3VPN over SRv6 or public network IPv4 over SRv6 scenario to accelerate traffic forwarding. This command allocates an End.DX4 SID to the specified next hop for BGP IPv4 routes and associates the next hop with an output interface.

Use one of the following methods to allocate End.DX4 SIDs to next hops:

·     Use this command to dynamically allocate an End.DX4 SID to a next hop from the locator applied to the VPN instance or public instance.

Make sure the output interface specified for the next hop in this command is consistent with the output interface of that next hop in the routing table. If they are inconsistent, the device cannot dynamically allocate an End.DX4 SID to the next hop.

·     Use the opcode end-dx4 vpn-instance command to manually configure an End.DX4 SID in the locator applied to the VPN instance or public instance.

Make sure the output interface specified for the next hop in the opcode end-dx4 vpn-instance command is consistent with the output interface of that next hop in the routing table. If they are inconsistent, the device cannot use the manually configured End.DX4 SID to forward traffic.

If both methods are used for the same next hop, the manually configured End.DX4 SID takes precedence over the dynamically allocated one.

You can specify only one output interface for one next hop. To change the output interface of a next hop, first use the undo nexthop command to remove the original next hop and output interface association.

The device might be unable to dynamically allocate SIDs to BGP IPv4 routes based on the route next hops when dynamic SID resources are insufficient. If the device does not have manually configured End.DX4 SIDs, it allocates the End.DT4 SID or End.DT46 SID of the VPN instance or public instance to the routes.

Examples

# In BGP IPv4 SR next hop view, allow the system to allocate an End.DX4 SID to next hop 10.1.1.2 and specify VLAN-interface 10 as the output interface of the next hop.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-family ipv4 unicast

[Sysname-bgp-default-ipv4] segment-routing ipv6 locator aaa

[Sysname-bgp-default-ipv4] segment-routing ipv6 apply-sid specify-nexthop

[Sysname-bgp-default-sid-np-ipv4] nexthop 10.1.1.2 interface vlan-interface 10

Related commands

opcode

nexthop interface (BGP SRv6 next hop view/BGP-VPN SRv6 next hop view/BGP-VPN IPv6 EVPN SR next hop view)

Use nexthop interface to specify a next hop to which an End.DX6 SID can be dynamically allocated and specify the output interface of the next hop.

Use undo nexthop to restore the default.

Syntax

nexthop nexthop-ipv6-address interface interface-type interface-number

undo nexthop nexthop-ipv6-address

Default

No End.DX6 SID is allocated to a next hop.

Views

BGP-VPN SRv6 next hop view

BGP-VPN IPv6 EVPN SR next hop view

BGP SRv6 next hop view

Predefined user roles

network-admin

mdc-admin

Parameters

nexthop-ipv6-address: Specifies a next hop by its IPv6 address.

interface-type interface-number: Specifies an output interface by its type and number.

Usage guidelines

This command is applicable to the IPv6 MPLS L3VPN over SRv6 or public network IPv6 over SRv6 scenario to accelerate traffic forwarding. This command allocates an End.DX6 SID to the specified next hop for BGP IPv6 routes and associates the next hop with an output interface.

Use one of the following methods to allocate End.DX6 SIDs to next hops:

·     Use this command to dynamically allocate an End.DX6 SID to a next hop from the locator applied to the VPN instance or public instance.

Make sure the output interface specified for the next hop in this command is consistent with the output interface of that next hop in the routing table. If they are inconsistent, the device cannot dynamically allocate an End.DX6 SID to the next hop.

·     Use the opcode end-dx6 vpn-instance command to manually configure an End.DX6 SID in the locator applied to the VPN instance or public instance.

Make sure the output interface specified for the next hop in the opcode end-dx6 vpn-instance command is consistent with the output interface of that next hop in the routing table. If they are inconsistent, the device cannot use the manually configured End.DX6 SID to forward traffic.

If both methods are used for the same next hop, the manually configured End.DX6 SID takes precedence over the dynamically allocated one.

You can specify only one output interface for one next hop. To change the output interface of a next hop, first use the undo nexthop command to remove the original next hop and output interface association.

The device might be unable to dynamically allocate SIDs to BGP IPv6 routes based on the route next hops when dynamic SID resources are insufficient. If the device does not have manually configured End.DX6 SIDs, it allocates the End.DT6 SID or End.DT46 SID of the VPN instance or public instance to the routes.

Examples

# In BGP SRv6 next hop view, allow the system to allocate an End.DX6 SID to next hop 10::1:2 and specify VLAN-interface 10 as the output interface of the next hop.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-family ipv6 unicast

[Sysname-bgp-default-ipv6] segment-routing ipv6 locator aaa

[Sysname-bgp-default-ipv6] segment-routing ipv6 apply-sid specify-nexthop

[Sysname-bgp-default-sid-np-ipv6] nexthop 10::1:2 interface vlan-inteface 10

Related commands

opcode

peer advertise original-route

Use peer advertise original-route to enable the device to advertise original BGP EVPN routes to a peer or peer group.

Use undo peer advertise original-route to restore the default.

Syntax

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise original-route

undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } advertise original-route

Default

The device advertises reoriginated BGP EVPN routes to peers and peer groups after the peer re-originated command is executed.

Views

BGP EVPN address family view

Predefined user roles

network-admin

mdc-admin

Parameters

group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must exist.

ipv4-address: Specifies a peer by its IPv4 address. The peer must exist.

mask-length: Specifies a mask length in the range of 0 to 32. To specify a subnet, you must specify both the ipv4-address and mask-length arguments.

ipv6-address: Specifies a peer by its IPv6 address. The peer must exist.

prefix-length: Specifies a prefix length in the range of 0 to 128. To specify a subnet, you must specify both the ipv6-address and prefix-length arguments.

Usage guidelines

For this command to take effect, you must execute the peer re-originated command.

The device configured with the peer re-originated command advertises only reoriginated BGP EVPN routes. For the device to advertise both original and reoriginated BGP EVPN routes to a peer or peer group, execute the peer advertise original-route command on the device.

Examples

# In BGP EVPN address family view, enable the device to advertise original BGP EVPN routes to peer 1.1.1.1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-family l2vpn evpn

[Sysname-bgp-default-evpn] peer 1.1.1.1 advertise original-route

Related commands

peer re-originated

peer suppress re-originated

peer prefix-sid

Use peer prefix-sid to enable BGP to exchange SRv6 SID information with an IPv6 peer or peer group.

Use undo peer prefix-sid to restore the default.

Syntax

peer { group-name | ipv6-address [ prefix-length ] } prefix-sid

undo peer { group-name | ipv6-address [ prefix-length ] } prefix-sid

Default

BGP does not exchange SRv6 SID information with an IPv6 peer or peer group.

Views

BGP VPNv4 address family view

BGP VPNv6 address family view

BGP IPv4 unicast address family view

BGP IPv6 unicast address family view

Predefined user roles

network-admin

mdc-admin

Parameters

group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must exist.

ipv6-address: Specifies a peer by its IPv6 address. The peer must exist.

prefix-length: Specifies a prefix length in the range of 0 to 128. To specify a subnet, you must specify both the ipv6-address and prefix-length arguments.

Usage guidelines

Use this command to enable IPv6 peers in an SRv6 VPN network to exchange SRv6 SID information through BGP VPNv4, VPNv6, IPv4 unicast, or IPv6 unicast routes.

Examples

# In BGP VPNv4 address family view, enable BGP to exchange SRv6 SID information with peer 2001:1::1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-family vpnv4

[Sysname-bgp-default-vpnv4] peer 2001:1::1 prefix-sid

peer suppress re-originated

Use peer suppress re-originated to suppress advertisement of reoriginated BGP EVPN routes to a peer or peer group.

Use undo peer suppress re-originated to restore the default.

Syntax

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } suppress re-originated ip-prefix

undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } suppress re-originated ip-prefix

Default

The device advertises reoriginated BGP EVPN routes to peers and peer groups after the peer re-originated command is executed.

Views

BGP EVPN address family view

Predefined user roles

network-admin

mdc-admin

Parameters

group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must exist.

ipv4-address: Specifies a peer by its IPv4 address. The peer must exist.

mask-length: Specifies a mask length in the range of 0 to 32. To specify a subnet, you must specify both the ipv4-address and mask-length arguments.

ipv6-address: Specifies a peer by its IPv6 address. The peer must exist.

prefix-length: Specifies a prefix length in the range of 0 to 128. To specify a subnet, you must specify both the ipv6-address and prefix-length arguments.

ip-prefix: Suppresses advertisement of reoriginated IP prefix advertisement routes.

Usage guidelines

The device configured with the peer re-originated and peer advertise original-route commands advertises both original and reoriginated BGP EVPN routes. For the device to advertise only original BGP EVPN routes to a peer or peer group, execute the peer suppress re-originated command on the device.

Examples

# In BGP EVPN address family view, suppress advertisement of reoriginated BGP EVPN routes to peer 1.1.1.1.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-family l2vpn evpn

[Sysname-bgp-default-evpn] peer 1.1.1.1 suppress re-originated

Related commands

peer advertise original-route

peer re-originated

segment-routing ipv6 apply-sid all-nexthop (BGP IPv4/IPv6 address family view)

Use segment-routing ipv6 apply-sid all-nexthop to dynamically allocate an End.DX4 or End.DX6 SID to each next hop of BGP IPv4 or IPv6 routes in the public network.

Use undo segment-routing ipv6 apply-sid all-nexthop to restore the default.

Syntax

segment-routing ipv6 apply-sid all-nexthop

undo segment-routing ipv6 apply-sid all-nexthop

Default

A PE allocates the End.DT4, End.DT6, or End.DT46 SID of the public instance to BGP IPv4 or IPv6 routes in the public network.

Views

BGP IPv4 unicast address family view

BGP IPv6 unicast address family view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

Use this command to forward an SRv6 decapsulated public network packet to the next hop without looking up the routing table of the public network.

This command is applicable to the public network IPv4 or IPv6 over SRv6 scenario. By default, a PE allocates the same SID to all BGP public network routes. When the PE removes the SRv6 encapsulation from a received packet, it looks up the routing table of the public network based on the SID for an optimal route. To forward the packet to the next hop without looking up the routing table, use this command.

This command dynamically allocates an End.DX4 or End.DX6 SID to each next hop for the BGP public network IPv4 or IPv6 routes. When forwarding a packet, the PE searches for the output interface and next hop based on the End.DX4 or End.DX6 SID of the packet. Then, the PE directly forwards the packet out of the output interface to the next hop.

Before you use this command in BGP IPv4 or IPv6 unicast address family view, execute the segment-routing ipv6 locator command in the same view to apply a locator to the view. This ensures successful dynamic End.DX4 or End.DX6 SID allocation.

In the same view, the segment-routing ipv6 apply-sid all-nexthop command is mutually exclusive with the segment-routing ipv6 apply-sid specify-nexthop command. Do not use both commands in the same view.

The device might be unable to dynamically allocate SIDs to BGP public network routes based on the route next hops when dynamic SID resources are insufficient. If the device does not have manually configured End.DX4 or End.DX6 SIDs, it allocates the End.DT4 SID, End.DT6 SID, or End.DT46 SID of the public instance to the routes.

The segment-routing ipv6 apply-sid all-nexthop command does not assign End.DX4 or End.DX6 SIDs to direct routes.

Examples

# In BGP IPv4 unicast address family view, enable the system to automatically allocate an End.DX4 SID to each next hop of BGP public network routes.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-family ipv4 unicast

[Sysname-bgp-default-ipv4] segment-routing ipv6 locator aaa

[Sysname-bgp-default-ipv4] segment-routing ipv6 apply-sid all-nexthop

Related commands

segment-routing ipv6 apply-sid specify-nexthop

segment-routing ipv6 locator

segment-routing ipv6 apply-sid all-nexthop (BGP-VPN IPv4/IPv6 address family view)

Use segment-routing ipv6 apply-sid all-nexthop to dynamically allocate an End.DX4 or End.DX6 SID to each next hop of BGP private network routes.

Use undo segment-routing ipv6 apply-sid all-nexthop to restore the default.

Syntax

segment-routing ipv6 apply-sid all-nexthop

undo segment-routing ipv6 apply-sid all-nexthop

Default

VPN instance-based SID allocation is used for BGP private network routes.

Views

BGP-VPN IPv4 unicast address family view

BGP-VPN IPv6 unicast address family view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

Use this command to forward an SRv6 decapsulated VPN packet to the next hop without looking up the routing table of the matching VPN instance.

This command is applicable to MPLS L3VPN over SRv6 networks. By default, a PE allocates the same SID to all BGP private network routes of a VPN instance. When the PE removes the SRv6 encapsulation from a received packet, it looks up the routing table of the VPN instance based on the SID for an optimal route. Then, the PE forwards the packet to a CE. To forward the packet to the next hop without looking up the routing table, use this command.

This command dynamically allocates an End.DX4 or End.DX6 SID to each next hop of the BGP private network routes in a VPN instance based on the next hop addresses. When forwarding a packet, the PE searches for the output interface and next hop based on the End.DX4 or End.DX6 SID of the packet. Then, the PE directly forwards the packet out of the output interface to the next hop.

Before you use this command in BGP-VPN IPv4 or IPv6 unicast address family view, execute the segment-routing ipv6 locator command in the same view to apply a locator to the view. This ensures successful dynamic End.DX4 or End.DX6 SID allocation.

In the same view, the segment-routing ipv6 apply-sid all-nexthop command is mutually exclusive with the segment-routing ipv6 apply-sid specify-nexthop command. Do not use both commands in the same view.

The device might be unable to dynamically allocate SIDs to BGP private network routes in a VPN instance based on the route next hops when dynamic SID resources are insufficient. If the device does not have manually configured End.DX4 or End.DX6 SIDs, it allocates the End.DT4 SID, End.DT6 SID, or End.DT46 SID of the VPN instance to the routes.

The segment-routing ipv6 apply-sid all-nexthop command does not assign End.DX4 or End.DX6 SIDs to direct routes.

Examples

# In BGP-VPN IPv4 unicast address family view, enable the device to dynamically allocate an End.DX4 or End.DX6 SID to each next hop of BGP private network routes.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] ip vpn-instance vpn1

[Sysname-bgp-default-vpn1] address-family ipv4

[Sysname-bgp-default-ipv4-vpn1] segment-routing ipv6 locator aaa

[Sysname-bgp-default-ipv4-vpn1] segment-routing ipv6 apply-sid all-nexthop

Related commands

segment-routing ipv6 apply-sid specify-nexthop

segment-routing ipv6 locator

segment-routing ipv6 apply-sid specify-nexthop (BGP IPv4/IPv6 address family view)

Use segment-routing ipv6 apply-sid specify-nexthop to configure next hop-specific dynamic End.DX4 or End.DX6 SID allocation for BGP public network IPv4 or IPv6 routes, and create and enter BGP IPv4 SR or SRv6 next hop view. If the view already exists, the command directly places you in the view.

Use undo segment-routing ipv6 apply-sid specify-nexthop to restore the default.

Syntax 

segment-routing ipv6 apply-sid specify-nexthop

undo segment-routing ipv6 apply-sid specify-nexthop

Default

A PE allocates the End.DT4, End.DT6, or End.DT46 SID of the public instance to BGP public network IPv4 or IPv6 routes.

Views

BGP IPv4 unicast address family view

BGP IPv6 unicast address family view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

This command is applicable to the public network IPv4 or IPv6 over SRv6 scenario.

By default, a PE allocates the same SID to all BGP public network routes. When a PE removes the SRv6 encapsulation from a received packet, it looks up the routing table of the public network based on the SID for an optimal route. To forward the packet to the next hop without looking up the routing table, use this command and the nexthop interface command.

This command and the nexthop interface command dynamically allocate an End.DX4 or End.DX6 SID to the specified next hop. When forwarding a packet, the PE searches for the output interface and next hop based on the End.DX4 or End.DX6 SID of the packet. Then, the PE directly forwards the packet out of the output interface to the next hop.

Before you use the segment-routing ipv6 apply-sid specify-nexthop command in BGP IPv4 or IPv6 unicast address family view, execute the segment-routing ipv6 locator command in the same view to apply a locator to the view. This ensures successful dynamic End.DX4 or End.DX6 SID allocation.

In the same view, the segment-routing ipv6 apply-sid specify-nexthop command is mutually exclusive with the segment-routing ipv6 apply-sid all-nexthop command. Do not use both commands in the same view.

The device might be unable to dynamically allocate SIDs to BGP public network routes based on the route next hops when dynamic SID resources are insufficient. If the device does not have manually configured End.DX4 or End.DX6 SIDs, it allocates the End.DT4 SID, End.DT6 SID, or End.DT46 SID of the public instance to the routes.

The segment-routing ipv6 apply-sid specify-nexthop command does not assign End.DX4 or End.DX6 SIDs to direct routes.

Examples

# In BGP IPv4 unicast address family view, configure next hop-specific dynamic End.DX4 SID allocation for BGP public network IPv4 routes, and create and enter BGP IPv4 SR next hop view.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] address-family ipv4 unicast

[Sysname-bgp-default-ipv4] segment-routing ipv6 locator aaa

[Sysname-bgp-default-ipv4] segment-routing ipv6 apply-sid specify-nexthop

[Sysname-bgp-default-sid-np-ipv4]

Related commands

nexthop interface

segment-routing ipv6 apply-sid all-nexthop

segment-routing ipv6 locator

segment-routing ipv6 apply-sid specify-nexthop (BGP-VPN IPv4/IPv6 address family view)

Use segment-routing ipv6 apply-sid specify-nexthop to configure next hop-specific dynamic End.DX4 or End.DX6 SID allocation for BGP private network IPv4 or IPv6 routes, and create and enter BGP-VPN IPv4 SR or SRv6 next hop view. If the view already exists, the command directly places you in the view.

Use undo segment-routing ipv6 apply-sid specify-nexthop to restore the default.

Syntax

segment-routing ipv6 apply-sid specify-nexthop

undo segment-routing ipv6 apply-sid specify-nexthop

Default

A PE allocates the End.DT4, End.DT6, or End.DT46 SID of a VPN instance to the BGP private network IPv4 or IPv6 routes of that VPN instance.

Views

BGP-VPN IPv4 unicast address family view

BGP-VPN IPv6 unicast address family view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

This command is applicable to the MPLS L3VPN over SRv6 scenarios.

By default, a PE allocates the same SID to all BGP routes of a VPN instance. When the PE removes the SRv6 encapsulation from a received packet, it looks up the routing table of the VPN instance based on the SID for an optimal route. Then, the PE forwards the packet to a CE. To forward the packet to the next hop without looking up the routing table, use this command and the nexthop interface command.

This command and the nexthop interface command dynamically allocate an End.DX4 or End.DX6 SID to the specified next hop. When forwarding a packet, the PE searches for the output interface and next hop based on the End.DX4 or End.DX6 SID of the packet. Then, the PE directly forwards the packet out of the output interface to the next hop.

Before you use the segment-routing ipv6 apply-sid specify-nexthop command in BGP-VPN IPv4 or IPv6 unicast address family view, execute the segment-routing ipv6 locator command in the same view to apply a locator to the view. This ensures successful dynamic End.DX4 or End.DX6 SID allocation.

In the same view, the segment-routing ipv6 apply-sid specify-nexthop command is mutually exclusive with the segment-routing ipv6 apply-sid all-nexthop command. Do not use both commands in the same view.

The device might be unable to dynamically allocate SIDs to BGP private network routes in a VPN instance based on the route next hops when dynamic SID resources are insufficient. If the device does not have manually configured End.DX4 or End.DX6 SIDs, it allocates the End.DT4 SID, End.DT6 SID, or End.DT46 SID of the VPN instance to the routes.

The segment-routing ipv6 apply-sid specify-nexthop command does not assign End.DX4 or End.DX6 SIDs to direct routes.

Examples

# In BGP-VPN IPv4 unicast address family view, configure next hop-specific dynamic End.DX4 SID allocation for BGP private network IPv4 routes, and create and enter BGP-VPN IPv4 SR next hop view.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] ip vpn-instance vpn1

[Sysname-bgp-default-vpn1] address-family ipv4 unicast

[Sysname-bgp-default-ipv4-vpn1] segment-routing ipv6 locator aaa

[Sysname-bgp-default-ipv4-vpn1] segment-routing ipv6 apply-sid specify-nexthop

[Sysname-bgp-default-sid-np-ipv4]

Related commands

nexthop interface

segment-routing ipv6 apply-sid all-nexthop

segment-routing ipv6 locator

segment-routing ipv6 best-effort

Use segment-routing ipv6 best-effort to recurse routes to SRv6 BE tunnels.

Use undo segment-routing ipv6 best-effort to restore the default.

Syntax

In BGP-VPN IPv4 unicast address family view or BGP-VPN IPv6 unicast address family view:

segment-routing ipv6 best-effort

undo segment-routing ipv6 best-effort

In BGP IPv4 unicast address family view or BGP IPv6 unicast address family view:

segment-routing ipv6 best-effort

undo segment-routing ipv6 best-effort

Default

A PE searches the IPv6 routing table based on the next hop of a matching route to forward traffic.

Views

BGP-VPN IPv4 unicast address family view

BGP-VPN IPv6 unicast address family view

BGP IPv4 unicast address family view

BGP IPv6 unicast address family view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

This command is applicable to the MPLS L3VPN over SRv6 networks. This command enables a PE to forward packets by looking up the IPv6 routing table based on the SRv6 SIDs in the packets.

Use this command in different address family views according to your network scenario.

·     In the private network IPv4 or IPv6 over SRv6 scenario, use this command in BGP-VPN IPv4 unicast address family view or BGP-VPN IPv6 unicast address family view.

·     In the public network IPv4 or IPv6 over SRv6 scenario, use this command in BGP IPv4 unicast address family view or BGP IPv6 unicast address family view.

Examples

# In BGP-VPN IPv4 unicast address family view, recurse private network routes to SRv6 BE tunnels.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] ip vpn-instance vpn1

[Sysname-bgp-default-vpn1] address-family ipv4

[Sysname-bgp-default-ipv4-vpn1] segment-routing ipv6 best-effort

# In BGP-VPN IPv6 unicast address family view, recurse private network routes to SRv6 BE tunnels.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] ip vpn-instance vpn1

[Sysname-bgp-default-vpn1] address-family ipv6

[Sysname-bgp-default-ipv6-vpn1] segment-routing ipv6 best-effort

Related commands

segment-routing ipv6 locator

segment-routing ipv6 locator

Use segment-routing ipv6 locator to apply a locator to a BGP family.

Use undo segment-routing ipv6 locator to restore the default.

Syntax

In BGP IPv4 unicast address family view or BGP IPv6 unicast address family view:

segment-routing ipv6 locator locator-name [ auto-sid-disable | auto-sid-dt46 ]

undo segment-routing ipv6 locator

In BGP-VPN IPv4 unicast address family view or BGP-VPN IPv6 unicast address family view:

segment-routing ipv6 locator locator-name [ evpn ] [ auto-sid-disable | auto-sid-dt46 ]

undo segment-routing ipv6 locator [ evpn ]

In BGP VPNv4 address family view or BGP VPNv6 address family view:

segment-routing ipv6 locator locator-name

undo segment-routing ipv6 locator

Default

No locator is applied to a BGP family.

Views

BGP-VPN IPv4 unicast address family view

BGP-VPN IPv6 unicast address family view

BGP VPNv4 address family view

BGP VPNv6 address family view

BGP IPv4 unicast address family view

BGP IPv6 unicast address family view

Predefined user roles

network-admin

mdc-admin

Parameters

locator-name: Specifies a locator by its name, a case-sensitive string of 1 to 31 characters. The specified locator must exist.

evpn: Adds the SID attribute to private network routes when the routes are converted to EVPN routes. If you do not specify this keyword, the command adds the SID attribute to private network routes when the routes are converted to BGP VPNv4 or VPNv6 routes.

auto-sid-disable: Disables automatic SRv6 SID allocation. If you do not specify this keyword, the device allows dynamically allocated SRv6 SIDs. If static SRv6 SIDs are configured when automatic SRv6 SID allocation is enabled, the static SRv6 SIDs take precedence. If no static SRv6 SIDs are configured when automatic SRv6 SID allocation is enabled, the system dynamically allocates SRv6 SIDs.

auto-sid-dt46: Specifies the type of dynamically allocated SRv6 SIDs as End.DT46. If you do not specify this keyword, the device dynamically allocates End.DT4 or End.DT6 SRv6 SIDs.

Usage guidelines

Operating mechanism

Execute this command to enable BGP to allocate SRv6 SIDs from the referenced Locator segment address space and enable BGP routes in the specified address family to carry Prefix SID attributes to advertise SRv6 SIDs.

In L3VPN over SRv6 and public IP over SRv6 scenarios, PEs can dynamically allocate SRv6 SIDs for private network routes or public IPv4/IPv6 routes of the VPN instances within the referenced locator. By default, the device dynamically allocates End.DT4 SIDs for public or private IPv4 routes and End.DT6 SIDs for public or private IPv6 routes. When both IPv4 and IPv6 routes coexist in the public network or a specific VPN instance, you can specify the auto-sid-dt46 keyword to allocate only one End.DT46 SID for both IPv4 and IPv6 routes.

Restrictions and guidelines

If you execute this command multiple times for the same address family, the most recent configuration takes effect.

Examples

# Apply locator abc to BGP-VPN IPv4 unicast address family view.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] ip vpn-instance vpn1

[Sysname-bgp-default-vpn1] address-family ipv4

[Sysname-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

# Apply locator abc to BGP-VPN IPv6 unicast address family view.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] ip vpn-instance vpn1

[Sysname-bgp-default-vpn1] address-family ipv6

[Sysname-bgp-default-ipv6-vpn1] segment-routing ipv6 locator abc

# Apply locator abc to BGP-VPN IPv6 unicast address family view.

<Sysname> system-view

[Sysname] bgp 100

[Sysname-bgp-default] ip vpn-instance vpn1

[Sysname-bgp-default-vpn1] address-family ipv6

[Sysname-bgp-default-ipv6-vpn1] segment-routing ipv6 locator abc evpn

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网