dhcp高级实验

dhcp高级实验

目标

1、路由器上分别实现接口地址池和全局地址池,SW1交换机一从接口地址池动态获取到IP地址;SW2交换机二从全局地址池动态获取到IP地址。
2、交换机SW1上配置接口地址池,内网PC1和PC2动态获取到IP地址;交换机SW2上配置全局接口地址池,内网PC3和PC4动态获取到IP地址;

网络拓扑图

在这里插入图片描述

配置

路由器R1(dhcp-server)配置:

sysname dhcp-server

dhcp enable

ip pool dhcp
gateway-list 192.168.2.254
network 192.168.2.0 mask 255.255.255.0
dns-list 192.168.2.253

interface GigabitEthernet0/0/0
ip address 192.168.1.254 255.255.255.0
dhcp select interface

interface GigabitEthernet0/0/1
ip address 192.168.2.254 255.255.255.0
dhcp select global

交换机SW1的配置:

sysname SW1

vlan batch 2
interface Vlanif1
ip address 192.168.3.254 255.255.255.0
dhcp select interface

interface Vlanif2
ip address dhcp-alloc

interface GigabitEthernet0/0/1
port link-type access
port default vlan 2

交换机SW2的配置:

sysname Huawei

vlan batch 2

dhcp enable

ip pool dhcp
gateway-list 192.168.4.254
network 192.168.4.0 mask 255.255.255.0
excluded-ip-address 192.168.4.253
dns-list 192.168.4.253

interface Vlanif1
ip address 192.168.4.254 255.255.255.0
dhcp select global

interface Vlanif2
ip address dhcp-alloc

interface GigabitEthernet0/0/1
port link-type access
port default vlan 2

猜你喜欢

转载自blog.csdn.net/qq_40168905/article/details/118486945