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:拓扑结构
上一次,我们通过宿舍联网打魔兽的需求,认识了如何通过物理层和链路层组建一个宿舍局域网.今天,让我们切换到稍微复杂点的场景,办公室. 在这个场景里,就不像在宿舍那样,搞几根网线,拉一拉,扯一扯就 ...
随机推荐
- PAT1028. List Sorting (25)---strcmp
题目链接为:https://www.patest.cn/contests/pat-a-practise/1028 1028. List Sorting (25) Excel can sort reco ...
- 【更新WordPress 4.6漏洞利用PoC】PHPMailer曝远程代码执行高危漏洞(CVE-2016-10033)
[2017.5.4更新] 昨天曝出了两个比较热门的漏洞,一个是CVE-2016-10033,另一个则为CVE-2017-8295.从描述来看,前者是WordPress Core 4.6一个未经授权的R ...
- 无分类编址(CIDR)构成超网
CIDR(无分类域间路由选择) CIDR最主要有两个以下特点: 消除传统的A,B,C地址和划分子网的概念,更有效的分配IPv4的地址空间,CIDR使IP地址又回到无分类的两级编码.记法:IP地址::= ...
- 计蒜客蓝桥杯模拟赛五J. 程序设计:放置守卫
在一张 n 行 m 列的方格地图上放置一些守卫,每个守卫能守护上.左.右三个方向上相邻的方格和自己所在的方格.如下图,红色的方格放置守卫,绿色的方格为该守卫守护的区域. 现在要求在地图上放置若干个守卫 ...
- Easy machine learning pipelines with pipelearner: intro and call for contributors
@drsimonj here to introduce pipelearner – a package I'm developing to make it easy to create machine ...
- php处理表单中的复选框问题以及js实现全选
做的一个项目中遇到了全选和取消全选的问题,这是一个很普遍的功能,,虽然我们经常用到,但是真正做起来却发现行不通,在网上找了些,大部分都是ie,但是谷歌内核浏览器不能正常实现,所以经过小小的调整,今天就 ...
- "php-cgi.exe - FastCGI 进程意外退出" 解决办法
问题描述: win7下iis中php-cgi.exe - FastCGI 进程意外退出 错误提示: HTTP 错误 500.0 - Internal Server Error D:\phpStudy\ ...
- sql还原(.mdf文件还原)
第一步: 把备份文件放到目录:C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA (默认)(这里用 MyDB.md ...
- INFORMATION_SCHEMA.PROFILING
24.18 The INFORMATION_SCHEMA PROFILING Table PROFILING表提供了语句分析信息. 其内容对应于SHOW PROFILES和SHOW PROFILE语句 ...
- Codility---EquiLeader
Task description A non-empty zero-indexed array A consisting of N integers is given. The leader of t ...