H3C-S5600系列交换机典型配置举例.doc

上传人:夺命阿水 文档编号:21311 上传时间:2022-07-11 格式:DOC 页数:16 大小:100KB
返回 下载 相关 举报
H3C-S5600系列交换机典型配置举例.doc_第1页
第1页 / 共16页
H3C-S5600系列交换机典型配置举例.doc_第2页
第2页 / 共16页
H3C-S5600系列交换机典型配置举例.doc_第3页
第3页 / 共16页
H3C-S5600系列交换机典型配置举例.doc_第4页
第4页 / 共16页
H3C-S5600系列交换机典型配置举例.doc_第5页
第5页 / 共16页
点击查看更多>>
资源描述

《H3C-S5600系列交换机典型配置举例.doc》由会员分享,可在线阅读,更多相关《H3C-S5600系列交换机典型配置举例.doc(16页珍藏版)》请在课桌文档上搜索。

1、S5600系列交换机典型配置举例静态路由典型配置1. 组网需求需求分析某小型公司办公网络需要任意两个节点之间能够互通,网络结构简单、稳定,用户希望最大限度利用现有设备.用户现在拥有的设备不支持动态路由协议.根据用户需求与用户网络环境,选择静态路由实现用户网络之间互通.网络规划根据用户需求,设计如图2-1所示网络拓扑图.图2-1静态路由配置举例组网图2. 配置步骤交换机上的配置步骤:# 设置以太网交换机Switch A的静态路由. system-viewSwitchA ip route-static SwitchA ip route-static SwitchA ip route-static

2、# 设置以太网交换机Switch B的静态路由. system-viewSwitchB ip route-static SwitchB ip route-static SwitchB ip route-static # 设置以太网交换机Switch C的静态路由. system-viewSwitchC ip route-static SwitchC ip route-static 主机上的配置步骤:# 在主机A上配缺省网关为.1,具体配置略.# 在主机B上配缺省网关为.1,具体配置略.# 在主机C上配缺省网关为.1,具体配置略.至此图中所有主机或以太网交换机之间均能两两互通. RIP典型配置1

3、. 组网需求需求分析某小型公司办公网络需要任意两个节点之间能够互通,网络规模比较小.需要设备自动适应网络拓扑变化,降低人工维护工作量.根据用户需求与用户网络环境,选择RIP路由协议实现用户网络之间互通.网络规划根据用户需求,设计如图2-2所示网络拓扑图.设备接口IP地址设备接口IP地址Switch AVlan-int1Switch BVlan-int1Vlan-int2Vlan-int3Switch CVlan-int1Vlan-int4图2-2 RIP典型配置组网图2. 配置步骤&说明:以下的配置,只列出了与RIP相关的操作.在进行下列配置之前,请先确保以太网链路层能够正常工作,且各VLAN

4、接口IP地址已经配置完成.配置Switch A# 配置RIP. system-viewSwitchA rip配置Switch B# 配置RIP. system-viewSwitchB ripSwitchB-rip network 110.11.2.0 配置Switch C# 配置RIP. system-viewSwitchC rip OSPF的DR典型配置1. 组网需求需求分析某用户网络链路类型为广播型网络,通过OSPF实现网络之间互通.由于网络中设备性能有差异,希望DR/BDR由性能较高的设备承担,优化网络处理速度.对于网络中性能较低的设备,禁止其参加DR/BDR选举.根据用户需求与其网络环

5、境,通过修改接口优先级实现用户需求.网络规划根据用户需求,设计如图2-3所示网络拓扑图.设备接口IP地址Router ID接口优先级Switch AVlan-int1.1100Switch BVlan-int1.20Switch CVlan-int1.32Switch DVlan-int1.41图2-3配置OSPF的DR选择组网图2. 配置步骤# 配置Switch A system-viewSwitchA interface Vlan-interface 1SwitchA-Vlan-interface1 ospf dr-priority 100SwitchA-Vlan-interface1 q

6、uitSwitchA router id .1SwitchA ospfSwitchA-ospf-1 area 0SwitchA-ospf-1-area-# 配置Switch B system-viewSwitchB interface Vlan-interface 1SwitchB-Vlan-interface1 ospf dr-priority 0SwitchB-Vlan-interface1 quitSwitchB router id .2SwitchB ospfSwitchB-ospf-1 area 0SwitchB-ospf-1-area-# 配置Switch C system-vie

