组网图形
IPSG简介
组网需求
配置思路
操作步骤
<HUAWEI> system-view [HUAWEI] sysname Core [Core] vlan batch 10 [Core] interface gigabitethernet 0/0/1 [Core-GigabitEthernet0/0/1] port link-type trunk [Core-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 [Core-GigabitEthernet0/0/1] quit [Core] dhcp enable [Core] ip pool 10 [Core-ip-pool-10] network 10.1.1.0 mask 24 [Core-ip-pool-10] gateway-list 10.1.1.1 [Core-ip-pool-10] quit [Core] interface vlanif 10 [Core-Vlanif10] ip address 10.1.1.1 255.255.255.0 [Core-Vlanif10] dhcp select global [Core-Vlanif10] quit
# 配置各接口所属VLAN。
<HUAWEI> system-view [HUAWEI] sysname ACC [ACC] vlan batch 10 [ACC] interface gigabitethernet 0/0/1 [ACC-GigabitEthernet0/0/1] port link-type access [ACC-GigabitEthernet0/0/1] port default vlan 10 [ACC-GigabitEthernet0/0/1] quit [ACC] interface gigabitethernet 0/0/2 [ACC-GigabitEthernet0/0/2] port link-type access [ACC-GigabitEthernet0/0/2] port default vlan 10 [ACC-GigabitEthernet0/0/2] quit [ACC] interface gigabitethernet 0/0/3 [ACC-GigabitEthernet0/0/3] port link-type access [ACC-GigabitEthernet0/0/3] port default vlan 10 [ACC-GigabitEthernet0/0/3] quit [ACC] interface gigabitethernet 0/0/4 [ACC-GigabitEthernet0/0/4] port link-type trunk [ACC-GigabitEthernet0/0/4] port trunk allow-pass vlan 10 [ACC-GigabitEthernet0/0/4] quit
# 使能DHCP Snooping功能,并将连接DHCP Server的GE0/0/4接口配置为信任接口。
[ACC] dhcp enable //使能DHCP功能 [ACC] dhcp snooping enable //使能DHCP Snooping功能 [ACC] vlan 10 [ACC-vlan10] dhcp snooping enable //使能DHCP Snooping功能 [ACC-vlan10] dhcp snooping trusted interface gigabitethernet 0/0/4 //配置信任接口 [ACC-vlan10] quit
[ACC] user-bind static ip-address 10.1.1.2 mac-address 0003-0003-0003 interface gigabitethernet 0/0/3 vlan 10
[ACC] vlan 10 [ACC-vlan10] ip source check user-bind enable //使能IPSG功能 [ACC-vlan10] quit
Host上线后,在ACC上执行display dhcp snooping user-bind all命令,可以查看Host的动态绑定表信息。
[ACC] display dhcp snooping user-bind all DHCP Dynamic Bind-table: Flags:O - outer vlan ,I - inner vlan ,P - Vlan-mapping IP Address MAC Address VSI/VLAN(O/I/P) Interface Lease -------------------------------------------------------------------------------- 10.1.1.254 0001-0001-0001 10 /-- /-- GE0/0/1 2014.08.17-07:31 10.1.1.253 0002-0002-0002 10 /-- /-- GE0/0/2 2014.08.17-07:34 -------------------------------------------------------------------------------- print count: 2 total count: 2
在ACC上执行display dhcp static user-bind all命令,可以查看打印机的静态绑定表信息。
[ACC] display dhcp static user-bind all DHCP static Bind-table: Flags:O - outer vlan ,I - inner vlan ,P - Vlan-mapping IP Address MAC Address VSI/VLAN(O/I/P) Interface -------------------------------------------------------------------------------- 10.1.1.2 0003-0003-0003 10 /-- /-- GE0/0/3 -------------------------------------------------------------------------------- Print count: 1 Total count: 1
Host使用DHCP服务器动态分配的IP地址可以正常访问网络,将Host更改为与动态获得的IP地址不一样的静态IP地址后无法访问网络。
原文:https://www.cnblogs.com/zhangwencheng/p/14187423.html