• 產品與解決方案
  • 行業解決方案
  • 服務
  • 支持
  • 合作夥伴
  • 關於我們

H3C S6890係列以太網交換機 典型配置舉例-Release 27xx係列-6W100

目錄

35-IP Source Guard典型配置舉例

本章節下載 35-IP Source Guard典型配置舉例  (273.92 KB)

35-IP Source Guard典型配置舉例

H3C S6890產品IP Source Guard配置舉例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

資料版本:6W100-20190628

 

Copyright © 2019 bobty下载软件 版權所有,保留一切權利。

非經本公司書麵許可,任何單位和個人不得擅自摘抄、複製本文檔內容的部分或全部,並不得以任何形式傳播。

除bobty下载软件 的商標外,本手冊中出現的其它公司的商標、產品標識及商品名稱,由各自權利人擁有。

本文檔中的信息可能變動,恕不另行通知。

 



1  簡介

本文檔介紹IP Source Guard的配置舉例。

IP Source Guard功能用於對端口收到的報文進行過濾控製,以防止非法用戶報文通過。

配置了IP Source Guard功能的端口隻轉發與綁定表項匹配的報文。IP Source Guard綁定表項可以通過手工配置(命令行手工配置產生靜態綁定表項)和動態獲取(根據DHCP的相關表項動態生成綁定表項)兩種方式生成。

2  配置前提

本文檔中的配置均是在實驗室環境下進行的配置和驗證,配置前設備的所有參數均采用出廠時的缺省配置。如果您已經對設備進行了配置,為了保證配置效果,請確認現有配置和以下舉例中的配置不衝突。

本文假設您已了解本文檔中的IP Source Guard特性。

3  基於IPv4靜態綁定的IP Source Guard配置舉例

3.1  組網需求

圖1所示,在一個小型網絡中,各主機和服務器均使用靜態配置的IPv4地址。要求在Device A和Device B上配置IP Source Guard全局靜態綁定表項和端口靜態綁定表項,並在端口下開啟IP Source Guard功能(IP+MAC綁定),對Device A和Device B接收到的報文進行過濾,以防止非法用戶報文通過。

具體需求如下:

·     Device A的端口XGE1/0/1允許Host A發送的IP報文通過。

·     Device A的所有端口都允許Host B發送的IP報文通過。

·     Device B的端口XGE1/0/1隻允許Host A和Host B發送的IP報文通過。

·     Device B的端口XGE1/0/2隻允許File Server發送的IP報文通過。

圖1 基於IPv4靜態綁定的IP Source Guard組網圖

3.2  配置思路

由於各主機和服務器都是用靜態IP地址和固定MAC地址,因此若要實現Device A的某個端口上僅允許特定主機通過,可在端口下配置IP Source Guard靜態綁定表項;若要實現允許特定主機的報文通過Device A的任意端口,則需要配置IP Source Guard全局靜態綁定表項。若要實現Device B的某個端口上僅允許特定主機通過,可在端口下配置IP Source Guard靜態綁定表項。

3.3  使用版本

本舉例是在S6890-CMW710-R2712版本上進行配置和驗證的。

3.4  配置注意事項

IP Source Guard功能靜態綁定表項中的VLAN參數不作為過濾報文的特征項,VLAN參數指定與否,不影響IP Source Guard功能對報文的過濾結果。

缺省情況下,本設備的接口處於ADM(Administratively Down)狀態,請根據實際需要在對應接口視圖下使用undo shutdown命令開啟接口。

3.5  配置步驟

3.5.1  Device A的配置

# 創建VLAN 10,並將端口Ten-GigabitEthernet1/0/1~Ten-GigabitEthernet1/0/3加入VLAN 10。

<DeviceA> system-view

[DeviceA] vlan 10

[DeviceA-vlan10] port ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/3

[DeviceA-vlan10] quit

# 配置VLAN接口10的IP地址。

[DeviceA] interface vlan-interface 10

[DeviceA-Vlan-interface10] ip address 192.168.0.10 255.255.255.0

[DeviceA-Vlan-interface10] quit

# 在端口Ten-GigabitEthernet1/0/1、Ten-GigabitEthernet1/0/2上配置IP Source Guard端口綁定功能,綁定源IP地址和MAC地址。

[DeviceA] interface ten-gigabitethernet 1/0/2

[DeviceA-Ten-GigabitEthernet1/0/2] ip verify source ip-address mac-address

[DeviceA-Ten-GigabitEthernet1/0/2] quit