7、wSwitchC interface Vlan-interface 1SwitchC-Vlan-interface1 ospf dr-priority 2SwitchC-Vlan-interface1 quitSwitchC router id .3SwitchC ospfSwitchC-ospf-1 area 0SwitchC-ospf-1-area-# 配置Switch D system-viewSwitchD interface Vlan-interface 1SwitchD-Vlan-interface1 quitSwitchD router id .4SwitchD ospfSwit

8、chD-ospf-1 area 0SwitchD-ospf-1-area-在Switch A上运行display ospf peer来显示OSPF邻居,注意Switch A有三个邻居.每个邻居的状态都是full,这意味着Switch A与它的每个邻居都形成了邻接Switch A和Switch C必须与网络中的所有交换机形成邻接,才能分别充当网络的DR和BDR.Switch A是网络中的DR,而Switch C是BDR.其它所有的邻居都是DRother这意味着它们既不是DR,也不是BDR.# 将Switch B的优先级改为200 system-viewSwitchB interface Vlan

9、-interface 1SwitchB-Vlan-interface1 ospf dr-priority 200在Switch A上运行display ospf peer来显示OSPF邻居,注意Switch B的优先级变为200;但它并不是DR.只有当现在的DR不在网络上了后,DR才会改变.关掉Switch A,在Switch D上运行display ospf peer命令可显示邻居,注意本来是BDR的Switch C成为了DR,并且Switch B现在成为了BDR.若网络中所有的交换机被移走后又重新加入,Switch B就被选为DR优先级为200,Switch A成为了BDR优先级为100.

10、关掉所有的交换机再重新启动,这个操作会带来一个新的DR/BDR选择. OSPF虚连接配置1. 组网需求需求分析用户网络运行OSPF实现网络互通.网络分为三个区域,一个骨干区域,两个普通区域Area 1、Area 2.其中某普通区域Area 2无法与骨干区域直接相连,只能通过另外一个普通区域Area 1接入.用户希望无法与骨干区域直接连接的普通区域Area 2能够与另外两个区域互通.根据用户需求与用户网络环境,选择虚连接来实现普通区域Area 2与骨干区域之间的连接.网络规划根据用户需求,设计如图2-4所示网络拓扑图.设备接口IP地址Router IDSwitch AVlan-int1.1Vla

11、n-int2-Switch BVlan-int1.2Vlan-int2-图2-4配置OSPF虚链路组网图2. 配置步骤配置OSPF基本功能# 配置Switch A. system-viewSwitchA interface vlan-interface 1SwitchA-Vlan-interface1 quitSwitchA interface vlan-interface 2SwitchA-Vlan-interface2 quitSwitchA router id .1SwitchA ospfSwitchA-ospf-1 area 0SwitchA-ospf-1-area-SwitchA-o

12、spf-1-area-.0 quitSwitchA-ospf-1 area 1SwitchA-ospf-1-area-SwitchA-ospf-1-area-.1 quitSwitchA-ospf-1 quit# 配置Switch B. system-viewSwitchB interface Vlan-interface 1SwitchB-Vlan-interface1 quitSwitchB interface Vlan-interface 2SwitchB-Vlan-interface2 quitSwitchB router id .2SwitchB ospfSwitchB-ospf-1

13、 area 1SwitchB-ospf-1-area-SwitchB-ospf-1-area-.1 quitSwitchB-ospf-1 area 2SwitchB-ospf-1-area-SwitchB-ospf-1-area-.2 quit# 显示Switch A的OSPF路由表.SwitchA display ospf routing OSPF Process 1 with Router ID .1 Routing TablesRouting for NetworkDestination Cost Type NextHop AdvRouter Area196.1.1.0/24 10 St

14、ub 196.1.1.2 197.1.1.0/24 10 Net 197.1.1.1 Total Nets: 2 Intra Area: 2 Inter Area: 0 ASE: 0 NSSA: 0&说明:由于Area2没有与Area0直接相连,所以Switch A的路由表中没有Area2中的路由.配置虚连接.# 配置Switch A.SwitchA ospfSwitchA-ospf-1 area 1SwitchA-ospf-1-area-SwitchA-ospf-1-area-.1 quitSwitchA-ospf-1 quit# 配置Switch B.SwitchB-ospf-1 area

