本文為大家講解Cisco路由器中配置DHCP服務器,希望能幫到大家。
配置以太口地址:
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
\\設置預留地址