[DeviceA] interface ten-gigabitethernet 1/0/1

[DeviceA-Ten-GigabitEthernet1/0/1] ip verify source ip-address mac-address

# 在端口Ten-GigabitEthernet1/0/1上配置隻允許MAC地址為0001-0203-0401、IP地址為192.168.0.1的終端Host A發送的IP報文通過。

[DeviceA-Ten-GigabitEthernet1/0/1] ip source binding ip-address 192.168.0.1 mac-address 0001-0203-0401

[DeviceA-Ten-GigabitEthernet1/0/1] quit

# 在Device A上配置允許MAC地址為0001-0203-0402、IP地址為192.168.0.2的終端Host B發送的IP報文通過。

[DeviceA] ip source binding ip-address 192.168.0.2 mac-address 0001-0203-0402

3.5.2  Device B的配置

# 創建VLAN 10,並將端口Ten-GigabitEthernet1/0/1加入VLAN 10。

<DeviceB> system-view

[DeviceB] vlan 10

[DeviceB-vlan10] port ten-gigabitethernet 1/0/1

[DeviceB-vlan10] quit

# 配置VLAN接口10的IP地址。

[DeviceB] interface vlan-interface 10

[DeviceB-Vlan-interface10] ip address 192.168.0.100 255.255.255.0

[DeviceB-Vlan-interface10] quit

# 創建VLAN 20,並將端口Ten-GigabitEthernet1/0/2加入VLAN 20。

[DeviceB] vlan 20

[DeviceB-vlan20] port ten-gigabitethernet 1/0/2

[DeviceB-vlan20] quit

# 配置VLAN接口20的IP地址。

[DeviceB] interface vlan-interface 20

[DeviceB-Vlan-interface20] ip address 192.168.2.100 255.255.255.0

[DeviceB-Vlan-interface20] quit

# 在端口Ten-GigabitEthernet1/0/1上配置IP Source Guard端口綁定功能,綁定源IP地址和MAC地址。

[DeviceB] interface ten-gigabitethernet 1/0/1

[DeviceB-Ten-GigabitEthernet1/0/1] ip verify source ip-address mac-address

# 配置在Device B的Ten-GigabitEthernet1/0/1上隻允許MAC地址為0001-0203-0401且IP地址為192.168.0.1的終端Host A與MAC地址為0001-0203-0402且IP地址為192.168.0.2的終端Host B發送的IP報文通過。

[DeviceB-Ten-GigabitEthernet1/0/1] ip source binding ip-address 192.168.0.1 mac-address 0001-0203-0401

[DeviceB-Ten-GigabitEthernet1/0/1] ip source binding ip-address 192.168.0.2 mac-address 0001-0203-0402

[DeviceB-Ten-GigabitEthernet1/0/1] quit

# 在端口Ten-GigabitEthernet1/0/2上配置IP Source Guard端口綁定功能,綁定源IP地址和MAC地址。

[DeviceB] interface ten-gigabitethernet 1/0/2

[DeviceB-Ten-GigabitEthernet1/0/2] ip verify source ip-address mac-address

# 配置在Device B的Ten-GigabitEthernet1/0/2上隻允許MAC地址為0001-0203-0403與IP地址為192.168.2.3的終端File server發送的IP報文通過。

[DeviceB-Ten-GigabitEthernet1/0/2] ip source binding ip-address 192.168.2.3 mac-address 0001-0203-0403

[DeviceB-Ten-GigabitEthernet1/0/2] quit

3.6  驗證配置

完成上述配置後,Host A、Host B可以ping通Device A、Device B上三層接口的IP地址;File server可以ping通Device B上Vlan-interface20的IP地址。且在Device A和Device B上可以查看到已配置成功的IP Source Guard靜態綁定表項。

# 在Device A上顯示靜態綁定表項。

[DeviceA] display ip source binding static

Total entries found: 2

IP Address      MAC Address    Interface                VLAN Type

192.168.0.2     0001-0203-0402 N/A                      N/A  Static

192.168.0.1     0001-0203-0401 XGE1/0/1                 N/A  Static

# 在Device B上顯示靜態綁定表項。

[DeviceB] display ip source binding static

Total entries found: 3

IP Address      MAC Address    Interface                VLAN Type

192.168.0.1     0001-0203-0401 XGE1/0/1                 N/A  Static

192.168.0.2     0001-0203-0402 XGE1/0/1                 N/A  Static

192.168.2.3     0001-0203-0403 XGE1/0/2                 N/A  Static