15、 1SwitchB-ospf-1-area-SwitchB-ospf-1-area-.1 quit# 显示Switch A的OSPF路由表.SwitchAdisplay ospf routing OSPF Process 1 with Router ID .1 Routing TablesRouting for NetworkDestination Cost Type NextHop AdvRouter Area196.1.1.0/24 10 Stub 196.1.1.2 197.1.1.0/24 10 Net 197.1.1.1 152.1.1.0/24 20 SNet 197.1.1.1

16、Total Nets: 3Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0可以看到,Switch A已经学到了Area2的路由.配置BGP联盟属性1. 组网需求需求分析某用户拥有一个大型AS,AS中运行BGP协议.随着AS规模的增长,IBGP对等体数量激增,用于BGP通信的网络资源亦随之增加.用户希望不影响设备工作性能条件下,削减IBGP对等体数量,降低BGP对设备CPU和网络资源的消耗.根据用户需求,选择应用BGP自治系统联盟属性实现用户需求.网络规划根据用户需求,设计如图2-5所示网络拓扑图.设备接口IP地址ASSwitch AVlan-int 1010

17、0Vlan-int 50.1/24Switch BVlan-int 10Switch CVlan-int 10Vlan-int 20Vlan-int 30Switch DVlan-int 20Switch EVlan-int 30200Vlan-int 40.1/24图2-5配置自治系统联盟的组网图配置策略l将AS 100划分为三个子自治系统,分别为AS 1001,AS 1002,AS 1003;lAS 1001,AS 1002,AS 1003之间运行EBGP;lAS 1001,AS 1002,AS 1003内部建立全连接,运行IBGP;lAS 100,AS 200之间运行EBGP.2. 配置

18、步骤# 配置Switch A. system-view SwitchA bgp 1001SwitchA-bgp network SwitchA-bgp confederation id 100SwitchA-bgp confederation peer-as 1002 1003SwitchA-bgp group confed1002 externalSwitchA-bgp peer 172.68.10.2 group confed1002 as-number 1002SwitchA-bgp group confed1003 externalSwitchA-bgp peer 172.68.10.

19、3 group confed1003 as-number 1003SwitchA-bgp quit# 配置Switch B. system-view SwitchB bgp 1002SwitchB-bgp confederation id 100SwitchB-bgp confederation peer-as 1001 1003SwitchB-bgp group confed1001 externalSwitchB-bgp peer 172.68.10.1 group confed1001 as-number 1001SwitchB-bgp group confed1003 external

20、SwitchB-bgp peer 172.68.10.3 group confed1003 as-number 1003# 配置Switch C. system-view SwitchC bgp 1003SwitchC-bgp confederation id 100SwitchC-bgp confederation peer-as 1001 1002SwitchC-bgp group confed1001 externalSwitchC-bgp peer 172.68.10.1 group confed1001 as-number 1001SwitchC-bgp group confed10

21、02 externalSwitchC-bgp peer 172.68.10.2 group confed1002 as-number 1002SwitchC-bgp group ebgp200 externalSwitchC-bgp peer 156.10.1.2 group ebgp200 as-number 200SwitchC-bgp group ibgp1003 internalSwitchC-bgp peer 172.68.1.2 group ibgp1003# 配置Switch D. system-view SwitchD bgp 1003SwitchD-bgp confedera

22、tion id 100SwitchD-bgp group ibgp1003 internalSwitchD-bgp peer 172.68.1.1 group ibgp1003# 配置Switch E. system-view SwitchE bgp 200SwitchE-bgp network SwitchE-bgp group ebgp100 externalSwitchE-bgp peer 156.10.1.1 group ebgp100 as-number 100SwitchE-bgp quit# 显示Switch E的BGP路由表.SwitchE display bgp routin

23、gFlags: # - valid - active I - internal D - damped H - history S - aggregate suppressed Dest/Mask Next-Hop Med Local-pref Origin Path-# .0/24 0.0.0.0 0 100 IGP# .0/24 156.10.1.1 0 100 IGP 100 Routes total: 2# 显示Switch A的BGP路由表.SwitchA display bgp routingFlags: # - valid - active I - internal D - dam

24、ped H - history S - aggregate suppressed Dest/Mask Next-Hop Med Local-pref Origin Path- I .0/24 156.10.1.2 0 100 IGP 200# .0/24 0.0.0.0 0 100 IGP Routes total: 2根据显示信息可以看出,子自治系统信息仅在联盟内部通告.处于联盟外部的自治系统的设备例如Switch E将联盟作为一个自治系统,不能学习联盟内部的子自治系统信息.配置BGP路由反射器1. 组网需求需求分析某用户拥有一个大型AS,AS中运行BGP协议.随着AS规模的增长,IBGP对

