华为三层交换机VRRP与DHCP综合实验详解
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为三层交换机VRRP与DHCP综合实验详解相关的知识,希望对你有一定的参考价值。
本知识重点考核大家对VRRP、DHCP掌握情况,实验要求如下:
实验要求:
1.SW1为vlan 10的主网关,vlan 20的备份网关;
2.SW2为vlan 20的主网关,vlan 10的备份网关;
3.DHCP服务器在vlan 66,网关在SW2上面;
4.PC1、PC2自动获取ip地址且可以互相ping通。
- 实验拓扑图如下:
第一步,进行基本网络配置,配置步骤及命令如下:
SW1上配置如下命令:
sysname SW1
vlan batch 10 20 66
interface GigabitEthernet0/0/1
port link-type access
port default vlan 10
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan all
interface Vlanif10
ip address 192.168.10.251 255.255.255.0
interface Vlanif20
ip address 192.168.20.251 255.255.255.0
interface Vlanif66
ip address 192.168.66.251 255.255.255.0
SW2上配置如下命令:
sysname SW2
vlan batch 10 20 66
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/3
port link-type access
port default vlan 66
interface Vlanif10
ip address 192.168.10.252 255.255.255.0
interface Vlanif20
ip address 192.168.20.252 255.255.255.0
interface Vlanif66
ip address 192.168.66.252 255.255.255.0
第二步,进行VRRP配置,如下:
SW1上配置如下命令:
interface Vlanif10
vrrp vrid 10 virtual-ip 192.168.10.250
vrrp vrid 10 priority 200
interface Vlanif20
vrrp vrid 20 virtual-ip 192.168.20.250
SW2上配置如下命令:
interface Vlanif10
vrrp vrid 10 virtual-ip 192.168.10.250
interface Vlanif20
vrrp vrid 20 virtual-ip 192.168.20.250
vrrp vrid 20 priority 200
第三步,配置DHCP,命令如下:
DHCP服务器配置
sysname DHCP
interface GigabitEthernet0/0/0
ip address 192.168.66.1 255.255.255.0
dhcp select global
ip route-static 0.0.0.0 0.0.0.0 192.168.66.252
ip pool p1
gateway-list 192.168.10.250
network 192.168.10.0 mask 255.255.255.0
dns-list 8.8.8.8
ip pool p2
gateway-list 192.168.20.250
network 192.168.20.0 mask 255.255.255.0
dns-list 8.8.8.8
SW1上配置如下命令:
dhcp enable
interface Vlanif10
dhcp select relay
dhcp relay server-ip 192.168.66.1
interface Vlanif20
dhcp select relay
dhcp relay server-ip 192.168.66.1
SW1上配置如下命令:
dhcp enable
interface Vlanif10
dhcp select relay
dhcp relay server-ip 192.168.66.1
interface Vlanif20
dhcp select relay
dhcp relay server-ip 192.168.66.1
最后,进行验证查看。
查看vrrp如下:
PC端查看如下:
通过以上查看得知,网关以及DHCP配置均满足实验要求,实验完成!!!
。
。
。
以上是关于华为三层交换机VRRP与DHCP综合实验详解的主要内容,如果未能解决你的问题,请参考以下文章