保持上述配置不變,將Host B改為通過端口XGE1/0/1接入Device A,仍然可以ping通Device A,因為全局靜態綁定表項不檢查端口的綁定關係。

如果修改Host B的IP地址,則無法ping通Device A,因為此時不滿足IP+MAC的綁定關係。

如果修改Host A的IP地址或接入端口,則無法ping通Device A,因為此時不滿足IP+MAC+端口的綁定關係。

3.7  配置文件

·     DeviceA

#

 ip source binding ip-address 192.168.0.2 mac-address 0001-0203-0402

#

vlan 10

#

interface Vlan-interface10

 ip address 192.168.0.10 255.255.255.0

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

 ip verify source ip-address mac-address

 ip source binding ip-address 192.168.0.1 mac-address 0001-0203-0401

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 10

 ip verify source ip-address mac-address

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 10

#

·     DeviceB

#

vlan 10

#

vlan 20

#

interface Vlan-interface10

 ip address 192.168.0.100 255.255.255.0

#

interface Vlan-interface20

 ip address 192.168.2.100 255.255.255.0

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

ip verify source ip-address mac-address

 ip source binding ip-address 192.168.0.1 mac-address 0001-0203-0401

 ip source binding ip-address 192.168.0.2 mac-address 0001-0203-0402

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

 ip verify source ip-address mac-address

 ip source binding ip-address 192.168.2.3 mac-address 0001-0203-0403

#

4  基於DHCP Snooping動態綁定的IP Source Guard配置舉例

4.1  組網需求

圖2所示,DHCP客戶端通過Device的端口XGE1/0/1接入網絡,利用DHCP服務器獲取IPv4地址。

具體應用需求如下:

·     Device上使能DHCP Snooping功能,保證客戶端從合法的服務器獲取IP地址。

·     在端口XGE1/0/1上啟用IPv4動態綁定功能,通過DHCP Snooping功能獲取的用戶信息來生成IP Source Guard動態綁定表項(IP+MAC綁定),並利用該表項對端口XGE1/0/1接收到的報文進行過濾,防止非法用戶報文通過。

圖2 基於DHCP Snooping動態綁定的IP Source Guard組網圖

 

4.2  配置思路

·     為了保證客戶端從合法的服務器獲取IP地址,需要將DeviceDHCP服務器相連的端口配置為信任端口(缺省情況下,使能了DHCP Snooping功能的設備上所有端口均為不信任端口)。

·     Device與客戶端相連的端口上啟用DHCP Snooping表項記錄功能(缺省為關閉),以使Device能監聽該端口上接收的報文、生成DHCP Snooping表項

4.3  使用版本

本舉例是在S6890-CMW710-R2712版本上進行配置和驗證的。

4.4  配置注意事項

缺省情況下,S6890係列交換機的接口處於ADM(Administratively Down)狀態,請根據實際需要在對應接口視圖下使用undo shutdown命令開啟接口。

4.5  配置步驟

4.5.1  配置DHCP服務器

說明

本例以S6890係列交換機作為DHCP服務器為例,說明DHCP服務器的基本配置。

 

# 配置VLAN接口1的IP地址,並將其配置為工作在DHCP服務器模式。

<DHCPserver> system-view

[DHCPserver] interface vlan-interface 1

[DHCPserver-Vlan-interface1] ip address 192.168.0.2 24

[DHCPserver-Vlan-interface1] dhcp select server

[DHCPserver-Vlan-interface1] quit

# 啟用DHCP服務。

[DHCPserver] dhcp enable

# 配置DHCP地址池1,用來為192.168.0.0/24網段內的客戶端分配IP地址和網絡配置參數。

[DHCPserver] dhcp server ip-pool 1

[DHCPserver-dhcp-pool-1] network 192.168.0.0 24

[DHCPserver-dhcp-pool-1] expired day 7

[DHCPserver-dhcp-pool-1] quit

4.5.2  配置Device

# 開啟DHCP Snooping功能。

<Device> system-view

[Device] dhcp snooping enable

# 設置與DHCP服務器相連的端口Ten-GigabitEthernet1/0/2為DHCP Snooping信任端口。

[Device] interface ten-gigabitethernet 1/0/2

[Device-Ten-GigabitEthernet1/0/2] dhcp snooping trust

[Device-Ten-GigabitEthernet1/0/2] quit

# 配置端口Ten-GigabitEthernet1/0/1的IP Source Guard綁定功能,綁定源IP地址和MAC地址。

[Device] interface ten-gigabitethernet 1/0/1

