Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Network Address Translation

IP IP Public One-to-one
Static NAT
Dynamic NAT
IP IP Public
NAT

IP IP Public Internet

IP IP Public
Many-to-one
IP IP Public PAT
NAT Table
Inside Outside
10.0.0.1 1.1.1.1

NAT
10.0.0.0/24 1.1.1.0/24
.1 .2 .1 .4 2.2.2.2
Internet

data 10.0.0.1 2.2.2.2 data 10.0.0.1 2.2.2.2

data 2.2.2.2 10.0.0.1


Router# show ip nat translations
Inside global Inside local Outside local Outside global
1.1.1.1 10.0.0.1 ... ...
Router#

NAT Table
Inside Outside
10.0.0.1 1.1.1.1
Outside Global
Inside Local NAT
10.0.0.0/24 1.1.1.0/24
.1 .2 .1 .4 2.2.2.2
Internet

Inside Global
data 10.0.0.1
data 10.0.0.1
1.1.1.1
2.2.2.2 2.2.2.2 data 1.1.1.1 2.2.2.2

data 2.2.2.2 10.0.0.1


1.1.1.1 data 2.2.2.2 1.1.1.1
Static NAT

NAT Table
Inside Outside
10.0.0.1 1.1.1.1

NAT
10.0.0.0/24 1.1.1.0/24
Web .1 .2 .1 .4 2.2.2.2
Server Internet

R(config-if)# ip nat
outside
R(config-if)# ip nat 10.0.0.1
data 2.2.2.2 1.1.1.1 data 2.2.2.2 1.1.1.1
inside
R(config)# ip nat inside source static 10.0.0.1 1.1.1.1
Static NAT

NAT Table
Inside Outside
10.0.0.1 3.3.3.3

NAT
10.0.0.0/24 1.1.1.0/24
Web .1 .2 .1 .4 2.2.2.2
Server Internet

R(config)# ip route 3.3.3.3 255.255.255.255 1.1.1.1

data 2.2.2.2 10.0.0.1


3.3.3.3 data 2.2.2.2 3.3.3.3

R(config)# ip nat inside source static 10.0.0.1 3.3.3.3

front IP, routed IP


Static NAT

NAT Table
Inside Outside
10.0.0.1 3.3.3.3
10.0.0.3 4.4.4.4
Web .1
Server
NAT
10.0.0.0/24 1.1.1.0/24
.2 .1 .4 2.2.2.2
Internet

Web .3
Server

R(config)# ip nat inside source static 10.0.0.1 3.3.3.3


R(config)# ip nat inside source static 10.0.0.3 4.4.4.4
NAT Table
Inside Outside
Dynamic NAT
10.0.0.1 3.3.3.1
10.0.0.2 3.3.3.2
10.0.0.3 3.3.3.3
.1 10.0.0.4 3.3.3.4
10.0.0.5 3.3.3.5
.2 10.0.0.6 3.3.3.6

NAT
.3
10.0.0.0/24 1.1.1.0/24
.7 .1 .4 2.2.2.2
Internet
.4

R(config)# ip route 3.3.3.0 255.255.255.248 1.1.1.1


.5

.6
NAT Table
Inside Outside
Dynamic NAT
10.0.0.1 3.3.3.1
10.0.0.2 3.3.3.2
10.0.0.3 3.3.3.3
10.0.0.4 3.3.3.4
10.0.0.5 3.3.3.5
10.0.0.6 3.3.3.6

access-list 1 permit 10.0.0.0 0.0.0.7

R(config)# ip nat inside source static 10.0.0.1 3.3.3.1


R(config)# ip nat inside source static 10.0.0.2 3.3.3.2
R(config)# ip nat inside source static 10.0.0.3 3.3.3.3
R(config)# ip nat inside source list 1 pool ABC
R(config)# ip nat inside source static 10.0.0.4 3.3.3.4
R(config)# ip nat inside source static 10.0.0.5 3.3.3.5
R(config)# ip nat inside source static 10.0.0.6 3.3.3.6

R(config)# ip nat pool ABC 3.3.3.1 3.3.3.6 prefix-length 29


Transport Layer

1024 53
DNS
1025 80
1026 80 HTTP

