- 论坛徽章:
- 0
|
NAT-SERVER# config t
NAT-SERVER(config)# ip dhcp pool F03
NAT-SERVER(dhcp-config)# network 192.168.103.0 255.255.255.0
NAT-SERVER(dhcp-config)# dns-server 211.98.2.4
NAT-SERVER(dhcp-config)# default-router 192.168.103.1
NAT-SERVER(dhcp-config)# exit
NAT-SERVER(config)#ip dhcp excluded-address 192.168.103.2 192.168.103.10 (保留IP地址段)
察看dhcp配置:
NAT-SERVER#show running-config
Building configuration...
Current configuration : 3859 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname NAT-SERVER
!
boot-start-marker
boot-end-marker
!
enable password 123456
!
no aaa new-model
ip subnet-zero
ip cef
!
!
ip dhcp excluded-address 192.168.101.2 192.168.101.10
ip dhcp excluded-address 192.168.102.2 192.168.102.10
ip dhcp excluded-address 192.168.103.2 192.168.103.10
ip dhcp excluded-address 192.168.104.2 192.168.104.10
ip dhcp excluded-address 192.168.105.2 192.168.105.10
ip dhcp excluded-address 192.168.106.2 192.168.106.10
ip dhcp excluded-address 192.168.107.2 192.168.107.10
ip dhcp excluded-address 192.168.108.2 192.168.108.10
!
ip dhcp pool F01
network 192.168.101.0 255.255.255.0
dns-server 211.98.2.4
default-router 192.168.101.1
!
ip dhcp pool F02
network 192.168.102.0 255.255.255.0
dns-server 211.98.2.4
default-router 192.168.102.1
!
ip dhcp pool F03
network 192.168.103.0 255.255.255.0
dns-server 211.98.2.4
default-router 192.168.103.1
!
ip dhcp pool F04
network 192.168.104.0 255.255.255.0
dns-server 211.98.2.4
default-router 192.168.104.1
!
ip dhcp pool F05
network 192.168.105.0 255.255.255.0
dns-server 211.98.2.4
default-router 192.168.105.1
!
ip dhcp pool F06
network 192.168.106.0 255.255.255.0
dns-server 211.98.2.4
default-router 192.168.106.1
!
ip dhcp pool F07
network 192.168.107.0 255.255.255.0
dns-server 211.98.2.4
default-router 192.168.107.1
!
ip dhcp pool F08
network 192.168.108.0 255.255.255.0
dns-server 211.98.2.4
default-router 192.168.108.1
!
no ip domain lookup
no ftp-server write-enable
!
!
!
!
interface FastEthernet0/0
ip address 222.38.100.4 255.255.255.224
ip nat outside
no ip route-cache cef
no ip route-cache
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
interface FastEthernet0/1.100
encapsulation isl 100
ip address 192.168.100.1 255.255.255.0
no ip redirects
ip nat inside
no cdp enable
interface FastEthernet0/1.101
encapsulation isl 101
ip address 192.168.101.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.102
encapsulation isl 102
ip address 192.168.102.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.103
encapsulation isl 103
ip address 192.168.103.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.104
encapsulation isl 104
ip address 192.168.104.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.105
encapsulation isl 105
ip address 192.168.105.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.106
encapsulation isl 106
ip address 192.168.106.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.107
encapsulation isl 107
ip address 192.168.107.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.108
encapsulation isl 108
ip address 192.168.108.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.109
encapsulation isl 109
ip address 192.168.109.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.110
encapsulation isl 110
ip address 192.168.110.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.111
encapsulation isl 111
ip address 192.168.111.1 255.255.255.0
no ip redirects
ip nat inside
!
interface FastEthernet0/1.112
encapsulation isl 112
ip address 192.168.112.1 255.255.255.0
no ip redirects
ip nat inside
!
ip nat pool HALL 222.38.100.4 222.38.100.4 netmask 255.255.255.224
ip nat inside source list 1 pool HALL overload
ip classless
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0
ip http server
!
access-list 1 permit 192.168.0.0 0.0.255.255
!
line con 0
line aux 0
line vty 0 4
password 123456
login
!
end
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/138/showart_1643.html |
|