dhcp的问题
路由器可以用作dhcp服务器, 加入有三台路由器,第一台路由器当做dhcp服务器 连接到第三台路由器的主机如何获得动态ip地址,三台路由器依次相连,小弟做了一个多小时的实验,但是怎么也获得不了,求高手解答一下,主机和dhcp服务器不跨路由器和跨一台路由器我都明白怎么配置 ,就是跨两台以上的怎么配置谢谢 指教{:soso_e130:} 跨设备 需要做DHCP 中继helper-address {你DHCP服务器的地址} 不过PT模拟器不支持 跨一台可以用helper-address 这个命令我试了但是跨两台就不行了 卩爿Μㄚ厢甚 发表于 2012-4-11 15:41 static/image/common/back.gif跨一台可以用helper-address 这个命令我试了但是跨两台就不行了
前提是你要有去往dhcp服务器的路由。。。。 helper-address这个命令在PT里面好像不是很支持的,如果不成功和模拟器还是有一定关系的吧! ywq1122 发表于 2012-4-11 16:04 static/image/common/back.gif
前提是你要有去往dhcp服务器的路由。。。。
路由我都做过了全都有 卩爿Μㄚ厢甚 发表于 2012-4-11 20:35 static/image/common/back.gif
路由我都做过了全都有
把配置贴上来看看吧 ywq1122 发表于 2012-4-11 21:26 static/image/common/back.gif
把配置贴上来看看吧
Building configuration...(第一个路由器)
Current configuration : 1059 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
ip dhcp excluded-address 18.18.18.1 18.18.18.10
ip dhcp excluded-address 19.19.19.1 19.19.19.20
ip dhcp excluded-address 25.25.25.1 25.25.25.25
!
ip dhcp pool ccnA
network 18.18.18.0 255.255.255.0
default-router 18.18.18.1
ip dhcp pool ccnp
network 19.19.19.0 255.255.255.0
default-router 19.19.19.19
ip dhcp pool ccie
network 25.25.25.0 255.255.255.0
default-router 25.25.25.1
!
!
!
!
!
!
!
no ip domain-lookup
!
!
!
!
!
!
interface FastEthernet0/0
ip address 20.20.20.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 18.18.18.1 255.255.255.0
duplex auto
speed auto
!
router rip
version 2
network 18.0.0.0
network 20.0.0.0
!
ip classless
ip route 30.30.30.0 255.255.255.0 FastEthernet0/0
ip route 25.25.25.0 255.255.255.0 FastEthernet0/0
ip route 25.25.25.0 255.255.255.0 20.20.20.2
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
line vty 0 4
login
!
!
!
end
中间的
Building configuration...
Current configuration : 980 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
ip dhcp excluded-address 19.19.19.1 19.19.19.20
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 20.20.20.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 19.19.19.19 255.255.255.0
ip helper-address 20.20.20.1
duplex auto
speed auto
!
interface Ethernet1/0
ip address 30.30.30.1 255.255.255.0
duplex auto
speed auto
!
interface Ethernet1/1
no ip address
duplex auto
speed auto
!
interface Ethernet1/2
no ip address
duplex auto
speed auto
!
interface Ethernet1/3
no ip address
duplex auto
speed auto
!
router rip
version 2
network 19.0.0.0
network 20.0.0.0
network 30.0.0.0
no auto-summary
!
ip classless
ip route 25.25.25.0 255.255.255.0 FastEthernet0/1
ip route 25.25.25.0 255.255.255.0 30.30.30.2
!
!
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
!
end
第三个路由器
Building configuration...
Current configuration : 660 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 25.25.25.1 255.255.255.0
ip helper-address 20.20.20.1
ip helper-address 30.30.30.1
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 30.30.30.2 255.255.255.0
duplex auto
speed auto
!
router rip
version 2
network 25.0.0.0
network 30.0.0.0
no auto-summary
!
ip classless
ip route 20.20.20.0 255.255.255.0 30.30.30.1
ip route 18.18.18.0 255.255.255.0 30.30.30.1
!
!
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
!
end
谢谢了 卩爿Μㄚ厢甚 发表于 2012-4-11 21:49 static/image/common/back.gif
Building configuration...(第一个路由器)
Current configuration : 1059 bytes
你的配置,我看不下去,你可以参考,一下我的,因为时间问题,所以只是大概做了一下,测试后第三台可以获得地址。见下图
第一台
Current configuration : 583 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
interface FastEthernet0/0
ip address 20.20.20.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 20.0.0.0
!
ip classless
!
line con 0
line vty 0 4
login
!
end
第二台:
Current configuration : 551 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!interface FastEthernet0/0
ip address 20.20.20.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 30.30.30.1 255.255.255.0
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 20.0.0.0
network 30.0.0.0
no auto-summary
!
ip classless
!
line con 0
line vty 0 4
login
end
第三台
Current configuration : 564 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
interface FastEthernet0/0
ip address 25.25.25.1 255.255.255.0
ip helper-address 20.20.20.1
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 30.30.30.2 255.255.255.0
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 25.0.0.0
network 30.0.0.0
!
ip classless
!
line con 0
line vty 0 4
login
!
end 好好学习,天天向上,谢谢大家! 感谢楼主分享 收藏了 {:6_280:} 路过 额。看不懂额··· {:6_282:}{:6_282:}
页:
[1]
2