《H3C三层交换机配置实例(共8页).doc》由会员分享,可在线阅读,更多相关《H3C三层交换机配置实例(共8页).doc(8页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、精选优质文档-倾情为你奉上H3C三层交换机配置实例专心-专注-专业1 网络拓扑图图1-1 网络拓扑图2 配置要求用户1网络:172.16.1.0/24 至出口1网络:172.16.100.0/24用户2网络:192.168.1.0/24 至出口2网络:192.168.100.0/24实现功能:用户1通过互联网出口1,用户2通过互联网出口2。3划分VLAN并描述3.1进入系统视图system-view /进入系统视图图3-1 系统视图3.2 创建VLAN并描述H3Cvlan 1 /本交换机使用H3C-vlan1description Manager /描述为“Manager”H3C-vlan1q
2、uit H3Cvlan 100 /划分vlan100H3C-vlan100description VLAN 100 /描述为“VLAN 100”H3C-vlan100quitH3Cvlan 101 /划分vlan101H3C-vlan101description VLAN 101 /描述为“VLAN 101”H3C-vlan101quitH3Cvlan 102 /划分vlan102H3C-vlan102description VLAN 102 /描述为“VLAN 102”H3C-vlan102quitH3Cvlan 103 /划分vlan103H3C-vlan103description VL
3、AN 103 /描述为“VLAN 103”H3C-vlan103quitH3C图3-2 划分VLAN及描述4 给VLAN设置网关4.1 VLAN1的IP地址设置把VLAN1的IP地址设置为192.168.0.254,子网掩码为255.255.255.0,用于本地使用。H3Cinterface vlan-interface 1H3C-Vlan-interface1ip address 192.168.0.254 255.255.255.0H3C-Vlan-interface1quitH3C图4-1 VLAN 1的IP设置4.2 VLAN100的网关设置把VLAN100的网关设置为192.168.
4、100.254,子网掩码为255.255.255.0 。H3Cinterface vlan-interface 100H3C-Vlan-interface100ip address 192.168.100.254 255.255.255.0H3C-Vlan-interface100quitH3C图4-2 VLAN100的网关设置4.3 VLAN101的网关设置把VLAN101的网关设置为192.168.1.254,子网掩码为255.255.255.0 。H3Cinterface vlan-interface 101H3C-Vlan-interface101ip address 192.168.
5、1.254 255.255.255.0H3C-Vlan-interface101quitH3C图4-3 VLAN101的网关设置4.4 VLAN102的网关设置把VLAN102的网关设置为172.16.100.254,子网掩码为255.255.255.0 。H3Cinterface vlan-interface 102H3C-Vlan-interface102ip address 172.16.100.254 255.255.255.0H3C-Vlan-interface102quitH3C图4-4 VLAN102的网关设置4.5 VLAN103的网关设置把VLAN103的网关设置为172.1
6、6.1.254,子网掩码为255.255.255.0 。H3Cinterface vlan-interface 103H3C-Vlan-interface103ip address 172.16.1.254 255.255.255.0H3C-Vlan-interface103quitH3C图4-5 VLAN103的网关设置5 给VLAN指定端口,设置端口类型5.1 VLAN100指定端口将端口GigabitEthernet 1/0/1指定给vlan100,并配置端口模式。H3Cinterface GigabitEthernet 1/0/1H3C-GigabitEthernet1/0/1port
7、 link-type accessH3C-GigabitEthernet1/0/1port access vlan 100H3C-GigabitEthernet1/0/1speed 1000H3C-GigabitEthernet1/0/1duplex fullH3C-GigabitEthernet1/0/1quitH3C图5-1 VLAN100指定端口5.2 VLAN102指定端口将端口GigabitEthernet 1/0/2指定给vlan102,并配置端口模式。H3Cint G 1/0/2H3C-GigabitEthernet1/0/2port link-type accessH3C-Gi
8、gabitEthernet1/0/2port access vlan 102H3C-GigabitEthernet1/0/2speed 1000H3C-GigabitEthernet1/0/2duplex fullH3C-GigabitEthernet1/0/2quitH3C图5-2 VLAN102指定端口5.3 VLAN1/101/103指定端口将端口GigabitEthernet 1/0/1516指定给vlan1/101/101,并配置端口模式。H3Cint G 1/0/15H3C-GigabitEthernet1/0/15port link-type trunkH3C-GigabitEt
9、hernet1/0/15port trunk permit vlan 1 101 103H3C-GigabitEthernet1/0/15speed 1000H3C-GigabitEthernet1/0/15duplex fullH3C-GigabitEthernet1/0/15quitH3Cint G 1/0/16H3C-GigabitEthernet1/0/16port link-type trunkH3C-GigabitEthernet1/0/16port trunk permit vlan 1 101 103H3C-GigabitEthernet1/0/16speed 1000H3C-
10、GigabitEthernet1/0/16duplex fullH3C-GigabitEthernet1/0/16quitH3C图5-3 VLAN1/101/103指定端口6 配置路由协议6.1 默认路由建立默认路由,将所有的数据包都丢往出口2的下一节点192.168.100.253:H3Cip route-static 0.0.0.0 0.0.0.0 192.168.100.2536.2配置流分类配置流分类1,对象为172.16.1.0/24的数据:H3Cacl number 3001H3C-acl-adv-3001rule 0 permit ip source 172.16.1.0 0.0
11、.0.255H3C-acl-adv-3001quitH3Ctraffic classifier 1H3C-classifier-1if-match acl 3001H3C-classifier-1quitH3C图6-1 配置流分类16.3 定义行为配置刚才定义的流分类的行为,定义如果匹配就下一跳至出口1即172.16.100.253:H3Ctraffic behavior 1H3C-behavior-1redirect next-hop 172.16.100.253H3C-behavior-1quitH3C图6-2 配置流分类行为6.4 应用QOS策略将刚才设置的应用至QOS策略中,定义pol
12、icy 1:H3Cqos p 1H3C-qospolicy-1classifier 1 behavior 1H3C-qospolicy-1quitH3C图6-3 QOS策略6.5 接口配置QOS策略在接口上应用定义的QOS策略policy 1:H3Cint G1/0/15H3C-GigabitEthernet1/0/15qos apply policy 1 inboundH3C-GigabitEthernet1/0/15quitH3Cint G1/0/16H3C-GigabitEthernet1/0/16qos apply policy 1 inboundH3C-GigabitEthernet1/0/16quitH3C图6-4 在端口应用QOS策略至此,配置已完成。保存配置。save图6-5 保存配置