Configuring DHCP and NAT, users achieve dynamic IP address and access to the public Internet

Router as an export gateway. The company consists of two departments A and B, respectively departments within the A and B terminal plan addresses two segments: 10.10.1.0/25 and 10.10.1.128/25, gateway address and 10.10.1.129 respectively 10.10.1.1/25 / 25. A PC for office within the department terminal, lease duration of 30 days, the domain name huawei.com, DNS server address 10.10.1.2. Sector B address lease period of 30 days, the domain name huawei.com, DNS server address 10.10.1.2. Address planning within the enterprise private network address, and the need to access the public Internet, therefore, need private network addresses to public addresses by configuring NAT. Router connected to the peer IP address interfaces GE0 / 0/0 to 12.1.1.1/24.
Configuring DHCP and NAT, users achieve dynamic IP address and access to the public Internet

AR1 configured as follows:
DHCP // turn enable the DHCP server
#
ACL Number 2000 //// configured to allow the network segment address of the NAT 10.10.1.0/24
rule. 5 the permit 10.1.1.0 0.0.0.255 Source
#
IP the pool Pl
Gateway- list 10.1.1.1 // gateway address configuration
network 10.1.1.0 mask 255.255.255.128/// global address pool may be dynamically assigned IP address range of
excluded-ip-address 10.1.1.2 // address pool configuration is not involved 10.10.1.2 automatically assigned
lease day 30 hour 0 minute 0 // configured IP address lease is 30 days
dns-list 10.1.1.2 // DNS server configured to use DHCP client's IP address
domain-name huawei.com // configure the domain name to huawei .com
#
IP the pool P2
Gateway List 10.1.1.129-
Network 10.1.1.128 mask 255.255.255.128
Lease 30 Day 0 hour 0 minute
DNS-List 10.1.1.1
Domain name-huawei.com
#
the GigabitEthernet0 interface / 0/0
IP address 12.1.1.1 255.255.255.0
NAT 2000 // do outbound NAT Easy IP mode in the outgoing interface GE0 / 0/0, private network addresses to public addresses
#
interface the GigabitEthernet0 / 0 /. 1
IP address 10.1.1.1 255.255.255.128
DHCP SELECT global // interface operates in global address pool
#
interface the GigabitEthernet0 / 0/2
IP address 10.1.1.129 255.255.255.128
DHCP SELECT global
#
IP-route static 0.0.0.0 0.0. 0.0 12.1.1.2 // configure a default route to the peer interface to ensure that the route is available

Guess you like

Origin blog.51cto.com/13452658/2450947