45fan.com - 路饭网

搜索: 您的位置主页 > 路由器设置 > Cisco 思科路由器 > 阅读资讯:如何在Cisco思科路由器上配置DHCP

如何在Cisco思科路由器上配置DHCP

2012-10-27 19:10:35 来源:www.45fan.com 【

这篇文章是关于CISCO路由器作为您的网络中的DHCP服务器来配置。

任务1:配置R1作为一个DHCP服务器,局域网内的主机动态提供所有的网络信息。(R1和R2通过以太网直连

服务器配置(R1)

!– enable dhcp server (default)

 

service dhcp

! — defining DHCP pool with all network information

ip dhcp pool OFFICE
network 192.168.12.0 255.255.255.0
domain-name networkers-online.com
default-router 192.168.12.1 !– gateway address
dns-server 192.168.12.100 192.168.12.101 !– DNS servers
netbios-name-server 192.168.12.99 !– WINS servers
lease 2 !– lease time

!– defining static binding to R2 using its client-id

ip dhcp pool STATIC
host 192.168.12.2 255.255.255.0
client-identifier 01cc.010d.f000.00

!– exclude server and static addresses from the dynamic pool

ip dhcp excluded-address 192.168.12.1
ip dhcp excluded-address 192.168.12.100 192.168.12.101
ip dhcp excluded-address 192.168.12.200
p dhcp excluded-address 192.168.12.2

客户端配置:

interface FastEthernet0/0
ip address dhcp client-id FastEthernet0/0

从R1 R2得到它的域名动态

!– R2 f0/0 address is assigned via DHCP

 

R2(config-if)#do sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.12.2 YES DHCP up up

!– R1 bindings has R2 as a static entry

R1#sh ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
192.168.12.2 01cc.010d.f000.00 Infinite Manual

R2#sh ip route
Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static routeGateway of last resort is 192.168.12.1 to network 0.0.0.0

 

C 192.168.12.0/24 is directly connected, FastEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
S* 0.0.0.0/0 [254/0] via 192.168.12.1

 R2使用浮动静态路由的默认网关设置R1

从R1,R2学习的DNS服务器

R2#ping xyz.comTranslating “yahoo.com”…domain server (192.168.12.100) (192.168.12.101)
% Unrecognized host or address, or protocol not running.

 


本文地址:http://www.45fan.com/cisco/753.html
Tags:
编辑:路饭网
推广内容
推荐阅读
热门推荐
推荐文章
关于我们 | 联系我们 | 友情链接 | 网站地图 | Sitemap | App | 返回顶部