一、实验目标

  • 掌握交换机Tag VLAN 的配置;
  • 掌握三层交换机基本配置方法;
  • 掌握三层交换机VLAN路由的配置方法;
  • 通过三层交换机实现VLAN间相互通信;

二、实验背景

某企业有两个主要部门,技术部和销售部,分处于不同的办公室,为了安全和便于管理,对两个部门的主机进行了VLAN的划分,技术部和销售部分处于不同的VLAN。现由于业务的需求,需要销售部和技术部的主机能够相互访问,获得相应的资源,两个部门的交换机通过一台三层交换机进行了连接。

三、技术原理

三层交换机具备网络层的功能,实现VLAN间相互访问的原理是:利用三层交换机的路由功能,通过识别数据包的IP地址,查找路由表进行选路转发。三层交换机利用直连路由可以实现不同VLAN之间的互相访问。三层交换机给接口配置IP地址,采用SVI(交换虚拟接口)的方式实现VLAN间互连。SVI是指为交换机中的VLAN创建虚拟接口,并且配置IP地址。

四、实验步骤

实验拓扑

1、在二层交换机上配置VLAN 2、VLAN 3,分别将端口2、端口3划到VLAN 2、VLAN 3;

2、将二层交换机与三层交换机相连的端口Fa0/1定义为Tag VLAN模式;

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#vlan 3
Switch(config-vlan)#exit
Switch(config)#interface fa0/2
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fa0/3
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#interface fa0/1
Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#

3、在三层交换机上配置VLAN 2、VLAN 3,分别将端口2、端口3划到VLAN 2、VLAN 3;

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#vlan 3
Switch(config-vlan)#exit
Switch(config)#interface fa0/2
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fa0/3
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exitSwitch(config)#

4、设置三层交换机VLAN间通信,创建VLAN 2、VLAN 3的虚拟接口,并配置虚拟接口VLAN 2、VLAN 3的IP地址;

Switch(config)#interface vlan 2                                   //创建 VLAN 2 的虚拟接口
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to upSwitch(config-if)#ip address 192.168.1.1 255.255.255.0            //配置虚拟接口 VLAN 2 的IP地址
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 3                                   //创建 VLAN 2 的虚拟接口
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan3, changed state to upSwitch(config-if)#ip address 192.168.2.1 255.255.255.0            //配置虚拟接口 VLAN 2 的IP地址
Switch(config-if)#no shutdown
Switch(config-if)#endSwitch#

5、查看三层交换机路由表

Switch#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC    192.168.1.0/24 is directly connected, Vlan2
C    192.168.2.0/24 is directly connected, Vlan3
Switch#

6、将VLAN 2、VLAN 3下的主机默认网关分别设置为相应虚拟接口的IP地址;

五、验证

打开PC1 Command Prompt

Packet Tracer PC Command Line 1.0
PC>ipconfigIP Address......................: 192.168.1.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.1PC>ping 192.168.1.3Pinging 192.168.1.3 with 32 bytes of data:Reply from 192.168.1.3: bytes=32 time=187ms TTL=128
Reply from 192.168.1.3: bytes=32 time=93ms TTL=128
Reply from 192.168.1.3: bytes=32 time=110ms TTL=128
Reply from 192.168.1.3: bytes=32 time=93ms TTL=128Ping statistics for 192.168.1.3:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:Minimum = 93ms, Maximum = 187ms, Average = 120msPC>ping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Request timed out.
Reply from 192.168.2.2: bytes=32 time=188ms TTL=127
Reply from 192.168.2.2: bytes=32 time=112ms TTL=127
Reply from 192.168.2.2: bytes=32 time=125ms TTL=127Ping statistics for 192.168.2.2:Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:Minimum = 112ms, Maximum = 188ms, Average = 141msPC>ping 192.168.2.3Pinging 192.168.2.3 with 32 bytes of data:Request timed out.
Reply from 192.168.2.3: bytes=32 time=125ms TTL=127
Reply from 192.168.2.3: bytes=32 time=78ms TTL=127
Reply from 192.168.2.3: bytes=32 time=64ms TTL=127Ping statistics for 192.168.2.3:Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:Minimum = 64ms, Maximum = 125ms, Average = 89ms

转载于:https://www.cnblogs.com/mchina/archive/2012/07/14/2591598.html

