跳转到内容
Ask AI

SRv6 Tunnel Configuration

此内容尚不支持你的语言。

[Command] show segment-routing srv6 locator

[Purpose] Display the SRv6 locator configuration for the current configuration

[View]

System View

[Use Cases]

Terminal window
sonic# show segment-routing srv6 locator
Locator:
Name ID Prefix Status
-------------------- ------- ------------------------ -------
test 1 2001::/64 Up

[Command] show segment-routing srv6 local sid

[Purpose] Display the currently active SID table entries for the device

[View] System View

[Use Cases]

Terminal window
sonic# show segment-routing srv6 local sid
+---------------+----------+-------+---------------------------+
| Sid | Action | Vrf | Adj |
+===============+==========+=======+===========================+
| 2001:: | End | | |
+---------------+----------+-------+---------------------------+
| 2001::22 | End | | |
+---------------+----------+-------+---------------------------+
| 2001::1:0:0:0 | End_X | | fe80::62eb:5aff:fe01:12f1 |
+---------------+----------+-------+---------------------------+
| 2001::2:0:0:0 | End_X | | fe80::76fe:48ff:fe8b:e63e |
+---------------+----------+-------+---------------------------+

[Command] show segment-routing srv6 manager

[Purpose] Display the source IP address for the currently configured SRV6 encapsulation

[View] System View

[Use Cases]

Terminal window
sonic# show segment-routing srv6 manager
Parameters:
Encapsulation:
Source Address:
Configured: 1099::1

[Command] show bgp segment-routing srv6

[Purpose] Display BGP and SRV6 binding information

[View] System View

[Use Cases]

Terminal window
sonic# show bgp segment-routing srv6
locator_name: test
prefix: 2500::/64
block-length: 40
node-length: 24
func-length: 16
arg-length: 0
locator_chunks:
functions:
- sid: 2500::2:0:0:0
locator: test
- sid: 2500::1:0:0:0
locator: test
- sid: 2500::1:0:0:0
locator: test
bgps:
- name: 100
vpn_policy[AFI_IP].tovpn_sid: 2500::2:0:0:0
vpn_policy[AFI_IP6].tovpn_sid: 2500::1:0:0:0
per-vrf tovpn_sid: (null)
- name: default
vpn_policy[AFI_IP].tovpn_sid: (null)
vpn_policy[AFI_IP6].tovpn_sid: (null)
per-vrf tovpn_sid: (null)

[Command] locator* locator_name* no locator* locator_name*

[Purpose] Bind the SRv6 locator in the corresponding view

[Parameter]

ParameterDescription
locator_nameThe instance name of the SRv6 locator

[View] ISIS/BGP SRv6 Configuration Overview [Use Cases]

Terminal window
sonic# configure
sonic(config)# router bgp 1024
sonic(config-router)# segment-routing srv6
sonic(config-router-srv6)# locator test

[Command] source-address* X:X::X:X* no source-address

[Purpose] Configure the source IP in the SRV6 tunnel header to a specified IPv6 address

[View] Encapsulation Configuration View

[Use Cases]

Terminal window
sonic# configure
sonic(config)# segment-routing
sonic(config-sr)# srv6
sonic(config-srv6)# encapsulation
sonic(config-srv6-encap)# source-address 1000::1

[Command] prefix* X:X::X:X/M*no prefix[Purpose] Specify the address prefix used by the SRV6 locator [View] Locator Configuration View [Notes] Only one instance of this prefix can be configured within a single locator.[Use Cases]```bash sonic# configure sonic(config)# segment-routing sonic(config-sr)# srv6 sonic(config-srv6)# locators sonic(config-srv6-locators)# locator test123 sonic(config-srv6-locator)# prefix 4000::/64

### sid vpn per-vrf export **\[Command]****sid vpn per-vrf export \{auto|***value***}****no sid vpn per-vrf export****\[Purpose]** Configure SID entries **\[Parameter]**|**Parameter**|**Description** |
| ------------- | ------------------------------------------------------------------------------- |
| auto | Automatically generate SID entries |
| *value* | Generate SID entries based on the configured parameters, value range: 1-1048575 |
**\[View]**
BGP Configuration Views
**\[Use Cases]**
```bash
sonic# configure
sonic(config)# router bgp 1024 vrf 100
sonic(config-router)# sid vpn per-vrf export auto

[Command] sid vpn export {auto|* value***}** no sid vpn export

[Purpose] Configure SID entries

[Parameter]

ParameterDescription
autoAutomatically generate SID entries
valueGenerate SID entries based on the configured parameters, value range: 1-1048575

[View] BGP Address Family Configuration Views

[Use Cases]

Terminal window
sonic# configure
sonic(config)# router bgp 1024 vrf 100
sonic(config-router)# sid vpn per-vrf export auto

[Command] sid vpn export {auto|* value***}** no sid vpn export

[Purpose] Configure SID entries

[Parameter]

ParameterDescription
autoAutomatically generate SID entries
valueGenerate SID entries based on the configured parameters, value range: 1-1048575

[View] BGP Address Family Configuration Views

[Use Cases]

Terminal window
sonic# configure
sonic(config)# router bgp 1024 vrf 100
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# sid vpn export auto

[Command] ipv6 route* X:X::X:X/M* XX::XXsegments* sid_number***/*** sid_number*****no ipv6 route* X:X::X:X/M* XX::XX

[Purpose] Configure static SRV6 routing and specify the SRv6 forwarding path

[Parameter]

ParameterDescription
XX::XXIPv6 local loopback address; specifies the outgoing interface for the route
sid_numberThe SID and END addresses of the SRV6 tunnel node devices, with different nodes separated by “/” in sequence

[View] VRF Configuration View

[Notes] The final node in the SRv6 forwarding path must use the addresses SID END.DT4, SID END.DT6, and SID END.DT46.

[Use Cases]

Terminal window
sonic# configure
sonic(config)# vrf 100
sonic(config-vrf)# ipv6 route 1023::/64 fe80::62eb:5aff:fe00:24d3 segments 2001::/2002::/2003::/2004::2:0:0:0

[Command] loopback {internal|binding srv6} no loopback [binding srv6]

[Purpose] Configure the interface for loopback mode

[Parameter]

ParameterDescription
internalSet the interface to loopback mode
binding srv6Bind to SRV6 and encapsulate the tunnel header for the SRV6 tunnel

[View] Interface Configuration View

[Notes] Once an interface is set to loopback mode, it will automatically come up. For SRv6 TE mode, interfaces not in use by the device must be set to loopback mode and bound to SRv6 in order to encapsulate tunnel headers for SRv6 traffic.

[Use Cases]

Terminal window
sonic# configure
sonic(config)# interface ethernet 10
sonic(config-if-10)# loopback internal
sonic(config-if-10)# loopback binding srv6