Home | 简体中文 | 繁体中文 | 杂文 | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | Github | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

23.4. VLAN

23.4.1. define vlan id

console(config)#vlan database

console(config-vlan)#vlan 2-10
Warning: The use of large numbers of VLANs or interfaces may cause significant
delays in applying the configuration.


console(config-vlan)#

		

23.4.2. show vlan

console#show vlan

VLAN       Name                         Ports          Type      Authorization
-----  ---------------                  -------------  -----     -------------
1      Default                          ch1-24,        Default   Required
                                        1/g1-1/xg4
2                                                      Static    Required
3                                                      Static    Required
4                                                      Static    Required
5                                                      Static    Required
6                                                      Static    Required
7                                                      Static    Required
8                                                      Static    Required
9                                                      Static    Required
10                                                     Static    Required
		

23.4.3. interface vlan

		
console#configure

console(config)#interface vlan 2

console(config-if-vlan2)#ip address 192.168.0.1 255.255.255.0
		
		

23.4.4. interface ethernet

console(config)#interface ethernet 1/g5
console(config-if-1/g5)#switchport mode access
console(config-if-1/g5)#switchport access vlan 5
Warning: The use of large numbers of VLANs or interfaces may cause significant
delays in applying the configuration.

console(config-if-1/g5)#
		

23.4.5. Virtual LAN Routing Commands

console(config)#interface vlan 11

console(config-if-vlan11)#routing
		
console#vlan database

console(config-vlan)#vlan routing 10