标签:ace 完全 端口 分享图片 验证 配置 lob ges int
实验名称:简单的DHCP 分配,加子网划分实验实验步骤:
1、
计算子网,将192.168.100.0/24 划分为4个网段,分别为:
网段:192.168.100.0/26 网关: 192.168.100.62
网段: 192.168.100.64/26 网关: 192.168.100.126
网段: 192.168.100.128/26 网关: 192.168.100.190
网段: 192.168.100.192/26 网关: 192.168.100.254
子网掩码为:255.255.255.192
2、
#配置交换机SW1 :
vlan batch 10 20 30 40
interface e0/0/1
port link-type access
port de vlan 10
interface e0/0/2
port link-type access
port de vlan 20
interface e0/0/3
port link-type access
port de vlan 30
interface e0/0/4
port link-type access
port de vlan 40
interface g0/0/1
port link-type trunk
port trunk a vlan 10 20 30 40
3、
#配置交换机sw2(与sw1配置完全相同)
vlan batch 10 20 30 40
interface e0/0/1
port link-type access
port de vlan 10
interface e0/0/2
port link-type access
port de vlan 20
interface e0/0/3
port link-type access
port de vlan 30
interface e0/0/4
port link-type access
port de vlan 40
interface g0/0/1
port link-type trunk
port trunk a vlan 10 20 30 40
4、
#配置作为DHCP服务器的SW3 :
vlan batch 10 20 30 40
dhcp enable /开启DHCP服务
ip pool vlan-10
network 192.168.100.0 mask 255.255.255.192
gateway-list 192.168.100.62
dns-list 8.8.8.8
lease day 3
ip pool vlan-20
network 192.168.100.64 mask 255.255.255.192
gateway-list 192.168.100.126
dns-list 8.8.8.8
lease day 3
ip pool vlan-30
network 192.168.100.128 mask 255.255.255.192
gateway-list 192.168.190.126
dns-list 8.8.8.8
lease day 3
ip pool vlan-40
network 192.168.100.192 mask 255.255.255.192
gateway-list 192.168.100.254
dns-list 8.8.8.8
lease day 3 /配置4个vlan 网段的地址池
interface vlan 10
ip address 192.168.100.62 255.255.255.192
dhcp select global
interface vlan 20
ip address 192.168.100.126 255.255.255.192
dhcp select global
interface vlan 30
ip address 192.168.100.190 255.255.255.192
dhcp select global
interface vlan 40
ip address 192.168.100.254 255.255.255.192
dhcp select global /配置4个网关,并指定dhcp服务器
port-group 1
group-member g0/0/1 g0/0/2
port link-type trunk
port trunk a vlan 10 20 30 40 /配置连接sw1和sw2的端口
验证:
获取到了IP
![](http://i2.51cto.com/images/blog/201812/03/8e76a6f6975c17369e087859f830ef27.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
标签:ace 完全 端口 分享图片 验证 配置 lob ges int
原文地址:http://blog.51cto.com/14029008/2325593