配置以太口地址:
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 B2
\\定義DHCP並命名爲vfast1
network 192.168.2.0 255.255.255.0
\\發佈地址池的網段
default-router 192.168.2.254
\\設定網關地址
dns-server 202.96.128.86 168.95.1.1
\\設置DNS地址
lease 3
\\設置地址訂製天數
ip dhcp excluded-address 192.168.2.1 192.168.2.40
\\設置預留地址