欢迎来到天天文库
浏览记录
ID:52072686
大小:197.00 KB
页数:5页
时间:2020-03-22
《通过路由器实现VLAN间路由.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、..通过路由器实现VLAN间路由【实验名称】通过路由器实现VLAN间路由【实验目的】掌握如何通过路由器实现VLAN间路由。【背景描述】作为企业的网络管理员,你按企业的部门结构创建了多个VLAN,为了实现数据资源的共享,现在需要使不同的VLAN里的用户相互通信,于是你决定配置路由器来实现VLAN间路由。本实验以1台S2126G交换机和1台R2620路由器为例,PC1和PC2的IP地址分别为192.168.10.10/24,192.168.20.20/24,PC1和PC2分别属于Vlan10和Vlan20,缺省网关分别指定为Vlan10和Vlan20在路由器上的对应子接
2、口的IP地址192.168.10.1和192.168.20.1。【实现功能】使位于不同VLAN里的用户可以相互通信。【实验拓扑】【实验设备】S2126G(1台)、R2620(1台)【实验步骤】第一步:在交换机S2126G上创建Vlan并分配相应端口S2126G(config)#vlan10!创建Vlan10S2126G(config)#vlan20!创建Vlan20.下载可编辑...S2126G(config)#interfacefastethernet0/1!进入接口配置模式S2126G(config-if)#switchportaccessvlan10!将F0/
3、1端口分配给Vlan10S2126G(config)#interfacefastethernet0/2!进入接口配置模式S2126G(config-if)#switchportaccessvlan20!将F0/2端口分配给Vlan20S2126G(config)#interfacefastethernet0/23S2126G(config-if)#switchportmodetrunk!配置trunk端口验证测试:验证VLAN和Trunk配置S2126G#showvlanVLANNameStatusPorts-----------------------------
4、-----------------------------------------------1defaultactiveFa0/3,Fa0/4,Fa0/5Fa0/6,Fa0/7,Fa0/8Fa0/9,Fa0/10,Fa0/11Fa0/12,Fa0/13,Fa0/14Fa0/15,Fa0/16,Fa0/17Fa0/18,Fa0/19,Fa0/20Fa0/21,Fa0/22,Fa0/23Fa0/2410VLAN0010activeFa0/1,Fa0/2320VLAN0020activeFa0/2,Fa0/23S2126G#showinterfacefastethern
5、et0/23switchport!验证端口的完整配置InterfaceSwitchportModeAccessNativeProtectedVLANlists-------------------------------------------------------------------------Fa0/23EnabledTrunk11DisabledAll或S2126G#showinterfacefastethernet0/23trunk!显示端口的trunk设置InterfaceModeNativeVLANVLANlists----------------
6、-----------------------------------------Fa0/23On1All第二步:在R2620路由器上配置接口F0的子接口R2620(config)#interfacefastethernet0R2620(config-if)#noipaddressR2620(config-if)#noshutdownR2620(config)#interfacefastethernet0.10!进入子接口F0.10配置模式R2620(config-if)#ipaddress192.168.10.1255.255.255.0!配置子接口F0.10IP
7、地址.下载可编辑...R2620(config-if)#encapsulationdot1q10!封装802.1Q并指定Vlan号10R2620(config)#interfacefastethernet0.20!进入子接口F0.20配置模式R2620(config-if)#ipaddress192.168.20.1255.255.255.0!配置子接口F0.20IP地址R2620(config-if)#encapsulationdot1q20!封装802.1Q并指定Vlan号20验证测试:验证接口配置和VLAN配置R2620#showipinterfacebr
此文档下载收益归作者所有