1、vlan划分实例vlan划分实例 3560-24ps 三层交换机配置:core#show runBuilding configuration. Current configuration : 1322 bytes!version 12.2no service password-encryption!hostname core!ip ssh version 1!port-channel load-balance src-mac!interface FastEthernet0/1 switchport mode trunk (配置f0/1为trunk)!interface FastEthernet
2、0/2 switchport access vlan 2 (配置f0/2为vlan 2)!interface FastEthernet0/3 switchport mode trunk interface FastEthernet0/4!interface FastEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0/10!interface FastEthernet0/
3、11 interface FastEthernet0/12!interface FastEthernet0/13!interface FastEthernet0/14!interface FastEthernet0/15!interface FastEthernet0/16!interface FastEthernet0/17!interface FastEthernet0/18!interface FastEthernet0/19!interface FastEthernet0/20interface FastEthernet0/21!interface FastEthernet0/22!i
4、nterface FastEthernet0/23 switchport mode trunk!interface FastEthernet0/24!interface GigabitEthernet0/1!interface GigabitEthernet0/2!interface Vlan1 no ip address shutdown!interface Vlan2 ip address 192.168.1.254 255.255.255.0 (配置vlan 2 IP地址)! interface Vlan3 ip address 192.168.2.254 255.255.255.0 (
5、vlan 3 IP 地址)!interface Vlan4 ip address 192.168.3.254 255.255.255.0!ip classless line con 0line vty 0 4 login!end core#show vtp sta VTP Version : 2Configuration Revision : 12Maximum VLANs supported locally : 1005Number of existing VLANs : 8VTP Operating Mode : ServerVTP Domain Name : abcVTP Pruning
6、 Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x9F 0xDF 0x07 0xA4 0xD7 0x51 0x52 0x0A Configuration last modified by 0.0.0.0 at 3-1-93 00:00:00Local updater ID is 192.168.1.254 on interface Vl2 (lowest numbered VLAN interface found) 配置VTP模式,vtp domain name 为 abc m
7、ode: Server 2960 -24 SW2 交换机的配置:Switch>enSwitch#show runBuilding configuration. Current configuration : 1000 bytes!version 12.2no service password-encryption!hostname Switch!interface FastEthernet0/1!interface FastEthernet0/2 (配置f0/2为trunk模式) switchport mode trunk!interface FastEthernet0/3!interf
8、ace FastEthernet0/4!interface FastEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0/10!interface FastEthernet0/11!interface FastEthernet0/12!interface FastEthernet0/13!interface FastEthernet0/14!interface FastE
9、thernet0/15!interface FastEthernet0/16!interface FastEthernet0/17!interface FastEthernet0/18!interface FastEthernet0/19!interface FastEthernet0/20!interface FastEthernet0/21!interface FastEthernet0/22 (配置f0/22端口属于vlan 3) switchport access vlan 3!interface FastEthernet0/23 (配置f0/23端口属于vlan 3) switchp
10、ort access vlan 3!interface FastEthernet0/24!interface GigabitEthernet1/1!interface GigabitEthernet1/2!interface Vlan1 no ip address shutdown!line con 0!line vty 0 4 loginline vty 5 15 login!end witch#show vtp statVTP Version : 2Configuration Revision : 12Maximum VLANs supported locally : 255Number
11、of existing VLANs : 8VTP Operating Mode : ClientVTP Domain Name : abcVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x9F 0xDF 0x07 0xA4 0xD7 0x51 0x52 0x0A Configuration last modified by 0.0.0.0 at 3-1-93 00:00:00配置vtp mode:ClientVTP Domain Name:abc 2960
12、 -24 SW3 交换机的配置: Switch>enSwitch#show runBuilding configuration. Current configuration : 1000 bytes!version 12.1no service password-encryption!hostname Switch!interface FastEthernet0/1!interface FastEthernet0/2!interface FastEthernet0/3 switchport mode trunk!interface FastEthernet0/4!interface Fa
13、stEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0/10!interface FastEthernet0/11!interface FastEthernet0/12!interface FastEthernet0/13!interface FastEthernet0/14!interface FastEthernet0/15!interface FastEthern
14、et0/16!interface FastEthernet0/17!interface FastEthernet0/18!interface FastEthernet0/19!interface FastEthernet0/20!interface FastEthernet0/21!interface FastEthernet0/22 switchport access vlan 4!interface FastEthernet0/23 switchport access vlan 4!interface FastEthernet0/24!interface GigabitEthernet1/
15、1!interface GigabitEthernet1/2!interface Vlan1 no ip address shutdown!line con 0!line vty 0 4 loginline vty 5 15 login!end Switch#show vtp staVTP Version : 2Configuration Revision : 12Maximum VLANs supported locally : 255Number of existing VLANs : 8VTP Operating Mode : ClientVTP Domain Name : abcVTP
16、 Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x9F 0xDF 0x07 0xA4 0xD7 0x51 0x52 0x0A Configuration last modified by 0.0.0.0 at 3-1-93 00:00:00 IP地址配置:Server0: IP地址: 192.168.1.1 子网掩码:255.255.255.0 默认网关:192.168.1.254PC0: IP地址: 192.168.2.1 子网掩码:255.255.255.0 默认网关:192.168.2.254 PC2:IP地址: 192.168.2.2 子网掩码: 255.255.255.0 默认网关:192.168.2.254 PC1: IP地址: 192.168.3.1 子网掩码:255.255.255.0 默认网关:192.168.3.254PC3: IP地址: 192.168.3.2 子网掩码: 255.255.255.0 默认网关: 192.168.3.254 经测试3个vlan互相能ping通。 OK! 实验到此结束。
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1