在“项目二 任务三 训练4 交换机的DHCP技术”基础上继续完成下列操作:
1、二层交换机50-2的配置
50-2>en
50-2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
50-2(config)#int
50-2(config)#interface g
50-2(config)#interface gigabitEthernet 0/2
50-2(config-if)#switchport mode trunk
50-2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up
50-2(config-if)#
2、三层交换机50-3的配置
Switch>en
Switch#
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname 50-3
50-3(config)#vtp domain wgj
Changing VTP domain name from NULL to wgj
50-3(config)#vtp mode client
Setting device to VTP CLIENT mode.
50-3(config)#
50-3(config)#ip routing
50-3(config)#interface vlan 50
50-3(config-if)#
%LINK-5-CHANGED: Interface Vlan50, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan50, changed state to up
50-3(config-if)#ip address 192.168.50.253 255.255.255.0
50-3(config-if)#interface vlan 60
50-3(config-if)#
%LINK-5-CHANGED: Interface Vlan60, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan60, changed state to up
50-3(config-if)#ip address 192.168.60.253 255.255.255.0
50-3(config)#
3、三层交换机50-1的配置
50-1>
50-1>en
50-1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
50-1(config)#int
50-1(config)#interface vlan 50
50-1(config-if)#standby 50 priority 110
50-1(config-if)#standby 50 ip 192.168.50.252
50-1(config-if)#standby 50 preempt
%HSRP-6-STATECHANGE: Vlan50 Grp 50 state Speak -> Standby
%HSRP-6-STATECHANGE: Vlan50 Grp 50 state Standby -> Active
50-1(config-if)#standby 50 track gigabitEthernet 0/2
50-1(config-if)#exit
50-1(config)#interface vlan 60
50-1(config-if)#standby 60 priority 100
50-1(config-if)#standby 60 ip 192.168.60.252
50-1(config-if)#exit
50-1(config)#
%HSRP-6-STATECHANGE: Vlan60 Grp 60 state Speak -> Standby
%HSRP-6-STATECHANGE: Vlan60 Grp 60 state Standby -> Active
50-1(config)#
4、三层交换机50-3配置
50-3>
50-3>en
50-3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
50-3(config)#interface vlan 50
50-3(config-if)#st
50-3(config-if)#standby 50 ip 192.168.50.252
50-3(config-if)#exit
50-3(config)#interface vlan 60
%HSRP-6-STATECHANGE: Vlan50 Grp 50 state Speak -> Standby
50-3(config-if)#standby 60 priority 110
50-3(config-if)#standby 60 ip 192.168.60.252
50-3(config-if)#standby 60 preempt
50-3(config-if)#
%HSRP-6-STATECHANGE: Vlan60 Grp 60 state Standby -> Active
50-3(config-if)#standby 60 track gigabitEthernet 0/2
50-3(config-if)#exit
50-3(config)#
5、查看交换机50-1的HSRP服务
6、未断开50-1交换机测试
7、断开50-1交换机测试
发现不通,思考什么原因。
检测PC配置发现为获取正确的IP地址,问题找到。
8、配置50-3的DHCP服务
50-3(config)#ip dhcp pool vlan50
50-3(dhcp-config)#network 192.168.50.0 255.255.255.0
50-3(dhcp-config)#dns-server 114.114.114.114
50-3(dhcp-config)#default-router 192.168.50.253
50-3(dhcp-config)#exit
50-3(config)#ip dhcp pool vlan60
50-3(dhcp-config)#network 192.168.60.0 255.255.255.0
50-3(dhcp-config)#dns-server 114.114.114.114
50-3(dhcp-config)#default-router 192.168.60.253
50-3(dhcp-config)#
9、PC重新获取IP地址,发现网关发生变化
10、ping测试连通性