配置以太口地址:
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
\\设置预留地址