trunk配置命令(交换机端口10设置为trunk端口需要三步,分别对应的命令为)

本文目录
- 交换机端口10设置为trunk端口需要三步,分别对应的命令为
- cisco二层交换机和三层交换机怎么设置trunk
- 锐捷交换机配置vlan和trunk的主要命令
- Cisco交换机Trunk配置命令!
- 思科2960交换机配置命令都有哪些
交换机端口10设置为trunk端口需要三步,分别对应的命令为
拿cisco交换机为例吧
interface gi1/0/10
switchport mode trunk
switchport trunk allow vlan all
cisco二层交换机和三层交换机怎么设置trunk
cisco二层交换机设置trunk:
S1》enable //进入特权模式
S1#config terminal //进入全局配置模式
S1(config)# interface vlan [vlanID] //进入vlan端口
S1(config-if)#switchport mode trunk //端口设置为trunk模式
三层交换机设置trunk:
S1》enable //进入特权模式
S1#config terminal //进入全局配置模式
S1(config)# interface vlan [vlanID] //进入vlan端口
S1(config-if)#switchport trunk encapsulation dot1q //封装协议
S1(config-if)#Switchport mode trunk //端口设置为trunk模式
扩展资料
交换机常见命令:
S1(config-if)#switchport trunk native vlan [vlanID] //设置为本征vlan
S1(config-if)#switchport trunk allowed vlan word/add/all/except/none/remove
//运行哪些vlan在本征vlan通信
S1(config-if)# do show interface trunk //查看端口trunk
S1#Show interface trunk //查看中继接口状态
S1#Show vlan brief //查看VLAN摘要信息
锐捷交换机配置vlan和trunk的主要命令
来自锐捷工程师的回答:
步骤一:给交换机配置IP地址
S2724G#conf
S2724G(config)#int vlan 1
S2724G(config-if)#ip addess 192.168.0.100 255.255.255.0
----给VLAN 1配置IP地址
S2724G(config-if)#no shutdown ----激活该VLAN接口
S2724G(config-if)#exit
S2724G(config)#ip default-gateway 192.168.0.1 ----指定交换机的网关地址
步骤二:创建VLAN
S2724G#conf
S2724G(config)#vlan 10 ----创建VLAN 10
S2724G(config-vlan)#exit
S2724G(config)# vlan 20 ----创建VLAN 20
S2724G(config-vlan)#exit
步骤三:把相应接口指定到相应的VLAN中
S2724G(config)#int gi 0/10
S2724G(config-if)#switch access vlan 10
----把交换机的第10端口划到VLAN 10中
S2724G(config-if)#exit
S2724G(config)#int gi 0/20
S2724G(config-if)#switch access vlan 20
----把交换机的第20端口划到VLAN 20中
S2724G(config-if)#exit
S2724G(config)#int gi 0/24
S2724G(config-if)#switch mode trunk
----设置24口为Trunk模式(与三层交换机的连接口
S2724G(config-if)#
步骤四:保存配置
S2724G(config-if)#end
S2724G#write
Cisco交换机Trunk配置命令!
1.(config)#int
f0/0
//进入相应接口,如果是多个接口可以使用命令
int
range
f0/
0
-
n
2.(config-if)#switchport
trunk
encapsulation
{dot1q|isl
}//封装dot1q或者isl(isl为思科私有,dot1q是802.1q,通用)
3.(config-if)#switchport
mode
trunk
//配置端口为trunk类型
4.(config-if)#switchport
trunk
allowed
vlan
all
//trunk允许所有vlan的流量通过
注意:2和3顺序不可颠倒
思科2960交换机配置命令都有哪些
思科2960交换机配置命令如下:
1、access: 主要用来接入终端设备,如PC机、服务器、打印服务器等。
2、trunk: 主要用在连接其它交换机,以便在线路上承载多个vlan。
3、multi: 在一个线路中承载多个vlan,但不像trunk,它不对承载的数据打标签。主要用于接入支持多vlan的服务器或者一些网络分析设备。现在基本不使用此类接口,在cisco的网络设备中,也基本不支持此类接口了。
扩展资料:
交换机口令设置:
1、switch》enable;进入特权模式、switch#configterminal;进入全局配置模式、switch(config)#hostname;设置交换机的主机名。
2、switch(config)#enablesecretxxx;设置特权加密口令、switch(config)#enablepasswordxxa;设置特权非密口令。
3、switch(config)#lineconsole0;进入控制台口、switch(config-line)#linevty04;进入虚拟终端。
4、switch(config-line)#login;允许登录、switch(config-line)#passwordxx;设置登录口令xx、switch#exit;返回命令。

更多文章:
majority of(the majority of 和 a majority of的区别以及用法例句)
2026年10月11日 07:40
another time(another time和other time的区别)
2026年10月11日 05:00







