计算机网络工程教程:基于cisco路由器和交换机,计算机网络工程教程—基于cisco路由器和交换机教学课件作者陆魁军chap2交换机VLAN设置v2.ppt...

a7f4a3f590493a1e451dd952a488fd7c.gif 计算机网络工程教程—基于cisco路由器和交换机教学课件作者陆魁军chap2交换机VLAN设置v2.ppt

(47页)

2577e1e96cf944399f4b758eb36f7aa5.gif

本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找使用更方便哦!

9.90 积分

计算机网络工程教程—基于cisco路由器和交换机作者:陆魁军 责任编辑:邹小宁 出版日期:2008年9月IDPN:308-2008-017课件章数:071第2章 交换机VLAN配置2.1交换机VLAN的端口划分和配置2.1.1 操作内容和环境操作内容 本节主要介绍在思科交换机上创建/删除VLAN、进行VLAN接口配置组网环境 一台思科Catalyst2950二层交换机:Switch1,IOS (C2950-I6Q4L2-M),版本12.1(20)EA1a , PC机4台,直通网线4根,console配置电缆一根,PC机与交换机快速以太口通过网线相连网络拓扑图22.1.2 VLAN的划分 以太网交换技术的一个主要方面是VLAN(Virtual Local Area Network,虚拟局域网),它使用交换机将工作站和服务器聚集在逻辑概念的组中,即是一种通过将局域网内的设备逻辑地而不是物理地划分成一个个网段,从而实现虚拟工作组的技术. VLAN的主要目的就是划分广播域,VLAN的划分方法有以下几种:基于端口的VLAN划分基于MAC地址的VLAN划分 基于协议的VLAN划分 基于子网的VLAN划分2.1.3 操作步骤 在配置前,请先使用”erase startup-config”、“no vlan 2-1001”等命令清除以前的配置信息,并重启交换机创建超级终端,通过Console口进入Switch1交换机VLAN配置 在进行配置前,先将以前配置的VLAN从数据库中清除,以保证配置的正确性。其命令如下:3 Switch1#vlan database #进入VLAN设置界面 Switch1(vlan)#no vlan vlan_id name #清除VLAN名称 Switch1(vlan)#no vlan vlan_id #清除VLAN 清除VLAN的另一种方法是:在特权EXEC模式下,用命令“delete vlan.dat”删除vlan.dat文件在交换机上创建VLAN Switch>enable #进入特权会话模式 Switch#config terminal #进入配置状态 Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname Switch1 #修改交换机主机名 Switch1(config)# exit Switch1#vlan database #进入VLAN设置界面 Switch1(vlan)#vlan 2 name work1 #创建VLAN2 其名称为work1 VLAN 2 modified: Name: work1 Switch1(vlan)#vlan 3 name work2 VLAN 3 modified: Name: work24 Switch1(vlan)#exit APPLY completed. Exiting....配置VLAN端口 Switch1# config terminal Switch1(config)# interface range fa0/9 – 11,fa0/17 – 20 #进入组配置界面 Switch1(Config-if-range)# switchport mode access #设置组中各端口的端口模式 Switch1(Config-if-range)#interface range fa0/9 – 11 Switch1(config-if-range)#switchport access vlan 2 #将fa0/9到fa0/11三个端口加入到VLAN 2 Switch1(config-if-range)# interface range fa0/17 – 20 Switch1(config-if-range)#switchport access vlan 3 #将fa0/17到fa0/20四个端口加入到VLAN 3 Switch1(config-if-range)#end Switch1# 5设置PC机地址,测试其连通性 设置四台PC机的IP地址都在同一个网段上: PC-A:IP地址为:192.168.20.2,子网掩码:255.255.255.0,默认网关:空; PC-B:IP地址为:192.168.20.4,子网掩码:255.255.255.0,默认网关:空; PC-C:IP地址为:192.168.20.6,子网掩码:255.255.255.0,默认网关:空; PC-D:IP地址为:192.168.20.8,子网掩码:255.255.255.0,默认网关:空; 在PC-A上执行: C:\>ping 192.168.20.4 #测试结果连通 C:\>ping 192.168.20.6 #测试结果不通 C:\>ping 192.168.20.8 #测试结果不通 在PC-C上执行: C:\>ping 192.168.20.2 #测试结果不通 C:\>ping 192.168.20.4 #测试结果不通 C:\>ping 192.168.20.8 #测试结果连通小结 62.2 VLAN之间的路由协议配置 2.2.1操作内容和环境操作内容: 本节主要介绍三层交换机的路由功能组网环境:两台思科Catalyst3550三层交换机:Switch1和Switch2,IOS (C3550-I5Q3L2-M), 版本12.2(25)SEA,PC机3台,交。省略部分。if)#no shutdown #改变了端口的属性,必须重新启动端口,使端口链路协议为UP状态 Router1(config-subif)#end查看路由器各子接口工作状态查看Fa0/0.1子接口信息 Router1#show interface fa0/0.1 FastEthernet0/0.1 is up, line protocol is up Hardware is AmdFE, address is 0011.5c8f.4ea0 (bia 0011.5c8f.4ea0) Internet address is 192.168.10.1/24 MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation 802.1Q Virtual LAN, Vlan ID 10.44 ARP type: ARPA, ARP Timeout 04:00:00 Last clearing of "show interface" counters never查看其它两个子接口信息 Router1#show int fa0/0.2 FastEthernet0/0.2 is up, line protocol is up Hardware is AmdFE, address is 0011.5c8f.4ea0 (bia 0011.5c8f.4ea0) Internet address is 192.168.20.1/24 MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation 802.1Q Virtual LAN, Vlan ID 20. ARP type: ARPA, ARP Timeout 04:00:00 Last clearing of "show interface" counters never Router1#show int fa0/0.3 FastEthernet0/0.3 is up, line protocol is up Hardware is AmdFE, address is 0011.5c8f.4ea0 (bia 0011.5c8f.4ea0) Internet address is 192.168.30.1/24 MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 45 Encapsulation 802.1Q Virtual LAN, Vlan ID 30. ARP type: ARPA, ARP Timeout 04:00:00 Last clearing of "show interface" counters never 查看路由信息 Router1#show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is not set C 192.168.30.0/24 is directly connected, FastEthernet0/0.3 C 192.168.10.0/24 is directly connected, FastEthernet0/0.1 C 192.168.20.0/24 is directly connected, FastEthernet0/0.2 测试Trunk属性的工作状态 核实VLAN的端口划分 46 Switch1#show interface trunk Port Mode Encapsulation Status Native vlan Fa0/6 on 802.1q trunking 1 Port Vlans allowed on trunk Fa0/6 1,10,20,30,1002-1005 Port Vlans allowed and active in management domain Fa0/6 1,10,20,30 Port Vlans in spanning tree forwarding state and not pruned Fa0/6 1,10,20,30 PC机互相执行ping操作,测试连通性 按拓扑图设置各PC机的IP地址 在PC-A机上执行: C:\>ping 192.168.10.1#测试结果是连通的,数据包通过第二层转发 C:\>ping 192.168.20.2 #测试结果是连通的,数据包通过第三层转发 C:\>ping 192.168.30.2 #测试结果是连通的,数据包通过第三层转发路由器和交换机的最终配置信息 Switch1#show run Router1#show run47 关 键 词: 交换机 路由器 chap2 作者 教学 cisco chap 基于 教程 vlan

4d91c43bfc72ca913299809b07b4968f.gif  天天文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。

关于本文

本文标题:计算机网络工程教程—基于cisco路由器和交换机教学课件作者陆魁军chap2交换机VLAN设置v2.ppt

链接地址: https://www.wenku365.com/p-50474330.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值