实验任务和目标:
任务1.按照实验要求连接拓扑
任务2.配置VTP域:SWITCH1、SWITCH2为VTP SERVER并开启VLTP修剪;SWITCH3、SWITCH4为VTP CLIENT;并在SERVER上创建VLAN2、3、4
任务3.将SWITCH1配置为VLAN1、VLAN3的根桥,VLAN2、VLAN4的次根桥
将SWITCH2配置为VLAN2、VLAN4的根桥,VLAN1、VLAN3的次根桥
任务4.在VTP CLIENT上将接口配置进正确的VLAN
任务5.配置SWITCH1和SWITCH2之间的以太网通道
任务6.在SWITCH1、SWITCH2、ROUTER1上配置RIP路由协议
任务7.测试网络联通性:VLAN内PC连通性;VLAN间PC连通性;VLAN内PC与INTERNET连通性
操作过程及配置说明:
任务一、略。
任务二、
1.先将所有交换机与交换机相连的接口设置为trunk.
2.配置VTP域,命令如下:
sw1#vlan da
sw1(vlan)#vtp server
sw1(vlan)#vtp domain jiawei
Changing VTP domain name from NULL to jiawei
sw1(vlan)#exit
APPLY completed.
Exiting....
其他交换机同此设置一样,只是把 server 改为 client .
3.创建VLAN.
4.查看结果:
sw1#show vlan-switch
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/0, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13
2 VLAN0002 active
3 VLAN0003 active
4 VLAN0004 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
4 enet 100004 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0
sw4#show vtp status
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 256
Number of existing VLANs : 8
VTP Operating Mode : Client
VTP Domain Name : jiawei
VTP Pruning Mode : Enabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x1A 0xFA 0x53 0x76 0xCA 0x5E 0xCC 0xB4
Configuration last modified by 0.0.0.0 at 3-1-02 00:15:29
任务三、
sw1(config)#spanning-tree vlan 1 root primary
% This switch is already the root of VLAN1 spanning tree
VLAN 1 bridge priority set to 8192
VLAN 1 bridge max aging time unchanged at 20
VLAN 1 bridge hello time unchanged at 2
VLAN 1 bridge forward delay unchanged at 15
sw1(config)#spanning-tree vlan 3 root primary
% This switch is already the root of VLAN3 spanning tree
VLAN 3 bridge priority set to 8192
VLAN 3 bridge max aging time unchanged at 20
VLAN 3 bridge hello time unchanged at 2
VLAN 3 bridge forward delay unchanged at 15
sw1(config)#spanning-tree vlan 2 root secondary
VLAN 2 bridge priority set to 16384
VLAN 2 bridge max aging time unchanged at 20
VLAN 2 bridge hello time unchanged at 2
VLAN 2 bridge forward delay unchanged at 15
sw1(config)#spanning-tree vlan 4 root secondary
VLAN 4 bridge priority set to 16384
VLAN 4 bridge max aging time unchanged at 20
VLAN 4 bridge hello time unchanged at 2
VLAN 4 bridge forward delay unchanged at 15
sw2(config)#spanning-tree vlan 2 root primary
VLAN 2 bridge priority set to 8192
VLAN 2 bridge max aging time unchanged at 20
VLAN 2 bridge hello time unchanged at 2
VLAN 2 bridge forward delay unchanged at 15
sw2(config)#spanning-tree vlan 4 root primary
VLAN 4 bridge priority set to 8192
VLAN 4 bridge max aging time unchanged at 20
VLAN 4 bridge hello time unchanged at 2
VLAN 4 bridge forward delay unchanged at 15
sw2(config)#spanning-tree vlan 1 root secondary
VLAN 1 bridge priority set to 16384
VLAN 1 bridge max aging time unchanged at 20
VLAN 1 bridge hello time unchanged at 2
VLAN 1 bridge forward delay unchanged at 15
sw2(config)#spanning-tree vlan 3 root secondary
VLAN 3 bridge priority set to 16384
VLAN 3 bridge max aging time unchanged at 20
VLAN 3 bridge hello time unchanged at 2
VLAN 3 bridge forward delay unchanged at 15
任务四、
sw3(config)#interface f0/14
sw3(config-if)#switchport access vlan 2
sw3(config)#interface f0/15
sw3(config-if)#switchport access vlan 3
其它交换机配置与SW3一样,只是改变接口和 VLAN 号。
任务五、
sw1(config)#interface range f0/14 - 15
sw1(config-if-range)#channel-group 1 mode on
Creating a port-channel interface Port-channel1
sw2(config)#interface range f0/14 - 15
sw2(config-if-range)#channel-group 1 mode on
Creating a port-channel interface Port-channel1
sw2#show ip interface bri
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset up up
FastEthernet0/1 unassigned YES unset up up
FastEthernet0/2 unassigned YES unset up up
FastEthernet0/3 unassigned YES unset up up
FastEthernet0/4 unassigned YES unset up down
FastEthernet0/5 unassigned YES unset up down
FastEthernet0/6 unassigned YES unset up down
FastEthernet0/7 unassigned YES unset up down
FastEthernet0/8 unassigned YES unset up down
FastEthernet0/9 unassigned YES unset up down
FastEthernet0/10 unassigned YES unset up down
FastEthernet0/11 unassigned YES unset up down
FastEthernet0/12 unassigned YES unset up down
FastEthernet0/13 unassigned YES unset up down
FastEthernet0/14 unassigned YES unset up up
FastEthernet0/15 unassigned YES unset up up
Port-channel1 unassigned YES unset up up
Vlan1 unassigned YES unset up up
任务六、
SW1:
VLAN 1 IP 192.168.1.254/24
VLAN 2 IP 192.168.2.254/24
VLAN 3 IP 192.168.3.254/24
VLAN 4 IP 192.168.4.254/24
F0/0 IP 192.168.5.1/24
SW2:
VLAN 1 IP 192.168.1.253/24
VLAN 2 IP 192.168.2.253/24
VLAN 3 IP 192.168.3.253/24
VLAN 4 IP 192.168.4.253/24
F0/0 IP 192.168.6.1/24
ROUTER 1:
F0/0 IP 192.168.5.2/24
F0/1 IP 192.168.6.2/24
sw1(config)#interface vlan 1
sw1(config-if)#ip address 192.168.1.254 255.255.255.0
sw1(config-if)#no shut
sw1(config-if)#exit
sw1(config)#interface vlan 2
sw1(config-if)#ip address 192.168.2.254 255.255.255.0
sw1(config-if)#no shut
sw1(config-if)#exit
sw1(config)#interface vlan 3
sw1(config-if)#ip address 192.168.3.254 255.255.255.0
sw1(config-if)#no shut
sw1(config-if)#exit
sw1(config)#interface vlan 4
sw1(config-if)#ip address 192.168.4.254 255.255.255.0
sw1(config-if)#no shut
sw1(config-if)#exit
sw1(config)#int f0/0
sw1(config-if)#no switchport
sw1(config-if)#ip add 192.168.5.1 255.255.255.0
sw2(config)#interface vlan 1
sw2(config-if)#ip address 192.168.1.253 255.255.255.0
sw2(config-if)#no shut
sw2(config-if)#exit
sw2(config)#interface vlan 2
sw2(config-if)#ip address 192.168.2.253 255.255.255.0
sw2(config-if)#no shut
sw2(config-if)#exit
sw2(config)#interface vlan 3
sw2(config-if)#ip address 192.168.3.253 255.255.255.0
sw2(config-if)#no shut
sw2(config-if)#exit
sw2(config)#interface vlan 4
sw2(config-if)#ip address 192.168.4.253 255.255.255.0
sw2(config-if)#no shut
sw2(config-if)#exit
sw2(config)#int f0/0
sw2(config-if)#no switchport
sw2(config-if)#ip add 192.168.6.1 255.255.255.0
sw1(config)#router rip
sw1(config-router)#version 2
sw1(config-router)#no auto-summary
sw1(config-router)#network 192.168.1.0
sw1(config-router)#network 192.168.2.0
sw1(config-router)#network 192.168.3.0
sw1(config-router)#network 192.168.4.0
sw1(config-router)#network 192.168.5.0
sw1(config-router)#exit
sw2(config)#router rip
sw2(config-router)#version 2
sw2(config-router)#no auto-summary
sw2(config-router)#network 192.168.1.0
sw2(config-router)#network 192.168.2.0
sw2(config-router)#network 192.168.3.0
sw2(config-router)#network 192.168.4.0
sw2(config-router)#network 192.168.6.0
sw2(config-router)#end
r1(config)#interface f0/0
r1(config-if)#no switchport
r1(config-if)#ip address 192.168.5.2 255.255.255.0
r1(config-if)#no shut
r1(config)#interface f0/1
r1(config-if)#no switchport
r1(config-if)#ip address 192.168.6.2 255.255.255.0
r1(config-if)#no shut
r1(config)#router rip
r1(config-router)#version 2
r1(config-router)#no auto-summary
r1(config-router)#network 192.168.5.0
r1(config-router)#network 192.168.6.0
r1(config-router)#exit
sw1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.4.0/24 is directly connected, Vlan4
C 192.168.5.0/24 is directly connected, FastEthernet0/0
R 192.168.6.0/24 [120/1] via 192.168.4.253, 00:00:00, Vlan4
[120/1] via 192.168.3.253, 00:00:07, Vlan3
[120/1] via 192.168.2.253, 00:00:12, Vlan2
[120/1] via 192.168.1.253, 00:00:17, Vlan1
C 192.168.1.0/24 is directly connected, Vlan1
C 192.168.2.0/24 is directly connected, Vlan2
C 192.168.3.0/24 is directly connected, Vlan3
sw2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.4.0/24 is directly connected, Vlan4
R 192.168.5.0/24 [120/1] via 192.168.4.254, 00:00:08, Vlan4
[120/1] via 192.168.3.254, 00:00:14, Vlan3
[120/1] via 192.168.2.254, 00:00:17, Vlan2
C 192.168.6.0/24 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Vlan1
C 192.168.2.0/24 is directly connected, Vlan2
C 192.168.3.0/24 is directly connected, Vlan3
r1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
R 192.168.4.0/24 [120/1] via 192.168.6.1, 00:00:16, FastEthernet0/1
[120/1] via 192.168.5.1, 00:00:27, FastEthernet0/0
C 192.168.5.0/24 is directly connected, FastEthernet0/0
C 192.168.6.0/24 is directly connected, FastEthernet0/1
R 192.168.1.0/24 [120/1] via 192.168.6.1, 00:00:16, FastEthernet0/1
[120/1] via 192.168.5.1, 00:00:27, FastEthernet0/0
R 192.168.2.0/24 [120/1] via 192.168.6.1, 00:00:16, FastEthernet0/1
[120/1] via 192.168.5.1, 00:00:27, FastEthernet0/0
R 192.168.3.0/24 [120/1] via 192.168.6.1, 00:00:16, FastEthernet0/1
[120/1] via 192.168.5.1, 00:00:27, FastEthernet0/0
任务七:
Vpc 1 ip 192.168.2.2 192.168.2.254 24
Vpc2 ip 192.168.3.2 192.168.3.254 24
Vpc3 ip 192.168.3.3 192.168.3.254 24
Vpc4 ip 192.168.4.2 192.168.4.254 24
Vpc5 ip 192.168.4.3 192.168.4.254 24
Vpc6 ip 192.168.2.3 192.168.2.254 24
Sw1 f0/0 192.168.5.1 /24
Sw2 f0/0 192.168.6.1 /24
R1 f0/0 192.168.5.2 /24
R1 f0/1 192.168.6.2/ 24