25、等体数量激增,用于BGP通信的网络资源亦随之增加.用户希望不影响设备工作性能条件下,削减IBGP对等体数量,降低BGP对设备CPU和网络资源的消耗.另外,该AS中,IBGP对等体之间连接采用部分互联.根据用户需求和用户网络环境,选择BGP路由反射器方案满足用户需求.网络规划根据用户需求,设计如图2-6所示网络拓扑图.设备接口IP地址ASSwitch AVlan-int 100.1/8100Vlan-int 2Switch BVlan-int 2200Vlan-int 3Switch CVlan-int 3Vlan-int 4Switch DVlan-int 4图2-6配置BGP路由反射器的组网

26、图配置策略lAS 100与AS 200对等体之间运行EBGP,通告.0/8网段;lAS 200中对等体之间运行IBGP,AS网络拓扑采用星型拓扑结构;中央设备作为路由反射器,其他设备作为客户机.2. 配置步骤配置Switch A system-view SwitchA interface Vlan-interface 2SwitchA-Vlan-interface2 interface Vlan-interface 100 SwitchA-Vlan-interface100 ip address SwitchA-Vlan-interface100 quitSwitchA bgp 100Swit

27、chA-bgp group ex externalSwitchA-bgp peer 192.1.1.2 group ex as-number 200SwitchA-bgp network 配置Switch B# 配置VLAN接口的IP地址. system-view SwitchB interface Vlan-interface 2SwitchB-Vlan-interface2 quitSwitchB interface Vlan-interface 3SwitchB-Vlan-interface3 quit# 配置BGP对等体.SwitchB bgp 200SwitchB-bgp group

28、 ex externalSwitchB-bgp peer 192.1.1.1 group ex as-number 100SwitchB-bgp group in internalSwitchB-bgp peer 193.1.1.1 group in配置Switch C# 配置VLAN接口的IP地址. system-view SwitchC interface Vlan-interface 3SwitchC-Vlan-interface3 quitSwitchC interface vlan-Interface 4SwitchC-Vlan-interface4 quit# 配置BGP对等体与路

29、由反射器.SwitchC bgp 200SwitchC-bgp group rr internalSwitchC-bgp peer rr reflect-clientSwitchC-bgp peer 193.1.1.2 group rrSwitchC-bgp peer 194.1.1.2 group rr配置Switch D# 配置VLAN接口的IP地址. system-view SwitchD interface Vlan-interface 4SwitchD-Vlan-interface4 quit# 配置BGP对等体.SwitchD bgp 200SwitchD-bgp group in

30、 internalSwitchD-bgp peer 194.1.1.1 group in在Switch B上用display bgp routing命令查看BGP路由表.注意:Switch B已知道了网络.0的存在.在Switch D上用display bgp routing命令查看BGP路由表.注意:Switch D也知道网络.0的存在.配置BGP路径选择1. 组网需求需求分析某用户网络由两个AS组成,两个AS通过BGP实现网络互通,其中一个AS运行OSPF.用户需求:控制从AS 200到AS 100的数据转发路径.根据用户需求,可在如下方案中任选其一:l选择BGP的MED属性控制数据从AS

31、 200到AS 100时的转发路径;l选择BGP的LOCAL_PREF属性控制数据从AS 200到AS 100时的转发路径.网络规划根据用户需求,设计如图2-7所示网络拓扑图.设备接口IP地址ASSwitch AVlan-int 101.1/8100Vlan-int 2Vlan-int 3Switch BVlan-int 2200Vlan-int 4Switch CVlan-int 3Vlan-int 5Switch DVlan-int 4Vlan-int 5图2-7配置BGP路径选择的组网图配置策略lAS 100与AS 200对等体之间运行EBGP,通告.0/8网段;lAS 200运行OSP

32、F实现网络互通;lSwitch D与Switch B,Switch D与 Switch C对等体之间运行IBGP;l在Switch A上应用路由策略,修改发布的路由信息MED属性,控制Switch D发出的数据进入AS 100时转发路径为:Switch DSwitch CSwitch A.l在Switch C上应用路由策略,修改发布路由信息的LOCAL_PREF属性,控制Switch D发出的数据进入AS 100时转发路径为:Switch DSwitch CSwitch A.2. 配置步骤配置Switch A# 配置VLAN接口的IP地址 system-view SwitchA interfa

