配置DHCP Relay Agent
缺省的
DHCP Relay Agent
设置
项目
|
缺省值
|
DHCP Relay Agent
状态
|
Disable,
关闭
DHCP
服务
|
DHCP Server
的
IP
地址
|
255.255.255.255
|
打开
DHCP Relay Agent
步骤
:
Switch# configure terminal
!
进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# service dhcp
!
打开
DHCP
服务
,
这里指打开
DHCP Relay Agent
2006-03-16
09:27:39
@5-CONFIG:Configured from outband
Switch(config)# end
!
退回到特权模式
2006-03-16
09:27:40
@5-CONFIG:Configured from outband
Switch# show running-config
!
显示当前配置
System software version : 1.63 Build
Jan 6 2006
Rel
Building configuration...
Current configuration : 371 bytes
!
version 1.0
!
no enable services web-server
hostname Switch
vlan 1
!
enable secret level 1 5 &t;C,tZ[qu<D+S(\rv=G1X)ss:>H.Y*T
enable secret level 15 5 &t,1u_;Cqu-8U0<Drv.tj9=Gs+/7R:>H
!
service dhcp
interface vlan 1
no shutdown
ip address 192.168.26.38 255.255.255.0
!
ip default-gateway 192.168.26.10
snmp-server community public ro
end
Switch# write
!
保存配置
Building configuration...
[OK]
配置
DHCP Server
的
IP
地址
步骤:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ip helper-address 192.168.26.47
!
设置
DHCP Server
的
IP
地址
2006-03-16
09:40:02
@5-CONFIG:Configured from outband
Switch(config)# end
2006-03-16
09:40:05
@5-CONFIG:Configured from outband
Switch# show running-config
System software version : 1.63 Build
Jan 6 2006
Rel
Building configuration...
Current configuration : 406 bytes
!
version 1.0
!
no enable services web-server
hostname Switch
vlan 1
!
enable secret level 1 5 &t,1u_;Cqu-8U0<Drv.tj9=Gs+/7R:>H
enable secret level 15 5 &t-aeh`@qu'dfimLrv{bcknAs7zyglow
!
service dhcp
ip helper-address 192.168.26.47
interface vlan 1
no shutdown
ip address 192.168.26.38 255.255.255.0
!
ip default-gateway 192.168.26.10
snmp-server community public ro
end
Switch# write
Building configuration...
[OK]
注
:
如果要把
DHCP Server
的
IP
地址恢复到缺省值
,
可以用
no ip helper-address
全局配置命令来设置
,