进入交换机:system-view
查看交换机配置信息:display current-configuration
删除VLAN:undo vlan 5
创建vlan:vlan 5
将端口加入到vlan中:port GigabitEthernet 1/0/20 to GigabitEthernet 1/0/23
进入vlan管理:interface vlan-interface 5
配置vlan管理ip:ip address 192.168.5.220 24
创建本地镜像组:mirroring-group 1 local
设置镜像组源端口:mirroring-group 1 mirroring-port g1/0/1 to g1/0/23 both
设置镜像组目的端口(接咱的服务器):mirroring-group 1 monitor-port g1/0/24
开启交换机trunk:
1.进入插上层交换机的端口:interface GigabitEthernet 1/0/1
2.开始端口trunk:port link-type trunk
设置静态路由使2网段可以连外网:ip route-static 0.0.0.0 192.168.2.1
创建规则:acl number 3001/3002
1.3001规则-2.13的15060端口到3.13的8097端口的udp数据
rule 0 permit udp source 192.168.2.13 0 destination 192.168.3.13 0 source-port eq 15060 destination-port eq 8097
2.3002规则-3.13的8097端口到2.13的15060端口的udp数据
rule 0 permit udp source 192.168.3.13 0 destination 192.168.2.13 0 source-port eq 8097 destination-port eq 15060
启用规则:
1.创建策略路由pr9:policy-based-route pr9 permit node 0
配置规则3001:if-match acl 3001
指向咱服务器ip:apply net-hop 192.168.4.15
2.创建策略路由pr10:policy-based-route pr10 permit node 0
配置规则3002:if-match acl 3001
指向咱服务器ip:apply net-hop 192.168.4.15
将策略路由和vlan绑定:
1.将策略路由pr9和vlan2绑定,进入vlan2中:interface vlan-interface 2 执行命令:ip policy-based-route pr9
1.将策略路由pr10和vlan3绑定,进入vlan3中:interface vlan-interface 3 执行命令:ip policy-based-route pr10
退出保存:save
H3C交换机配置端口镜像和策略路由
最新推荐文章于 2025-04-16 14:46:43 发布