[Device-Ten-GigabitEthernet1/0/1] ip verify source ip-address mac-address

# 啟用端口Ten-GigabitEthernet1/0/1的DHCP Snooping表項記錄功能。

[Device-Ten-GigabitEthernet1/0/1] dhcp snooping binding record

[Device-Ten-GigabitEthernet1/0/1] quit

4.5.3  配置DHCP客戶端

將終端配置為自動獲取IP地址(具體過程略)。

4.6  驗證配置

DHCP客戶端成功獲取IP地址以後,在Device上可以顯示通過DHCP Snooping模塊獲取的IP Source Guard動態綁定表項信息。(以接入四台DHCP客戶端為例)

[Device] display ip source binding dhcp-snooping

Total entries found: 4

IP Address      MAC Address    Interface                 VLAN Type

192.168.0.1     0001-0203-0401 XGE1/0/1                  1    DHCP snooping

192.168.0.3     0001-0203-0403 XGE1/0/1                  1    DHCP snooping

192.168.0.4     0001-0203-0404 XGE1/0/1                  1    DHCP snooping

192.168.0.5     0001-0203-0405 XGE1/0/1                  1    DHCP snooping

DHCP客戶端均可以ping通DHCP服務器接口IP地址192.168.0.2。

如果DHCP客戶端通過手工配置IP地址的方式,修改了自身的IP地址,將無法ping通DHCP服務器接口IP地址。

4.7  配置文件

·     Device

#

vlan 1

#

dhcp snooping enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

ip verify source ip-address mac-address

dhcp snooping binding record

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

dhcp snooping trust

#

5  基於DHCP中繼動態綁定的IP Source Guard配置舉例

5.1  組網需求

圖3所示,Device通過接口Vlan-interface10和Vlan-interface20分別與DHCP客戶端和DHCP服務器相連。

具體應用需求如下:

·     Device上使能DHCP中繼功能,DHCP客戶端通過Device從DHCP服務器獲取IP地址。

·     在接口Vlan-interface10上啟用IPv4動態綁定功能,通過DHCP中繼獲取的用戶信息來生成IP Source Guard動態綁定表項(IP+MAC綁定),並利用該表項對接口Vlan-interface10收到的報文進行過濾,防止非法用戶報文通過。

圖3 基於DHCP中繼動態綁定的IP Source Guard組網圖

 

 

5.2  配置思路

在Device上啟用DHCP中繼用戶地址表項記錄功能(缺省為關閉),以使Device能監聽該接口上接收的報文、生成DHCP中繼用戶地址表項。

5.3  使用版本

本舉例是在S6890-CMW710-R2712版本上進行配置和驗證的。

5.4  配置注意事項

缺省情況下,S6890係列交換機的接口處於ADM(Administratively Down)狀態,請根據實際需要在對應接口視圖下使用undo shutdown命令開啟接口。

5.5  配置步驟

5.5.1  配置DHCP服務器

說明

本例以S6890係列交換機作為DHCP服務器為例,說明DHCP服務器的基本配置。

 

# 配置VLAN接口20的IP地址,並將其配置為工作在DHCP服務器模式。

<DHCPserver> system-view

[DHCPserver] interface vlan-interface 20

[DHCPserver-Vlan-interface20] ip address 10.10.0.2

[DHCPserver-Vlan-interface20] dhcp select server

[DHCPserver-Vlan-interface20] quit

# 啟用DHCP服務。

[DHCPserver] dhcp enable

# 配置DHCP地址池1,用來為192.168.0.0/24網段內的客戶端分配IP地址和網絡配置參數。

[DHCPserver] dhcp server ip-pool 1

[DHCPserver-dhcp-pool-1] network 192.168.0.0 24

[DHCPserver-dhcp-pool-1] expired day 7

[DHCPserver-dhcp-pool-1] quit

由於DHCP中繼連接客戶端的接口IP地址與DHCP服務器的IP地址不在同一網段,因此需要在DHCP服務器上通過靜態路由或動態路由協議保證兩者之間路由可達,這裏以配置靜態路由為例。

[DHCPserver] ip route-static 192.168.0.0 24 10.10.0.1

5.5.2  配置Device

# 創建VLAN 10,並將端口Ten-GigabitEthernet1/0/1加入VLAN 10。

<Device> system-view

[Device] vlan 10

[Device-vlan10] port ten-gigabitethernet 1/0/1

[Device-vlan10] quit

# 配置VLAN接口10的IP地址。

