Dell Networking SONiC:如何設定 IPv6 位址
Summary: 本文說明如何在 Dell Networking SONiC 設定 IPv6 位址。本文使用執行 Dell SONiC 4.1 的交換器。
This article applies to
This article does not apply to
This article is not tied to any specific product.
Not all product versions are identified in this article.
Instructions
|
先決條件
我們使用標準介面命名來展示概念。請參閱 Dell Networking S 系列202172 Dell 文章:基本介面組態 - SONiC 4.0, 以取得介面命名的詳細資訊 |
指數
組態語法和顯示命令
連結本機位址
IPv6 位址空間
範例組態
將 IP 位址指派給介面。
將 IP 位址指派給 VLAN。
將 IP 位址指派給 PortChannel。
將 IP 位址指派給回送介面。
注意:設定 IPv6 位址時,連結本機位址也會預設為啟用。連結本機位址以 FE80 開頭:.您可以使用命令 show ipv6 介面來檢視連結本機位址。
組態語法和顯示命令
組態語法
| 命令 | 說明 |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
輸入 Dell 管理命令列介面 |
DELLSONiC# configure terminal |
進入組態模式 |
DELLSONiC(config)# interface <Eth slot/port><Vlan ID><PortChannel ID><Eth slot/port.subport><Loopback ID> |
設定介面、VLAN、PortChannel、子介面、回路回復。 |
DELLSONiC(conf-if-XXXX)#ipv6 enable |
在介面上啟用 IPv6 轉送。 |
DELLSONiC(conf-if-XXXX)#no ipv6 enable |
在介面上停用 IPv6 轉送。 |
DELLSONiC(conf-if-XXXX)# ipv6 address ipv6-prefix/prefix-length |
設定 IPv6-prefix 和前置詞長度。 |
DELLSONiC(conf-if-XXXX)# no ipv6 address ipv6-prefix/prefix-length |
移除 IPv6 位址。 |
DELLSONiC(conf-if-XXXX)# no shutdown |
如果介面已關機,請取消套用介面。 |
顯示命令以驗證 IPv6 位址。
| 命令 | 說明 |
|---|---|
admin@DELLSONiC:~$ sonic-cli |
輸入 Dell 管理命令列介面 |
DELLSONiC# configure terminal |
進入組態模式 |
DELLSONiC# show ipv6 interfaces |
顯示在介面中設定的 IP。 |
DELLSONiC# show running-configuration interface <Eth slot/port><Vlan ID><PortChannel ID><Loopback ID> |
顯示介面組態 |
連結本機位址
IPv6 連結本機位址用於與本機網路中的節點通訊。RFC 4291 底下定義了 IPv6 連結本機位址。以下是 Dell SONiC 中有關 IPv6 連結本機位址的須知事項嗎?
- 位址區塊 fe80:/10 保留給 IPv6 連結本機位址。
- 當在介面上設定 IPv6 位址時,會自動產生連結本機位址。
- 我們無法指派靜態連結本機位址。
- 從介面移除 IPv6 位址時,也會移除連結本機位址。
DELLSONiC# show ipv6 interfaces Flags: U-Unnumbered interface, A-Anycast IP ----------------------------------------------------------------------------------------------------------------- Interface IP address/mask VRF Admin/Oper Flags ----------------------------------------------------------------------------------------------------------------- Management0 fe80::XXXX:XXXX:XXXX:XXXX/64 up/down Eth1/1 3000::1/64 up/up Eth1/1 fe80::XXXX:XXXX:XXXX:XXXX/64 up/up |
IPv6 位址空間
| IPv6 前置詞 | 分配 |
|---|---|
| 2000::/3 | 全球 Unicast |
| fe80::/10 | Link-Scoped Unicast |
| ff00::/8 | 組 播 |
| 0000::/8 | 由 IETF 保留 |
| 0100::/8 | 由 IETF 保留 |
| 0200::/7 | 由 IETF 保留 |
| 0400::/6 | 由 IETF 保留 |
| 0800::/5 | 由 IETF 保留 |
| 1000::/4 | 由 IETF 保留 |
| 4000::/3 | 由 IETF 保留 |
| 6000::/3 | 由 IETF 保留 |
| 8000::/3 | 由 IETF 保留 |
| a000::/3 | 由 IETF 保留 |
| c000::/3 | 由 IETF 保留 |
| e000::/4 | 由 IETF 保留 |
| f000::/5 | 由 IETF 保留 |
| f800::/6 | 由 IETF 保留 |
| fe00::/9 | 由 IETF 保留 |
| fec0:/10 | 由 IETF 保留 |
| fc00::/7 | 獨一無二的當地 Unicast |
由網際網路指定編號授權單位 (IANA)、網際網路通訊協定第 6 版位址空間所提供
範例組態
將 IP 位址指派給介面。
讓我們指派 IPv6 位址 3000::1/64 至介面 Eth 1/1。 admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Eth 1/1 DELLSONiC(config-if-Eth1/1)# ipv6 address 3000::1/64 DELLSONiC(config-if-Eth1/1)# end DELLSONiC# |
讓我們檢查指派給介面 Eth 1/1 的 IPv6 位址。
DELLSONiC# show ipv6 interfaces Flags: U-Unnumbered interface, A-Anycast IP ----------------------------------------------------------------------------------------------------------------- Interface IP address/mask VRF Admin/Oper Flags ----------------------------------------------------------------------------------------------------------------- Management0 fe80::XXXX:XXXX:XXXX:XXXX/64 up/down Eth1/1 3000::1/64 up/up Eth1/1 fe80::XXXX:XXXX:XXXX:XXXX/64 up/up |
DELLSONiC# show running-configuration interface Eth 1/1 ! interface Eth1/1 mtu 9100 no shutdown ipv6 address 3000::1/64 |
將 IP 位址指派給 VLAN。
讓我們指派 IPv6 位址 3000::1/64 至介面 VLAN1。 admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Vlan 1 DELLSONiC(config-if-Vlan1)# ipv6 address 3000::1/64 DELLSONiC(config-if-Vlan1)# end DELLSONiC# |
讓我們檢查指派給介面 VLAN1 的 IPv6 位址。
DELLSONiC# show ipv6 interfaces Flags: U-Unnumbered interface, A-Anycast IP ----------------------------------------------------------------------------------------------------------------- Interface IP address/mask VRF Admin/Oper Flags ----------------------------------------------------------------------------------------------------------------- Management0 fe80::XXXX:XXXX:XXXX:XXXX/64 up/down Vlan1 3000::1/64 up/up Vlan1 fe80::XXXX:XXXX:XXXX:XXXX/64 up/up |
DELLSONiC# show running-configuration interface Vlan 1 ! interface Vlan1 ipv6 address 3000::1/64 DELLSONiC# |
將 IP 位址指派給 PortChannel。
讓我們指派 IPv6 位址 3000::1/64 至介面 PortChannel1。 admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface PortChannel 1 DELLSONiC(config-if-po1)# ipv6 address 3000::1/64 DELLSONiC(config-if-po1)# end DELLSONiC# |
讓我們檢查指派給介面 PortChannel1 的 IPv6 位址。
DELLSONiC# show ipv6 interfaces Flags: U-Unnumbered interface, A-Anycast IP ----------------------------------------------------------------------------------------------------------------- Interface IP address/mask VRF Admin/Oper Flags ----------------------------------------------------------------------------------------------------------------- Management0 fe80::XXXX:XXXX:XXXX:XXXX/64 up/down PortChannel1 3000::1/64 up/up PortChannel1 fe80::XXXX:XXXX:XXXX:XXXX/64 up/up |
DELLSONiC# show running-configuration interface PortChannel 1 ! interface PortChannel1 no shutdown ipv6 address 3000::1/64 DELLSONiC# |
將 IP 位址指派給回送介面。
注意:回路回復支援前置詞長度 128。
讓我們指派 IPv6 位址 3000::1/128 至介面 Loopback 1。
admin@DELLSONiC:~$ sonic-cli DELLSONiC# configure DELLSONiC(config)# interface Loopback 1 DELLSONiC(config-if-lo1)# ipv6 address 3000::1/128 DELLSONiC(config-if-lo1)# end DELLSONiC# |
讓我們檢查指派給介面回路回復 1 的 IPv6 位址。
DELLSONiC# show ipv6 interfaces Flags: U-Unnumbered interface, A-Anycast IP ----------------------------------------------------------------------------------------------------------------- Interface IP address/mask VRF Admin/Oper Flags ----------------------------------------------------------------------------------------------------------------- Management0 fe80::XXXX:XXXX:XXXX:XXXX/64 up/down Loopback1 3000::1/128 up/up Loopback1 fe80::XXXX:XXXX:XXXX:XXXX/64 up/up |
DELLSONiC# show running-configuration interface Loopback 1 ! interface Loopback 1 ipv6 address 3000::1/128 DELLSONiC# |
Affected Products
Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9264F-ON, PowerSwitch Z9332F-ON
, PowerSwitch Z9432F-ON
...
Article Properties
Article Number: 000219072
Article Type: How To
Last Modified: 01 Nov 2023
Version: 2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.