通过路由器实现VLAN间路由

上传人:cn****1 文档编号:543876460 上传时间:2023-09-28 格式:DOCX 页数:5 大小:37.94KB
返回 下载 相关 举报
通过路由器实现VLAN间路由_第1页
第1页 / 共5页
通过路由器实现VLAN间路由_第2页
第2页 / 共5页
通过路由器实现VLAN间路由_第3页
第3页 / 共5页
通过路由器实现VLAN间路由_第4页
第4页 / 共5页
通过路由器实现VLAN间路由_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《通过路由器实现VLAN间路由》由会员分享,可在线阅读,更多相关《通过路由器实现VLAN间路由(5页珍藏版)》请在金锄头文库上搜索。

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 和 Vian 20,缺省网关分 别指定为 Vlan10 和 Vlan 20 在路由 器上的

2、对应 子接口的 IP 地址 192.168.10.1 和 192.168.20.1 。实现功能】使位于不同VLAN里的用户可以相互通信。实验拓扑】F0F0/PC1R2620Van 10Vlan 20F0/23S2126GPC2实验设备】S2126G1 台、R26201 台 【实验步骤】第一步:在交换机S2126G上创建Vlan并分配相应端口S2126G (config)# vlan 10!创建 Vlan 10S2126G (config)# vlan 20!创建 Vlan 20S2126G(config)#interface fastethernet 0/1S2126G(config-if)#

3、switchport access vlan 10!进入接口配置模式!将F0/1端口分配给Vian 10S2126G(config)#interface fastethernet 0/2S2126G(config-if)#switchport access vian 20!进入接口配置模式!将F0/2端口分配给Vian 20S2126G(config)#interface fastethernet 0/23S2126G(config-if)#switchport mode trunk ! 配置 trunk 端口验证测试:验证VLAN和Trunk配置S2126G #show vianVLAN N

4、ameStatus Ports1 defauitactive Fa0/3 ,Fa0/4 ,Fa0/5 Fa0/6 ,Fa0/7 ,Fa0/8 Fa0/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/2410 VLAN0010active Fa0/1 ,Fa0/2320 VLAN0020active Fa0/2 ,Fa0/23S2126G #show interface fastethernet 0/23 switchport ! 验证端口的完整

5、配置 Interface Switchport Mode Access Native Protected VLAN iistsFa0/23 Enabied Trunk 11Disabied Aii或S2126G #show interface fastethernet 0/23 trunk ! 显示端口的 trunk 设置 InterfaceMode Native VLAN VLAN iistsFa0/23On 1Aii第二步:在R2620路由器上配置接口 F0的子接口R2620(config)# interface fastethernet 0R2620(config-if)#no ip a

6、ddressR2620(config-if)#no shutdownR2620(config)# interface fastethernet 0.10 !进入子接口配置模式R2620(config-if)# ip address 192.168.10.1 255.255.255.0!配置子接口 F0.10 IP 地址InterfaceIP-AddressFastEthernet0unassignedFastEthernet0.10192.168.10.1FastEthernet0.20192.168.20.1Serial0unassignedSerial1unassignedR2620#sh

7、ow vlansProtocols Configured: Address:Received:Transmitted:IP192.168.10.12626R2620(config)# interface fastethernet 0.20!进入子接口配置模式R2620(config-if)# ip address 192.168.20.1 255.255.255.0!配置子接口 F0.20 IP 地址验证测试:验证接口配置和VLAN配置R2620#show ip interface briefOK? Method StatusProtocolYES unset upupYES manual u

8、pupYES manual upupYES unset administratively downdownYES unset administratively downdownVirtual LAN ID: 10 (IEEE 802.1Q Encapsulation)Virtual LAN ID: 20 (IEEE 802.1Q Encapsulation)Protocols Configured: Address:Received:Transmitted:Replv iom192.168.20.20:byte jj=32t imelinsTTL=127Replijf pom192.168.2

9、0.20:byte s;=32timelmsTTL=127Replyf rom192.168.20.20:byte j;=32t imelinsTTL=127Replyf ion192.168.20.20:byte 5;=32timeping 192.168.20.20 !在PC1的命令行方式下验证能Ping通PC3c:C: IKDOSSyst e32cd. ezeC:pin3 192.1&8.20.28以上结果显示说明:在不同VLAN里的电脑系统通过路由器是可以互相通信的。【注意事项】 各个VLAN内主机的网关须指定为路由器上对应的子接口 IP地址【参考配置】S2126G#show runn

10、ing-config ! 显示交换机 S2126G 的全部配置 Current configuration : 374 bytes hostname S2126Genable secret level 1 5 $2fimLMp3bcknAxB4yglowNqQehIOr enable secret level 15 5 $28U0H.Q1u_;C,t !interface fastEthernet 0/1switchport access vlan 10 !interface fastEthernet 0/2switchport access vlan 20 !interface fastEt

11、hernet 0/23switchport mode trunk !interface vlan 1no shutdown !endR2620#show running-config ! 显示路由器 R2620 的全部配置 Current configuration:!version 6.14(2)!hostname R2620!enable secret 5 $1$DRPX$jcKCqvMTY1yB4Xrp4qrKR1!ip subnet-zero!interface FastEthernet0no ip addressencapsulation dot1Q 10encapsulation dot1Q 20 !interface Serial0no ip address shutdown!interface Serial1no ip address shutdown!voice-port 0!voice-port 1!voice-port 2!voice-port 3ip classless!line con 0line aux 0!line vty 0 4password starlogin end

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 学术论文 > 其它学术论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号