内容发布更新时间 : 2024/11/19 7:49:58星期一 下面是文章的全部内容请认真阅读。
#进入系统视图
#显示当前配置的所有vlan [Quidway] display vlan all The following static VLANs exist: 1(default), 2-4092, 4094 #显示静态配置的vlan
[Quidway] display vlan static The following static VLANs exist: 1(default), 2-4092, 4094 #显示vlan10信息
[Quidway]display vlan 10
The specified VLAN does not exist. #新建一个vlan20,并进入vlan20视图 [Quidway]vlan 20
#指定VLAN端口,动态vlan划分时不需要指定 [Quidway-vlan20] port ethernet 0/2 to ethernet 0/5
#给VLAN指定IP地址 (三层交换机才可以设置VLAN IP 我们的交换机做不了) [Quidway-vlan20] interface vlan-interface 20
[Quidway-vlan-interface20] ip address 192.169.1.251 255.255.0.0 [Quidway-vlan-interface20] save [Quidway-vlan-interface20] quit #显示vlan20信息
[Quidway] display vlan 20 VLAN ID: 20
VLAN Type: static
Route Interface: configured IP Address: 192.169.1.251 Subnet Mask: 255.255.0.0 Description: GuestVlan Name: VLAN 0069 Tagged Ports: none Untagged Ports:
Ethernet0/2 Ethernet0/3
Ethernet0/4 Ethernet0/5 添加端口为trunk口 进入到指定端口下面
[Quidway]interface Ethernet0/1
[Quidway interface Ethernet0/1]port link-type trunk
[Quidway interface Ethernet0/1]port trunk pemit vlan10 20
查看vlan
[Quidway] display vlan all 查看当前交换机配置 [Quidway] display cur 查看当前交换机端口配置 [Quidway] display interface all 查看MAC地址
[Quidway] display mac