1.1.1.1 2.2.2.2
NAT Table
Inside Outside
10.0.0.1 1.1.1.1
10.0.0.2 1.1.1.2
10.0.0.3 1.1.1.3
.1 10.0.0.4 1.1.1.4
10.0.0.5 1.1.1.5
.2 10.0.0.6 1.1.1.6

NAT
.3
10.0.0.0/24 1.1.1.0/24
.7 .1 .4 2.2.2.2
Internet
.4

.5

.6
NAT Table
Inside Outside
10.0.0.1 1.1.1.1
10.0.0.2 1.1.1.2
10.0.0.3 1.1.1.3
.1 10.0.0.4 1.1.1.4
10.0.0.5 1.1.1.5
.2 10.0.0.6 1.1.1.6

NAT
.3
2.2.2.2
.4

1.1.1.1
.5
1.1.1.2
1.1.1.3
.6 1.1.1.4
1.1.1.5
1.1.1.6
PAT Table
Inside Outside
10.0.0.1 1.1.1.1
10.0.0.2 1.1.1.1
10.0.0.3 1.1.1.1
.1 10.0.0.4 1.1.1.1
10.0.0.5 1.1.1.1
.2 10.0.0.6 1.1.1.1

PAT
.3
2.2.2.2
.4

1.1.1.1
.5
1.1.1.1
1.1.1.1
.6 1.1.1.1
1.1.1.1
1.1.1.1
PAT Table
Inside Outside
10.0.0.1 1.1.1.1 : 1024 socket 1
10.0.0.2 1.1.1.1 : 1025 socket 2
10.0.0.3 1.1.1.1 : 1026 socket 3
.1 10.0.0.4 1.1.1.1 : 1027 socket 4
10.0.0.5 1.1.1.1 : 1028 socket 5
.2 10.0.0.6 1.1.1.1 : 1029 socket 6

PAT
.3
2.2.2.2
.4

1.1.1.1 : 1024
.5
1.1.1.1 : 1025
1.1.1.1 : 1026
.6 1.1.1.1 : 1027
1.1.1.1 : 1028
1.1.1.1 : 1029
PAT Table
Inside Outside
10.0.0.1 1.1.1.1 : 1024 socket 1
10.0.0.2 1.1.1.1 : 1025 socket 2
10.0.0.3 1.1.1.1 : 1026 socket 3
.1 10.0.0.4 1.1.1.1 : 1027 socket 4
10.0.0.5 1.1.1.1 : 1028 socket 5
.2 10.0.0.6 1.1.1.1 : 1029 socket 6

PAT
.3
10.0.0.0/24 1.1.1.0/24
.2 .1 .4 2.2.2.2
Internet
.4
1029

.5

.6
PAT Table
Inside Outside
session 10.0.0.1 : 1024 1.1.1.1 : 1024 socket 1
10.0.0.1 : 1025 1.1.1.1 : 1025 socket 2
10.0.0.1 : 1026 1.1.1.1 : 1026 socket 3
.1 10.0.0.6 : 1024 1.1.1.1 : 1027 socket 4
10.0.0.6 : 1025 1.1.1.1 : 1028 socket 5
.2 10.0.0.6 : 1026 1.1.1.1 : 1029 socket 6
10.0.0.6 : 80 1.1.1.1 : 80
PAT
.3 10.0.0.5 : 69 1.1.1.1 : 69
10.0.0.0/24 1.1.1.0/24
.2 .1 .4 2.2.2.2
R(config)# ip nat inside source static udp 10.0.0.5
f0/0
Internet69 1.1.1.1 69
.4
1029

data 1026
1029 80 10.0.0.6
1.1.1.1 2.2.2.2 data 1029 80 1.1.1.1 2.2.2.2
tftp .5
data 80 1029
1026 2.2.2.2 10.0.0.6
1.1.1.1 data 80 1029 2.2.2.2 1.1.1.1

http .6 1026 R# clear ip nat translation *


ip nat pool ABC 1.1.1.1 1.1.1.1 prefix-length 24
R(config)#
R(config)#
ip natipinside
nat inside
sourcesource
list 1list
interface
1 pool f0/0
ABC overload
overload

You might also like