惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
Hugging Face - Blog
Hugging Face - Blog
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
B
Blog
小众软件
小众软件
T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
I
InfoQ
Engineering at Meta
Engineering at Meta
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
H
Help Net Security
雷峰网
雷峰网
S
SegmentFault 最新的问题
V
Visual Studio Blog
爱范儿
爱范儿

博客园 - kyovcs

通用连接数据库的C#类 感受 C# 3.0 的优雅 用FLASHMX连结ASPX的方式 防止SQL注入漏洞 VLAN间路由实验 配置RIPv2(Enabling Rip v2) Cisco IOS 基本命令集 CCNA课堂精简笔记 .NET委托:一个C#睡前故事 C#学习笔记 最少步骤:N变1 取胜之道 点灯游戏算法 关于被整除问题 八方块移动游戏 Visual C# 诠释常用排序算法 A*寻路初探 线索二叉树(C# 2.0) 二叉树遍历算法实现(C#2.0)
使用TRUNK连接多台交换机VLAN(Vlan + Trunk)
kyovcs · 2007-10-20 · via 博客园 - kyovcs


注意:使用了路由器去模拟
PC主机

步骤一:配置各PCIP地址。
步骤二:在pc1ping其它的主机结果是全部通的。
步骤三:将switch1switch2fa0/12的直连接口指定为干道

sw1(config)#inte fa0/12
sw1(config-if)#switchport trunk encapsulation dot1q
sw1(config-if)#switchport mode trunk
sw1(config-if)#exit

sw2(config)#inte fa0/12
sw2(config-if)#switchport trunk encapsulation dot1q
sw2(config-if)#switchport mode trunk
sw2(config-if)#exit

步骤四:使用show interface trunkshow interface fa0/12 switchport命令查看确认干道

sw1#show interfaces trunk

Port      Mode         Encapsulation  Status        Native vlan
Fa0/12     on           802.1q          trunking      1

Port      Vlans allowed on trunk
Fa0/12     none

Port      Vlans allowed and active in management domain
Fa0/12     none

Port      Vlans in spanning tree forwarding state and not pruned
Fa0/12     none


sw2#show interfaces fastethernet0/12 switchport

Name: Fa0/12
Switchport:     Enabled
Administrative mode: trunk
Operational mode: trunk
Administrative Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001

Protected: false

Voice vlan: none (Inactive)
Appliance trust: none

步骤三:在switch1switch2上创建vlan 10 vlan 20,并将端口按图加入到相应的VLAN
步骤四:使用ping去确认

      

PC1              PC2              PC5              PC6 可以相互PING



PC3              PC4              PC7              PC8 可以相互PING