思科交换机如何配置Trunk?
实验目的
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 PC2
PC2> ip 10.1.2.1/24
配置PC3:
VPCS> set pcname PC3
PC3> ip 10.1.1.2/24
配置PC4:
VPCS> set pcname PC4
PC4> ip 10.1.2.2/24
配置SW1:
Switch>enable
Switch#configure terminal
Switch(config)#hostname SW1
SW1(config)#no ip domain-lookup
SW1(config)#line console 0
SW1(config-line)#exec-timeout 0 0
SW1(config-line)#logging synchronous
SW1(config-line)#end
SW1#
配置SW2:
Switch>enable
Switch#configure terminal
Switch(config)#hostname SW2
SW2(config)#no ip domain-lookup
SW2(config)#line console 0
SW2(config-line)#exec-timeout 0 0
SW2(config-line)#logging synchronous
SW2(config-line)#end
SW2#
步骤2:VLAN的配置
配置SW1:
SW1(config)#vlan 10
SW1(config-vlan)#name IT
SW1(config-vlan)#exit
SW1(config)#vlan 20
SW1(config-vlan)#name HR
SW1(config-vlan)#exit
SW1(config)#interface Eth0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 10
SW1(config-if)#exit
SW1(config)#interface Eth0/2
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 20
SW1(config-if)#end
SW1#
配置SW2:
SW2(config)#vlan 10
SW2(config-vlan)#name IT
SW2(config-vlan)#exit
SW2(config)#vlan 20
SW2(config-vlan)#name HR
SW2(config-vlan)#exit
SW2(config)#interface Eth0/1
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 10
SW2(config-if)#exit
SW2(config)#interface Eth0/2
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 20
SW2(config-if)#end
SW2#
步骤3:Trunk的配置
配置SW1:
SW1(config)#interface Eth0/0
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config-if)#end
SW1#
配置SW2:
SW2(config)#interface Eth0/0
SW2(config-if)#switchport trunk encapsulation dot1q
SW2(config-if)#switchport mode trunk
SW2(config-if)#end
SW2#
实验检查
步骤1:检查VLAN
检查SW1:
SW1#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Et0/3
10 IT active Et0/1
20 HR active Et0/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
SW1已经创建好VLAN10和VLAN20,并已将对应接口划入。
检查SW2:
SW2#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Et0/3
10 IT active Et0/1
20 HR active Et0/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
SW2已经创建好VLAN10和VLAN20,并已将对应接口划入。
步骤2:检查Trunk
检查SW1:
SW1#show interfaces Eth0/0 switchport
Name: Et0/0
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none
E0/0接口当前是Trunk,封装的协议是dot1q。
SW1#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Et0/0 on 802.1q trunking 1
Port Vlans allowed on trunk
Et0/0 1-4094
Port Vlans allowed and active in management domain
Et0/0 1,10,20
Port Vlans in spanning tree forwarding state and not pruned
Et0/0 1,10,20
E0/0封装的Trunk协议是dot1q,当前的状态是trunking。
SW1#sh run int Eth0/0
Building configuration...
Current configuration : 90 bytes
!
interface Ethernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
end
E0/0接口的Trunk封装协议是dot1q,模式是trunk。
检查SW2:
SW2#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Et0/0 on 802.1q trunking 1
Port Vlans allowed on trunk
Et0/0 1-4094
Port Vlans allowed and active in management domain
Et0/0 1,10,20
Port Vlans in spanning tree forwarding state and not pruned
Et0/0 1,10,20
E0/0封装的Trunk协议是dot1q,当前的状态是trunking。
步骤4:网络连通性测试
测试PC1和PC3的连通性:
PC1> ping 10.1.1.2
84 bytes from 10.1.1.2 icmp_seq=1 ttl=64 time=1.603 ms
84 bytes from 10.1.1.2 icmp_seq=2 ttl=64 time=1.234 ms
84 bytes from 10.1.1.2 icmp_seq=3 ttl=64 time=1.027 ms
84 bytes from 10.1.1.2 icmp_seq=4 ttl=64 time=2.372 ms
84 bytes from 10.1.1.2 icmp_seq=5 ttl=64 time=1.200 ms
PC1和PC3的网络连通性正常。
测试PC2和PC4的连通性:
PC2> ping 10.1.2.2
84 bytes from 10.1.2.2 icmp_seq=1 ttl=64 time=0.887 ms
84 bytes from 10.1.2.2 icmp_seq=2 ttl=64 time=0.932 ms
84 bytes from 10.1.2.2 icmp_seq=3 ttl=64 time=1.295 ms
84 bytes from 10.1.2.2 icmp_seq=4 ttl=64 time=0.926 ms
84 bytes from 10.1.2.2 icmp_seq=5 ttl=64 time=1.011 ms
PC2和PC4的网络连通性正常。
思科交换机如何配置Trunk?相关推荐
- Boson Netsim 思科交换机仿真 配置VLAN和TRUNK
目录 内容和步骤 1. 绘制实验拓扑图 2. 配置交换机基本参数 3. 配置交换机VLAN和TRUNK 问题讨论 总结 内容和步骤 1. 绘制实验拓扑图 绘图时,遵循"够用为度"的 ...
- CCNA重点难点:思科交换机生成树配置
后台收到粉丝留言说讲一下生成树的配置,小微作为一个宠粉专业户,这还不快分分钟安排上,所以小伙伴们有想学想看的知识点都可以留言给小微,小微加更都会安排上~ 附上:教学视频+技术文档哦,你就说棒不棒,哈 ...
- 思科交换机Vlan配置以及VLAN应用场景
VLAN相关学习视频:超简单的[思科交换机Vlan配置]https://www.zhihu.com/zvideo/1446489190669803520https://www.zhihu.com/zv ...
- 思科交换机接口配置trunk_Cisco交换机配置VLAN与TRUNK
0x00前言: 今日在学校里学习了如何搭建vlan和配置等等还有trunk. 由于快下课了.尽快写. 0x01准备: Cisco模拟器 0x02正文: 要求: VLAN 10 左边的IP:192.16 ...
- 思科交换机 3560配置
思科3560交换机配置实例 前提准备工作 第一步:建立本地配置环境,只需将计算机(或终端)的串口通过标准RS-232电缆与此Catalyst 3560设备的Console口连接 第二步:在计算机上运行 ...
- 中兴交换机配置telnet连接_原创:思科交换机常用配置
一.交换机的配置方式 1.Console 将配置电缆的DB-9(或DB-25)孔式插头 接到要对交换机进行配置的微机或终端的串口上. 首先启动超级终端,点击windows的开始→程序→附件→通讯→超级 ...
- 思科交换机接口配置trunk_交换机之间trunk端口的设置问题
我用路由器实现vlan之间的互访,如图: (R1)------(SW1)------(PC1) //PC1属于vlan2,属于192.168.2.0网段 | | (SW2)------(PC2) / ...
- 思科交换机VTP配置
通常情况下,我们需要在整个园区网或者企业网中的一组的交换机中保持VLAN数据库的同步,以保证所有交换机都能从数据帧中读取相关的VLAN信息进行正确的数据转发,然而对于大型网络来说,可能有成百上千台交换 ...
- 思科交换机基本配置实例讲解《一》
1.基本概念介绍 IOS: 互联网操作系统,也就是交换机和路由器中用的操作系统 VLAN: 虚拟lan VTP: VLAN TRUNK PROTOCOL DHCP: ...
最新文章
- 用C语言解“二分法求多项式单根”题
- 看到一个flash做的超酷网站
- day05 Spring中自定义注解的用处-之获取自定义的Servie
- J-Link该如何升级固件?
- impala操作hive数据实例
- 【python】热力图绘制: intensity_heatmap,density_heatmap
- python读取url中存储的数据_Python实现从URL地址提取文件名的方法
- JSP面试题都在这里
- js创建对象,用函数实现对象创建,并实现内函数共享
- 安卓Activity劫持与反劫持
- 关于KERNEL_SECURITY_CHECK_FAILURE蓝屏(BSOD)0x00000139错误解决思路
- c语言考研必刷题小程序,小程序推荐:大学生必备刷题小程序,内容涵盖各种证书考试题型...
- 计算机课件制作,多媒体课件制作photoshop和powerpoint教案
- hive优化:大表关联数据倾斜问题
- 2022-2028全球与中国脚踏泵市场现状及未来发展趋势
- 【IoT】蓝牙 GAP 和 GATT 协议简析
- 庄子 “唯至人乃能游于世不避,顺人而不失己。”
- C++编程 一个正整数的立方和
- 亢奋、焦虑、担忧,EOS拥趸者的无眠23小时
- 如何分析和研究Log文件 ,如何看日志信息