cisco模拟器之------交换机、路由器、vlan的综合实例
主要实现功能: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的综合实例的更多相关文章
- Cisco思科模拟器交换机划分VLAN 入门详解 - 精简归纳
Cisco思科模拟器交换机划分VLAN 入门详解 - 精简归纳 JERRY_Z. ~ 2020 / 10 / 24 转载请注明出处!️ 附: 交流方式: ️ ️ ️ QQ: 1846334075 We ...
- Cisco SG300系列交换机划分VLan与普通路由器连接配置
思科SG300系列三层交换机是针对中小企业设计的一款产品,Marvell 主控和128M Ram,最大支持52个千兆RJ45端口和2个SFP端口,因公司业务需求,最近也进行了解和配置,具体型号为 SG ...
- VLAN原理详解[转载] 网桥--交换机---路由器
来自:http://blog.csdn.net/phunxm/article/details/9498829 一.什么是桥接 桥接工作在OSI网络参考模型的第二层数据链路层,是一种以 ...
- 交换机之vlan详解
一.为什么需要VLAN 1.1.什么是VLAN? VLAN(Virtual LAN),翻译成中文是"虚拟局域网".LAN可以是由少数几台家用计算机构成的网络,也可以是数以百计的计算 ...
- 网络协议 4 - 交换机与 VLAN:办公室太复杂,我要回学校
上一次,我们通过宿舍联网打魔兽的需求,认识了如何通过物理层和链路层组建一个宿舍局域网.今天,让我们切换到稍微复杂点的场景,办公室. 在这个场景里,就不像在宿舍那样,搞几根网线,拉一拉, ...
- 管理型交换机IEEE 802.1Q VLAN设置应用实例
转载标注: IEEE802.1Q 我粗略理解为对交换机入口规则和出口规则设置,入口打上VID,设置从哪些口可以出去,并且是否带标签. 一 VLAN的概念 VLAN(Virtual Local Area ...
- 让VMware ESXi虚拟交换机支持VLAN
眼下虚拟化应用比較广泛,通常情况下.一台物理主机在安装VMware ESXi或Hyper-V虚拟机软件后.能够在一台物理主机上创建多个虚拟机,而且创建的每一个虚拟机能够像原来的物理一样对外提供服务,这 ...
- 网络协议 4 - 交换机与 VLAN
上一次,我们通过公司需求,认识了如何通过物理层和链路层组建一个公司局域网.今天,我们切换到复杂点的办公室场景. 在这个场景里,就不像在大学教室那样,搞几根网线,拉一拉,扯一扯就可以了.一个办公 ...
- 网络协议 4 - 交换机与 VLAN:拓扑结构
上一次,我们通过宿舍联网打魔兽的需求,认识了如何通过物理层和链路层组建一个宿舍局域网.今天,让我们切换到稍微复杂点的场景,办公室. 在这个场景里,就不像在宿舍那样,搞几根网线,拉一拉,扯一扯就 ...
随机推荐
- hdu4681 String DP(2013多校第8场)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4681 思路: 我是胡搞过的 就是先预处理出(i,j)的正向的最大连续子串和逆向最大连续子串 然后对于A ...
- [刷题]算法竞赛入门经典 3-10/UVa1587 3-11/UVa1588
书上具体所有题目:http://pan.baidu.com/s/1hssH0KO 题目:算法竞赛入门经典 3-10/UVa1587:Box 代码: //UVa1587 - Box #include&l ...
- 1.各个浏览器内核?经常遇到的浏览器兼容性有哪些?解决办法?常用的hack技巧?
IE: trident内核 Firefox(火狐):gecko内核 Safari(苹果):webkit内核 Opera(欧鹏):以前是presto内核,现在是Blink内核 Chrome:Blink ...
- 关于web程序快速开发个人见解以及经历
由于在之前公司业务的发展,需要在基于核心业务的基础上开发其他较为独立的业务系统,所以就有了这个基于Dapper,DDD概念的基础框架,由于个人基于这个框架已经经历过两个系统的开发,也因为其他项目团队需 ...
- webapi “ObjectContent`1”类型未能序列化内容类型“application/xml; charset=utf-8”的响应正文。
今天在来一发 webapi的一个知识点 相信用过webapi的对这个错误 已经看在眼里 痛在心里了把 我百度也搜了一下 看了一下 然后发现他们的解决办法 并没有什么软用. 然后想起来当时上学的 ...
- 关于ubuntu的图标创建以及快捷方式打开
//这里个人要添加的的为微信小程序开发工具 1:终端命令: sudo gedit /usr/share/applications/MyChat.desktop 2:修改启动器配置如下: [Deskto ...
- 022 component(组件)关联映射
Component关联映射: 目前有两个类如下: 值对象没有标识,而实体对象具有标识,值对象属于某一个实体,使用它重复使用率提升,而且更清析. 以上关系的映射称为component(组件)关联映射 在 ...
- 学习python的第一个小目标:通过requests+xlrd实现简单接口测试,将测试用例维护在表格中,与脚本分开。
小白的学习方式:通过确定一个小目标来想办法实现它,再通过笔记来加深印象. 面对标题中的小目标我陷入了思考....嗯,首先实现利用xlrd库来取出想要的用例 首先用表格准备好用例,如图下: 先试下取nu ...
- 【T-SQL】系列文章全文目录(2017-06-02更新)
本系列[T-SQL]主要是针对T-SQL的总结. T-SQL基础 [T-SQL基础]01.单表查询-几道sql查询题 [T-SQL基础]02.联接查询 [T-SQL基础]03.子查询 [T-SQL基础 ...
- Java常用类之【日期相关类】
一.日期类 Java语言提供了2个类来处理日期 Date类 Date类以毫秒来表示特定的日期 构造方法 Date date = new Date(); System.out.println(date) ...