《--三层交换机的配置案例.docx》由会员分享,可在线阅读,更多相关《--三层交换机的配置案例.docx(7页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、*三层交换机的配置案例以下开始配置第一步:划分VLAN,并描述vlan 1 description local-S3600 vlan 2 description 1ink-to-wenquanvlan 3description link-to-ruzhouvlan 4 description link-to-xiaotun vlan 5 description 1ink-to-baofengvlan 6description link-to-pingxivlan 7description 1ink-to-pingnanvlan 8 description Up1ink-to-Putian vl
2、an 9 description link-to-pingxicentre第二步:给VLAN划网关interface Vlan-interface2description link to wenquanip address 10. 41. 77. 41 255. 255. 255. 192interface Vlan-interface3description link to ruzhouip address 10. 41. 77. 105 255. 255. 255. 192interface Vianinterfaceddescription link to xiaotunip addre
3、ss 10.41. 77. 169 255. 255. 255. 192interface Vlan-interface5description link to baofengip address 10.41.77.233 255. 255. 255. 192interface Vlan-interface6description link to pingxiip address 10. 41. 78. 41 255. 255. 255. 192interface Vlan-interface7description link to pingnan ip address 10.41. 78.
4、105 255. 255. 255. 192 interface Vlan-interface8description uplink to putianip address 10. 41. 244. 102 255. 255. 255. 252 interface Vlan-interface9description link to pingxicentreip address 10. 41. 80. 233 255. 255. 255. 192第三步:给VLAN指定端口interface Ethernetl/0/2description link to wenquanport access
5、vlan 2interface Ethernetl/0/3description link to ruzhouport access vlan 3interface Ethernetl/0/4description link to xiaotunport access vlan 4interface Ethernetl/0/5description link to baofengport access vlan 5interface Ethernetl/0/6description link to pingxi port access vlan 6interface Ethernetl/0/7
6、description link to pingnanport access vlan 7interface Ethernetl/0/8description uplink to putianport access vlan 8interface Ethernetl/0/9 to Ethernetl/0/24description link to pingxicentreport access vlan 9第四步:配置路由协议/ (1)用RIP配动态路由ripnetwork 10. 41. 77. 41network 10. 41. 77. 105network 10. 41. 77. 169
7、network 10. 41. 77. 233network 10. 41. 78. 41 network 10. 41. 78. 105network 10. 41. 80. 233 network 10. 41. 244. 102/ (2)配静态路由(只用对远端设备配一条路由即可, 本地自通)-一推荐用此协议ip route 0. 0. 0. 0 0. 0. 0. 0 10. 41. 244. 101 案例:*S3600三层交换机配置方法sysvlan 2port el/0/2int vlan 2ip add 10.41.77.41 255. 255. 255. 192 温泉网关vlan
8、3port el/0/3int vlan 3ip add 10. 41. 77. 105 255. 255. 255. 192 /*网关vlan 4port el/0/4int vlan 4ip add 10. 41. 77. 169 255.255.255. 192 小屯网关vlan 5port el/0/5int vlan 5ip add 10.41.77.233 255.255.255. 192 宝丰网关vlan 6port el/0/6int vlan 6ip add 10. 41. 78. 41 255. 255. 255. 192 平西网关vlan 7port el/0/7int
9、vlan 7ip add 10. 41. 78. 105 255. 255. 255. 192 /平南网关vlan 8port el/0/8int vlan 8ip add 10. 41. 244. 102 255. 255. 255. 252 省中心网 关vlan 9port el/0/9 to el/0/24int vlan 9ip add 10. 41. 80. 233 255. 255. 255. 192 /分中心网 关配置路由 ip route 0. 0. 0. 0 0. 0. 0. 0 10. 41. 244. 101*三层交换机上如何实现不同vlan间的通信命令如下:一、组网需求
10、:交换机配置了 4个VLAN,分别为VLAN1, VLAN2, VLAN3, VLAN4,要求VLAN1可以与VLAN2, 3, 4互访,但是VLAN2, 3, 4之间不能互访,用Hybrid端口属性实现此功能。二、配置步骤:1 . 创立 VLAN2vlan 22 . 创立 VLAN3vlan 33 . 创立 VLAN4vlan 44 . 进入端口 Ethernetl/0/linterface Ethernetl/0/l5 . 将端口设置为hybrid模式port link-type hybrid6 . 设置端口 pvid为1port hybrid pvid vlan 17 . 允许VLAN1
11、, 2, 3, 4不打标签通过port hybrid vlan 1 to 4 untagged8 .进入端口 Ethernetl/0/2interface Ethernetl/0/29 . 将端口设置为hybrid模式port link-type hybrid10 .设置端口 pvid为2port hybrid pvid vlan 211 .允许VLAN1, 2不打标签通过 port hybrid vlan 1 to 2 untagged12 .进入端口 Ethernetl/0/3interface Ethernetl/0/313 .将端口设置为hybrid模式port link-type h
12、ybrid14 .设置端口 pvid为3port hybrid pvid vlan 315 .允许VLAN1, 3不打标签通过port hybrid vlan 1 3 untagged16 .进入端口 Ethernet 1/0/4interface Ethernetl/0/417 .将端口设置为hybrid模式port link-type hybrid18 .设置端口 pvid为4port hybrid pvid vlan 419 .允许VLAN1, 4不打标签通过port hybrid vlan 1 4 untagged三、配置关键点:1 .利用交换机以太网端口的Hybrid特性,可以实现 PVLAN的功能。2 .采用Hybrid属性实现的PVLAN功能和PVLAN的工作 机制存在较大差异,上述情况只适用于网络流量,网络用户 较少的应用。