Packet Tracer 5.0实验(四) 利用三层交换机实现VLAN间路由相关推荐

  1. Packet Tracer 思科模拟器入门教程 之七 利用三层交换机实现VLAN间路由

    实验目标 掌握交换机Tag VLAN的配置 掌握三层交换机基本配置方法: 掌握三层交换机VLAN路由的配置方法: 通过三层交换机实现VLAN间相互通信: 实验背景 某企业有两个主要部门,技术部和销售部 ...

  2. 利用三层交换机实现VLAN间路由配置

    利用三层交换机实现VLAN间路由配置 实验目标: 一. 掌握交换机Tag VLAN的配置: 二.掌握三层交换机基本配置方法: 三. 掌握三层交换机的VLAN路由的配置方法: 四.通过三层交换机实现VL ...

  3. 利用三层交换机实现 VLAN 间路由

    利用三层交换机实现 VLAN 间路由 拓扑图 三台PC的参考配置 [实验步骤] 第一步:配置两台交换机的主机名 Switch#configure terminal Enter configuratio ...

  4. 思科利用三层交换机实现 VLAN 间路由

    一.实验目的 掌握三层交换机基本配置方法 掌握三层交换机VLAN路由的配置方法 通过三层交换机实现VLAN间相互通信 二.实验原理 三层交换机具备网络层的功能,实现VLAN相互访问的原理是:利用三层交 ...

  5. 实验5,利用三层交换机实现VLAN间路由

    这次我们要做的是利用三层交换机来实现不同VLAN之间的通信.所以这次我们准备了三台PC机,一个两层交换机,一个三层交换机.通过三层交换机来创建SVI,实现不同VLAN之间的通信. 实验步骤 (1)在三 ...

  6. 第4章 利用三层交换机实现VLAN间路由lan配置

    实验目标: 一. 掌握交换机Tag VLAN的配置: 二.掌握三层交换机基本配置方法: 三. 掌握三层交换机的VLAN路由的配置方法: 四.通过三层交换机实现VLAN见相互通信: 技术原理: 三层交换 ...

  7. 思科三层交换机开启ipv6路由功能_思科利用三层交换机实现VLAN间路由

    预备知识: VLAN的划分解决了广播域太大而容易引起广播风暴的问题,有利于增加网络带宽,提高带宽利用率.但划分了VLAN后,VLAN之间的计算机也不能通信,信息.资源不能共享,这与网络建立的目的相违背 ...

  8. 思科:利用三层交换机实现vlan间路由

    一.拓扑图 二.二层交换机的配置 Switch# Switch#config t Enter configuration commands, one per line. End with CNTL/Z ...

  9. 利用三层交换机实现VLAN间路由

    步骤1:配置三层交换机的主机名 Ruijie#conf t Enter configuration commands, one per line.  End with CNTL/Z. Ruijie(c ...

最新文章

  1. ESLint里的规则教会我,无规矩 不编程
  2. php网址变量怎么输出,【PHP网站】如何使用dedecms v5.7前台模版里输出变量
  3. php调用swf文件上传,swfupload-jquery-plugin AJAX+PHP 文件上传
  4. linux sha1sum命令,讲解Linux中校验文件的MD5码与SHA1码的命令使用
  5. 什么是传感器? 传感器由哪几部分组成? 传感器分类?
  6. CSU 1573 最多的数字
  7. NB-IoT---(0) NB-IoT技术
  8. AcWing 847. 图中点的层次(BFS模板)
  9. PS中预设画笔并为路径描边
  10. 经纬度坐标和投影坐标的转换
  11. QT设计风速仪上位机实例(串口读写数据处理数据下载)
  12. Windows任务管理器命令行查进程
  13. 麻了,别再为难软件测试员了
  14. 秦曾昌人工智能课程---3、机器学习中的哲学
  15. Bert入门学习过程记录
  16. 语义分割重制版1——Pytorch 搭建自己的Unet语义分割平台
  17. Android常见设计模式——观察者模式 (Observer Pattern)
  18. 矩阵不可约和导出图强联通关系
  19. 智慧社区三维可视化决策系统平台(数字孪生)-解决方案开发案例
  20. 树莓派+UVC摄像头+网络监控

热门文章

  1. java 泛型 子类_Java泛型:要求泛型成为某种类型的子类
  2. 解决win10使用GPU跑程序遇到的一系列报错
  3. python自定义函数func_python自定义函数与面向对象
  4. HTML+CSS+JS实现 ❤️制作loading动画效果❤️
  5. html5新增的type类型,html5新增的type类型
  6. linux文件属性是什么意思,Linux文件属性
  7. MySQL 内连接查询
  8. sqlserver 微信 读取_Sql Server使用链接服务器远程取数据_sqlserver
  9. python写算法求最短路径,Python实现迪杰斯特拉算法并生成最短路径的示例代码
  10. 数学建模学习笔记(四)——拟合算法