Simple demonstration of DHCP relay service----

Demonstration of a simple topology diagram of the DHCP relay service:

Insert picture description here
DHCP relay service ideas:

         **LS1:**建立vlan 10 20
                   进入各接口分别设置access接口模式,设置对应vlan,开启接口:
                             Int e0/0/1  port link-type access   port default vlan 10   undo  shutdown
                             Int e0/0/2  port link-type access   port default vlan 20   undo  shutdown
                             Int e0/0/3  port link-type access   port default vlan 10   undo  shutdown
                             Int e0/0/4  port link-type access   port default vlan20   undo  shutdown
                             Int g0/0/1  port link-type trunk    port trunk allow-pass vlan all(10、20) un sh

         **R1:**  开启dhcp:dhcp enable
                进入子接口, 设置dot1q termination vid (vlan号),  设置ip,  开启arp请求,  接口下宣告dhcp中继,  选择寻址接口ip, 最后顺便开启接口有备无患:
                  g0/0/1.10;    dot1q termination vid 10;    ip add 192.168.10.1 24 ;  arp broadcast enable;   dhcp select relay;    dhcp relay server-ip 14.0.0.2;   un sh
                  g0/0/1.20;    dot1q termination vid 20;    ip add 192.168.20.1 24 ;  arp broadcast enable;   dhcp select relay;    dhcp relay server-ip 14.0.0.2;   un sh
               不要忘记设置g0/0/2和g0/0/0的ip: 分别是 ip add 14.0.0.1 24;un sh   和   ip add 12.0.0.1 24;un sh
               设置静态路由: ip route-static 15.0.0.0  24  12.0.0.2 (往AR2方向)
                      因为AR4和AR1是直连路由,所以不需要设置路由了。

        **R2:**  先开启dhcp:dhcp enable
                进入端口g0/0/0 设置ip 12.0.0.2 24 ;un sh
                              g0/0/1 设置ip 15.0.0.1 24 ; un sh
                 端口模式g0/0/1下 宣告dhcp中继服务:dhcp select relay;
                 接着选择寻址接口ip:dhcp relay server-ip 14.0.0.2 
                 最后不要忘记(末节网路)设置默认路由:ip route-static 0.0.0.0  0.0.0.0  12.0.0.1

       **R4:**  二话不说先开启dhcp模式:dhcp enable
              进入端口g0/0/0 设置ip 14.0.0.2  24 ;  在接口宣告去哪个地方找服务: dhcp select  global ; 顺便开启接口 un sh
      ——设置地址池:  ip pool DHCP15.0.0.0
              网络号、子网掩码: network 15.0.0.0 mask 24
              网关: gateway-list 15.0.0.1
              设置dns: dns-list 8.8.8.8 2.2.2.2
           ——设置地址池:  ip pool DHCPvlan10
                  网络号、子网掩码: network 192.168.10.0 mask 24
                  网关: gateway-list 192.168.10.1
                  设置dns: dns-list 8.8.8.8 2.2.2.2
      ——设置地址池:  ip pool DHCPvlan20
              网络号、子网掩码: network 192.168.20.0 mask 24
              网关: gateway-list 192.168.20.1
              设置dns: dns-list 8.8.8.8 2.2.2.2
           最后别忘记(末节网络)设置默认路由:0.0.0.0  0.0.0.0  14.0.0.1  

PC test:
Insert picture description here
>ping ipconfig /renew to get ip; ipconfig /release releases ip and
finally can do packet capture test...

##########
Hope to help you or bring you inspiration.
Knowledge sharing is all on the blog. See you next time.

Guess you like

Origin blog.csdn.net/XCsuperman/article/details/107024468