1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
--More--
Switch2
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vlan 2
Switch(config-vlan)#exit
Switch(config)#vlan 3
Switch(config-vlan)#exit
Switch(config)#int fa 0/1
Switch(config-if)#switch access vlan 2
Switch(config-if)#exit
Switch(config)#int fa 0/2
Switch(config-if)#switch access vlan 3
Switch(config-if)#exit
Switch(config)#int fa 0/24
Switch(config-if)#switch mode trunk
Switch(config-if)#end
Switch#
%SYS-5-CONFIG_I: Configured from console by console
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Gig1/1, Gig1/2
2 VLAN0002 active Fa0/1
3 VLAN0003 active Fa0/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
--More--
![交换机划分 VLAN 配置](http://img.jiangsulong.com/220411/14332S610-4.png)
文章插图
PC>ipconfig
IP Address......................: 192.168.1.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.1
PC>ping 192.168.1.3
Pinging 192.168.1.3 with 32 bytes of data:
Request timed out.
Request timed out.
Ping statistics for 192.168.1.3:
Packets: Sent = 2, Received = 0, Lost = 2 (100% loss),
Control-C
^C
PC>ping 192.168.1.4
Pinging 192.168.1.4 with 32 bytes of data:
Reply from 192.168.1.4: bytes=32 time=16ms TTL=128
Reply from 192.168.1.4: bytes=32 time=17ms TTL=128
Reply from 192.168.1.4: bytes=32 time=15ms TTL=128
Reply from 192.168.1.4: bytes=32 time=18ms TTL=128
Ping statistics for 192.168.1.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 15ms, Maximum = 18ms, Average = 16ms
PC>ipconfig
IP Address......................: 192.168.1.3
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.1
PC>ping 192.168.1.4
Pinging 192.168.1.4 with 32 bytes of data:
Request timed out.
Ping statistics for 192.168.1.4:
Packets: Sent = 2, Received = 0, Lost = 2 (100% loss),
Control-C
^C
PC>ping 192.168.1.5
Pinging 192.168.1.5 with 32 bytes of data:
Reply from 192.168.1.5: bytes=32 time=16ms TTL=128
Reply from 192.168.1.5: bytes=32 time=15ms TTL=128
Reply from 192.168.1.5: bytes=32 time=16ms TTL=128
Reply from 192.168.1.5: bytes=32 time=15ms TTL=128
Ping statistics for 192.168.1.5:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 15ms, Maximum = 16ms, Average = 15ms
本文原创地址:https://www.linuxprobe.com/switch-vlan-configuration.html 编辑:传棋,审核员:逄增宝
推荐阅读
- 根据交换机的工作原理可知,交换机可以多个端口对之间的数据传输
- 一文讲弄懂什么是vlan、三层交换机、网关、子网掩码
- 路由交换技术—VLAN原理及配置
- 图文并茂 VLAN 详解,让你看一遍就理解 VLAN
- IP地址如何分类 ABC类IP是怎么划分的?
- 交换机与路由器的区别
- 淘宝店铺级别的等级划分 淘宝的店家等级
- 网管型交换机比普通交换机多了哪些功能
- 交换机的三种接口类型,接收和转发方式
- 网络安全之交换机常见的VLAN跳跃攻击和生成树攻击原理