system-view
session 1 華為交換機端口模式
一、華為交換機端口分為三種模式:access、trunk、hybird
1、access端口,用於連接主機,pvid就是該端口所屬的vlan號,只能屬於一個vlan
2、trunk端口,用於交換機之間連接,默認pvid是vlan1,不屬於任何vlan
3、hybird端口,是一種特殊的端口類型,默認pvid是vlan1,不屬於任何vlan,是交換機端口的默認模式
————————————————
單個端口加入到vlan:
interface GigabitEthernet 0/0/25
port link-type access
port default vlan 999
display this
display arp
修改端口Ethernet 0/0/1的vlan
interface Ethernet 0/0/1
display this
port link-type access
port default vlan1
port link-type access
port default vlan3
端口interface GigabitEthernet0/0/2,屬於trunk類型,pvid 為2
port link-type trunk
port trunk pvid vlan 2
端口pvid可以直接改為vlan3
port link-type trunk
port trunk pvid vlan 3