3560-24ps 三层交换机配置:
core#show run
Building configuration...
Current configuration : 1322 bytes
!
version 12.2
no 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 FastEthernet0/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/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/20
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface 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 (vlan 3 IP 地址)
!
interface Vlan4
ip address 192.168.3.254 255.255.255.0
!
ip classless
line con 0
line vty 0 4
login
!
!
end
core#show vtp sta
VTP Version : 2
Configuration Revision : 12
Maximum VLANs supported locally : 1005
Number of existing VLANs : 8
VTP Operating Mode : Server
VTP Domain Name : abc
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x9F 0xDF 0x07 0xA4 0xD7 0x51 0x52 0x0A
Configuration last modified by 0.0.0.0 at
Local updater ID is 192.168.1.254 on interface Vl2 (lowest numbered VLAN interface found)
配置VTP模式,vtp domain name 为 abc mode: Server
2960 -24 SW2 交换机的配置:
Switch>en
Switch#show run
Building configuration...
Current configuration : 1000 bytes
!
version 12.2
no service password-encryption
!
hostname Switch
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2 (配置f0/2为trunk模式)
switchport mode trunk
!
interface FastEthernet0/3
!
interface 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 FastEthernet0/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)
switchport 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
login
line vty 5 15
login
!
!
end
witch#show vtp stat
VTP Version : 2
Configuration Revision : 12
Maximum VLANs supported locally : 255
Number of existing VLANs : 8
VTP Operating Mode : Client
VTP Domain Name : abc
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x9F 0xDF 0x07 0xA4 0xD7 0x51 0x52 0x0A
Configuration last modified by 0.0.0.0 at
配置vtp mode:Client
VTP Domain Name:abc
2960 -24 SW3 交换机的配置:
Switch>en
Switch#show run
Building configuration...
Current configuration : 1000 bytes
!
version 12.1
no service password-encryption
!
hostname Switch
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/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/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/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
switchport access vlan 4
!
interface FastEthernet0/23
switchport access vlan 4
!
interface FastEthernet0/24
!
interface GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
no ip address
shutdown
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end
Switch#show vtp sta
VTP Version : 2
Configuration Revision : 12
Maximum VLANs supported locally : 255
Number of existing VLANs : 8
VTP Operating Mode : Client
VTP Domain Name : abc
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x9F 0xDF 0x07 0xA4 0xD7 0x51 0x52 0x0A
Configuration last modified by 0.0.0.0 at
IP地址配置:
Server0:
IP地址: 192.168.1.1
子网掩码:255.255.255.0
默认网关:192.168.1.254
PC0:
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.254
PC3:
IP地址: 192.168.3.2
子网掩码: 255.255.255.0
默认网关: 192.168.3.254
经测试3个vlan互相能ping通。
OK! 实验到此结束。
联系客服