路由交换学习第七天:交换机之间trunk_PC和路由器通信
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了路由交换学习第七天:交换机之间trunk_PC和路由器通信相关的知识,希望对你有一定的参考价值。
R1配置:
[HW-R1]interface GigabitEthernet 0/0/1 //配置1口
[HW-R1-GigabitEthernet0/0/1]ip address 10.10.10.1 24 //配置1口IP
SW1:
[HW-SW1]vlan batch 8 to 12 99 //SW1批量创建VLAN8到12和99
[HW-SW1]int g0/0/1 //配置g0/0/1接口
[HW-SW1-GigabitEthernet0/0/1]port link-type access //G0/0/1端口模式是access
[HW-SW1-GigabitEthernet0/0/1]port default vlan 8 //G0/0/1端口加入到VLAN8
[HW-SW1-GigabitEthernet0/0/1]int g 0/0/3 //配置g0/0/3接口
[HW-SW1-GigabitEthernet0/0/3]port link-type trunk //G0/0/3端口模式是trunk
[HW-SW1-GigabitEthernet0/0/3]port trunk allow-pass vlan all //G0/0/3允许所有VLAN通过
[HW-SW1-GigabitEthernet0/0/3]display port vlan active //查看端口的VLAN状态
T=TAG U=UNTAG
Port Link Type PVID VLAN List
GE0/0/1 access 8 U: 8
GE0/0/2 hybrid 1 U: 1
GE0/0/3 trunk 99 U: 99
T: 1 8 to 12
======================================================
SW3:
[HW-SW3]vlan batch 8 to 12 99 //SW3批量创建VLAN8到12和99
[HW-SW3]interface g 0/0/3 //配置G0/0/3接口
[HW-SW3-GigabitEthernet0/0/3]port link-type trunk //配置G0/0/3接口为trunk
[HW-SW3-GigabitEthernet0/0/3]port trunk allow-pass vlan all //G0/0/3允许所有VLAN通过
[HW-SW3]int g0/0/10 //配置G0/0/10口
[HW-SW3-GigabitEthernet0/0/10]port link-type access //配置当前端口为access
[HW-SW3-GigabitEthernet0/0/10]port default vlan 8 //配置当前端口VLAN号为8
[HW-SW3-GigabitEthernet0/0/10]int g0/0/11 //配置G0/0/11口
[HW-SW3-GigabitEthernet0/0/11] port link-type access //配置当前端口为access
[HW-SW3-GigabitEthernet0/0/11] port default vlan 8 //配置当前端口VLAN号为8
[HW-SW3]dis port v a //查看端口的VLAN状态
T=TAG U=UNTAG----------------------------------------------------------
Port Link Type PVID VLAN List--------------------------------------------------------------GE0/0/1 hybrid 1 U: 1
GE0/0/2 hybrid 1 U: 1
GE0/0/3 trunk 99 U: 99
T: 1 8 to 12
GE0/0/4 hybrid 1 U: 1
GE0/0/5 hybrid 1 U: 1
GE0/0/6 hybrid 1 U: 1
GE0/0/7 hybrid 1 U: 1
GE0/0/8 hybrid 1 U: 1
GE0/0/9 hybrid 1 U: 1
GE0/0/10 access 8 U: 8
GE0/0/11 access 8 U: 8
~~
以上是关于路由交换学习第七天:交换机之间trunk_PC和路由器通信的主要内容,如果未能解决你的问题,请参考以下文章