HCNA-8 VLAN基础配置 <Huawei>clocktimezone BJ add 8:00:00 <Huawei>clockdatetime 16:01 2020-04-28 <Huawei>system-view [Huawei]sysnamesw2 [sw2]vlan 10 //创建VLAN [sw2-vlan10]descriptionmarketing //VLAN描述 [sw2-vlan10]vlan20 [sw2-vlan20]descriptionit [sw2-vlan20]quit [sw2]interfaceGigabitEthernet 0/0/1 //接口视图 [sw2-GigabitEthernet0/0/1]undonegotiation auto //不执行自协商 [sw2-GigabitEthernet0/0/1]duplexfull //全双工 [sw2-GigabitEthernet0/0/1]speed1000 //速率1000M [sw2-GigabitEthernet0/0/1]portlink-type access //接口链路类型 访问 [sw2-GigabitEthernet0/0/1]portdefault vlan 10 //接口默认VLAN [sw2-GigabitEthernet0/0/1]quit [sw2]interfaceGigabitEthernet 0/0/2 [sw2-GigabitEthernet0/0/2]undonegotiation auto [sw2-GigabitEthernet0/0/2]duplexfull [sw2-GigabitEthernet0/0/2]speed1000 [sw2-GigabitEthernet0/0/2]portlink-type access [sw2-GigabitEthernet0/0/2]portdefault vlan 10 [sw2-GigabitEthernet0/0/2]quit [sw2]interfaceGigabitEthernet 0/0/3 [sw2-GigabitEthernet0/0/3]undonegotiation auto [sw2-GigabitEthernet0/0/3]duplexfull [sw2-GigabitEthernet0/0/3]speed1000 [sw2-GigabitEthernet0/0/3]portlink-type access [sw2-GigabitEthernet0/0/3]portdefault vlan 20 [sw2-GigabitEthernet0/0/3]quit [sw2]interfaceGigabitEthernet 0/0/24 [sw2-GigabitEthernet0/0/24]undonegotiation auto [sw2-GigabitEthernet0/0/24]duplexfull [sw2-GigabitEthernet0/0/24]speed1000 [sw2-GigabitEthernet0/0/24]portlink-type trunk [sw2-GigabitEthernet0/0/24]porttrunk allow-pass vlan all [sw2-GigabitEthernet0/0/24]quit [sw2]displayvlan //查看VLAN [sw2]displayport vlan active //查看接口VLAN激活状态 [sw2]return <sw2>save
<Huawei>clocktimezone BJ add 8:00:00 <Huawei>clockdatetime 16:15 2020-04-28 <Huawei>system-view [Huawei]sysnamesw3 [sw3]vlanbatch 20 30 //批量创建VLAN [sw3-vlan20]descriptionit [sw3-vlan30]descriptionproject [sw3-vlan30]quit [sw3]port-groupgroup-member GigabitEthernet 0/0/1 to gigabitethernet 0/0/3 //接口组 组成员 [sw3-port-group]undonegotiation auto [sw3-port-group]duplexfull [sw3-port-group]speed1000 [sw3-port-group]portlink-type access [sw3-port-group]quit [sw3]interfaceGigabitEthernet 0/0/3 [sw3-GigabitEthernet0/0/1]portdefault vlan 20 [sw3-GigabitEthernet0/0/1]quit [sw3]port-groupgroup-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 [sw3-port-group]portdefault vlan 30 [sw3]interfaceGigabitEthernet 0/0/24 [sw3-GigabitEthernet0/0/24]undonegotiation auto [sw3-GigabitEthernet0/0/24]duplexfull [sw3-GigabitEthernet0/0/24]speed1000 [sw3-GigabitEthernet0/0/24]portlink-type trunk [sw3-GigabitEthernet0/0/24]porttrunk allow-pass vlan all [sw3-GigabitEthernet0/0/24]quit [sw3]displayvlan [sw3]displayport vlan active [sw3]return <sw3>save
<Huawei>clocktimezone BJ add 8:00:00 <Huawei>clockdatetime 16:40 2020-04-28 <Huawei>system-view [Huawei]sysnamesw1 [sw1]vlan10 [sw1-vlan10]descriptionmarketing [sw1-vlan10]vlan20 [sw1-vlan20]descriptionit [sw1-vlan20]vlan30 [sw1-vlan30]descriptionproject [sw1-vlan30]quit [sw1]port-groupgroup-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 [sw1-port-group]undonegotiation auto [sw1-port-group]duplexfull [sw1-port-group]speed1000 [sw1-port-group]portlink-type trunk [sw1-port-group]porttrunk allow-pass vlan all [sw1-port-group]quit [sw1]displayvlan [sw1]displayport vlan active [sw1]return <sw1>save |