Cisco 路由器中配置 DHCP 服务器
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

配置以太口地址:

 

Interface Ethernet 0

\\ 进入以太网口配置模式

No shut

 \\ 启动以太网口

Ip address 192.168.2.1 255.255.255.0

\\ 设定 IP 地址与子网掩码

ip address 192.168.1.1 255.255.255.0 secondary

\\ 设定第二地址与子网掩码

ip nat outside

\\ 设定该端口为出口

 

ip dhcp pool  vfast1

\\ 定义 DHCP 并命名为 vfast1

  network 192.168.2.0 255.255.255.0

\\ 发布地址池的网段

  default-router 192.168.2.1

\\ 设定网关地址

  dns-server 202.106.196.115 202.106.196.152

\\ 设置 DNS 地址

  lease 2

\\设置地址订制天数

 

ip dhcp excluded-address 192.168.2.1 192.168.2.40

ip dhcp excluded-address 192.168.2.100 192.168.2.160

\\ 设置预留地址