主要实现功能:a)位于路由器同一侧的不同网段的主机之间实现通信。

       b)  位于不同路由器的主机之间实现通信。

网络拓扑图:

命令配置:

switch0的配置:

Switch(config)#vlan 11             //划分子网11

Switch(config-vlan)#name T11

Switch(config-vlan)#no shutdown

exit

Switch(config)#vlan 22   //划分子网22

Switch(config-vlan)#name T22

Switch(config-vlan)#no shutdown

exit

Switch(config)#interface fastethernet 0/1

Switch (congfig-if)#switchport mode trunk            //把0/1接口设为trunk模式

Switch (config-if)#no shutdown

Switch (config-if)#exit

Switch(config)#interface fastethernet 0/2      //把0/2接口划分给子网11

Switch (congfig-if)#switchport access vlan 11

Switch (config-if)#no shutdown

Switch (config-if)#exit

Switch(config)#interface fastethernet 0/3

Switch (congfig-if)#switchport access vlan 22    //把0/3接口划分给子网22

Switch (config-if)#no shutdown

Switch (config-if)#exit

Switch1的配置:

Switch(config)# vlan 11

Switch(config-vlan)#name T11

Switch(config-vlan)#no shutdown

exit

Switch(config)# vlan 22

Switch(config-vlan)#name T22

Switch(config-vlan)#no shutdown

exit

Switch(config)#interface fastethernet 0/1

Switch (congfig-if)#switchport mode trunk

Switch (config-if)#no shutdown

Switch (config-if)#exit

Switch(config)#interface fastethernet 0/2

Switch (congfig-if)#switchport access vlan 11

Switch (config-if)#no shutdown

Switch (config-if)#exit

Switch(config)#interface fastethernet 0/3

Switch (congfig-if)#switchport access vlan 22

Switch (config-if)#no shutdown

Switch (config-if)#exit

Router0的配置:

Switch (config)#int f0/1.1       //在0/1接口下划分子接口0/1.1

Switch (config)#int f0/1.2  //在0/1接口下划分子接口0/1.2

Switch(config)#interface fastethernet 0/1.1       //配置子接口0/1.1的路由信息

Switch (congfig-subif)#encapsulation dot1Q 11    //单臂路由

Switch (config-subif)#ip address 192.168.48.1 255.255.255.0

Switch (config-subif)#exit

Switch(config)#interface fastethernet 0/1.2    //配置子接口0/1.2的路由信息

Switch (congfig-subif)#encapsulation dot1Q 22   //单臂路由

Switch (config-subif)#ip address 192.168.49.1 255.255.255.0

Switch (config-subif)#exit

Switch(config)#interface fastethernet 0/1

Switch (congfig-subif)#no shutdown

Switch (congfig-subif)#exit

Switch (congfig)#interface fastethernet 0/0      //配置接口0/0的路由信息

Switch (config-subif)#ip address 192.168.127.1 255.255.255.0

Switch (congfig-subif)#no shutdown

Switch (congfig-subif)#exit

Switch (config)#ip route 192.168.64.0 255.255.255.0 192.168.127.2      //配置静态路由协议

Switch (config)#ip route 192.168.72.0 255.255.255.0 192.168.127.2

Switch (config)#exit

Router1的配置:

Switch (config)#int f0/1.1

Switch (config)#int f0/1.2

Switch(config)#interface fastethernet 0/1.1

Switch (congfig-subif)#encapsulation dot1Q 11

Switch (config-subif)#ip address 192.168.64.1 255.255.255.0

Switch (config-subif)#exit

Switch(config)#interface fastethernet 0/1.2

Switch (congfig-subif)#encapsulation dot1Q 22

Switch (config-subif)#ip address 192.168.72.1 255.255.255.0

Switch (config-subif)#exit

Switch(config)#interface fastethernet 0/1

Switch (congfig-subif)#no shutdown

Switch (congfig-subif)#exit

Switch (congfig)#interface fastethernet 0/0

Switch (config-subif)#ip address 192.168.127.2 255.255.255.0

Switch (congfig-subif)#no shutdown

Switch (congfig-subif)#exit

Switch (config)#ip route 192.168.48.0 255.255.255.0 192.168.127.1

Switch (config)#ip route 192.168.49.0 255.255.255.0 192.168.127.1

Switch (config)#exit

分别给各台主机配置ip以及其他信息:

结果每台主机都可以通信。

