思科dhcp之基础配置IPv4

一、拓扑图

 二、配置

IOU1:

interface Ethernet0/0
 switchport access vlan 10

interface Ethernet0/1
 switchport access vlan 11

interface Vlan10
 ip address 192.168.10.1 255.255.255.0
 ip helper-address 192.168.11.1

interface Vlan11
 ip address 192.168.11.2 255.255.255.0

service dhcp
ip forward-protocol udp bootps
ip routing
ip route 0.0.0.0 0.0.0.0 192.168.11.1

IOU2:

ip route 0.0.0.0 0.0.0.0 192.168.11.2

interface Ethernet0/1
 ip address 192.168.11.1 255.255.255.0

service dhcp
ip dhcp excluded-address 192.168.10.1
ip dhcp pool vlan10
 network 192.168.10.0 255.255.255.0
 dns-server 202.103.24.68 
 default-router 192.168.10.1 
 lease 14

三、查看效果

show ip dhcp conflict  //查看检冲突导致ip而不会被分配的地址

show ip dhcp pool //查看DHCP 地址池的信息

show ip dhcp pool vlan20 //查看vlan20地址池情况

show ip dhcp binding //查看地址分配情况
 

clear ip dhcp binding * //清除所有dhcp地址分配地址记录

clear ip dhcp conflict  //清除conflict 记录

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值