思科交換機建立vlan的命令是什麼??
阿新 • • 發佈:2019-02-05
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
::::::::