实验目的

1、理解Trunk的运行原理

2、掌握Trunk的配置方法

实验拓扑

实验需求

1、根据实验拓扑图,完成设备的基本配置;

2、分别在SW1和SW2创建VLAN10和VLAN20,名字为IT和HR;

3、分别在SW1和SW2上把相应的接口划入VLAN10和VLAN20;

4、把SW1和SW2互连的链路配置成Trunk,采用Dot1q封装;

5、测试PC之间的网络连通性。

实验步骤

步骤1:设备的基本配置

配置PC1

VPCS> set pcname PC1   //设置主机名PC1> ip 10.1.1.1/24      //设置IP地址

配置PC2

VPCS> set pcname PC2PC2> ip 10.1.2.1/24

配置PC3

VPCS> set pcname PC3PC3> ip 10.1.1.2/24

配置PC4

VPCS> set pcname PC4PC4> ip 10.1.2.2/24

配置SW1

Switch>enableSwitch#configure terminalSwitch(config)#hostname SW1SW1(config)#no ip domain-lookupSW1(config)#line console 0SW1(config-line)#exec-timeout 0 0SW1(config-line)#logging synchronousSW1(config-line)#endSW1#

配置SW2

Switch>enableSwitch#configure terminalSwitch(config)#hostname SW2SW2(config)#no ip domain-lookupSW2(config)#line console 0SW2(config-line)#exec-timeout 0 0SW2(config-line)#logging synchronousSW2(config-line)#endSW2#

步骤2:VLAN的配置

配置SW1

SW1(config)#vlan 10SW1(config-vlan)#name ITSW1(config-vlan)#exitSW1(config)#vlan 20SW1(config-vlan)#name HRSW1(config-vlan)#exitSW1(config)#interface Eth0/1SW1(config-if)#switchport mode accessSW1(config-if)#switchport access vlan 10SW1(config-if)#exitSW1(config)#interface Eth0/2SW1(config-if)#switchport mode access   SW1(config-if)#switchport access vlan 20SW1(config-if)#endSW1#

配置SW2

SW2(config)#vlan 10SW2(config-vlan)#name ITSW2(config-vlan)#exitSW2(config)#vlan 20SW2(config-vlan)#name HRSW2(config-vlan)#exitSW2(config)#interface Eth0/1SW2(config-if)#switchport mode accessSW2(config-if)#switchport access vlan 10SW2(config-if)#exitSW2(config)#interface Eth0/2SW2(config-if)#switchport mode access   SW2(config-if)#switchport access vlan 20SW2(config-if)#endSW2#

步骤3:Trunk的配置

配置SW1

SW1(config)#interface Eth0/0SW1(config-if)#switchport trunk encapsulation dot1qSW1(config-if)#switchport mode trunkSW1(config-if)#endSW1#

配置SW2

SW2(config)#interface Eth0/0SW2(config-if)#switchport trunk encapsulation dot1qSW2(config-if)#switchport mode trunkSW2(config-if)#endSW2#

实验检查

步骤1:检查VLAN

检查SW1

SW1#show vlan briefVLAN Name                             Status    Ports---- -------------------------------- --------- -------------------------------1    default                             active     Et0/310   IT                                 active     Et0/120   HR                                active     Et0/21002 fddi-default                     act/unsup1003 token-ring-default               act/unsup1004 fddinet-default                  act/unsup1005 trnet-default                    act/unsupSW1已经创建好VLAN10和VLAN20,并已将对应接口划入。

检查SW2

SW2#show vlan briefVLAN Name                             Status    Ports---- -------------------------------- --------- -------------------------------1    default                             active    Et0/310   IT                                 active    Et0/120   HR                                active    Et0/21002 fddi-default                     act/unsup1003 token-ring-default               act/unsup1004 fddinet-default                  act/unsup1005 trnet-default                    act/unsupSW2已经创建好VLAN10和VLAN20,并已将对应接口划入。

步骤2:检查Trunk

检查SW1

