批量创建Vlan11-20,并将交换机端口1-10分别加入到Vlan中,设置为ass口,
[Quidway] system-view //进入配置视图
[Quidway] sysname SwitchA //给交换机命名
[SwitchA] vlan batch 11 to 20 //同时创建vlan11到vlan20
[SwitchA] interface ethernet 0/0/1 //进入端口0/0/1
[SwitchA-Ethernet0/0/1] port link-type access //设置端口模式为access
[SwitchA-Ethernet0/0/1] port default vlan 2 //将端口加入vlan2中
[SwitchA-Ethernet0/0/1] quit //退出
[SwitchA] interface ethernet 0/0/2 //进入端口0/0/2
[SwitchA-Ethernet0/0/2] port link-type access //端口模式为access
[SwitchA-Ethernet0/0/2] port default vlan 3 //将端口加入vlan3中
[SwitchA-Ethernet0/0/2] quit //退出
一直把剩余端口加完;
再把千兆25口改成trunk 口,并只允许Vlan11-20通过;
[Quidway]interface GigabitEthernet 0/0/1 //进入对应端口
[Quidway-GigabitEthernet0/0/1]undo port default vlan //删除默认的vlan1,不删除默认vlan,无法改端口模式会报错。
[Quidway-GigabitEthernet0/0/1]port link-type trunk //把端口改成 trunk模式
[Quidway-GigabitEthernet0/0/1]port trunk allow-pass vlan 11 to 20 //只允许vlan11-20通过
交换机11-24端口和千兆端口26号划分到vlan1,做成一个交换机备用。
<Quidway>sa 保存参数,
[Quidway]dis cu 检查相应参数,完成设置。
[Quidway]dis cu
sysname Quidway
vlan batch 1 to 2 11 to 20
bpdu enable
cluster enable ntdp enable ntdp hop 16 ndp enable
voice-vlan mac-address 0001-e300-0000 mask ffff-ff00-0000 description Simens phone voice-vlan mac-address 0003-6b00-0000 mask ffff-ff00-0000 description Cisco phone voice-vlan mac-address 0004-0d00-0000 mask ffff-ff00-0000 description Avaya phone voice-vlan mac-address 0060-b900-0000 mask ffff-ff00-0000 description Philips/NEC phone voice-vlan mac-address 00d0-1e00-0000 mask ffff-ff00-0000 description Pingtel phone voice-vlan mac-address 00e0-7500-0000 mask ffff-ff00-0000 description Polycom phone voice-vlan mac-address 00e0-bb00-0000 mask ffff-ff00-0000 description 3com phone
interface Vlanif1
interface Ethernet0/0/1
port link-type access
port default vlan 11
ntdp enable ndp enable
interface Ethernet0/0/2
port link-type access
port default vlan 12
ntdp enable ndp enable
interface Ethernet0/0/3
port link-type access
port default vlan 13
ntdp enable ndp enable
interface Ethernet0/0/4
port link-type access
port default vlan 14
ntdp enable ndp enable
interface Ethernet0/0/5
port link-type access
port default vlan 15
ntdp enable ndp enable
interface Ethernet0/0/6 port link-type access port default vlan 16 ntdp enable ndp enable
interface Ethernet0/0/7 port link-type access port default vlan 17 ntdp enable ndp enable
interface Ethernet0/0/8 port link-type access port default vlan 18 ntdp enable ndp enable
interface Ethernet0/0/9 port link-type access port default vlan 19 ntdp enable ndp enable
interface Ethernet0/0/10 port link-type access port default vlan 20 ntdp enable ndp enable
interface Ethernet0/0/11 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/12 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/13 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/14 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/15 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/16 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/17 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/18 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/19 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/20 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/21 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/22 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/23 port default vlan 1 ntdp enable ndp enable
interface Ethernet0/0/24 port default vlan 1 ntdp enable ndp enable
interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 11 to 20 ntdp enable ndp enable
interface GigabitEthernet0/0/2 port default vlan 1 ntdp enable ndp enable
interface NULL0
aaa authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
user-interface con 0 user-interface vty 0 4
return [Quidway]
完成。
标签:enable,EI,default,Ethernet0,vlan,汇聚,ntdp,port From: https://blog.51cto.com/u_13920733/8009309