华为实验32-DHCP中继实验原理
可以与其他网段的DHCP通信,从未在多个网段上DHCP客户端可以只用同一个DHCP服务器,节约了成本,有利于集中管理和维护
实验目的
理解DHCP的应用场景
理解DHCP中继的配置
实验拓扑
实验步骤
1,基本配置并测试联通性
2,配置ospf网络
[R1]ospf 1 [R1-ospf-1]area 0 [R1-ospf-1-area-0.0.0.0]network 200.1.1.0 0.0.0.255 [R1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[R2]ospf 1 [R2-ospf-1]area 0 [R2-ospf-1-area-0.0.0.0]network 200.1.1.0 0.0.0.255 [R2-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255
[R3]ospf 1 [R3-ospf-1]area 0 [R3-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255
查看路由表信息


3,配置DHCP服务器
总部R3为dhcp服务器
[R3]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [R3]ip pool dhc [R3]ip pool dhcp-pool Info: It's successful to create an IP address pool. [R3-ip-pool-dhcp-pool]network 10.1.1.0 mask 255.255.255.0 [R3-ip-pool-dhcp-pool]gateway-list 10.1.1.254 [R3-ip-pool-dhcp-pool]int g0/0/1 [R3-GigabitEthernet0/0/1]dhcp select global
查看ip地址池情况

4,配置DHCP中继
第一种方法：直接在Ｒ１的接口下开启ｄｈｃｐ中继功能，并指向服务器ip地址为100.1.1.1
[R1]dhcp enable Info: The operation may take a few seconds. Please wait for a moment.done. [R1]int g0/0/1 [R1-GigabitEthernet0/0/1]dhcp select relay [R1-GigabitEthernet0/0/1]dhcp relay server-ip 100.1.1.1
第二种方法:在R1上创建DHCP服务器组，指定组名为dhcp-group
[R1]dhcp server group dhcp-group Info:It's successful to create a DHCP server group. [R1-dhcp-server-group-dhcp-group]dhcp-server 100.1.1.1 [R1-dhcp-server-group-dhcp-group]int g0/0/1 [R1-GigabitEthernet0/0/1]dhcp select relay [R1-GigabitEthernet0/0/1]dhcp relay server-select dhcp-group
5,配置pc获取地址方式为DHCP


测试两台机器的联通性,可以