暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

S5700简单配置IP绑定

DevOps架构实战 2021-01-08
1304

#设定端口模式

[Quidway] int gigabitethernet 0/0/1
[Quidway-GigabitEthernet0/0/1] port link-type access

#将端口加入Vlan
[Quidway] vlan 2
[Quidway-vlan2] port gigabitethernet 0/0/2 to 0/0/20
[Quidway-Vlan2] quit

#设置VLAN IP(管理IP)
[Quidway] interface vlanif 2
[Quidway-Vlanif2 ip address 192.168.0.253 255.255.255.0
[Quidway-Vlanif2] shutdown
[Quidway-Vlanif2] undo shutdown

#设置默认路由
[Quidway] ip route-static 0.0.0.0 0.0.0.0 192.168.0.253

# 关闭WEB Server,dhcp
[Quidway] undo http server enable
[Quidway] undo dhcp enable


[Switch]interface g0/0/2
[Switch-GigabitEthernet0/0/2]ip source check user-bind enable
[Switch-GigabitEthernet0/0/2]quit
[Switch]interface g0/0/3
[Switch-GigabitEthernet0/0/3]ip source check user-bind enable
[Switch-GigabitEthernet0/0/3]quit

上述命令,是在接口下启用数据包源IP-MAC地址绑定检查,检查的依据是user-bind绑定表,
检查不通过的数据包将被丢弃掉。

[Switch]user-bind static ip-address 12.12.12.1 mac-address 5489-98d7-3ae9
[Switch]user-bind static ip-address 12.12.12.2 mac-address 5489-987b-4b2c

上述命令,用于静态绑定IP地址与MAC地址的对应关系。

测试结果是PC以指定IP地址互Ping时可以通,而只要用任何一方更改了IP地址,它们将无法通信。



文章转载自DevOps架构实战,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论