Dhcp与中继结合实现单臂路由和直连主机自动获取IP并全网互通

Dhcp与中继结合实现单臂路由和直连主机自动获取IP并全网互通
Dhcp与中继结合实现单臂路由和直连主机自动获取IP并全网互通_第1张图片
LSW1 DHCP中继
开启dhcp服务 dhcp enable
创建vlan 10 20 进入虚接口配置IP分别192.168.10.254 / 192.168.20.254
虚接口vlanif1 配置192.168.11.1
进行静态路由保证全网互通基础
[Huawei]ip route-static 192.168.13.0 24 192.168.11.2
[Huawei]ip route-static 192.168.12.0 24 192.168.11.2
[Huawei]ip route-static 192.168.40.0 24 192.168.11.2
[Huawei]ip route-static 192.168.50.0 24 192.168.11.2
[Huawei]ip route-static 192.168.60.0 24 192.168.11.2
[Huawei]ip route-static 192.168.70.0 24 192.168.11.2
[Huawei]ip route-static 192.168.30.0 24 192.168.11.2
进入vlanif10 vlanif20开启dhcp中继模式并指向dhcp服务器192.168.11.2
dhcp select relay
dhcp relay server-ip 192.168.11.2

AR2 DHCP中继
开启dhcp服务 dhcp enable
进入接口0/0/0和2/0/0配置IP分别192.168.12.2 / 192.168.13.1
进行静态路由保证全网互通基础
[Huawei]ip route-static 192.168.11.0 24 192.168.12.1
[Huawei]ip route-static 192.168.10.0 24 192.168.12.1
[Huawei]ip route-static 192.168.40.0 24 192.168.11.2
[Huawei]ip route-static 192.168.50.0 24 192.168.11.2
[Huawei]ip route-static 192.168.60.0 24 192.168.11.2
[Huawei]ip route-static 192.168.70.0 24 192.168.11.2
[Huawei]ip route-static 192.168.20.0 24 192.168.12.1
进入g0/0/1 g2/0/0开启dhcp中继模式并指向dhcp服务器192.168.11.2
dhcp select relay
dhcp relay server-ip 192.168.11.2

AR3 DHCP中继
开启dhcp服务 dhcp enable
进入接口0/0/1配置IP 192.168.13.2
进行静态路由保证全网互通基础
[Huawei]ip route-static 192.168.11.0 24 192.168.13.1
[Huawei]ip route-static 192.168.12.0 24 192.168.13.1
[Huawei]ip route-static 192.168.10.0 24 192.168.13.1
[Huawei]ip route-static 192.168.20.0 24 192.168.13.1
[Huawei]ip route-static 192.168.30.0 24 192.168.13.1
分别进入g0/0/0子接口g0/0/0.1-g0/0/0.4
IP分别是192.168.40.254 192.168.50.254 192.168.60.254 192.168.70.254
开启dhcp中继模式并指向dhcp服务器192.168.12.1
dhcp select relay
dhcp relay server-ip 192.168.12.1
AR1 DHCP 服务器
开启dhcp服务
dhcp enable
进入接口g0/0/1和g0/0/2分别配置IP 192.168.11.1、192.168.12.1
开启dhcp全局模式
dhcp select global
创建7个IP池,分别是
ip pool 10、ip pool 20、ip pool 30、ip pool 40、
ip pool 50、ip pool 60、ip pool 70
分别建立自己的网段,在创建dns 8.8.8.8
Network 192.168.10.0 mask 24
gateway 192.168.10.254
Network 192.168.20.0 mask 24
gateway 192.168.20.254
Network 192.168.30.0 mask 24
gateway 192.168.30.254
Network 192.168.40.0 mask 24
gateway 192.168.40.254
Network 192.168.50.0 mask 24
gateway 192.168.50.254
Network 192.168.60.0 mask 24
gateway 192.168.60.254
Network 192.168.70.0 mask 24
gateway 192.168.70.254

你可能感兴趣的:(IT,运维,交换路由配置,DHCP)