锐捷路由器ip配置命令(锐捷路由器作DHCP服务器设置实例)

路由器作DHCP服务器设置实例

锐捷路由器ip配置命令(锐捷路由器作DHCP服务器设置实例)(1)

设置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

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页