主要实现功能: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. 更新jar包里的配置文件

    更新jar包里的配置文件 起因 从笔记本传了个jar到服务器,运行的时候才发现配置文件一个ip项填错了.本来很简单的问题,maven重新打包就可以了,但是30多M的jar包就因为一个配置项错了又要重新 ...

  2. vue视频学习笔记07

    video 7 vue问题:论坛http://bbs.zhinengshe.com------------------------------------------------UI组件别人提供好一堆 ...

  3. LeetCode:60. Permutation Sequence,n全排列的第k个子列

    LeetCode:60. Permutation Sequence,n全排列的第k个子列 : 题目: LeetCode:60. Permutation Sequence 描述: The set [1, ...

  4. Linux五种IO模型性能分析

    1. 概念理解 在进行网络编程时,我们常常见到同步(Sync)/异步(Async),阻塞(Block)/非阻塞(Unblock)四种调用方式: 同步:       所谓同步,就是在发出一个功能调用时, ...

  5. jQuery操作之效果

    jQuery操作之效果 效果操作一共分五类:1.基本,2.滑动,3.淡入淡出,4.自定义,5.设置 show(),hide(),toggle() 代码如下: html代码: <p style=& ...

  6. liunx命令3

    liunx系统目录结构 / /home /root /dev /usr /etc/ /boot /lib /var /tmp /proc /bin /sbin / 通常称为根分区,所有的文件和目录的起 ...

  7. Spring Boot 学习(1)

    文 by / 林本托 Tip 做一个终身学习的人. Spring Boot 初体验 Spring Boot 包含了很多 start(Spring boot 中 的叫法,就是一个模块,后文统一称模块,便 ...

  8. 使用nodejs爬前程无忧前端技能排行(半半成品)

    最近准备换工作,需要更新一下技能树.为做到有的放矢,想对招聘方的要求做个统计.正好之前了解过nodejs,所以做了个爬虫搜索数据. 具体步骤: 1.  先用fiddler分析请求需要的header和b ...

  9. convertView的疑问(软件管理器)

    package com.hixin.appexplorer; import java.util.List; import android.app.Activity; import android.co ...

  10. DOM4J介绍与代码示例(2)-XPath 详解

    XPath 详解,总结 XPath简介 XPath是W3C的一个标准.它最主要的目的是为了在XML1.0或XML1.1文档节点树中定位节点所设计.目前有XPath1.0和 XPath2.0两个版本.其 ...