有台核心交换机S7506E-S,需要做双出口策略路由,V5版本R6708P03,需要双出口策略路由案例或者改版本交换机的配置手册。
H3C Comware Platform Software
Comware Software, Version 5.20, Release 6708P03
Copyright (c) 2004-2013 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
H3C S7506E-S uptime is 36 weeks, 1 day, 12 hours, 12 minutes
MPU(M) 0:
Uptime is 36 weeks,1 days,12 hours,12 minutes
H3C S7506E-S MPU(M) with 1 BCM1122 Processor
BOARD TYPE: LSQ1SRPA
DRAM: 512M bytes
FLASH: 64M bytes
NVRAM: 0K bytes
PCB 1 Version: VER.A
Bootrom Version: 500
CPLD 1 Version: 002
Release Version: H3C S7506E-S-6708P03
Patch Version : None
(0)
最佳答案
策略路由实现
1.2配置需求及实现的效果
交换机SW1上配置一条静态路由,使终端访问114.114.114.114的时候通过R2,其中192.168.2.0这个网段,访问114.114.114.114 的时候匹配策略路由从R3去访问。
2 组网图
3 配置步骤
一.交换机和路由器上ip地址基本配置
#在SW1上进图系统视图
<H3C>system-view
System View: return to User View with Ctrl+Z.
#创建vlan 1-4
[H3C]vlan 1 to 4
#配置vlan 1-vlan 4虚接口IP地址
[H3C]interface Vlan-interface 1
[H3C-Vlan-interface1] ip address 192.168.1.1 255.255.255.0
[H3C-Vlan-interface1]quit
[H3C]interface Vlan-interface 2
[H3C-Vlan-interface2] ip address 192.168.2.1 255.255.255.0
[H3C-Vlan-interface2]quit
[H3C]interface Vlan-interface 3
[H3C-Vlan-interface3] ip address 10.10.10.1 255.255.255.0
[H3C-Vlan-interface3]quit
[H3C]interface Vlan-interface 4
[H3C-Vlan-interface4] ip address 20.20.20.1 255.255.255.0
[H3C-Vlan-interface4]quit
#将端口分别划分到所属vlan,端口1属于vlan 3,端口4属于vlan 4,端口5属于默人vlan 1,端口6属于vlan 2。
[H3C]interface GigabitEthernet 1/0/1
[H3C-GigabitEthernet1/0/1] port access vlan 3
[H3C-GigabitEthernet1/0/1]quit
[H3C]interface GigabitEthernet 1/0/4
[H3C-GigabitEthernet1/0/4] port access vlan 4
[H3C-GigabitEthernet1/0/4]quit
[H3C]interface GigabitEthernet 1/0/6
[H3C-GigabitEthernet1/0/6] port access vlan 2
[H3C-GigabitEthernet1/0/6]quit
#配置到114.114.114.0网段的静态路由
[H3C] ip route-static 114.114.114.0 24 10.10.10.2
[H3C]save force
#在R1上进图系统视图
<H3C>system-view
System View: return to User View with Ctrl+Z.
#创建环回接口LoopBack 0用来模拟主机,地址是114.114.114.114/24
[H3C]interface LoopBack 0
[H3C-LoopBack0]ip address 114.114.114.114 255.255.255.0
[H3C-LoopBack0]quit
#为路由器1口和2口分别配置IP地址。
[H3C]int GigabitEthernet 0/1
[H3C-GigabitEthernet0/1] ip address 30.30.30.1 255.255.255.0
[H3C]int GigabitEthernet 0/2
[H3C-GigabitEthernet0/2] ip address 40.40.40.1 255.255.255.0
[H3C-GigabitEthernet0/2]quit
#配置到192.168.1.0网段的静态路由
[H3C]ip route-static 192.168.1.0 24 30.30.30.2
#配置到114.114.114.0网段的静态路由
[H3C]ip route-static 192.168.2.0 24 40.40.40.2
#开启设备的ICMP目的不可达报文的发送功能
[H3C]ip unreachables enable
#开启ICMP超时报文发送功能
[H3C]ip ttl-expires enable
[H3C]save force
#在R2上进图系统视图
<H3C>system-view
System View: return to User View with Ctrl+Z.
#为路由器1口和2口分别配置IP地址。
[H3C]int GigabitEthernet 0/0
[H3C-GigabitEthernet0/0] ip address 30.30.30.2 255.255.255.0
[H3C]int GigabitEthernet 0/1
[H3C-GigabitEthernet0/1] ip address 10.10.10.2 255.255.255.0
#配置到114.114.114.0网段的静态路由
[H3C] ip route-static 114.114.114.0 24 30.30.30.1
#配置到192.168.1.0网段的静态路由
[H3C] ip route-static 192.168.1.0 24 10.10.10.1
#配置到114.114.114.0网段的静态路由
[H3C] ip route-static 192.168.2.0 24 10.10.10.1
#开启设备的ICMP目的不可达报文的发送功能
[H3C]ip unreachables enable
#开启ICMP超时报文发送功能
[H3C]ip ttl-expires enable
[H3C]save force
#在R3上进图系统视图
<H3C>system-view
System View: return to User View with Ctrl+Z.
#为路由器1口和2口分别配置IP地址。
[H3C]int GigabitEthernet 0/0
[H3C-GigabitEthernet0/0] ip address 40.40.40.2 255.255.255.0
[H3C]int GigabitEthernet 0/1
[H3C-GigabitEthernet0/1] ip address 20.20.20.2 255.255.255.0
#配置到114.114.114.0网段的静态路由
[H3C] ip route-static 114.114.114.0 24 40.40.40.1
#配置到192.168.1.0网段的静态路由
[H3C] ip route-static 192.168.1.0 24 10.10.10.2
#配置到114.114.114.0网段的静态路由
[H3C] ip route-static 192.168.2.0 24 10.10.10.
#开启设备的ICMP目的不可达报文的发送功能
[H3C]ip unreachables enable
#开启ICMP超时报文发送功能
[H3C]ip ttl-expires enable
[H3C]save force
二.交换机策略路由配置
<H3C>system-view
System View: return to User View with Ctrl+Z.
#定义访问控制列表3000,用来匹配内网源地址为192.168.2.0/24网段的数据流
[H3C]acl number 3000
[H3C-acl-adv-3000]rule permit ip source 192.168.2.0 0.0.0.255
[H3C-acl-adv-3000]quit
# 定义访问控制列表3001,用来匹配内网192.168.2.0/24网段去访问内网192.168.1.0/24网段的数据流。
[H3C]acl number 3001
[H3C-acl-adv-3001]rule permit ip source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
[H3C-acl-adv-3001]quit
# 创建策略路由,名称为aaa,节点为10,匹配acl 3001的数据流,不设置apply动作(如果不设置动作,则匹配到的数据转发时根据路由表来进行转,且不再匹配下一节点,配置这个节点的作用是实现内网不同网段之间互访的流量不匹配策略路由,达到可以互访的目的。备注:默认情况下,网关在路由器上的不同网段是可以互相访问的)。
[H3C]policy-based-route aaa permit node 10
[H3C-pbr-aaa-10]if-match acl 3001
[H3C-pbr-aaa-10]quit
#创建策略路由aaa的节点20,匹配acl 3000的数据流,设置apply动作,指定数据的下一跳为20.20.20.2。
[H3C]policy-based-route aaa node 20
[H3C-pbr-aaa-20]if-match acl 3000
[H3C-pbr-aaa-20]apply next-hop 20.20.20.2
[H3C-pbr-aaa-20]quit
#在内网VLAN虚接口(网关)上应用策略路由
[H3C]interface vlan 2
[H3C-Vlan-interface2]ip policy-based-route aaa
[H3C-Vlan-interface2]quit
[H3C]save force
4 验证配置
# 交换机上没有配置策略路由的时候,在两台终端上tracert路径的结果如下:
192.168.1.2:
192.168.2.2:
# 配置了策略路由以后
192.168.1.2:
192.168.2.2:
(0)
有案例连接吗?官网找的不是S7506E-S,V5版本R6708P03手册。命令不一样。
V5加答案了
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
V5加答案了