16.06.2014 Views

Cisco CCNA Study Guide - Router Alley

Cisco CCNA Study Guide - Router Alley

Cisco CCNA Study Guide - Router Alley

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CCNA</strong> <strong>Study</strong> <strong>Guide</strong> v2.62 – Aaron Balchunas<br />

303<br />

Configuring Static NAT<br />

The first step to configure Static NAT is to identify the inside (usually<br />

private) and outside (usually public) interfaces:<br />

<strong>Router</strong>(config)# int e0/0<br />

<strong>Router</strong>(config-if)# ip nat inside<br />

<strong>Router</strong>(config)# int s0/0<br />

<strong>Router</strong>(config-if)# ip nat outside<br />

To statically map a public address to a private address, the syntax is as<br />

follows:<br />

<strong>Router</strong>(config)# ip nat inside source static 172.16.1.1 158.80.1.40<br />

This command performs a static translation of the source address 172.16.1.1<br />

(located on the inside of the network), to the outside address of 158.80.1.40.<br />

Configuring Dynamic NAT<br />

When configuring Dynamic NAT, the inside and outside interfaces must<br />

first be identified:<br />

<strong>Router</strong>(config)# int e0/0<br />

<strong>Router</strong>(config-if)# ip nat inside<br />

<strong>Router</strong>(config)# int s0/0<br />

<strong>Router</strong>(config-if)# ip nat outside<br />

Next, a pool of global addresses must be specified. Inside hosts will<br />

dynamically choose the next available address in this pool, when<br />

communicating outside the local network:<br />

<strong>Router</strong>(config)# ip nat pool POOLNAME 158.80.1.1 158.80.1.50 netmask<br />

255.255.255.0<br />

The above command specifies that the pool named POOLNAME contains a<br />

range of public addresses from 158.80.1.1 through 158.80.1.50.<br />

Finally, a list of private addresses that are allowed to be dynamically<br />

translated must be specified:<br />

<strong>Router</strong>(config)# ip nat inside source list 10 pool POOLNAME<br />

<strong>Router</strong>(config)# access-list 10 permit 172.16.1.0 0.0.0.255<br />

The first command states that any inside host with a source that matches<br />

access-list 10 can be translated to any address in the pool named<br />

POOLNAME.<br />

The access-list specifies any host on the 172.16.1.0 network.<br />

* * *<br />

All original material copyright © 2013 by Aaron Balchunas (aaron@routeralley.com),<br />

unless otherwise noted. All other material copyright © of their respective owners.<br />

This material may be copied and used freely, but may not be altered or sold without the expressed written<br />

consent of the owner of the above copyright. Updated material may be found at http://www.routeralley.com.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!