SW1#show interfaces Eth0/0 switchportName: Et0/0Switchport: EnabledAdministrative Mode: trunkOperational Mode: trunkAdministrative Trunking Encapsulation: dot1qOperational Trunking Encapsulation: dot1qNegotiation of Trunking: OnAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Administrative Native VLAN tagging: enabledVoice VLAN: noneAdministrative private-vlan host-association: noneAdministrative private-vlan mapping: noneAdministrative private-vlan trunk native VLAN: noneAdministrative private-vlan trunk Native VLAN tagging: enabledAdministrative private-vlan trunk encapsulation: dot1qAdministrative private-vlan trunk normal VLANs: noneAdministrative private-vlan trunk associations: noneAdministrative private-vlan trunk mappings: noneOperational private-vlan: noneTrunking VLANs Enabled: ALLPruning VLANs Enabled: 2-1001Capture Mode DisabledCapture VLANs Allowed: ALLProtected: falseAppliance trust: noneE0/0接口当前是Trunk,封装的协议是dot1q。SW1#show interfaces trunkPort        Mode            Encapsulation   Status        Native vlanEt0/0       on               802.1q         trunking      1Port        Vlans allowed on trunkEt0/0       1-4094Port        Vlans allowed and active in management domainEt0/0       1,10,20Port        Vlans in spanning tree forwarding state and not prunedEt0/0       1,10,20E0/0封装的Trunk协议是dot1q,当前的状态是trunking。SW1#sh run int Eth0/0Building configuration...Current configuration : 90 bytes!interface Ethernet0/0 switchport trunk encapsulation dot1q switchport mode trunkendE0/0接口的Trunk封装协议是dot1q,模式是trunk。

检查SW2

SW2#show interfaces trunkPort        Mode             Encapsulation  Status        Native vlanEt0/0       on                802.1q        trunking      1Port        Vlans allowed on trunkEt0/0       1-4094Port        Vlans allowed and active in management domainEt0/0       1,10,20Port        Vlans in spanning tree forwarding state and not prunedEt0/0       1,10,20E0/0封装的Trunk协议是dot1q,当前的状态是trunking。

步骤4:网络连通性测试

测试PC1和PC3的连通性:

PC1> ping 10.1.1.284 bytes from 10.1.1.2 icmp_seq=1 ttl=64 time=1.603 ms84 bytes from 10.1.1.2 icmp_seq=2 ttl=64 time=1.234 ms84 bytes from 10.1.1.2 icmp_seq=3 ttl=64 time=1.027 ms84 bytes from 10.1.1.2 icmp_seq=4 ttl=64 time=2.372 ms84 bytes from 10.1.1.2 icmp_seq=5 ttl=64 time=1.200 msPC1和PC3的网络连通性正常。

测试PC2和PC4的连通性:

PC2> ping 10.1.2.284 bytes from 10.1.2.2 icmp_seq=1 ttl=64 time=0.887 ms84 bytes from 10.1.2.2 icmp_seq=2 ttl=64 time=0.932 ms84 bytes from 10.1.2.2 icmp_seq=3 ttl=64 time=1.295 ms84 bytes from 10.1.2.2 icmp_seq=4 ttl=64 time=0.926 ms84 bytes from 10.1.2.2 icmp_seq=5 ttl=64 time=1.011 msPC2和PC4的网络连通性正常。

