交换机实现DHCP中继
配置DHCP Relay Agent
缺省的DHCP Relay Agent设置
打开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
Switch(config)# end
!退回到特权模式
2006-03-16
Switch# show running-config
!显示当前配置
System software version : 1.63 Build
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
Switch(config)# end
2006-03-16
Switch# show running-config
System software version : 1.63 Build
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全局配置命令来设置, 本文出自 51CTO.COM技术博客 |


luodie
博客统计信息
热门文章
最新评论
友情链接