Print

S7000/S7500E/10500係列V7交換機DHCPv6中繼配置方法

2022-03-07 發表

組網及說明

配置需求或說明

1.1適用產品係列

案例適用於如S7000/S7500E/10500等的V7交換機V5V7交換機具體分類及型號可以參考1.1 Comware V5V7平台交換機分類說明”。

 

1.2配置需求及實現效果

SWA作為DHCPv6服務器終端PC1PC2分配2::/64以及3::/64Ipv6地址,SWB作為DHCPv6中繼設備終端和服務器轉發報文


配置步驟

配置步驟

3.1 配置SWADHCPv6服務器

#配置SWADHCPv6服務器)與SWBDHCPv6中繼)的IPV6互聯接口所屬vlan 1虛接口地址。取消設備發布RA消息的抑製。配置被管理地址的配置標誌位為1,即主機通過DHCPv6服務器獲取IPv6地址。配置其他信息配置標誌位為1,即主機通過DHCPv6服務器獲取除IPv6地址以外的其他信息。

<SWA>system-view

System View: return to User View with Ctrl+Z.

[SWA]int vlan 1

[SWA-Vlan-interface1] ipv6 address 1::1/64

[SWA-Vlan-interface1] ipv6 nd autoconfig managed-address-flag

[SWA-Vlan-interface1] ipv6 nd autoconfig other-flag

[SWA-Vlan-interface1] undo ipv6 nd ra halt

#配置接口Vlan-interface1工作在DHCPv6服務器模式。

[SWA-Vlan-interface1] ipv6 dhcp select server

[SWA-Vlan-interface1] quit

#配置不參與自動分配的IPv6地址,以避免分配DNS服務器的地址。

[SWA]ipv6 dhcp server forbidden-address 2::1

[SWA]ipv6 dhcp server forbidden-address 3::1

#配置DHCPv6服務器地址池為1為客戶端分配2::/64IPv6地址

[SWA]ipv6 dhcp pool 1

[SWA-dhcp6-pool-1] network 2::/64

[SWA-dhcp6-pool-1] dns-server 2::1

[SWA-dhcp6-pool-1] gateway-list 2::1

[SWA-dhcp6-pool-1]quit

#配置DHCPv6服務器地址池為2為客戶端分配3::/64IPv6地址

[SWA]ipv6 dhcp pool 2

[SWA-dhcp6-pool-2] network 3::/64

[SWA-dhcp6-pool-2] dns-server 3::1

[SWA-dhcp6-pool-2] gateway-list 3::1

[SWA-dhcp6-pool-2]quit

#SWA添加DHCPv6中繼IPv6靜態路由。

[SWA] ipv6 route-static 2:: 64 1::2

[SWA] ipv6 route-static 3:: 64 1::2

#保存配置

[SWA] save for

 

3.2 配置SWBDHCPv6中繼

#配置SWB上創建vlan 2vlan 3,將接口Ethernet 1/0/2加入vlan 2,接口Ethernet 1/0/3加入vlan 3

<SWB>sys

System View: return to User View with Ctrl+Z.

[SWB]vlan 2 to 3

[SWB]int Ethernet 1/0/2

[SWB-Ethernet1/0/2]port access vlan 2

[SWB-Ethernet1/0/2]quit

[SWB]int Ethernet 1/0/3

[SWB-Ethernet1/0/3]port access vlan 3

[SWB-Ethernet1/0/3]quit

#配置SWBSWA互聯接口所屬vlan1虛接口IPv6地址

[SWB]interface Vlan-interface1

[SWB-Vlan-interface1] ipv6 address 1::2/64

#配置vlan 2vlan 3虛接口IPv6地址。取消設備發布RA消息的抑製。配置被管理地址的配置標誌位為1,即主機通過DHCPv6服務器獲取IPv6地址。配置其他信息配置標誌位為1,即主機通過DHCPv6服務器獲取除IPv6地址以外的其他信息。

[SWB]int vlan 2

[SWB-Vlan-interface2] ipv6 address 2::1/64

[SWB-Vlan-interface2] ipv6 nd autoconfig managed-address-flag

[SWB-Vlan-interface2] ipv6 nd autoconfig other-flag

[SWB-Vlan-interface2] undo ipv6 nd ra halt

[SWB-Vlan-interface2]quit

[SWB]int vlan 3

[SWB-Vlan-interface3] ipv6 address 3::1/64

[SWB-Vlan-interface3] ipv6 nd autoconfig managed-address-flag

[SWB-Vlan-interface3] ipv6 nd autoconfig other-flag

[SWB-Vlan-interface3] undo ipv6 nd ra halt

[SWB-Vlan-interface3]quit

#SWB添加DHCPv6服務器IPv6靜態路由。

[SWB] ipv6 route-static :: 0 1::1

#分別配置vlan 2vlan 3虛接口工作在DHCPv6中繼模式,指定1::1DHCPv6服務器地址。

[SWB] int vlan 2

[SWB-Vlan-interface2]ipv6 dhcp select relay

[SWB-Vlan-interface2]ipv6 dhcp relay server-address 1::1

[SWB-Vlan-interface2]quit

[SWB] int vlan 3

[SWB-Vlan-interface3]ipv6 dhcp select relay

[SWB-Vlan-interface3]ipv6 dhcp relay server-address 1::1

[SWB-Vlan-interface3]quit

#保存配置

[SWA] save for

 

驗證配置

#SWADHCPv6分配ipv6地址情況如下PC1獲取2::2/64IPv6地址PC2獲取3::2/64IPv6地址

配置關鍵點