cisco模拟器之------交换机、路由器、vlan的综合实例的更多相关文章

  1. Cisco思科模拟器交换机划分VLAN 入门详解 - 精简归纳

    Cisco思科模拟器交换机划分VLAN 入门详解 - 精简归纳 JERRY_Z. ~ 2020 / 10 / 24 转载请注明出处!️ 附: 交流方式: ️ ️ ️ QQ: 1846334075 We ...

  2. Cisco SG300系列交换机划分VLan与普通路由器连接配置

    思科SG300系列三层交换机是针对中小企业设计的一款产品,Marvell 主控和128M Ram,最大支持52个千兆RJ45端口和2个SFP端口,因公司业务需求,最近也进行了解和配置,具体型号为 SG ...

  3. VLAN原理详解[转载] 网桥--交换机---路由器

    来自:http://blog.csdn.net/phunxm/article/details/9498829 一.什么是桥接          桥接工作在OSI网络参考模型的第二层数据链路层,是一种以 ...

  4. 交换机之vlan详解

    一.为什么需要VLAN 1.1.什么是VLAN? VLAN(Virtual LAN),翻译成中文是"虚拟局域网".LAN可以是由少数几台家用计算机构成的网络,也可以是数以百计的计算 ...

  5. 网络协议 4 - 交换机与 VLAN:办公室太复杂,我要回学校

        上一次,我们通过宿舍联网打魔兽的需求,认识了如何通过物理层和链路层组建一个宿舍局域网.今天,让我们切换到稍微复杂点的场景,办公室.     在这个场景里,就不像在宿舍那样,搞几根网线,拉一拉, ...

  6. 管理型交换机IEEE 802.1Q VLAN设置应用实例

    转载标注: IEEE802.1Q 我粗略理解为对交换机入口规则和出口规则设置,入口打上VID,设置从哪些口可以出去,并且是否带标签. 一 VLAN的概念 VLAN(Virtual Local Area ...

  7. 让VMware ESXi虚拟交换机支持VLAN

    眼下虚拟化应用比較广泛,通常情况下.一台物理主机在安装VMware ESXi或Hyper-V虚拟机软件后.能够在一台物理主机上创建多个虚拟机,而且创建的每一个虚拟机能够像原来的物理一样对外提供服务,这 ...

  8. 网络协议 4 - 交换机与 VLAN

    上一次,我们通过公司需求,认识了如何通过物理层和链路层组建一个公司局域网.今天,我们切换到复杂点的办公室场景.     在这个场景里,就不像在大学教室那样,搞几根网线,拉一拉,扯一扯就可以了.一个办公 ...

  9. 网络协议 4 - 交换机与 VLAN:拓扑结构

    上一次,我们通过宿舍联网打魔兽的需求,认识了如何通过物理层和链路层组建一个宿舍局域网.今天,让我们切换到稍微复杂点的场景,办公室.     在这个场景里,就不像在宿舍那样,搞几根网线,拉一拉,扯一扯就 ...

随机推荐

  1. php学习之正则表达式

    1.正则表达式基本语法 首先,我们应该了解,两个特殊的符号'^'和'$'. 他们的作用是分别指出一个字符串的开始和结束.例子如下: "^The":表示所有以"The&qu ...

  2. java关键字transient与volatile小结

    本文转自:http://heaven-arch.iteye.com/blog/1160693 transient和volatile两个关键字一个用于对象序列化,一个用于线程同步,都是Java中比较高阶 ...

  3. 简单RPC框架-基于Consul的服务注册与发现

    *:first-child { margin-top: 0 !important; } body>*:last-child { margin-bottom: 0 !important; } /* ...

  4. progressBar的使用

    <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=&quo ...

  5. [原创]CentOS下Mysql双机互为备份

    一.环境: 1.安装Centos-6.5-x64位系统的机器两台: host1:192.168.2.3 host2:192.168.2.4  (互相能ping通) 2.安装Mysql. 命令:Yum ...

  6. Virtualbox让kali虚拟机共享主机的无线网络连接

    今天在测试虚拟机下安装kali系统时,遇到一个问题,默认安装完kali系统后,虚拟机不能上网.虚拟机网络配置使用的是默认的网络地址转换(NAT)选项. 网上查了很多,都说使用NAT模式时虚拟机不用做任 ...

  7. ArrayList实现分组功能

    这边只用2个属性来进行分组 定义Object有key与value属性 按照key的不同对于arrayList进行分组 List<Object> tempList=new ArrayList ...

  8. #417 Div2 B

    #417 Div2 B 题意 给定一个01矩阵表示一幢楼,左右两侧是楼梯,中间是房间,1代表那个房间开灯,0代表关灯,现在某人从1层左端楼梯开始关掉所有灯,当移动某一层时,必须关掉当前层所有灯才能移动 ...

  9. 【JAVAEE学习笔记】hibernate02:实体规则、对象状态、缓存、事务、批量查询和实现客户列表显示

    一.hibernate中的实体规则 实体类创建的注意事项 1.持久化类提供无参数构造 2.成员变量私有,提供共有get/set方法访问.需提供属性 3.持久化类中的属性,应尽量使用包装类型 4.持久化 ...

  10. Chrome 开发者工具断点调试(视频教程)

    很多人不了解 Chrome Dev Tools (开发者工具)的使用方法和技巧. 其中很多技能,无论是前端开发从业者,还是普通用户,了解一些还是对日常很有帮助的. 本猿定期录制.甚至根据您的需求来订制 ...