路由器作为DHCP Server同时实现DHCP Agent/Relay

由器作为DHCP Server同时实现DHCP Agent/Relay
 
 
案例分析:
一台R2611作为DHCP服务器,给不同网段的PC提供DHCP服务。
网络拓扑如图所示:
==============================================================
+
+ Router2611 fa0/0 —————————— fa0/0 R2
+ /
+ /
+ PCs
+
+
+
+
+ Router2611 fa1/0 192.168.12.1/30
+ R2 fa1/0 192.168.12.1/30
+ LAN PCs 192.168.10.2/24 default-gateway 192.168.10.1/24
+
+
+
+ 作者:熵焓2005
+ Blog: www.netpeter.cn
+ E-mail:peter9435@126.com
==============================================================
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+ 实验平台 dynamips + dynagen
+
+ Lab_net文件
+
+ #Labs——DHCP Lab
+
+
+ autostart = false
+ ghostios = true
+ ghostsize = 256
+ sparemem = true
+
+
+ [127.0.0.1:7200]
+ udp = 12000
+
+ workingdir = F:/dy/tmp
+
+
+ [[2621]]
+ image = ../ios/unzip-c2600-advsecurityk9-mz.124-4.T.bin
+ exec_area = 32
+ #slot1 = NM-16ESW
+ WIC0/0 = WIC-2T
+ #WIC0/1 = WIC-2T
+ ram = 72
+ Confreg = 0x2102
+
+ [[1710]]
+ #支持WIC卡,WIC-2T &WIC-1ENET
+ image = ../ios/unzip-C1700-Y.BIN
+ exec_area = 32
+ mmap = False
+ ram = 20
+ confreg = 0x2102
+
+
+ [[router R1]]
+ console = 2000
+ model = 2621
+ f0/0 = R2 f0/0
+
+
+ [[router R2]]
+ console = 2001
+ model = 2621
+ fa0/1 = R3 fa0
+
+ [[router R3]]
+ console = 2002
+ model = 1710
+
========================================================================================================================

配置文件:
R1
enable
conf t
host R1
no ip domain loo
line con 0
no exec-timeout
logg sy
interface lo 0
ip add 1.1.1.1 255.255.255.0
interface fa0/0
ip add 192.168.12.1 255.255.255.252
speed 100
full-duplex
no shut
router rip
ver 2
netw 192.168.12.0
netw 1.1.1.0
no auto-summary
service dhcp
no ip dhcp conflict logging
ip dhcp pool test
network 192.168.10.0/24
domain-name lan.com
dns-server 192.168.10.254
default-router 192.168.10.1
lease infinite
exit
ip dhcp excluded-address 192.168.10.1 192.168.10.30

R2
enable
conf t
host R2
no ip domain loo
line con 0
no exec-timeoute
logg sy
inter lo 0
ip add 2.2.2.2 255.255.255.0
inter fa0/0
ip add 192.168.12.2 255.255.255.252
speed 100
full-duplex
no shut
interface fa0/1
ip add 192.168.10.1 255.255.255.0
speed 100
no shut
ip helper-address 192.168.12.1
router rip
ver 2
netw 192.168.10.0
netw 192.168.12.0
netw 2.2.2.0
no auto-summary

R3
enable
conf t
host PC1
no ip routing
interface fa0
no shut
ip address dhcp

 

 

http://blogold.chinaunix.net/u2/61459/showart_1011320.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值