思科交换机如何配置Trunk?相关推荐

  1. Boson Netsim 思科交换机仿真 配置VLAN和TRUNK

    目录 内容和步骤 1. 绘制实验拓扑图 2. 配置交换机基本参数 3. 配置交换机VLAN和TRUNK 问题讨论 总结 内容和步骤 1. 绘制实验拓扑图 绘图时,遵循"够用为度"的 ...

  2. CCNA重点难点:思科交换机生成树配置

    后台收到粉丝留言说讲一下生成树的配置,小微作为一个宠粉专业户,这还不快分分钟安排上,所以小伙伴们有想学想看的知识点都可以留言给小微,小微加更都会安排上~ 附上:教学视频+技术文档哦,你就说棒不棒,哈 ...

  3. 思科交换机Vlan配置以及VLAN应用场景

    VLAN相关学习视频:超简单的[思科交换机Vlan配置]https://www.zhihu.com/zvideo/1446489190669803520https://www.zhihu.com/zv ...

  4. 思科交换机接口配置trunk_Cisco交换机配置VLAN与TRUNK

    0x00前言: 今日在学校里学习了如何搭建vlan和配置等等还有trunk. 由于快下课了.尽快写. 0x01准备: Cisco模拟器 0x02正文: 要求: VLAN 10 左边的IP:192.16 ...

  5. 思科交换机 3560配置

    思科3560交换机配置实例 前提准备工作 第一步:建立本地配置环境,只需将计算机(或终端)的串口通过标准RS-232电缆与此Catalyst 3560设备的Console口连接 第二步:在计算机上运行 ...

  6. 中兴交换机配置telnet连接_原创:思科交换机常用配置

    一.交换机的配置方式 1.Console 将配置电缆的DB-9(或DB-25)孔式插头 接到要对交换机进行配置的微机或终端的串口上. 首先启动超级终端,点击windows的开始→程序→附件→通讯→超级 ...

  7. 思科交换机接口配置trunk_交换机之间trunk端口的设置问题

    我用路由器实现vlan之间的互访,如图: (R1)------(SW1)------(PC1)  //PC1属于vlan2,属于192.168.2.0网段 | | (SW2)------(PC2) / ...

  8. 思科交换机VTP配置

    通常情况下,我们需要在整个园区网或者企业网中的一组的交换机中保持VLAN数据库的同步,以保证所有交换机都能从数据帧中读取相关的VLAN信息进行正确的数据转发,然而对于大型网络来说,可能有成百上千台交换 ...

  9. 思科交换机基本配置实例讲解《一》

    1.基本概念介绍 IOS:       互联网操作系统,也就是交换机和路由器中用的操作系统 VLAN:    虚拟lan VTP:       VLAN TRUNK PROTOCOL DHCP:    ...

最新文章

  1. 用C语言解“二分法求多项式单根”题
  2. 看到一个flash做的超酷网站
  3. day05 Spring中自定义注解的用处-之获取自定义的Servie
  4. J-Link该如何升级固件?
  5. impala操作hive数据实例
  6. 【python】热力图绘制: intensity_heatmap,density_heatmap
  7. python读取url中存储的数据_Python实现从URL地址提取文件名的方法
  8. JSP面试题都在这里
  9. js创建对象,用函数实现对象创建,并实现内函数共享
  10. 安卓Activity劫持与反劫持
  11. 关于KERNEL_SECURITY_CHECK_FAILURE蓝屏(BSOD)0x00000139错误解决思路
  12. c语言考研必刷题小程序,小程序推荐:大学生必备刷题小程序,内容涵盖各种证书考试题型...
  13. 计算机课件制作,多媒体课件制作photoshop和powerpoint教案
  14. hive优化:大表关联数据倾斜问题
  15. 2022-2028全球与中国脚踏泵市场现状及未来发展趋势
  16. 【IoT】蓝牙 GAP 和 GATT 协议简析
  17. 庄子 “唯至人乃能游于世不避,顺人而不失己。”
  18. C++编程 一个正整数的立方和
  19. 亢奋、焦虑、担忧,EOS拥趸者的无眠23小时
  20. 如何分析和研究Log文件 ,如何看日志信息

热门文章

  1. 机器学习-各类学习器评价指标
  2. Vue 实现图片拖拽功能
  3. linux下/proc/sysrq-trigger详解
  4. java博客论坛设计报告,javaweb课程设计报告-个人博客网站的实现(Java).doc
  5. XGBOOST原理解析
  6. 电脑可选更新到底是什么?(功能、质量和驱动程序更新)
  7. strace命令使用方式
  8. linux的浏览器大全,Linux下9款浏览器对比
  9. MySQL之库表设计篇:一到五范式、BC范式与反范式详解
  10. C语言1.5e10什么意思,汽车排量1.5e是什么意思