博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
5.6. DHCP
阅读量:7118 次
发布时间:2019-06-28

本文共 2386 字,大约阅读时间需要 7 分钟。

ip dhcp excluded 192.168.0.1 (排除的IP)ip dhcp pool xxx(随便你定义的名字)network 192.168.0.0 255.255.255.0 (你分配的IP段)default-router 192.168.0.1 (关网的网内)dns-server 202.96.64.68 (DNS服务器的IP)lease 7netbios-name-serverRouter>enPassword:Router#conf tEnter configuration commands, one per line.  End with CNTL/Z.Router(config)#ip dhcp excluded 10.10.0.1 10.10.0.254Router(config)#ip dhcp pool officeRouter(dhcp-config)#network 10.10.0.0 255.255.255.0Router(dhcp-config)#default-router 10.10.0.254Router(dhcp-config)#dns-server 208.67.222.222 208.67.220.220Router(dhcp-config)#netbios-name-server 10.10.0.2Router(dhcp-config)#lease 7Router(dhcp-config)#endRouter#

可变长子网掩码实例

ip dhcp excluded-address 192.168.40.250 192.168.40.254ip dhcp excluded-address 192.168.50.250 192.168.50.254!ip dhcp pool Office-1 network 192.168.40.240 255.255.255.240 default-router 192.168.40.254 dns-server 208.67.222.222 208.67.220.220 lease 7!ip dhcp pool Office-2 network 192.168.50.128 255.255.255.128 default-router 192.168.50.254 dns-server 208.67.222.222 208.67.220.220 lease 7!interface GigabitEthernet0/1 description Office-1 ip address 192.168.40.254 255.255.255.240 ip nat inside ip virtual-reassembly in duplex auto speed auto!interface GigabitEthernet0/2 description Office-2 ip address 192.168.50.254 255.255.255.128 ip nat inside ip nat enable ip virtual-reassembly in duplex auto speed auto!2911(dhcp-config)#do show ip dhcp pool Office-2Pool Office-2 : Utilization mark (high/low)    : 100 / 0 Subnet size (first/next)       : 0 / 0 Total addresses                : 126 Leased addresses               : 0 Pending event                  : none 1 subnet is currently in the pool : Current index        IP address range                    Leased addresses 192.168.50.129       192.168.50.129   - 192.168.50.254    02911(config)#do show ip dhcp pool Office-1Pool Office-1 : Utilization mark (high/low)    : 100 / 0 Subnet size (first/next)       : 0 / 0 Total addresses                : 14 Leased addresses               : 1 Pending event                  : none 1 subnet is currently in the pool : Current index        IP address range                    Leased addresses 192.168.40.242       192.168.40.241   - 192.168.40.254    1

5.6.1. dns-server

OpenDNS

dns-server 208.67.222.222dns-server 208.67.220.220

Google

dns-server 8.8.8.8dns-server 4.4.4.4

原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

你可能感兴趣的文章
AI工程师成长之路--机器学习之模型评估与选择
查看>>
菜鸟排查数据库异常的事
查看>>
CSS:关于元素宽度与高度的讨论 系列文章(一)
查看>>
webstorm、phpstorm、idea等使用技巧记录
查看>>
腾讯内核团队发布 TCPA,为何是 OPEN 而非开源?
查看>>
Linux 用户被差别对待?无法通过 apple.com 管理 Apple ID
查看>>
芯片巨人英特尔的 Linux 开源驱动加入支持其独显的代码
查看>>
Elasticsearch批量导入数据脚本(python)
查看>>
Android Studio 3.5 Canary 12 发布
查看>>
我在 DC010 听了一场黑客版“奇葩说”|ISC2018
查看>>
js算法初窥06(算法模式03-函数式编程)
查看>>
【视频教程】微信小程序开发【一个实例】
查看>>
一看就懂的Mybatis框架入门笔记
查看>>
Rails 5.2.3 RC1 发布,Ruby Web 应用开发框架
查看>>
Android RecyclerView从入门到玩坏
查看>>
Riot v4.0.0-alpha.10 发布,JavaScript 的 MVP 框架
查看>>
Linux中管理用户和组命令
查看>>
将本地docker容器迁移到服务端
查看>>
甲骨文匯編1
查看>>
从0打卡leetcode之day 6--最长回文串
查看>>