H3C交换机配置端口镜像和策略路由

进入交换机: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

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值