华为路由器 配置IPSG防止主机仿冒其他主机IP地址示例(静态绑定)

组网需求

图1所示,Host通过Router接入网络,Gateway为企业出口网关,各Host均使用静态配置的IP地址。管理员希望Host使用管理员分配的固定IP地址上网,不允许仿冒其他主机的IP地址非法获取网络访问权限。

图1 配置IPSG防止主机仿冒其他主机的IP地址(静态绑定)组网图

 

 

 


配置思路

采用如下的思路在Router上配置IPSG功能,实现上述需求。

  1. 在Router上配置Host_1和Host_2的静态绑定表,固定IP和MAC的绑定关系。
  2. 在Router连接用户主机的接口使能IPSG,实现Host只能使用管理员分配的固定IP地址上网。
  3. 创建Host_1和Host_2的静态绑定表项

操作步骤

2.  <Huawei> system-view
3.   
4.  [Huawei] sysname Router
5.   
6.  [Router] user-bind static ip-address 10.0.0.1 mac-address 0001-0001-0001
7.   
8.  [Router] user-bind static ip-address 10.0.0.11 mac-address 0002-0002-0002
9.   

10.使能IPSG功能

# 在连接Host_1的Eth0/0/1接口使能IPSG功能。

[Router] interface ethernet 0/0/1
 
[Router-Ethernet0/0/1] ip source check user-bind enable
 
[Router-Ethernet0/0/1] quit

# 在连接Host_2的Eth0/0/2接口使能IPSG功能。

[Router] interface ethernet 0/0/2
 
[Router-Ethernet0/0/2] ip source check user-bind enable
 
[Router-Ethernet0/0/2] quit

11.验证配置结果

在Router上执行display dhcp static user-bind all命令,可以查看静态绑定表信息。

[Router] 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.0.0.1                        0001-0001-0001  --  /--  /--    --       
 
10.0.0.11                       0002-0002-0002  --  /--  /--    --       
 
--------------------------------------------------------------------------------
 
Print count:           2          Total count:           2           

Host_1和Host_2使用管理员分配的固定IP地址可以正常访问网络,更改IP地址后无法访问网络。

配置文件

Router的配置文件

#
 
sysname Router
 
#
 
user-bind static ip-address 10.0.0.1 mac-address 0001-0001-0001
 
user-bind static ip-address 10.0.0.11 mac-address 0002-0002-0002
 
#
 
interface Ethernet0/0/1
 
 ip source check user-bind enable
 
#
 
interface Ethernet0/0/2
 
 ip source check user-bind enable
 
#
 
return
posted @ 2022-10-27 11:04  菜鸟有菜  阅读(576)  评论(0)    收藏  举报