Configuration Example: Port Address Translation


Figure 23-1 shows the network topology for the PAT configuration that follows using the commands covered in this chapter.

Figure 23-1. Port Address Translation Configuration


ISP Router

router>en

 

router#config t

 

router(config)#host ISP

Sets host name

ISP(config)#no ip domain-lookup

Turns off DNS resolution to avoid wait time due to DNS lookup of spelling errors

ISP(config)#enable secret cisco

Sets encrypted password

ISP(config)#line con 0

 

ISP(config-line)#login

 

ISP(config-line)#password class

Sets console line password to class

ISP(config-line)#logging synchronous

Commands will be appended to a new line

ISP(config-line)#exit

 

ISP(config)#int s 0/1

 

ISP(config-if)#ip address 199.85.64.6 255.255.255.252

Assigns IP address

ISP(config-if)#clockrate 56000

Assigns clock rate to data communications equipment (DCE) cable on this side of link

ISP(config-if)#no shut

 

ISP(config-if)#int lo0

Creates loopback interface 0

ISP(config-if)#ip address 200.200.200.1 255.255.255.255

Assigns IP address

ISP(config-if)#exit

 

ISP(config)#exit

 

ISP#copy run start

Saves config to NVRAM


Company Router

router>en

 

router#config t

 

router(config)#host Company

Sets host name

Company(config)#no ip domain-lookup

Turns off DNS resolution to avoid wait time due to DNS lookup of spelling errors

Company(config)#enable secret cisco

Sets secret password

Company(config)#line con 0

 

Company(config-line)#login

 

Company(config-line)#password class

Sets console line password to class

Company(config-line)#logging synchronous

Commands will be appended to a new line

Company(config-line)#exit

 

Company(config)#int fa 0/0

 

Company(config-if)#ip address 172.16.10.1 255.255.255.0

 

Company(config-if)#no shut

 

Company(config-if)#int s0/0

 

Company(config-if)#ip add 199.85.64.5 255.255.255.252

 

Company(config-if)#no shut

 

Company(config-if)#exit

 

Company(config)#ip route 0.0.0.0 0.0.0.0 199.85.64.6

Sends all packets not defined in the routing table to the ISP router

Company(config)#access-list 1 permit 172.16.10.0 0.0.0.255

Defines which addresses are permitted throughthese addresses are those that will be allowed to be translated with NAT

Company(config)#ip nat inside source list 1 int s 0/0 overload

Creates NAT by combining List 1 with the interface S0/0. Overloading will take place

Company(config)#int fa 0/0

 

Company(config-if)#ip nat inside

Location of private inside addresses

Company(config-if)#int s 0/0

 

Company(config-if)#ip nat outside

Location of public outside addresses

Company(config-if)#

 

Company#copy run start

 





CCNA Self-Study(c) CCNA Portable Command Guide
CCNA Portable Command Guide
ISBN: 1587201585
EAN: 2147483647
Year: 2006
Pages: 261
Authors: Scott Empson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net