Jeremy’s IT Lab lecture video:
Commands
Commands List
NAT Privileged Exec Commands
3. NAT
Link to original
- clear ip nat translation *
-->Clears all dynamic NAT translations in the NAT translation tableNAT Show Commands
18. NAT
Link to original
- show ip nat translations
-->Shows information about IP addresses that have been translated through NAT- show ip nat statistics
-->Shows statistics about the current NAT processNAT Global Commands
NAT Global
1. Static NAT
- ip nat inside source static inside-local-ip inside-global-ip
-->Configures a one-to-one (Static NAT) IP address mapping2. Dynamic NAT
Link to original
- access-list ACL-ID{ deny
|permit } arguments-->Creates an ACL with the specified arguments. Used to decide which addresses should be translated with NAT- ip nat pool pool-name start-ip end-ip { prefix-length prefix-length | netmask subnet-mask }
-->Creates a NAT pool to be used for dynamic NAT translations- ip nat inside source list acl-id pool pool-name
-->Configures dynamic NAT on the router using the specified NAT pool and ACL- ip nat inside source list acl-id pool pool-name overload
-->Configures dynamic PAT on the router using the specified NAT pool and ACL- ip nat inside source list acl-id interface interface-id overload
-->Configures dynamic PAT on an interface using the specified NAT pool and ACLNAT Interface Commands
NAT Interface
Link to original
- ip nat inside
-->Defines the ‘inside’ interface(s) connected to the internal network- ip nat outside
-->Defines the ‘outside’ interface(s) connected to the external network
NAT Info
Private IPv4 Addresses (RFC 1918)
IPv4 doesn’t provide enough addresses for all devices that need them in the modern world.
- That’s why RFC 1918 was created as a short term solution for the problem. It specifies three IPv4 ranges as private address ranges (meant for local usage), and they are:
- 10.0.0.0/8 (10.0.0.0 to 10.255.255.255)
- 172.16.0.0/12 (172.16.0.0 to 172.31.255.255)
- 192.168.0.0/16 (192.168.0.0 to 192.168.255.255)
- Private IP addresses cannot be used over the internet.
- These addresses can be used freely in your local networks. They do not have to be globally unique.
Network Address Translation (NAT) General Information
Network Address Translation (NAT) is a protocol that is used to modify the source and/or destination IP addresses of packets.
- There are many reasons to use NAT, but the most common reason is to allow hosts with private IP addresses to communicate with other hosts over the internet.
- Source NAT is the NAT type that you’ll have to understand and know how to configure for the CCNA.
![]() |
|---|
| Source NAT demonstration |
Source NAT types, and what will be discussed in this lecture/note
- In this lecture/note, we’ll be focusing on Source Static NAT and how to set it up.
- Meanwhile, Dynamic Source NAT and Dynamic Source PAT will be discussed in the next lecture/note. (Day 45 - NAT (2))
NAT Address Types
There are four address types used in NAT, they are:
- Inside Local
- The IP address of the inside host, from the perspective of the local network
- Inside Global
- The IP address of the inside host, from the perspective of the global network
- Outside Local
- The IP address of the outside host, from the perspective of the local network
- Outside Global
- The IP address of the outside host, from the perspective of the global network
Good way to remember the types
- Inside/Outside refers to the location of the host
- Local/Global refers to the perspective
Note on: Outside Local and Outside Global addresses
- For the CCNA, the Outside Local and Outside Global addresses will be the same and will not change.
- Unless Destination NAT is used, the two addresses will be the same. (This is outside the scope of the CCNA certificate)
Static NAT
Static NAT involves statically configuring one-to-one mappings of private IP addresses to public IP addresses.
- When traffic from the internal host is sent to the outside network, the router will translate the source address.
- Also, this one-to-one mapping also allows external hosts to access the internal host via the Inside Global address.
Static NAT Configuration
show ip nat translations- Shows information about IP addresses that have been translated through NAT.
- Includes the following information:
- Protocol used in the connection
- Inside Local address
- Inside Global address
- Outside Local address
- Outside Global address
show ip nat statistics- Shows statistics about the current NAT process
- Includes the following information:
- Total active translations (static, dynamic, extended)
- Peak translations (highest amount of translations in one time)
- Outside interfaces
- Inside interfaces
- Etc.
clear ip nat translation *- Clears all dynamic NAT translations in the NAT translation table
- (One type of dynamic translations is IP address translations with a port included)
ip nat inside- Defines the ‘inside’ interface(s) connected to the internal network
ip nat outside- Defines the ‘outside’ interface(s) connected to the external network
ip nat inside source static INSIDE-LOCAL-IP INSIDE-GLOBAL-IP- Configures a one-to-one (Static NAT) IP address mapping
Jeremy’s IT Lab előadásvideó:
Parancsok
Parancslista
NAT Privileged Exec Parancsok
3. NAT
Eredeti hivatkozása
- clear ip nat translation *
-->Törli az összes dinamikus NAT fordítást a NAT fordítási táblázatból (NAT translation table)NAT Show Parancsok
18. NAT
Eredeti hivatkozása
- show ip nat translations
-->Információt jelenít meg a NAT által lefordított IP címekről- show ip nat statistics
-->Statisztikákat mutat a jelenlegi NAT folyamatrólNAT Globális Parancsok
NAT Global
1. Static NAT
- ip nat inside source static inside-local-ip inside-global-ip
-->Beállít egy egy-az-egyhez (Static NAT) IP cím leképezést2. Dynamic NAT
Eredeti hivatkozása
- access-list ACL-ID{ deny
|permit } arguments-->Létrehoz egy ACL-t a megadott paraméterekkel. Annak meghatározására szolgál, mely címeket kell lefordítani NAT-tal- ip nat pool pool-name start-ip end-ip { prefix-length prefix-length | netmask subnet-mask }
-->Létrehoz egy NAT pool-t a dinamikus NAT fordításokhoz- ip nat inside source list acl-id pool pool-name
-->Beállítja a dinamikus NAT-ot az útválasztón a megadott NAT pool és ACL használatával- ip nat inside source list acl-id pool pool-name overload
-->Beállítja a dinamikus PAT-ot az útválasztón a megadott NAT pool és ACL használatával- ip nat inside source list acl-id interface interface-id overload
-->Beállítja a dinamikus PAT-ot egy interfész nyilvános címére a megadott ACL használatávalNAT Interfész Parancsok
NAT Interface
Eredeti hivatkozása
- ip nat inside
-->Kijelöli a belső ('inside') hálózathoz csatlakozó belső interfész(eke)t- ip nat outside
-->Kijelöli a külső ('outside') hálózathoz csatlakozó külső interfész(eke)t
NAT Információk
Privát IPv4 Címek (RFC 1918)
Az IPv4 címtér véges, és nem biztosít elegendő egyedi címet a modern világ összes hálózatra kapcsolódó eszköze számára.
- Ezért hozták létre az RFC 1918 szabványt átmeneti megoldásként. Ez a dokumentum három IPv4 címtartományt határoz meg privát (helyi felhasználásra szánt) címtartományként:
- 10.0.0.0/8 (10.0.0.0 – 10.255.255.255)
- 172.16.0.0/12 (172.16.0.0 – 172.31.255.255)
- 192.168.0.0/16 (192.168.0.0 – 192.168.255.255)
- A privát IP címek nem továbbíthatók (nem forgalomirányíthatók) az interneten.
- Ezek a címtartományok bárki által szabadon és díjmentesen felhasználhatók a helyi magánhálózatokban; nem szükséges globálisan egyedinek lenniük.
Network Address Translation (NAT) Általános Információk
A Network Address Translation (NAT) egy olyan technológia, amellyel a csomagok forrás (source) és/vagy cél (destination) IP címét módosítják (fordítják) áthaladás közben.
- A NAT-nak számos felhasználási módja van, de a leggyakoribb cél az, hogy a privát IP címmel rendelkező belső hostok kommunikálhassanak az interneten található külső hostokkal.
- A Source NAT a legfontosabb NAT típus, amelyet a CCNA vizsgára érteni és konfigurálni kell.
![]() |
|---|
| Source NAT folyamat bemutatása |
Source NAT típusok és az anyag felépítése
- Ebben a leckében/jegyzetben a Source Static NAT működésére és konfigurálására fókuszálunk.
- A Dynamic Source NAT és a Dynamic Source PAT a következő tananyagban kerül bemutatásra (45. Nap - NAT (2)).
NAT Címtípusok (NAT Address Types)
A NAT terminológiában 4 címtípust különböztetünk meg:
- Inside Local
- A belső (inside) host IP címe a helyi (local) belső hálózat szemszögéből (jellemzően privát IP).
- Inside Global
- A belső (inside) host IP címe a globális (global) külső hálózat / internet szemszögéből (a lefordított nyilvános IP).
- Outside Local
- A külső (outside) host IP címe a helyi (local) belső hálózat szemszögéből.
- Outside Global
- A külső (outside) host IP címe a globális (global) külső hálózat szemszögéből.
Egyszerű megjegyzési szabály
- Az Inside / Outside a host fizikai/logikai elhelyezkedésére utal.
- A Local / Global a nézőpontra (szemszögre) utal.
Megjegyzés: Outside Local és Outside Global címek
- A CCNA szintjén az Outside Local és Outside Global címek mindig megegyeznek, és nem változnak meg.
- Csak akkor térnének el, ha Destination NAT-ot alkalmaznánk (ez a CCNA tananyagon kívül esik).
Static NAT (Statikus NAT)
A Static NAT egy állandó, egy-az-egyhez (one-to-one) leképezést hoz létre egy privát IP cím és egy nyilvános IP cím között.
- Amikor a belső host forgalmat küld a külső hálózat felé, a router a forrás (source) címet lefordítja a megadott nyilvános címre.
- Ez az egy-az-egyhez kapcsolat azt is lehetővé teszi, hogy külső hostok közvetlenül elérjék a belső szervert/eszközt az Inside Global címen keresztül.
Static NAT Konfiguráció
show ip nat translations- Megjeleníti a NAT táblázatban jelenleg aktív összes címfordítási bejegyzést.
- A következő oszlopokat tartalmazza:
- Protokoll (ha meg van adva)
- Inside Local cím
- Inside Global cím
- Outside Local cím
- Outside Global cím
show ip nat statistics- Részletes statisztikát nyújt a futó NAT folyamatról:
- Aktív fordítások száma (static, dynamic, extended)
- Csúcs fordítási szám (peak translations)
- Outside interfészek listája
- Inside interfészek listája
- Stb.
- Részletes statisztikát nyújt a futó NAT folyamatról:
clear ip nat translation *- Törli az összes dinamikus NAT bejegyzést a táblázatból.
- (A statikus fordításokat nem törli, csak a dinamikusan létrejötteket).
ip nat inside- Kijelöli az interfészt mint a belső (inside) hálózathoz tartozó interfészt.
ip nat outside- Kijelöli az interfészt mint a külső (outside) hálózathoz tartozó interfészt.
ip nat inside source static INSIDE-LOCAL-IP INSIDE-GLOBAL-IP- Létrehozza a fix egy-az-egyhez statikus NAT kapcsolatot a megadott belső és külső IP cím között.
/ATCH-Day-44---NAT-(1)-20240410224811.webp)