ip dhcp excluded-address 192.168.2.1 192.168.2.100 //保留IP
!
ip dhcp pool test
network 192.168.2.0 255.255.255.0
dns-server 172.16.0.120
default-router 192.168.2.1
interface FastEthernet0/0
ip address 172.16.1.11 255.255.240.0
no ip directed-broadcast
ip nat outside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.2.1 255.255.255.0
no ip directed-broadcast
ip nat inside
speed auto
full-duplex
!
ip nat pool waibu 172.16.1.11 172.16.1.11 prefix-length 20
ip nat inside source list 101 pool waibu overload
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.0.50
ip http server
ip http authentication local
!
access-list 101 permit ip 192.168.2.0 0.0.0.255 any
!
!
line con 0
transport input none
line aux 0
line vty 0 4
password cisco
login
转载于:https://blog.51cto.com/22494/647915