计算机网络实验 实验四 跨交换机实现vlan

上传人:li****i 文档编号:243129422 上传时间:2024-09-16 格式:PPT 页数:20 大小:774KB
返回 下载 相关 举报
计算机网络实验 实验四 跨交换机实现vlan_第1页
第1页 / 共20页
计算机网络实验 实验四 跨交换机实现vlan_第2页
第2页 / 共20页
计算机网络实验 实验四 跨交换机实现vlan_第3页
第3页 / 共20页
点击查看更多>>
资源描述
,单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,第四级,第五级,*,实验四跨交换机实现,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,模式。,实验七 静态路由实验拓扑,实验名称:静态路由,实验目的:掌握通过静态路由方式实现网络的连通性。,172.16.1.0,PC1,172.16.1.11,Fa1/0,172.16.1.1,S1/2,172.16.2.1,172.16.2.0,S1/2,172.16.2.2,172.16.3.0,Fa1/0,172.16.3.2,PC2,172.16.3.22,实验步骤,步骤,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,nat,pool to-internet 192.1.1.1,192.1.1.1,netmask,255.255.255.0 overload,! 定义地址池,R1(config)#access-list 1 permit 192.168.1.0 0.0.0.255,!定义允许转换的地址,R1(config)#ip,nat,inside source list 1 pool to-internet,!为内部本地调用转换地址池,验证测试:,R1#,sh,ip,nat,translations,
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 小学资料


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!