[Device] interface vlan-interface 10

[Device-Vlan-interface10] ip address 192.168.0.1 255.255.255.0

[Device-Vlan-interface10] quit

# 創建VLAN 20,並將端口Ten-GigabitEthernet1/0/2加入VLAN 20。

[Device] vlan 20

[Device-vlan20] port ten-gigabitethernet 1/0/2

[Device-vlan20] quit

# 配置VLAN接口20的IP地址。

[Device] interface vlan-interface 20

[Device-Vlan-interface20] ip address 10.10.0.1 255.255.255.0

[Device-Vlan-interface20] quit

# 開啟DHCP服務。

[Device] dhcp enable

# 開啟DHCP中繼用戶地址表項記錄功能。

[Device] dhcp relay client-information record

# 配置接口Vlan-interface10工作在DHCP中繼模式。

[Device] interface vlan-interface 10

[Device-Vlan-interface10] dhcp select relay

# 在DHCP中繼上指定DHCP服務器的地址。

[Device-Vlan-interface10] dhcp relay server-address 10.10.0.2

[Device-Vlan-interface10] quit

# 在接口Vlan-interface10上配置IPv4接口綁定功能,綁定源IP地址和MAC地址。

[Device] interface vlan-interface 10

[Device-Vlan-interface10] ip verify source ip-address mac-address

[Device-Vlan-interface10] quit

5.5.3  配置DHCP客戶端

將終端配置為自動獲取IP地址(具體過程略)。

5.6  驗證配置

DHCP客戶端成功獲取IP地址以後,在Device上可以顯示通過DHCP relay模塊獲取的IP Source Guard動態綁定表項信息。(以接入四台DHCP客戶端為例)

<Device> display ip source binding dhcp-relay

Total entries found: 4

IP Address      MAC Address    Interface                VLAN Type

192.168.0.2     0001-0203-0402 Vlan10 10   DHCP relay

192.168.0.3     0001-0203-0403 Vlan10 10   DHCP relay

192.168.0.4     0001-0203-0404 Vlan10 10   DHCP relay

192.168.0.5     0001-0203-0405 Vlan10 10   DHCP relay

DHCP客戶端均可以ping通DHCP服務器接口IP地址10.10.0.2。

如果DHCP客戶端通過手工配置IP地址的方式,修改了自身的IP地址,將無法ping通DHCP服務器接口IP地址。

5.7  配置文件

·     Device

#

 dhcp enable

 dhcp relay client-information record

#

vlan 10

#

vlan 20

#

interface Vlan-interface10

 ip address 192.168.0.1 255.255.255.0

 dhcp select relay

 dhcp relay server-address 10.10.0.2

 ip verify source ip-address mac-address

#

interface Vlan-interface20

 ip address 10.10.0.1 255.255.255.0

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#

6  基於IPv6靜態綁定表項與DHCPv6 Snooping動態綁定的IP Source Guard配置舉例

6.1  組網需求

圖4所示,File server、Host A、Host B和DHCPv6服務器都與Device相連。File server靜態配置IPv6地址,Host A和Host B為DHCPv6客戶端。

·     在Device的端口XGE1/0/1上配置IPv6靜態綁定表項和IPv6綁定功能,使得該端口隻允許File server(MAC地址為0001-0203-0405、IPv6地址為2001::1)發送的IPv6報文通過。

·     在端口XGE1/0/2和端口XGE1/0/3上啟用IPv6動態綁定功能,通過DHCPv6 Snooping功能獲取的用戶信息來生成IP Source Guard動態綁定表項(IP+MAC綁定),並利用該表項對端口接收到的報文進行過濾,防止非法用戶報文通過。

圖4 基於IPv6靜態綁定表項與DHCPv6 Snooping動態綁定的IP Source Guard組網圖

 

6.2  配置思路

·     為了保證客戶端從合法的服務器獲取IP地址,需要將DeviceDHCPv6服務器相連的端口配置為信任端口(缺省情況下,使能了DHCPv6 Snooping功能的設備上所有端口均為不信任端口)。

·     在DeviceDHCPv6客戶端相連的端口上啟用DHCPv6 Snooping表項記錄功能(缺省為關閉),以使Device能監聽該端口上接收的報文、生成DHCPv6 Snooping表項。

6.3  使用版本

本舉例是在S6890-CMW710-R2712版本上進行配置和驗證的。

6.4  配置注意事項

IP Source Guard功能靜態綁定表項中的VLAN參數不作為過濾報文的特征項,VLAN參數指定與否,不影響IP Source Guard功能對報文的過濾結果。

