銳捷路由器作DHCP服務器設置實例

路由器作DHCP服務器設置實例


銳捷路由器作DHCP服務器設置實例




設置DHCP Server之前路由器的基本配置信息

hostname "router"

!

enable secret 5 $1$siY9$wlJOkf2qcK6bvQGb5WfyK/

!

ip subnet-zero

!

interface FastEthernet0

!外網口設置

ip address 202.152.36.33 255.255.255.0

ip nat outside

!

interface FastEthernet1

!內網口設置

ip address 192.168.0.1 255.255.255.0

ip nat inside

!

ip nat inside source list 1 interface FastEthernet0 overload

ip nat translation dns-timeout 30

ip nat translation finrst-timeout 20

ip nat translation icmp-timeout 30

ip nat translation tcp-timeout 150

ip nat translation timeout 120

ip nat translation udp-timeout 150

ip nat optimize

ip nat limit-max-session all 350

ip classless

ip route 0.0.0.0 0.0.0.0 202.152.36.33

access-list 1 permit any

!

line con 0

line vty 0 4

password star

login

!

End


啟用DHCP服務器,配置如下:

NBR100#conf

Configuring from terminal, memory, or network [terminal]?

Enter configuration commands, one per line. End with CNTL/Z.

NBR100(config)#service dhcp

!啟用DHCP 服務

NBR100(config)#ip dhcp excluded 192.168.0.1 192.168.0.50

!設置排斥地址,不分配給客戶端

NBR100(config)#ip dhcp pool addpool

!設置地址池名稱

NBR100(config-dhcp)#network 192.168.0.0 255.255.255.0

!設置地址池網段

NBR100(config-dhcp)#default-router 192.168.0.1

!設置分配給客戶端主機的缺省網關

NBR100(config-dhcp)#dns-server 202.101.143.141

!設置分配給客戶端主機的DNS服務器地址

NBR100(config-dhcp)#end

NBR100#write

!保存配置

Building configuration...

[OK]

至此,配置完成。

NBR100#show run

Building configuration...

Current configuration:

!

!

hostname "NBR100"

!

enable secret 5 $1$M8NH$s0bDADQAsqmSgwiFI/mnM.

!

!

!

ip subnet-zero

ip dhcp excluded-address 192.168.0.1 192.168.0.50

!

ip dhcp pool addpool

default-router 192.168.0.1

dns-server 202.101.143.141

network 192.168.0.0 255.255.255.0

!

!

!

interface FastEthernet0

ip address 202.152.36.33 255.255.255.0

ip nat outside

!

interface FastEthernet1

ip address 192.168.0.1 255.255.255.0

ip nat inside

!

ip nat inside source list 1 interface FastEthernet0 overload

ip nat translation dns-timeout 30

ip nat translation finrst-timeout 20

ip nat translation icmp-timeout 30

ip nat translation tcp-timeout 150

ip nat translation timeout 120

ip nat translation udp-timeout 150

ip nat optimize

ip nat limit-max-session all 350

ip classless

ip route 0.0.0.0 0.0.0.0 202.152.36.34

access-list 1 permit any

!

line con 0

line vty 0 4

password star

login

!

end


分享到:


相關文章: