计算机网络实验实验四跨交换机实现vlan.ppt_第1页
计算机网络实验实验四跨交换机实现vlan.ppt_第2页
计算机网络实验实验四跨交换机实现vlan.ppt_第3页
计算机网络实验实验四跨交换机实现vlan.ppt_第4页
计算机网络实验实验四跨交换机实现vlan.ppt_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

实验四跨交换机实现vlan 步骤1: 在交换机switchA上创建Vlan 10, 将0/5端口划分到vlan 10中。 switchA# configure terminal switchA(conf)# vlan 10 switchA(conf-vlan)name sales switchA(config-vlan)#exit switchA(config)#interface fa 0/5 switchA(config0if)#switchport access vlan 10 (验证测试:验证已创建了Vlan 10,并将0/5端口划分到vlan 10中。 switchA# show vlan id 10),步骤2: 在交换机switchA上创建Vlan 20, 将0/15端口划分到vlan 20中。 switchA# configure terminal switchA(conf)# vlan 20 switchA(conf-vlan)name technical switchA(config-vlan)#exit switchA(config)#interface fa 0/15 switchA(config-if)#switchport access vlan 20 (验证测试:验证已创建了Vlan 20,并将0/15端口划分到vlan 20中。 switchA# show vlan id 20),步骤3:在交换机switchA上将与switchB相连的端口(假设为0/24端口)定义为tag vlan模式。 switchA(config)#interface fa 0/24 switchA(config-if)#switchport mode trunk 验证fa 0/24端口已被设置为tag vlan模式。switchA#show interface fa 0/24 switchport) 步骤4:在交换机sB上创建Vlan 10, 将0/5端口划分到vlan 10中 switchB# configure terminal switchB(conf)# vlan 10 switchB(conf-vlan)name sales switchB(config-vlan)#exit switchB(config)#interface fa 0/5 switchB(config0if)#switchport access vlan 10 验证已创建了Vlan 10,并将0/5端口划分到vlan 10中。switchB# show vlan id 10),步骤5: 在交换机switchB上将与switchA相连的端口(假设为0/24端口)定义为tag vlan模式。 switchB(config)#interface fa 0/24 switchB(config-if)#switchport mode trunk (验证测试:验证fa 0/24端口已被设置为tag vlan模式。 switchB#show interface fa 0/24 switchport) 步骤6.验证PC1与PC3能互相通信,但PC2与PC3不能互相通信,步骤7.设置三层交换机Vlan间通讯 SwitchA(config)# int vlan 10 SwitchA(config-if)# ip address 192.168.10.254 255.255.255.0 配置虚拟接口Vlan10的地址为 192.168.10.254 SwitchA(config-if)# exit SwitchA(config)# int vlan 20 SwitchA(config-if)# ip address 192.168.20.254 255.255.255.0 步骤8 将PC1和PC3的默认网关设置为192.168.10.254 将PC2的网关设置为:192.168.20.254,步骤6:验证PC1与PC3能互相通信,但PC2与PC3不能互相通信。 Switchport access vlan 1 指将当前端口加入到vlan 1中。 trunk: 主要用在连接其它交换机,以便在线路上承载多个vlan Switchport mode trunk ,强制接口成为trunk模式。,实验七 静态路由 实验拓扑,实验名称:静态路由 实验目的:掌握通过静态路由方式实现网络的连通性。,实验步骤,步骤1:在路由器1上配置接口的IP地址 Red-Giant(config)#hostname RA !配置路由器主机名 RA(config)#interface fastethernet 1/0 RA(config-if)#ip address 172.16.1.1 255.255.255.0 RA(config-if)#no shutdown RA(config)#interface serial 1/2 RA(config-if)#ip address 172.16.2.1 255.255.255.0 RA(config-if)#no shutdown 验证测试: RA#show ip interface brief,实验步骤,步骤2:在路由器2上配置接口的IP地址和串口上的时钟频率 Red-Giant(config)#hostname RB !配置路由器主机名 RB(config)#interface fastethernet 1/0 RB(config-if)#ip address 172.16.3.2 255.255.255.0 RB(config-if)#no shutdown RB(config)#interface serial 1/2 RB(config-if)#ip address 172.16.2.2 255.255.255.0 RB(config-if)#clock rate 64000 RB(config-if)#no shutdown 验证测试: RB#show ip interface brief,实验步骤,步骤3:在路由器1上配置静态路由 RA(config)#ip router 172.16.3.0 255.255.255.0 172.16.2.2 验证测试: RA#show ip route 步骤4:在路由器2上配置静态路由 RB(config)#ip router 172.16.1.0 255.255.255.0 172.16.2.1 验证测试: RB#show ip route 步骤5:测试网络的互连互通性 C:ping 172.16.3.22 !从PC1 ping PC2 结果: C:ping 172.16.1.11 !从PC2 ping PC1 结果:,动态路由rip,前两步相同 RA(config)# router rip RA(config-router)#network 172.16.0.0 RA# show ip route RB(config)# router rip RB(config-router)#network 172.16.0.0 RB# show ip route,ospf,RA(config)#router ospf 1 RA(config-router)# #network 172.16.1.1 0.0.0.0 area 0 RA(config-router)# #network 172.16.2.1 0.0.0.0 area 0 # sh ip ospf neighbor,RB(config)#router ospf 1 RB(config-router)# #network 172.16.2.2 0.0.0.0 area 0 RB(config-router)# #network 172.16.3.2 0.0.0.0 area 0 # sh ip ospf neighbor,实验八 网络地址转换 实验名称:静态内部源地址转换NAT 实验目的:掌握内网中一台服务器连接到Internet网时的静态内部源地址转换 步骤1:基本配置 Red-Giant(config)#hostname R1 R1(config)#interface serial 1/2 R1(config-if)# ip address 192.1.1.1 255.255.255.0 R1(config-if)# clock rate 64000 R1(config-if)# no shutdown R1(config-if)# end R1(config)# interface fa 1/0 R1(config-if)# ip add 192.168.1.1 255.255.255.0 R1(config-if)# no sh,Red-Giant(config)#hostname R2 R2(config)#interface serial 1/2 R2(config-if)# ip address 192.1.1.2 255.255.255.0 R2(config-if)# no shu R2(config-if)# end,步骤2 配置静态NAT映射 R1(config)# ip nat inside source static 192.168.1.2 192.1.1.3 定义静态映射一一匹配 R1(config)# int fa 1/0 R1(config-if)# ip nat inside R1(config)# int s1/2 / (int fa 1/1) R1(config-if)# ip nat outside R1(config)# ip route 0.0.0.0 0.0.0.0 fa 1/1 验证测试:R1# sh ip nat translations R1# sh run 查看结果,动态NAPT配置 复用内部全局地址转换NAPT 【实训名称】 复用内部全局地址转换NAPT 【实训目的】 掌握内网中所有主机连接到Internet网时,通过端口号区分的复用内部全局地址转换。,第一步:基本配置 Red-Giant (config)#hostname R1 R1(config)#interface serial 1/2 R1(config-if)#ip address 192.1.1.1 255.255.255.0 R1(config-if)#clock rate 64000 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface fastEthernet 1/0 R1(config-if)#ip add 192.168.1.1 255.255.255.0 R1(config-if)#no sh,Red-Giant(config)#hostname R2 R2(config)#int serial 1/2 R2(config-if)#ip add 192.1.1.2 255.255.255.0 R2(config-if)#no sh R2(config-if)#end,第二步:配置动态NAPT映射 R1(config)#ip n

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论