缺省情況下,S6890係列交換機的接口處於ADM(Administratively Down)狀態,請根據實際需要在對應接口視圖下使用undo shutdown命令開啟接口。

6.5  配置步驟

# 配置DHCPv6服務器和DHCPv6客戶端。(略)

# 配置端口Ten-GigabitEthernet1/0/1的IPv6 Source Guard綁定功能,綁定源IPv6地址和MAC地址。

<Device> system-view

[Device] interface ten-gigabitethernet 1/0/1

[Device-Ten-GigabitEthernet1/0/1] ipv6 verify source ip-address mac-address

# 配置在Device的端口Ten-GigabitEthernet1/0/1上隻允許MAC地址為0001-0203-0405、IPv6地址為2001::1的終端發送的IPv6報文通過。

[Device-Ten-GigabitEthernet1/0/1] ipv6 source binding ip-address 2001::1 mac-address 0001-0203-0405

[Device-Ten-GigabitEthernet1/0/1] quit

# 全局使能DHCPv6 Snooping功能。

[Device] ipv6 dhcp snooping enable

# 配置與DHCPv6服務器相連的端口Ten-GigabitEthernet1/0/4為DHCP Snooping信任端口。

[Device] interface ten-gigabitethernet 1/0/4

[Device-Ten-GigabitEthernet1/0/4] ipv6 dhcp snooping trust

[Device-Ten-GigabitEthernet1/0/4] quit

# 配置端口Ten-GigabitEthernet1/0/2的IPv6 Source Guard綁定功能,綁定源IPv6地址和MAC地址。

[Device] interface ten-gigabitethernet 1/0/2

[Device-Ten-GigabitEthernet1/0/2] ipv6 verify source ip-address mac-address

# 啟用端口Ten-GigabitEthernet1/0/2的DHCPv6 Snooping表項記錄功能。

[Device-Ten-GigabitEthernet1/0/2] ipv6 dhcp snooping binding record

[Device-Ten-GigabitEthernet1/0/2] quit

# 配置端口Ten-GigabitEthernet1/0/3的IPv6 Source Guard綁定功能,綁定源IPv6地址和MAC地址。

[Device] interface ten-gigabitethernet 1/0/3

[Device-Ten-GigabitEthernet1/0/3] ipv6 verify source ip-address mac-address

# 啟用端口Ten-GigabitEthernet1/0/3的DHCPv6 Snooping 表項記錄功能。

[Device-Ten-GigabitEthernet1/0/3] ipv6 dhcp snooping binding record

[Device-Ten-GigabitEthernet1/0/3] quit

6.6  驗證配置

File server可以ping通DHCPv6服務器與客戶端相連的接口IPv6地址。

在Device上可以查看到已配置成功的IP Source Guard靜態綁定表項。

[Device] display ipv6 source binding static

Total entries found: 1

IPv6 Address         MAC Address    Interface                VLAN Type

2001::1              0001-0203-0405 XGE1/0/1                 N/A  Static

客戶端通過DHCPv6服務器成功獲取IPv6地址之後,通過執行以下命令可查看到已生成的IPv6動態綁定表項信息。

[Device] display ipv6 source binding dhcpv6-snooping

Total entries found: 2

IPv6 Address         MAC Address    Interface               VLAN Type

2001::2              0001-0203-0406 XGE1/0/2                1    DHCPv6 snooping

2001::3              0001-0203-0407 XGE1/0/3                1    DHCPv6 snooping

DHCPv6客戶端可以ping通DHCPv6服務器接口IPv6地址。

如果DHCPv6客戶端通過手工配置IPv6地址的方式,修改了自身的IPv6地址,將無法ping通DHCPv6服務器接口IPv6地址。

6.7  配置文件

·     Device

#

ipv6 dhcp snooping enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 ipv6 verify source ip-address mac-address

 ipv6 source binding ip-address 2001::1 mac-address 0001-0203-0405

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 ipv6 verify source ip-address mac-address

 ipv6 dhcp snooping binding record

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 ipv6 verify source ip-address mac-address

 ipv6 dhcp snooping binding record

#

interface Ten-GigabitEthernet1/0/4

 port link-mode bridge

 ipv6 dhcp snooping trust

#

7  相關資料

·     H3C S6890以太網交換機 安全配置指導(R27xx)

·     H3C S6890以太網交換機 安全命令參考(R27xx)

不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!

BOB登陆
官網
聯係我們