网络实验八(路由器实现跨vlan通信)
来源:互联网 发布:ubuntu 16.04 下载jdk 编辑:程序博客网 时间:2024/06/03 15:59
网络实验八:用路由器实现跨vlan通信
一:网络拓扑图如下:
详细的介绍前几次实验都已详细的说明啦,由于时间的关系,这次就简单明了的说明重点:
二:首先对交换机S1,S2进行配置即vlan的划分
s1:
Switch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2VLAN 2 added: Name:VLAN0002Switch(config)#interface fastethernet 0/2Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#interface fastethernet 0/3Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#interface fastethernet 0/1Switch(config-if)#switchport access vlan 2
由于端口0/1默认情况下是属于vlan1,为了能通信,也需要划分到vlan2中。s2:同上
Switch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 3VLAN 3 added: Name:VLAN0003Switch(config)#interface fastethernet 0/2Switch(config-if)#switchport access vlan 3Switch(config-if)#exitSwitch(config)#interface fastethernet 0/3Switch(config-if)#switchport access vlan 3Switch(config-if)#exitSwitch(config)#interface fastethernet 0/1Switch(config-if)#switchport access vlan 3
三:对路由器进行配置使路由器之间能通信
R1
Press Enter to StartRouter>Router>enable Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1R1(config)#interface serial 0/0R1(config-if)#ip address 172.16.2.1 255.255.255.0R1(config-if)#no shutdown%LINK-3-UPDOWN: Interface Serial0/0, changed state to up%LINK-3-UPDOWN: Interface Serial0/0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to downR1(config-if)#clock rate 64000%LINK-3-UPDOWN: Interface Serial0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to upR1(config-if)#exit
R2:
同上:
Press Enter to StartRouter>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2R2(config)#interface serial 0/0R2(config-if)#ip address 172.16.2.2 255.255.255.0R2(config-if)#no shutdown%LINK-3-UPDOWN: Interface Serial0/0, changed state to upR2(config-if)#exitR2(config)#exit
测试如下:有r2 ping r1R2(config-if)#exitR2(config)#exitR2#ping 172.16.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
四:给路由器添加静态路由信息:
r1
R1(config-if)#exitR1(config)#ip route 172.16.3.0 255.255.255.0 172.16.2.2
r2
R2#configure terminalEnter configuration commands, one per line. End with CNTL/Z.R2(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.1
五:给路由器设置网关:
r1
R1(config)#interface ethernet 0/0R1(config-if)#ip address 172.16.1.1 255.255.255.0R1(config-if)#no shutdown%LINK-3-UPDOWN: Interface Ethernet0/0, changed state to upR1(config-if)#
r2
R2(config)#interface ethernet 0/0R2(config-if)#ip address 172.16.3.1 255.255.255.0R2(config-if)#no shutdown%LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
六:给pc机配置ip和网关
给pc21即图上的pc1
C:>ipconfig /ip 172.16.1.2 255.255.255.0C:>ipconfig /dg 172.16.1.1C:>ping 172.16.3.2Pinging 172.16.3.2 with 32 bytes of data:Reply from 172.16.3.2: bytes=32 time=60ms TTL=241Reply from 172.16.3.2: bytes=32 time=60ms TTL=241Reply from 172.16.3.2: bytes=32 time=60ms TTL=241Reply from 172.16.3.2: bytes=32 time=60ms TTL=241Reply from 172.16.3.2: bytes=32 time=60ms TTL=241Ping statistics for 172.16.3.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55msC:>ping 172.16.3.3Pinging 172.16.3.3 with 32 bytes of data:Reply from 172.16.3.3: bytes=32 time=60ms TTL=241Reply from 172.16.3.3: bytes=32 time=60ms TTL=241Reply from 172.16.3.3: bytes=32 time=60ms TTL=241Reply from 172.16.3.3: bytes=32 time=60ms TTL=241Reply from 172.16.3.3: bytes=32 time=60ms TTL=241Ping statistics for 172.16.3.3: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55ms
给pc31即图上的pc3
C:>ipconfig /ip 172.16.3.2 255.255.255.0C:>ipconfig /dg 172.16.3.1C:>ping 172.16.1.2Pinging 172.16.1.2 with 32 bytes of data:Reply from 172.16.1.2: bytes=32 time=60ms TTL=241Reply from 172.16.1.2: bytes=32 time=60ms TTL=241Reply from 172.16.1.2: bytes=32 time=60ms TTL=241Reply from 172.16.1.2: bytes=32 time=60ms TTL=241Reply from 172.16.1.2: bytes=32 time=60ms TTL=241Ping statistics for 172.16.1.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55msC:>ping 172.16.1.3Pinging 172.16.1.3 with 32 bytes of data:Reply from 172.16.1.3: bytes=32 time=60ms TTL=241Reply from 172.16.1.3: bytes=32 time=60ms TTL=241Reply from 172.16.1.3: bytes=32 time=60ms TTL=241Reply from 172.16.1.3: bytes=32 time=60ms TTL=241Reply from 172.16.1.3: bytes=32 time=60ms TTL=241Ping statistics for 172.16.1.3: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55ms
由于时间关系:上面就只是列啦实验结果和过程,其实全部的内容都是前面几次实验的。这次就是一个综合的实验,。
- 网络实验八(路由器实现跨vlan通信)
- 路由器实现不同VLAN间通信
- 网络Cisco实验-跨交换机相同VLAN通信
- CCNA实验十 通过路由器实现vlan间路由(单臂路由)
- 多端口路由器实现VLAN间通信过程
- 路由器实现vlan通讯
- 网络实验(四跨交换机的VLAN的划分)
- 网络Cisco实验-同一交换机不同VLAN通信
- 同一路由器不同vlan之间的通信(一)
- 同一路由器不同vlan之间的通信(二)
- 通信网络实验-嗅探器实现
- 跨交换机实现vlan间通信
- 利用路由器配置单臂路由实现不同VLAN间的通信
- 使用SOHO路由器实现二层交换机基于端口的VLAN间通信
- CCNA实验八 使用VTP管理vlan
- 网络Cisco实验-交换机路由器综合实验(静态路由)
- 路由器+二层交换机划分vlan实现vlan互通
- VLAN间路由-路由器加二层交换机实现
- 数据库连接池为什么要建立多个连接
- ubuntu 开机自动挂载指定磁盘分区
- Magento 必须掌握的知识点
- 玩转SSRS第八篇---报表订阅进阶
- 将session存到远程服务器中session过期机制
- 网络实验八(路由器实现跨vlan通信)
- DAVINCI DM365-DM368开发攻略——U-BOOT-2010.12及UBL的移植
- JSP核心基础-Servlet一个简单的例子
- hdu 2191 悼念512汶川大地震遇难同胞——珍惜现在,感恩生活
- VS2012下基于Glut OpenGL GL_CULL_FACE示例程序:
- fprintf 的封装(vsprintf,va_start(), va_arg(), va_end()可变参数列表)
- ADSL宽带速率上行、下行速率
- 数组倒置解决方案
- 在计算机运算的时候,都是以补码的方式进行运算的