Vlan Mac Address Type Ports
---- ----------- -------- -----
1 0001.9780.6173 DYNAMIC Fa0/1
1 0004.9a08.4ce0 DYNAMIC Fa0/2
1 00e0.f726.7d02 DYNAMIC Fa0/2
3S(config-if)#switch trunk encapsulation dot1q
// 这句话的作用是什么???
创建一个vlan的命令:
3S(config-if)#exit
3S(config)#vlan 10
3S(config-vlan)#?
VLAN configuration commands:
exit Apply changes, bump revision number, and exit mode
name Ascii name of the VLAN
no Negate a command or set its defaults
3S(config-vlan)#name vlan10
3S(config-vlan)#exit
3S(config)#interface f0/1
3S(config-if)#switch mode access
3S(config-if)#switchport access vlan 10
3S(config-if)#exit
3S(config)#exit
3S#
%SYS-5-CONFIG_I: Configured from console by console
3S#write
Building configuration...
[OK]
3S#logout
那么如何在全局模式下,创建vlan呢???
:
vlan vlannumber
name vlanname
exit
::::::
创建好之后,在添加:
interface f 0/1
switch mode access
switchport access vlan vlannumber
exit
::::::::
---- ----------- -------- -----
1 0001.9780.6173 DYNAMIC Fa0/1
1 0004.9a08.4ce0 DYNAMIC Fa0/2
1 00e0.f726.7d02 DYNAMIC Fa0/2
3S(config-if)#switch trunk encapsulation dot1q
// 这句话的作用是什么???
创建一个vlan的命令:
3S(config-if)#exit
3S(config)#vlan 10
3S(config-vlan)#?
VLAN configuration commands:
exit Apply changes, bump revision number, and exit mode
name Ascii name of the VLAN
no Negate a command or set its defaults
3S(config-vlan)#name vlan10
3S(config-vlan)#exit
3S(config)#interface f0/1
3S(config-if)#switch mode access
3S(config-if)#switchport access vlan 10
3S(config-if)#exit
3S(config)#exit
3S#
%SYS-5-CONFIG_I: Configured from console by console
3S#write
Building configuration...
[OK]
3S#logout
那么如何在全局模式下,创建vlan呢???
:
vlan vlannumber
name vlanname
exit
::::::
创建好之后,在添加:
interface f 0/1
switch mode access
switchport access vlan vlannumber
exit
::::::::