33、ce Vlan-interface 2SwitchA-Vlan-interface2 quitSwitchA interface Vlan-interface 3SwitchA-Vlan-interface3 quitSwitchA interface Vlan-interface 101SwitchA-Vlan-interface101 ip address SwitchA-Vlan-interface101 quit# 启动BGP.SwitchA bgp 100# 通告.0/8网段路由信息.SwitchA-bgp network .0# 配置对等体.SwitchA-bgp group ex

34、192 externalSwitchA-bgp peer 192.1.1.2 group ex192 as-number 200SwitchA-bgp group ex193 externalSwitchA-bgp peer 193.1.1.2 group ex193 as-number 200SwitchA-bgp quit# 创建ACL 2000,允许目的地址为.0/8的路由信息通过.SwitchA acl number 2000SwitchA-acl-basic-2000 rule permit source SwitchA-acl-basic-2000 rule deny source

35、 anySwitchA-acl-basic-2000 quit# 创建路由策略apply_med_50,匹配模式为允许,如果路由信息通过ACL 2000的过滤,则设置其MED值为50.SwitchA route-policy apply_med_50 permit node 10SwitchA-route-policy if-match acl 2000SwitchA-route-policy apply cost 50SwitchA-route-policy quit# 创建路由策略apply_med_100,匹配模式为允许,如果路由信息通过ACL 2000的过滤,则设置其MED值为100.

36、SwitchA route-policy apply_med_100 permit node 10SwitchA-route-policy if-match acl 2000SwitchA-route-policy apply cost 100SwitchA-route-policy quit# 对发布给对等体组ex193对等体的路由信息应用路由策略apply_med_50;对发布给对等体组ex192对等体的路由信息应用路由策略apply_med_100.SwitchA bgp 100SwitchA-bgp peer ex193 route-policy apply_med_50 export

37、SwitchA-bgp peer ex192 route-policy apply_med_100 export配置Switch B# 配置VLAN接口IP地址. system-view SwitchB interface vlan 2SwitchB-Vlan-interface2 quitSwitchB interface Vlan-interface 4SwitchB-Vlan-interface4 quit# 配置OSPF.SwitchB ospfSwitchB-ospf-1 area 0SwitchB-ospf-1-area-.0 network 194.1.1.0 0.0.0.255

38、 SwitchB-ospf-1-area-SwitchB-ospf-1-area-.0 quitSwitchB-ospf-1 quit# 启动BGP,创建对等体组,并向对等体组添加对等体.SwitchB bgp 200SwitchB-bgp undo synchronizationSwitchB-bgp group ex externalSwitchB-bgp peer 192.1.1.1 group ex as-number 100SwitchB-bgp group in internalSwitchB-bgp peer 194.1.1.1 group inSwitchB-bgp peer

39、195.1.1.2 group in配置Switch C# 配置VLAN接口IP地址. system-view SwitchC interface Vlan-interface 3SwitchC-Vlan-interface3 quitSwitchC interface Vlan-interface 5SwitchC-Vlan-interface5 quit# 启动OSPF.SwitchC ospfSwitchC-ospf-1 area 0SwitchC-ospf-1-area-SwitchC-ospf-1-area-.0 network 195.1.1.0 0.0.0.255 SwitchC

40、-ospf-1-area-.0 quitSwitchC-ospf-1 quit# 启动BGP,创建对等体组,并向对等体组添加对等体.SwitchC bgp 200SwitchC-bgp undo synchronizationSwitchC-bgp group ex externalSwitchC-bgp peer 193.1.1.1 group ex as-number 100SwitchC-bgp group in internalSwitchC-bgp peer 195.1.1.1 group inSwitchC-bgp peer 194.1.1.2 group in配置Switch D

41、# 配置VLAN接口IP地址. system-view SwitchD interface Vlan-interface 4SwitchD-Vlan-interface4 quitSwitchD interface Vlan-interface 5SwitchD-Vlan-interface5 quit# 启动OSPF.SwitchD ospfSwitchD-ospf-1 area 0SwitchD-ospf-1-area-SwitchD-ospf-1-area-SwitchD-ospf-1-area-SwitchD-ospf-1-area-.0 quitSwitchD-ospf-1 quit# 启动BGP,创建对等体组,并向对等体组添加对等体.SwitchD bgp 200SwitchD-bg

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 在线阅读 > 生活休闲


备案号:宁ICP备20000045号-1

经营许可证:宁B2-20210002

宁公网安备 64010402000986号