CCNA3 Module 6: NAT for IPv4 - Enterprise Networking Security and Automation (ENSA)
Summary
TLDRThe lecture covers Module 6 of the Cisco NetAcad CCNA 3 course, focusing on Network Address Translation (NAT) for IPv4. It explains how NAT is used to address IPv4 address exhaustion by translating private IP addresses to public ones, allowing devices to communicate over the internet. The lecture delves into the different types of NAT, including Static NAT, Dynamic NAT, Port Address Translation (PAT), and NAT64 which is used for IPv6. Static NAT involves a one-to-one mapping of local to global addresses, useful for consistent access to internal devices like web servers. Dynamic NAT uses a pool of addresses for on-demand translation. PAT allows multiple devices to share a single public address using different port numbers. The session also highlights the advantages of NAT, such as conservation of IP addresses, and disadvantages like end-to-end connectivity issues. It describes how NAT configuration is done on Cisco devices and discusses NAT64 for IPv6-IPv4 translation. The lecture concludes with verification steps for NAT configurations and mentions of practical exercises and resources for further learning.
Takeaways
- π NAT is essential for IPv4 address scalability.
- π Types of NAT include Static, Dynamic, PAT, and NAT64.
- π NAT helps in conserving global IPv4 addresses.
- πΌ NAT configuration can be performed on Cisco devices.
- π NAT has both technical advantages and limitations.
- π PAT uses ports to differentiate local IP addresses.
- π₯ NAT hides local IPs from external networks.
- π§ NAT may complicate IPsec tunneling protocols.
- π NAT64 enables IPv6 and IPv4 communication.
- π§ Understanding NAT terms is crucial for network setup.
Timeline
- 00:00:00 - 00:05:00
The lecture series for CCNA 3 covers enterprise networking, security, and automation. This particular module focuses on NAT for IPv4, discussing its configuration on edge routers to enhance IPV4 address scalability. Key areas include the characteristics and types of NAT, advantages and disadvantages, and various NAT techniques such as static NAT, dynamic NAT, PAT, and NAT64.
- 00:05:00 - 00:10:00
NAT characteristics are discussed, particularly how IPv4 address space is managed with private addresses as per RFC 1918, which cannot be routed over the internet. NAT translates these private addresses into public ones, allowing devices to access external networks. Three classes of IPv4 addresses - Class A, B, and C are also mentioned, with Class C being common in home routers.
- 00:10:00 - 00:15:00
NAT's primary function is to conserve public IPv4 addresses, making use of private addresses internally and translating them when public addresses are needed. It acts at the network edge, translating private to public IP addresses, often implemented in home/business routers to manage IPv4 exhaustion and maintain private-public communication across networks.
- 00:15:00 - 00:20:00
The NAT translation process is illustrated with a scenario where a PC communicates with an external web server. The process involves mapping local to global addresses, sending packets with translated addresses, receiving responses, and translating them back to local addresses, exemplifying how NAT facilitates communication between private and public networks.
- 00:20:00 - 00:25:00
The NAT terminology includes Inside Local Address, Inside Global Address, Outside Local Address, and Outside Global Address. These terms are explained from the device's perspective with the translated address, highlighting the IPv4 address translation process and ensuring proper communication channels within and outside a network.
- 00:25:00 - 00:30:00
Static NAT involves a one-to-one mapping of IP addresses, ensuring consistency and accessibility, especially for servers requiring remote access. This static method requires enough public addresses for simultaneous user sessions and allows for consistent address assignments without frequent changes. It's an essential feature for publicly accessible devices.
- 00:30:00 - 00:35:00
Dynamic NAT, in contrast, assigns IP addresses from a pool on a first-come, first-served basis. This flexible allocation still requires sufficient public addresses for users, allowing dynamic assignments without manual configuration. Its efficiency depends on the availability of public addresses, adapting to the changing needs of network access.
- 00:35:00 - 00:40:00
Port Address Translation (PAT) or NAT overload allows multiple private addresses to map to a single public IP. PAT distinguishes communication sessions using different TCP port numbers, handling multiple sessions across the same public IP. Itβs common in home networks, adjusting to port availability and pool allocation to facilitate multiple connections.
- 00:40:00 - 00:45:00
PAT manages ports efficiently by preserving and reassigning port numbers if needed while accommodating simultaneous sessions across fewer public IPv4 addresses. Known as 'NAT overload', itβs crucial for conserving address space, allowing many-to-one mappings, and supporting extensive network sessions, enhancing flexibility and connectivity.
- 00:45:00 - 00:50:00
Verifying NAT operations involves using commands like show ip nat translations and show ip nat statistics, allowing administrators to monitor dynamic and static NAT processes. These commands aid in ensuring the proper allocation of address pools, clearing statistics for accuracy, and generally verifying network configurations are functioning as expected.
- 00:50:00 - 00:55:00
Dynamic NAT with pools entails configuring address pools and associating them with access control lists (ACLs) for address translation, dynamically assigning addresses to devices based on requests. Verification through command line confirms the effective translation and availability, facilitating network traffic efficiently with minimal manual oversight.
- 00:55:00 - 01:00:00
For PAT configuration using a single IP or a pool, the process involves adding the 'overload' keyword to enhance dynamic translation for multiple internal devices using few external addresses. The communication sessions are uniquely identified by different port numbers, supported by the NAT overload capability, ensuring efficient network management.
- 01:00:00 - 01:05:00
Analyzing PAT operations reveals the extensive use of IP and port modifications, accommodating both PC-to-server and server-to-PC communications. The use of the same public IP with differing ports exemplifies its efficacy, essential for port flexibility and ensuring sustained connectivity across diverse network configurations.
- 01:05:00 - 01:10:00
Verification of PAT, similar to NAT, uses show ip nat commands to review translation statistics and address allocations. It emphasizes the sharing of IPv4 addresses, distinct port numbers for transactions, ensuring network operations are optimized for multiple simultaneous connections while maintaining clarity of operation.
- 01:10:00 - 01:15:00
NAT64 facilitates IPv4 to IPv6 transition by allowing communication between IPv6 and IPv4 environments. Although designed to make NAT obsolete, IPv6 NAT64 focuses on transitional solutions rather than prolonged reliance on address translations, providing protocol translation where needed without extensive NAT dependence.
- 01:15:00 - 01:20:00
The lecture wraps up by summarizing NAT concepts, reinforcing the need for address translation due to IPv4 scarcity, and clarifying the terminologies and processes through dynamic and static NAT, PAT, and NAT64. Emphasis is placed on understanding NATβs role in networking, its operational principles, and practical configurations.
- 01:20:00 - 01:25:44
In conclusion, the comprehensive exploration of NAT in this lecture addresses configuration strategies, verification methods, operational nuances of NAT, PAT, and NAT64. It emphasizes understanding network address translation's significance in managing IPv4 address limitations and ensuring seamless transitions toward IPv6.
Mind Map
Video Q&A
What is the main purpose of NAT in networking?
The main purpose of NAT is to conserve public IPv4 addresses and allow private IPv4 addresses within a local network to be translated to public addresses for external communication.
What are the different types of NAT?
The different types of NAT are Static NAT, Dynamic NAT, Port Address Translation (PAT), and NAT64.
Why is NAT used extensively despite IPv6 availability?
NAT is extensively used due to IPv4 address exhaustion, as it allows for the conservation and efficient use of limited IPv4 addresses.
What does Port Address Translation (PAT) do?
PAT allows multiple devices on a local network to be mapped to a single public IPv4 address but with different port numbers.
What are the advantages of using NAT?
NAT allows for the conservation of public IPv4 addresses, hides local network addresses for security, and maintains a consistent internal addressing scheme.
What are the disadvantages of NAT?
NAT can increase forwarding delays, complicate VPN tunneling protocols like IPsec, and cause loss of end-to-end IP traceability.
How does Dynamic NAT differ from Static NAT?
Dynamic NAT uses a pool of public addresses assigned on a first-come-first-serve basis, while Static NAT uses a fixed, manually configured one-to-one address mapping.
What is NAT64 used for?
NAT64 is used for protocol translation between IPv6-only and IPv4-only networks to facilitate communication.
Is NAT a solution for IPv4 address exhaustion?
Yes, NAT is a temporary solution for IPv4 address exhaustion by allowing multiple devices to share a limited number of public addresses.
How does NAT affect security?
NAT can hide internal network addresses from external observers, providing a basic level of security, but it's not a comprehensive security measure.
View more video summaries
Windows command line networking: netstat
MY 6 WEEK UPDATE ON MOUNJARO; TIRZEPATIDE; HOW MUCH DID I LOSE, SIDE EFFECTS, BENEFITS, AND MORE
Preventing Chronic Disease through Lifestyle Choices
Danielle ~ The Clay Lady - Introduction to the Potter's Wheel
GW2 - "The Tale of Hong Kiltong"
Ep:338 OZEMPIC AND MOUNJARO: YOU MUST DO THIS!!!
- 00:00:00welcome back to the cisco netacad ccna 3
- 00:00:04enterprise networking security and
- 00:00:06automation lecture series
- 00:00:08if you haven't seen my previous lecture
- 00:00:10series covering ccna1 and ccna2 i will
- 00:00:14leave links in the description for those
- 00:00:16playlists
- 00:00:17i would recommend that you go through
- 00:00:19the previous ccna lectures before you
- 00:00:22move forward with this course
- 00:00:24today i will cover module number six
- 00:00:27which is nat for ipv4
- 00:00:31the objective of this module is to learn
- 00:00:33how we can configure nat services on
- 00:00:36edge router to provide ipv4 address
- 00:00:39scalability
- 00:00:41i will cover nat
- 00:00:42characteristics types of nat
- 00:00:45nat advantages and disadvantages
- 00:00:48static nat dynamic nat
- 00:00:51pat
- 00:00:52and nat 64.
- 00:00:57nat characteristics
- 00:01:01ipv4 address space
- 00:01:04networks commonly implemented using
- 00:01:07private ipv4 addresses as defined in rfc
- 00:01:121918 standard
- 00:01:14so remember networks are
- 00:01:16commonly implemented using ipv for
- 00:01:18addresses
- 00:01:19but based on the rfc 1918 standard
- 00:01:24private ipv4 addresses cannot be routed
- 00:01:27over the internet and are used within an
- 00:01:29organization or site to allow devices to
- 00:01:32communicate locally
- 00:01:34to allow a device with a private ipv4
- 00:01:38address to access devices and resources
- 00:01:41outside of its local network the private
- 00:01:44address must be translated
- 00:01:46to a public address
- 00:01:48so the network address translation or
- 00:01:50nat provides the translation of private
- 00:01:53addresses
- 00:01:54to public addresses
- 00:01:56and on the right hand side
- 00:01:58we have three classes of ipv4 addresses
- 00:02:02we have class a class b and class c
- 00:02:05and you see the range in the middle
- 00:02:07under the activity type
- 00:02:09the range of ip addresses associated
- 00:02:11with these classes
- 00:02:13in most home routers
- 00:02:15you probably have seen the class c which
- 00:02:18is the 192 this this ips address range
- 00:02:22because that is typically the default on
- 00:02:24d-link and cisco and many other ip
- 00:02:27address schemes built into some of those
- 00:02:29routers and modems
- 00:02:32but however you may also have come
- 00:02:34across the other ip addresses listed
- 00:02:36here
- 00:02:37these are like different types of
- 00:02:38classes
- 00:02:40associated with the ipv4 rfc 1918
- 00:02:43standard
- 00:02:47so what is
- 00:02:48nat the primary use of nad is to
- 00:02:51conserve public ipv4 addresses
- 00:02:55in my previous lectures i have mentioned
- 00:02:57numerous times how we are running out of
- 00:03:00ipv4 addresses
- 00:03:02that can be routed globally
- 00:03:05so the nat is actually a temporary
- 00:03:08solution that we use uh to prevent ipv4
- 00:03:12address exhaustion
- 00:03:14so nat allows networks to use private
- 00:03:17ipv4 addresses internally and translate
- 00:03:21them to a public address when needed
- 00:03:24a net router typically operates at the
- 00:03:27border of a stubbed network
- 00:03:29when a device inside the stub network
- 00:03:33wants to communicate with a device
- 00:03:35outside of its network the packet is
- 00:03:37forwarded to the border router which
- 00:03:39performs the network address translation
- 00:03:42process translating the internal private
- 00:03:45address of the device to a public
- 00:03:47outside routable address
- 00:03:50so the primary purpose of the nat
- 00:03:53is to sit
- 00:03:54right at the edge of that private
- 00:03:56network
- 00:03:57and then translate the private ip
- 00:04:01addresses into a publicly routable ip
- 00:04:05address hence the nat stand for network
- 00:04:07address translation and these are
- 00:04:09typically
- 00:04:10this is a process typically happens in
- 00:04:14the router at the edge of your private
- 00:04:17network so at
- 00:04:19in small businesses and in homes this is
- 00:04:22typically done in the router modem
- 00:04:24combination devices
- 00:04:26or on the router at the edge of your
- 00:04:29network which is connected to your the
- 00:04:32internet service provider
- 00:04:38so how
- 00:04:39does the nat works so pc1 in this
- 00:04:42situation on the right hand side this
- 00:04:44diagram
- 00:04:46wants to communicate with an outside web
- 00:04:48server with a public address of
- 00:04:50209.165.201.1
- 00:04:54so the pc one
- 00:04:56which is this one which is not really
- 00:04:58labeled as pc one but this is the pc one
- 00:05:00connected to router one and it wants to
- 00:05:02communicate to the
- 00:05:04web server with ip address 209.165.201
- 00:05:10which is outside of its uh private
- 00:05:13network so the the web server is not
- 00:05:15within the pc one's private network
- 00:05:18so what happens is a pc one sends a
- 00:05:20packet
- 00:05:21address to the web server
- 00:05:23next the r2 which is this edge router
- 00:05:27receives the packet and reads the source
- 00:05:30ipv4 address to determine if it's if it
- 00:05:33needs a translation
- 00:05:36r2 adds mapping of the local to global
- 00:05:40address to the nat table so it actually
- 00:05:43going to get the local ipe and then map
- 00:05:46it to the global ip for that nat table
- 00:05:50then the r2 sends the packet with the
- 00:05:52translator source address towards the
- 00:05:54destination then it's going to get
- 00:05:55forwarded towards the destination of
- 00:05:58this
- 00:05:59you know server
- 00:06:01the web server responds with a packet
- 00:06:03address to the inside global address of
- 00:06:06pc1 which is a 209.165.200.226.
- 00:06:11so it's going to get addressed back to
- 00:06:13that inside address with this one
- 00:06:16then the r2
- 00:06:18receives the packet with the destination
- 00:06:20address 209.165.200.226
- 00:06:24that to checks the nat table and finds
- 00:06:26an entry for this mapping
- 00:06:29r2 uses this information and translate
- 00:06:32the inside global address
- 00:06:34209.165.200.226
- 00:06:37to inside local address which is going
- 00:06:40to be the 192.168.10.10
- 00:06:44and the packet is forwarded towards the
- 00:06:46pc one
- 00:06:47so
- 00:06:48what happened here
- 00:06:49if i described in plain simple uh
- 00:06:53english
- 00:06:54what happened is that this device want
- 00:06:56to communicate outside of its network
- 00:07:00and the what this device is trying to do
- 00:07:02is to communicate to this web server in
- 00:07:05the uh in the internet or in a different
- 00:07:07network
- 00:07:09however
- 00:07:10this
- 00:07:11device cannot see
- 00:07:13this
- 00:07:14server
- 00:07:15so what it needs is a nat a network
- 00:07:18address translation so what the network
- 00:07:20address translation is doing is that it
- 00:07:23is matching the ip address of the
- 00:07:25internal device
- 00:07:27to an external device is trying to
- 00:07:30communicate
- 00:07:31so that it can be
- 00:07:33you know used
- 00:07:34for communication between the external
- 00:07:37and the internal device
- 00:07:39so that is the simplest way i look at
- 00:07:41the how the net tables work
- 00:07:44so
- 00:07:45basically you have a net table simulator
- 00:07:48like this so you have a net payable will
- 00:07:50have an inside local address which is
- 00:07:52the address of the device that trying to
- 00:07:54communicate to outside you have an
- 00:07:56internal insight global address so that
- 00:07:58is an internal global address and then
- 00:08:00you're going to have a outside local
- 00:08:02address
- 00:08:03and then you have an outside global
- 00:08:05address and using that information in
- 00:08:07that table this pc is now able to reach
- 00:08:10the internet
- 00:08:12even though its internal ip address is
- 00:08:15not globally routable because it is all
- 00:08:17done through the net translation so
- 00:08:19that's how i look at this
- 00:08:21six step process
- 00:08:25so let's look at some terminologies
- 00:08:27associated with nat
- 00:08:30the net includes four types of addresses
- 00:08:32you will hear the inside local address
- 00:08:36inside global address outside local
- 00:08:39address and outside global address so
- 00:08:41you will hear those four types when
- 00:08:43somebody is talking to you about nat
- 00:08:46so the nat terminology is always applied
- 00:08:49uh from the perspective of the device
- 00:08:51with the translated address so remember
- 00:08:55the nat terminology so when if you want
- 00:08:57to know how this terminology is being
- 00:09:00applied or used it is always applied
- 00:09:02from the perspective of the device with
- 00:09:04the translated address
- 00:09:06so that means the inside you know
- 00:09:08whatever the device that been getting
- 00:09:09translated in the inside the local
- 00:09:12network
- 00:09:13so the inside address is the address of
- 00:09:15the device which is being translated by
- 00:09:17the network address translator so the
- 00:09:19nat
- 00:09:21the outside address is the address of
- 00:09:23the destination device
- 00:09:26in our previous example
- 00:09:28the outside address going to be the
- 00:09:30address of the web server the inside
- 00:09:32address going to be the address of the
- 00:09:34yeah the computer the pc one that is
- 00:09:37trying to communicate to that web server
- 00:09:40the local address is a address is that
- 00:09:44is any address that appeared on the
- 00:09:46inside portion of the network
- 00:09:49so the local address
- 00:09:50is the address that is the inside
- 00:09:52portion of that nat table so the net
- 00:09:54site the global the global address is an
- 00:09:57address that is in any address that
- 00:09:58appears on the outside portion of the
- 00:10:00network so remember if you go back in
- 00:10:02here so the inside address is right here
- 00:10:05the outside address is right here and
- 00:10:08the the other options that we have
- 00:10:11in here is the uh the inside um
- 00:10:15sorry
- 00:10:16local address sorry local address
- 00:10:19and the global address so the the local
- 00:10:23address is here global addre you know
- 00:10:25local
- 00:10:26global address is outside and then you
- 00:10:29have the inside local and the outside
- 00:10:31local so you actually see all of that
- 00:10:32information appear on the nat table
- 00:10:36so remember those terms and remember
- 00:10:39that the terminology is applied from the
- 00:10:41perspective of the device with the
- 00:10:43translated address so that's very
- 00:10:46important
- 00:10:51inside local address
- 00:10:54the address of the source as seen from
- 00:10:57the inside of the network is the inside
- 00:10:59local address
- 00:11:01this is typically a private ipv4 address
- 00:11:04the inside local address of pc1 in this
- 00:11:07example is the 192.168.10.10
- 00:11:11because that is the local internal ip
- 00:11:14address of that pc so that is the inside
- 00:11:16local address
- 00:11:17the inside global addresses
- 00:11:20this is the address of this source as
- 00:11:23seen from the outside network
- 00:11:26the inside global address of pc1 in this
- 00:11:29example going to be
- 00:11:33209.165.200.226. so this is the address
- 00:11:34of the source as seen from outside of
- 00:11:37the network so if somebody looking from
- 00:11:39outside to the inside of the network it
- 00:11:40doesn't see the
- 00:11:41192.168.10.10 instead it sees that
- 00:11:43209.165.200.226.
- 00:11:48outside global address is the address of
- 00:11:51the destination
- 00:11:52as seen from the outside the network so
- 00:11:55from outside the network
- 00:11:57whatever the address that is seen
- 00:12:00as the destination um you know
- 00:12:02as address of the destination scene from
- 00:12:04the outside is what we call the outside
- 00:12:06network which is outside of this so the
- 00:12:09outside global address in this example
- 00:12:11for web server is 209.165.200.1
- 00:12:16which is that one
- 00:12:18the outside local address however is the
- 00:12:21address of the destination as seen from
- 00:12:23the inside of the network so the outside
- 00:12:26local address is the address of the
- 00:12:28destination as seen from the inside of
- 00:12:31the network so the pc one sends traffic
- 00:12:33to the web server at ipv4 address of
- 00:12:36209.164
- 00:12:40so that would be
- 00:12:41the outside you know the local address
- 00:12:46while it is uncommon this address could
- 00:12:48be different than the globally routable
- 00:12:50address of the destination so remember
- 00:12:53that
- 00:12:54even though it is very uncommon to see
- 00:12:56that this address could be different
- 00:12:58from the globally routable address of
- 00:13:00the destination address so that now you
- 00:13:02can see
- 00:13:03those different addresses and how we've
- 00:13:05been used on the right hand side so we
- 00:13:08have the inside local address in a
- 00:13:10graphical format you see this here and
- 00:13:12you have the outside
- 00:13:14local address when the data is going
- 00:13:15this way and then you have the inside
- 00:13:18global and outside global when the data
- 00:13:19coming back you have
- 00:13:21the and the outside global address
- 00:13:24inside global address outside local
- 00:13:26address and
- 00:13:28inside local address so you can see that
- 00:13:31in a graphical format on the right hand
- 00:13:33side
- 00:13:37types of nat
- 00:13:41static network address translation or
- 00:13:43static nat
- 00:13:45uses a one-to-one mapping of local and
- 00:13:48global address configured by the network
- 00:13:51administrator that remain constant so
- 00:13:53just like the term static
- 00:13:56you know what it stands for in english
- 00:13:58it is a static statistical statically
- 00:14:01assigned sorry statically assigned that
- 00:14:03mean an administrator
- 00:14:05manually assigned the nat in static net
- 00:14:09static net is useful for web servers or
- 00:14:12devices that must have a consistent
- 00:14:15address that is accessible from the
- 00:14:18internet
- 00:14:19such as a company web server or a
- 00:14:22company email server ftp server etc
- 00:14:25it is also useful for devices that must
- 00:14:28be accessible by authorized personnel
- 00:14:30when off-site but not by general public
- 00:14:33on the internet so because you don't
- 00:14:35want those ip addresses and information
- 00:14:38to change
- 00:14:39for those resources that has to be
- 00:14:41accessed by someone remotely outside the
- 00:14:44network you can create that static nat
- 00:14:47entries
- 00:14:48so on the right hand side here's an
- 00:14:51example of that you have an inside
- 00:14:52network with a server and
- 00:14:55several end devices connected to a
- 00:14:57switch
- 00:14:58and you can have a static net
- 00:15:00translation
- 00:15:02assigned to this particular server so
- 00:15:05that it won't change
- 00:15:07its ip addresses and other
- 00:15:08configurations associated with that net
- 00:15:11translation
- 00:15:13by you know
- 00:15:14by configuring it in the administrative
- 00:15:16sections of the router so you can go
- 00:15:19into the net table and you can enter an
- 00:15:21entry so that the the entry for this
- 00:15:25server will remain the same in the
- 00:15:28inside global address
- 00:15:30you know
- 00:15:31with respect to that ip internal ip
- 00:15:33address of that server
- 00:15:35please note the static network trust
- 00:15:37that
- 00:15:38enough public addresses are available to
- 00:15:40satisfy the total number of simultaneous
- 00:15:43user sessions so if you are creating
- 00:15:45these kind of static nad entries you
- 00:15:48need to have enough public addresses
- 00:15:50available to satisfy the total number of
- 00:15:52simultaneous uses in the in a session so
- 00:15:55remember that
- 00:15:58the other option is called the dynamic
- 00:16:00nat
- 00:16:01so that's another type of nat so in
- 00:16:04dynamic nat uses
- 00:16:06a pool of public addresses and assigns
- 00:16:09them to a first come first serve basis
- 00:16:13so just like it's what it sounds like it
- 00:16:16is dynamically assigned
- 00:16:18you know
- 00:16:20method
- 00:16:20so when an inside device requests access
- 00:16:23to an outside network the dynamic net
- 00:16:25assigns an available public ipv4 address
- 00:16:29from a pool
- 00:16:31the other addresses in the pool are
- 00:16:33still available
- 00:16:34for use
- 00:16:35but the it's gonna assign dynamically as
- 00:16:38the request comes in
- 00:16:40please note the dynamic net request that
- 00:16:43enough public addresses are also be
- 00:16:45available to satisfy the total number of
- 00:16:48simultaneous user session so just like
- 00:16:50the static nand the dynamic net also
- 00:16:52requires uh that enough public addresses
- 00:16:55are available um for simultaneous use so
- 00:16:59on the right hand side uh the you can
- 00:17:01see a situation where we have the
- 00:17:04dynamic net
- 00:17:05configured now in this case
- 00:17:07the router will be
- 00:17:09dynamically assigning those uh
- 00:17:12nat translations uh based on the request
- 00:17:16it gets from the inside network
- 00:17:21port address translation
- 00:17:24port address translation also known as
- 00:17:27nat overload
- 00:17:28maps multiple private ipv4 addresses to
- 00:17:32a single public ipv4 address or a few
- 00:17:35addresses
- 00:17:37so with pat when the nat router receives
- 00:17:40a packet from the client it uses the
- 00:17:43source port number to uniquely identify
- 00:17:45the specific nat translation
- 00:17:48pat ensures
- 00:17:50that devices use a different tcp port
- 00:17:53number each session with a server on the
- 00:17:56internet
- 00:17:58so
- 00:17:58in other words if these two computers
- 00:18:01try to reach the exact same server
- 00:18:03through this one router it still can use
- 00:18:06the same public ip address but because
- 00:18:09they're coming from two different ports
- 00:18:12the pad gonna associate those
- 00:18:14ports
- 00:18:16so that both of these devices inside the
- 00:18:18network can access the same server at
- 00:18:21the same time
- 00:18:23if you look at your home network
- 00:18:26and your isp provided router it is
- 00:18:29actually running pat instead of nat so
- 00:18:33you probably have like one or two uh
- 00:18:36publicly facing ip addresses so most
- 00:18:39likely for most home users is going to
- 00:18:41be one publicly facing ip address
- 00:18:45and then
- 00:18:46you are using the pat the port address
- 00:18:50translation method
- 00:18:52for communicating with the outside world
- 00:18:54so what it what is the key feature with
- 00:18:56the pad is that with pat when the nat
- 00:18:59router receives a packet from
- 00:19:01the client it uses the source port to
- 00:19:04uniquely identify that nat translation
- 00:19:07so that everybody can use this like a
- 00:19:10multiple devices can use the same ip
- 00:19:12address
- 00:19:13but associated different ports with it
- 00:19:16to communicate to the outside world
- 00:19:19so that's the way i look at the nat
- 00:19:21and
- 00:19:22what actually nat doing is that
- 00:19:26the the nat is
- 00:19:28modifying
- 00:19:29the layer 3 headers
- 00:19:32while the pad is modifying both layer 3
- 00:19:35and layer 4 headers
- 00:19:40next available port
- 00:19:43pat attempts to preserve the original
- 00:19:46source port if the original source port
- 00:19:49is already used pat assigns the first
- 00:19:52available port number starting from the
- 00:19:54beginning of the appropriate port group
- 00:19:57so it could be from 0 to 5 11
- 00:20:01512 to
- 00:20:031023 or one thousand twenty four to
- 00:20:06sixty five thousand five hundred thirty
- 00:20:08five so what pat going to do is pat
- 00:20:11attempts to preserve the original source
- 00:20:12port but but if the original soft spot
- 00:20:15is already used then what's pat gonna
- 00:20:18assign
- 00:20:19a
- 00:20:20available port number starting from the
- 00:20:22beginning of the appropriate port group
- 00:20:25so if the original part is fall between
- 00:20:28in here it's going to find an
- 00:20:30appropriate port within here if it is
- 00:20:32false in here it's going to find an
- 00:20:33appropriate port in here
- 00:20:36so when there are no more ports
- 00:20:37available and there is more than one
- 00:20:40external address in the address pool pat
- 00:20:43moves to the next address to try to
- 00:20:45allocate the original source port
- 00:20:47the process continues until there are no
- 00:20:50more available ports or external ipv4
- 00:20:53addresses in the address pool
- 00:20:56so in this example we have the inside
- 00:20:59network with three end devices we have a
- 00:21:02router with the pad configured and we
- 00:21:05have the outside internet and if you
- 00:21:07look at the net uh table with overload
- 00:21:09because nat or with overload is the same
- 00:21:12as pat remember it's the same term uh
- 00:21:16like the same concept
- 00:21:18uh so um
- 00:21:20not overload or the pat pat
- 00:21:23is basically have that you know inside
- 00:21:26global ip address and the inside local
- 00:21:28ip addresses but however what differ
- 00:21:32this from you know the
- 00:21:34typical nat table is that these ip
- 00:21:37addresses have port numbers associated
- 00:21:40with it because remember the nap pad is
- 00:21:43modifying both the layer 3 and layer 4
- 00:21:47as opposed to nat only modifying the
- 00:21:49layer 3 headers right so layer 3 header
- 00:21:52is associated with just the ip address
- 00:21:55and the layer 3 f4 is associated with
- 00:21:58the port number so the type of port that
- 00:22:01being used so
- 00:22:03in
- 00:22:03pat we are modifying both the
- 00:22:06layer
- 00:22:073 ip address and the layer 4
- 00:22:11port number so remember that that is a
- 00:22:13difference between nan and pad
- 00:22:16so in the next page we are actually
- 00:22:18looking at some of the differences um
- 00:22:20in a table
- 00:22:22so on the right hand side there is a
- 00:22:24summary
- 00:22:25of differences between nat and pat
- 00:22:28so nat one to one mapping between inside
- 00:22:32local and inside global addresses while
- 00:22:34pat
- 00:22:35one inside global address can be mapped
- 00:22:38to many inside local addresses because
- 00:22:41now we have port number association
- 00:22:43nat uses only ipv4 addresses in
- 00:22:46translation process while the path uses
- 00:22:49ipv4 addresses and the tcp or udp source
- 00:22:53port numbers in translation process so
- 00:22:56it uses ip and the port
- 00:23:00nat
- 00:23:01uses a unique uh inside global address
- 00:23:04is required for each inside host
- 00:23:07accessing the outside network so in the
- 00:23:10net you need to have a unique inside
- 00:23:12global address for each inside host but
- 00:23:16with pad a single unique inside global
- 00:23:19address can be shared by many inside
- 00:23:22hosts
- 00:23:23accessing the outside network so pat has
- 00:23:26some more advantages than nat
- 00:23:29and remember nat only modifies the ipv4
- 00:23:33addresses
- 00:23:34while the path modifies both the ipv4
- 00:23:38address and the port number hence the
- 00:23:40nat as i mentioned before only modify
- 00:23:43the layer 3 header while the path modify
- 00:23:47both layer 3 which is the ip address and
- 00:23:50the layer 4 headers which is the port
- 00:23:52number
- 00:23:54you should remember this like back of
- 00:23:55your hand because you know this is this
- 00:23:58will show up on your exams and quizzes
- 00:24:04packets without a layer 4 segment
- 00:24:07some packets do not contain a layer for
- 00:24:09port number such as icmp
- 00:24:11version 4 messages
- 00:24:14each of these types of protocols is
- 00:24:17handled differently by pat
- 00:24:19because remember pat's request
- 00:24:21i mean pat uses utilizes both layers
- 00:24:25three and layer four but not all packets
- 00:24:28contain layer for information such as
- 00:24:30the port numbers right such as icmps
- 00:24:34so
- 00:24:35for example the icmp version for query
- 00:24:37messages echo request and echo replies
- 00:24:40include a query id
- 00:24:43icmp version 4 uses the query id to
- 00:24:46identify any code request with its
- 00:24:48corresponding echo reply
- 00:24:51please note other icmp version 4
- 00:24:54messages do not use the query id these
- 00:24:56messages and other protocols that do not
- 00:24:59use tcp or udp port numbers very uh
- 00:25:04vary and are beyond the scope of this
- 00:25:06curriculum so
- 00:25:08keep that in mind back of your mind it
- 00:25:11is not part of this course this lecture
- 00:25:14series for now but in the future
- 00:25:16you know i will cover this
- 00:25:19the path uses both layer 3 and layer 4
- 00:25:23modification
- 00:25:25nat do not
- 00:25:26however not all packets that you're
- 00:25:28gonna send through the pad
- 00:25:30will have layer four which is the port
- 00:25:33number such as the iecmp version four
- 00:25:36but those are handled differently by the
- 00:25:38pad which we will not cover
- 00:25:41in this lecture okay that's all you need
- 00:25:44to know for now for nat versus pad so
- 00:25:47remember the layer three layer two
- 00:25:49differences and also remember that pat
- 00:25:51is what actually being used in most
- 00:25:54homes so if you buy a router if you get
- 00:25:57a router modem combination from your isp
- 00:26:00when you
- 00:26:00connect to the internet when you when
- 00:26:02you are watching this video for example
- 00:26:04by connecting to youtube.com
- 00:26:06you are basically using
- 00:26:08a pat not an ad even though we typically
- 00:26:12misuse the term nat all the time
- 00:26:15most home routers most home
- 00:26:18you know router modem combination
- 00:26:20devices use a type of pad so it is pad
- 00:26:24so that's what you need to understand
- 00:26:26for now don't worry about how icmp
- 00:26:29version 4 packets are handled by the pad
- 00:26:30but it is beyond the scope of this
- 00:26:33class
- 00:26:36so there's a packet tracer file called
- 00:26:38investigate nat operations if you have
- 00:26:41access to this file please go ahead
- 00:26:43download it and do it if you do not i
- 00:26:46will leave a copy in the
- 00:26:49sanuj.com website and i will make sure
- 00:26:51to leave a link in the description so
- 00:26:53you can go and click and download it and
- 00:26:55do it
- 00:26:59net advantages and disadvantages
- 00:27:05so let's look at the advantages of nat
- 00:27:08nat provides many benefits
- 00:27:11they include net conserve the
- 00:27:13legally registered addressing scheme by
- 00:27:15allowing the privatization of
- 00:27:19internet so what basically
- 00:27:22it is doing is that remember the ipv4
- 00:27:25address exhaustion issue so that that
- 00:27:27has been addressed by nat so the nat is
- 00:27:30basically conserving the legally
- 00:27:32registered addressing scheme by allowing
- 00:27:35the privatization of you know the
- 00:27:38internet so the the internal networks of
- 00:27:41any
- 00:27:43land network
- 00:27:44is now separated from globally routable
- 00:27:48ip addresses as a result of use of nat
- 00:27:51nat also conserves the address through
- 00:27:53application port level multiplexing that
- 00:27:57increases the flexibility of connections
- 00:27:59to the public network that provides
- 00:28:01consistency for internal network
- 00:28:04addressing schemes so that means that
- 00:28:07you can have a specific addressing
- 00:28:09schemes associated with your
- 00:28:11organization you can use because you are
- 00:28:12behind a nat
- 00:28:14you can use whatever addressing scheme
- 00:28:16you like you don't have to worry about
- 00:28:18you know uh whether it's it's globally
- 00:28:20routable or not like for example uh you
- 00:28:23may want to use
- 00:28:24192.168.10. something like that or you
- 00:28:27192.168.20. something or for something
- 00:28:29else with the new network and
- 00:28:32192.168.30. something for something
- 00:28:34other than you know those two so
- 00:28:37so on and so forth like you can
- 00:28:38customize the anyway you like
- 00:28:41uh you know
- 00:28:42for your internal network uh the
- 00:28:45addresses because they are not like a
- 00:28:47globally routable ip addresses they are
- 00:28:49just within your organization
- 00:28:51that also allows the existing private
- 00:28:53ipv4 address scheme to remain while
- 00:28:56allowing for easy
- 00:28:58change to a new public addressing scheme
- 00:29:01and that hides the ipv for addresses of
- 00:29:04users and other devices so not
- 00:29:07theoretically like it's not a very good
- 00:29:10way to
- 00:29:11for security but it is
- 00:29:13better than expose ip addresses uh to
- 00:29:16the uh the outside world so that
- 00:29:18basically hides the internal ip
- 00:29:20addresses from the outside world but
- 00:29:22remember nat is not a firewall though so
- 00:29:25it's not a security feature but it kind
- 00:29:27of provide a type of security where it
- 00:29:29kind of hides the internal ip address
- 00:29:32from the outside world but remember it's
- 00:29:35it's not a security feature though okay
- 00:29:38so what are the disadvantage of nat
- 00:29:42so the drawbacks or disadvantages
- 00:29:44include net increases forwarding delays
- 00:29:47because remember every
- 00:29:49data packet that goes through the pat or
- 00:29:52nat has to be translated every single
- 00:29:55time it goes out as well as every single
- 00:29:58time the packet comes back in right so
- 00:30:00if you want to access a web server from
- 00:30:03inside
- 00:30:04your initial transaction has to be
- 00:30:06translated through the pattern at and
- 00:30:09when the web server send the information
- 00:30:11back to you
- 00:30:12that packet packets also has to be
- 00:30:15translated uh by the neither nato pad so
- 00:30:18that gonna create a forwarding delays
- 00:30:21it also can create end-to-end addressing
- 00:30:24um
- 00:30:26loss so it causes the loss of the
- 00:30:28end-to-end addressing so the addressing
- 00:30:30is not consistent so
- 00:30:32your end device your device
- 00:30:36is not directly addressing
- 00:30:38the uh server outside outside your
- 00:30:41network it's actually being there's a
- 00:30:45type of a man in the middle situation
- 00:30:47right basically a nat is basically
- 00:30:49acting as a translator between
- 00:30:52the
- 00:30:53outside world server and you so that's
- 00:30:56what it means by the end-to-end
- 00:30:58addressing is lost
- 00:30:59the end-to-end ip v4 traceability is
- 00:31:02also lost so there are situations where
- 00:31:04you need to trace the ip
- 00:31:07for troubleshooting as well as for other
- 00:31:09reasons and that will be lost at the nat
- 00:31:13nat complicates the use of tunneling
- 00:31:15protocols such as ipsec so if you have
- 00:31:18ipsec tunnels that you need to create
- 00:31:20like a vpn tunnels nat will create
- 00:31:23complications which we will cover later
- 00:31:25sometime so i will go over like ipsec
- 00:31:29and vpns and how nat can complicate it
- 00:31:32and how we go about resolving that nat
- 00:31:35complication with respect to ipsec i
- 00:31:38will i will cover that in a later
- 00:31:40lecture
- 00:31:41uh not also uh have an issue with
- 00:31:45services that request the initiation of
- 00:31:48tcp connections from outside network or
- 00:31:51stateless protocols such as
- 00:31:53those using udp
- 00:31:55because those can be disrupted as a
- 00:31:59result of nat
- 00:32:00so
- 00:32:01you know the services that require the
- 00:32:03initiation of a tcp connection from the
- 00:32:05outside network or the stateless
- 00:32:07protocols such as udp could have a a
- 00:32:11disruption because of the nat
- 00:32:13translation so
- 00:32:15while we have overcome some of these
- 00:32:17issues
- 00:32:18uh like you know it's not for the you
- 00:32:20know it's not completely eliminated
- 00:32:22that's what you need to understand so
- 00:32:23for your exams and quizzes you should
- 00:32:25know all of these items listed here as
- 00:32:28the
- 00:32:29disadvantages for
- 00:32:31using a nat
- 00:32:35static nat
- 00:32:39static net scenario
- 00:32:41static net is a one-to-one mapping
- 00:32:43between an inside address and an outside
- 00:32:46address
- 00:32:47static net allows external devices to
- 00:32:49initiate connections to internal devices
- 00:32:52using statically assigned public
- 00:32:55addresses
- 00:32:57for instance an internal web server may
- 00:33:00be mapped to a specific inside global
- 00:33:03address so that it is accessible from
- 00:33:06outside network so if you have a web
- 00:33:08server internally inside your network
- 00:33:10and if you want clients outside
- 00:33:13accessing that website
- 00:33:14you
- 00:33:15have to assign a static nat so that
- 00:33:19every single time that this data pass
- 00:33:22through your router
- 00:33:23that it is always the same so same port
- 00:33:26same ip address same everything so that
- 00:33:29a public
- 00:33:31system can have access to your web
- 00:33:33server so that is an example of a public
- 00:33:36sorry a static net scenario
- 00:33:41configure static nat
- 00:33:43so there are two basic tasks when
- 00:33:46configuring static net translations
- 00:33:49in cisco routers the step one is to
- 00:33:52create a mapping between the inside
- 00:33:55local address and the inside global
- 00:33:57address using the command ip nat inside
- 00:34:01source static command
- 00:34:03so that's the command you need to use ip
- 00:34:06nat inside source static right here and
- 00:34:10then you're gonna enter the ip address
- 00:34:12and the
- 00:34:13you know associated information and the
- 00:34:15step two
- 00:34:17is the interface
- 00:34:19participating in the translations are
- 00:34:21configured as inside or outside relative
- 00:34:23to the nat
- 00:34:25with the ip nat inside command and ipnat
- 00:34:28outside commands and you can see that
- 00:34:30been entered right here so this is how
- 00:34:33you actually
- 00:34:34create a
- 00:34:36static nad on your cisco routers
- 00:34:40again i will go through these kind of
- 00:34:42examples in a live lab demonstration
- 00:34:45later and post to my youtube channel as
- 00:34:47a separate video but for now just know
- 00:34:49these commands ip
- 00:34:52nats inside source static ipnot inside
- 00:34:55and ipnet outside
- 00:35:01analyze static nat
- 00:35:03the static nat translation process
- 00:35:06between the client and the web server
- 00:35:09can be summarized with these five steps
- 00:35:12so
- 00:35:13the client sends a packet to the web
- 00:35:15server
- 00:35:17so that's the first thing going to
- 00:35:18happen so the client send the packet to
- 00:35:20the web server asking hey i want to
- 00:35:22access this website
- 00:35:24the r2 receives the packet from the
- 00:35:26client and in its nat
- 00:35:28outside interface and check its nat
- 00:35:31table start to get the message and check
- 00:35:34it's not table
- 00:35:35r2 translates the inside global address
- 00:35:39of the inside local address and forward
- 00:35:42the packet towards the web server so
- 00:35:43it's going to get forwarded
- 00:35:45to the web server based on the net table
- 00:35:48information
- 00:35:49the
- 00:35:50web server receives the packet and
- 00:35:52responds to the client using its inside
- 00:35:55local address
- 00:35:57then dr2
- 00:35:59receives the packet from the web server
- 00:36:01on a snap inside interface with the
- 00:36:04source address of the inside local
- 00:36:07address of the web server and
- 00:36:10it also translate the source address to
- 00:36:12the inside global address so these are
- 00:36:15the two things that at the very end that
- 00:36:17the this thing gonna do
- 00:36:19the nat
- 00:36:21that is located in the router
- 00:36:24so
- 00:36:26how do you verify static net so to
- 00:36:29verify the net operation you can issue
- 00:36:32the command show ip
- 00:36:34nat translations
- 00:36:36and this command shows the active nat
- 00:36:39translations because the example is a
- 00:36:42static net configuration the translation
- 00:36:44is always present in the net table
- 00:36:46regardless of any active communication
- 00:36:49so you don't need to have traffic pass
- 00:36:51through to generate this data because it
- 00:36:54is a static nat configuration
- 00:36:57so if the command is issued used during
- 00:36:59an active session the output also
- 00:37:02indicates the address of the outside
- 00:37:04device as well
- 00:37:05in this case it is a static net and you
- 00:37:08can actually see
- 00:37:09that beam map right here
- 00:37:12with the show ipna translations command
- 00:37:19another useful command is to use show
- 00:37:21ipnat statistics
- 00:37:23it displays information about the total
- 00:37:26number of active translations nat
- 00:37:28configuration parameters the number of
- 00:37:31addresses in the pool and the number of
- 00:37:33addresses that have been allocated to
- 00:37:36verify that the net translation is
- 00:37:38working it is best to clear the
- 00:37:40statistics from any port translation
- 00:37:43using
- 00:37:44clear ips nat statistics command before
- 00:37:48trying out the show ipnat statistics so
- 00:37:50that you will have a better idea about
- 00:37:53whether
- 00:37:54whatever the changes that you made is
- 00:37:55actually working so if you run the show
- 00:37:57ip not statistics it will show you how
- 00:38:00many hits and the misses and some data
- 00:38:02associated with that but you can run the
- 00:38:04clear ip net statistics to clear that
- 00:38:07information and see if it is working
- 00:38:09afterward
- 00:38:13so there is a packet tracer file called
- 00:38:15configure static nat if you have access
- 00:38:18to that file please go ahead and do it
- 00:38:20if you do not i will post a copy of this
- 00:38:22file to my sanju.com website once i find
- 00:38:25one and so you can download and go ahead
- 00:38:27and do them
- 00:38:28again i will do these
- 00:38:31packet tracer
- 00:38:32options like the the module examples and
- 00:38:36activities on separate videos and post
- 00:38:39to my youtube channel later sometimes
- 00:38:43dynamic nat
- 00:38:48dynamic net scenario
- 00:38:51dynamic net automatically maps inside
- 00:38:54local addresses to inside global
- 00:38:56addresses
- 00:38:57dynamic nat uses a pool of inside global
- 00:39:00addresses
- 00:39:02the pool of inside global addresses is
- 00:39:04available to any device on the inside
- 00:39:07network on a first come first serve
- 00:39:10basis
- 00:39:11so basically as the term suggests
- 00:39:14dynamic
- 00:39:16it's automatically assigning ip
- 00:39:18addresses to inside devices that is
- 00:39:21trying to reach the outside networks
- 00:39:24by using a pool of available global ip
- 00:39:28addresses
- 00:39:29and how it it is doing that is first
- 00:39:32come first serve basis so whichever the
- 00:39:34inside device first requested it gets
- 00:39:37the
- 00:39:38an ip address assigned from that pool uh
- 00:39:41from the dynamic nat scenario
- 00:39:43in the dynamic net situation right
- 00:39:46so the thing about this is that if all
- 00:39:49the addresses in the pool are in use a
- 00:39:52device must wait for an available ip
- 00:39:54address before it can access the outside
- 00:39:57network so because it is dynamically
- 00:39:59assigned
- 00:40:00we are using the first come first
- 00:40:02services to assign those internal uh
- 00:40:06global addresses
- 00:40:07if the internal or inside global address
- 00:40:10pool get exhausted then the next device
- 00:40:13next inside device trying to reach the
- 00:40:15outside network has to wait for an
- 00:40:17available address so it can get assigned
- 00:40:20a internal global
- 00:40:22iip address so that it can reach the
- 00:40:25outside network
- 00:40:27so
- 00:40:28just like the name suggests dynamic nat
- 00:40:31in this setting scenario these nat is
- 00:40:35automatically mapping the inside local
- 00:40:37addresses to
- 00:40:39inside global addresses so on the right
- 00:40:41hand side we have a router r2 that is
- 00:40:45using the dynamic nat
- 00:40:48so when one of these devices try to
- 00:40:50reach the server outside of its network
- 00:40:53it is going to use the automatically
- 00:40:56assigning the ip addresses method
- 00:41:00to assign an ip address to these end
- 00:41:03devices
- 00:41:05using the pool of global ip addresses in
- 00:41:07the nat
- 00:41:09and then that device can reach the
- 00:41:11outside network using that
- 00:41:14mapping
- 00:41:14so that's how the dynamic nat works
- 00:41:20so on a cisco device you can configure
- 00:41:23dynamic nat by following five steps
- 00:41:27so the first thing we need to do is to
- 00:41:29define a pool of addresses that will be
- 00:41:32used for translation using ipnat pool
- 00:41:35command so the command is ip
- 00:41:38nat pool
- 00:41:40so that's the command you should
- 00:41:41remember
- 00:41:42and next step what we're going to do is
- 00:41:44to configure a standard access control
- 00:41:47list to identify or permit in this case
- 00:41:50only those addresses that are to be
- 00:41:53translated
- 00:41:55then
- 00:41:56just like any other acl we what we're
- 00:41:59going to do is we're going to bind the
- 00:42:01acl to the pool using the ip nat inside
- 00:42:05source list command
- 00:42:07so on the bottom of your screen you see
- 00:42:10these three steps done
- 00:42:11on this cisco router so we have the ip
- 00:42:15nat pool so that's the command we used
- 00:42:17to define the pool of addresses for the
- 00:42:19net translation
- 00:42:21and we have named the pool as nat dash
- 00:42:25pool one so this is for identification
- 00:42:27of that pool
- 00:42:29so then we have assigned the ip address
- 00:42:31pool of one nine two one six eight two
- 00:42:33hundred two two two six to one nine two
- 00:42:36one six five dot two hundred two four
- 00:42:38zero so that's a range of ip addresses
- 00:42:40that we're gonna assign to this net pool
- 00:42:42with the subnet mask associated with
- 00:42:44that
- 00:42:45then we have created the access list
- 00:42:47here
- 00:42:48uh using the access dash list command uh
- 00:42:51with permitting that uh you know that
- 00:42:54those networks and then
- 00:42:57we have bind that access list to this
- 00:43:00nat pool so if you don't remember how we
- 00:43:03how the access list works and how you
- 00:43:06can configure them you can watch my
- 00:43:08previous lecture on access list
- 00:43:11but in this scenario we are using that
- 00:43:13knowledge to assign that access list
- 00:43:16creating an access list and assigning
- 00:43:18that access list to this nat pool so
- 00:43:21those are the first three steps you need
- 00:43:23to take
- 00:43:24in the five step process of creating a
- 00:43:28dynamic nat on a cisco router
- 00:43:31so the next thing what we're going to do
- 00:43:33is to identify which interfaces are
- 00:43:36inside
- 00:43:37so
- 00:43:38once you have created the net pool and
- 00:43:41have assigned it to the uh you know the
- 00:43:44the access list
- 00:43:46next we are using the interface commands
- 00:43:49to identify inside uh
- 00:43:52you know interfaces
- 00:43:54and then identify the also the outside
- 00:43:56interfaces so in this example
- 00:43:59we have identified the serial 0 1 0 as
- 00:44:02the inside interface and the serial 0 1
- 00:44:061 as our outside interface hence what
- 00:44:09we're going to do is we're going to go
- 00:44:10to interface configuration for serial 0
- 00:44:131 0 1 with the interface serial 1 0 1
- 00:44:16command and we're going to issue the
- 00:44:18command i p
- 00:44:19nat inside for that and then we're going
- 00:44:22to go into the interface configuration
- 00:44:24for serial 0 1 1 and then we're going to
- 00:44:27issue the ip nat outside command so that
- 00:44:31what this command is going to do is
- 00:44:33going to make the serial 0 1 0 the
- 00:44:36inside
- 00:44:38you know interface and then the serial 0
- 00:44:401 1 the outside interface which is
- 00:44:43required for our net operations
- 00:44:46so that would actually create the
- 00:44:50dynamic nat on a cisco router
- 00:44:55analyze dynamic nat
- 00:44:57inside to outside
- 00:45:00the dynamic nut translation process
- 00:45:02includes the following steps so it
- 00:45:04includes several steps this is three of
- 00:45:06them and we will go into the next slide
- 00:45:08to discuss the other steps associated
- 00:45:10with this
- 00:45:12so
- 00:45:13the in this scenario on the right hand
- 00:45:15side the same network diagram that we
- 00:45:18viewed a few slides ago on the right
- 00:45:20hand side you have that r2 router that
- 00:45:23is translating
- 00:45:25the net request that coming from the
- 00:45:27inside network to the outside network
- 00:45:29right so in this situation the pc one
- 00:45:32and pc2 send packets requesting a
- 00:45:35connection to the server the server is
- 00:45:37located in the outside of this network
- 00:45:39right
- 00:45:40so the next thing what's going to happen
- 00:45:42is r2 receives the first packet from pc1
- 00:45:46checks the acl
- 00:45:47to determine if the package should be
- 00:45:49translated
- 00:45:50select an available global address and
- 00:45:53create a translation entry in the net
- 00:45:56table so what happen is when the pc one
- 00:45:59request the access to the server the
- 00:46:02first thing this router gonna do it's
- 00:46:03gonna check hey is this need to be
- 00:46:05translated to the outside or is it just
- 00:46:07an internal routing thing so if it is in
- 00:46:10external in this case it is because he's
- 00:46:13trying to access this server what he's
- 00:46:15going to do is he's going to check the
- 00:46:16acl to determine if the packet
- 00:46:18you know how the package should be
- 00:46:19translated and then select an available
- 00:46:22global address from the its pool
- 00:46:25and then assign it to that request and
- 00:46:29then add that information to its nat
- 00:46:32table
- 00:46:33r2 replay then what's going to happen is
- 00:46:35r2 replaces the inside local source
- 00:46:38address of pc1 which is 192.16810.10
- 00:46:42with the translated global ip address of
- 00:46:44209.165.200.226
- 00:46:49and forward that packet so before
- 00:46:51forwarding that packet but
- 00:46:53what's next going to happen after the
- 00:46:55net table entry has been created is to
- 00:46:57convert the inside ip address of that pc
- 00:47:01to the
- 00:47:02inside global ip address that assigned
- 00:47:05by the nat process
- 00:47:07the same process occurs for the packet
- 00:47:09from pc2 using the translated address of
- 00:47:12209.165.200.227
- 00:47:16which is shown on the right hand side so
- 00:47:18we have a nat pool and here's a inside
- 00:47:22local ip address so the for the pc one
- 00:47:25it is which is 209 165 200.226 is the
- 00:47:29global that assigned to the local one
- 00:47:30here and for the pc2
- 00:47:33the nat has assigned 209.165.200.227
- 00:47:38to that pc2 uh um you know internal ip
- 00:47:42address so you can see that on the net
- 00:47:44pool so this is what's happening right
- 00:47:45here so this this pc1 and pc2 request
- 00:47:49the connection to the
- 00:47:50server outside it goes to the this r2
- 00:47:53router and the r2 router checks the acl
- 00:47:56to determine if the package should be
- 00:47:58translated and
- 00:48:00if it is needed to be translated then
- 00:48:02you're going to select from a global ip
- 00:48:05internal global ip address and assign
- 00:48:08them accordingly to this you know
- 00:48:10request and add that to its ipv4 net
- 00:48:14pool table so that's the first three
- 00:48:17steps going to happen
- 00:48:19in the dynamic nat
- 00:48:22and the next thing is the server
- 00:48:25receives the packet from the pc one
- 00:48:29so after that the table has been created
- 00:48:31after the eyepiece has been assigned the
- 00:48:34internal global ip address the server
- 00:48:36receives the packet from the pc1 and
- 00:48:38respond using the destiny destination
- 00:48:41address of 209.165.200.226.
- 00:48:47because that is the one that been
- 00:48:49assigned during the net process on this
- 00:48:51r2
- 00:48:53the server receives the packet from pc2
- 00:48:55it responds to the you
- 00:48:57request using the destination address of
- 00:49:00209.165.
- 00:49:02but you know but this time it is 227
- 00:49:05because it is the pc2 that is requesting
- 00:49:08the connection so basically when the
- 00:49:10server received the information from
- 00:49:12this one it goes with this ip address
- 00:49:15when the server received from pc2 it
- 00:49:17goes with this ip address why
- 00:49:20because in the previous process we have
- 00:49:23created this net pool and assigned
- 00:49:25these nats
- 00:49:27associated with those pc1 and pc2
- 00:49:31internal ip addresses
- 00:49:33in the next step the fifth steps what's
- 00:49:35going to happen when the r2 receives the
- 00:49:37packet with the destination address of
- 00:49:39what
- 00:49:42209.165.200.226 so this is going to
- 00:49:44receive that information back from the
- 00:49:47server it performs a nat table lookup
- 00:49:51and translate the address back to the
- 00:49:54inside local address and forward the
- 00:49:57packet towards the pc one
- 00:49:59remember on our previous steps here we
- 00:50:02have created the net table entry right
- 00:50:06here so when the rr2 received the packet
- 00:50:09from the pc1 and pc2 it check the acl
- 00:50:12determine if the packet should be
- 00:50:13translated and what's going to happen is
- 00:50:15it's going to assign an internal global
- 00:50:17ip address and it also creates a
- 00:50:19translation entry in the net table right
- 00:50:22now that entry is now being used here
- 00:50:26is to again translate it back
- 00:50:30to the inside local address and forward
- 00:50:33the packet towards the pc1 in this case
- 00:50:36because the pc1 requested it so when the
- 00:50:38pc
- 00:50:39when the r2 received the packet with the
- 00:50:41destination address of 209.165.200.227
- 00:50:46it performs a nat table lookup and
- 00:50:48translate the address back to the inside
- 00:50:50local address of 192.168.10.
- 00:50:54so 11.10 and forward the packet towards
- 00:50:57a pc
- 00:50:592 because in this case 226 is associated
- 00:51:02with pc1 in the net table and that
- 00:51:05the ip address ending two to seven
- 00:51:08associated with pc2
- 00:51:10on the net table so it gets translated
- 00:51:12to the internal ip address of that ip
- 00:51:14sorry for pc2
- 00:51:17so
- 00:51:18that those are the you know the steps
- 00:51:20that gonna take for the translation and
- 00:51:23what's gonna happen next is the pc1 and
- 00:51:25pc2 receive the packets and continue the
- 00:51:28conversation back and forth between the
- 00:51:31external server and the internal device
- 00:51:34so the router performs steps two to five
- 00:51:37for each packet
- 00:51:39so
- 00:51:40each time this the these internal
- 00:51:43devices try to communicate outside and
- 00:51:45um you know system it goes to
- 00:51:48these
- 00:51:49fives uh you know steps this this this
- 00:51:51and
- 00:51:53uh these two steps every single time so
- 00:51:56it's try to communicate
- 00:51:58so again to summarize this because this
- 00:52:00is a very important concept
- 00:52:02pc1 and pcs2 send packets requesting to
- 00:52:05the outside well the r2 dynamic nat
- 00:52:08gonna sign random ip address out of its
- 00:52:12dynamic nat eye pool of ip addresses if
- 00:52:15it is available based on the acl
- 00:52:18so then it will add those entries to the
- 00:52:22net table
- 00:52:24and then forward the information to the
- 00:52:27outside server and when the outside
- 00:52:30server come back and reply back
- 00:52:32to the
- 00:52:33r2 it's going to use those ip inside
- 00:52:36global ip addresses assigned by the r2
- 00:52:39to communicate back to the r2 but then
- 00:52:42r2 going to translate it back
- 00:52:44to these pc1 and pc2 internal ip
- 00:52:47addresses based on the net pool entries
- 00:52:49that it has created in step two
- 00:52:53and then the process repeats over and
- 00:52:56over and over as it start communicating
- 00:52:58back and forth uh you know between the
- 00:53:01internal devices and the external source
- 00:53:04so it's gonna go through the process of
- 00:53:07one two one two three
- 00:53:09four five over and over and over until
- 00:53:12the communication is terminated
- 00:53:15so that's the process of dynamic nat
- 00:53:19outside to inside
- 00:53:23so how do you verify dynamic nat
- 00:53:25so on a cisco device the output of the
- 00:53:28show ipnat translations so the the
- 00:53:31command is show ipnat translations
- 00:53:34can be used to display all static
- 00:53:37translations that have been configured
- 00:53:40and any dynamic translations that have
- 00:53:42been created by traffic so if you run
- 00:53:44the command show ipnat translations it
- 00:53:48will show you all the translations here
- 00:53:50this is not only a useful command for
- 00:53:52you to verify your nat but
- 00:53:56also
- 00:53:57may be used by your instructor like in
- 00:54:00my instructor have you show ipnet
- 00:54:02translations to verify your lab exams is
- 00:54:04done properly so this is something that
- 00:54:06very very easy way to check if the
- 00:54:08student have done what they're supposed
- 00:54:10to do so this is a good
- 00:54:13command that you should remember
- 00:54:16adding the verbose a keyword display
- 00:54:19additional information about each
- 00:54:21translation including how long the entry
- 00:54:24was created and used so if you show
- 00:54:26ipnet translation and you add the
- 00:54:28additional command verbose right here it
- 00:54:31will give you some additional
- 00:54:32information related to that dynamic nat
- 00:54:40by default translation entries timeout
- 00:54:43after 24 hours unless the timers have
- 00:54:46been reconfigured with the ipnat
- 00:54:48translation timeout command so remember
- 00:54:51this command as well ipnat translation
- 00:54:54timeout and then you can put the time
- 00:54:56out variable in this case in seconds
- 00:54:59right here
- 00:55:01to clear dynamic entries before the
- 00:55:04timeout has expired you can use the
- 00:55:06clear ipnat translation command so that
- 00:55:09is clear ipnat translation command
- 00:55:12and the ipnet translation timeout is
- 00:55:15entered in the global configuration mode
- 00:55:17while the clear ipnat translation can be
- 00:55:19entered in the privilege executive mode
- 00:55:22and on here you can see that command
- 00:55:24entered clear ipna translation with a
- 00:55:27star here and the show ipnet translation
- 00:55:29will show the ip addresses and the
- 00:55:31bottom of your screen you have the
- 00:55:35a table that actually describes some of
- 00:55:38these commands and its options
- 00:55:40and if you have ever reached uh you know
- 00:55:43if you have research a
- 00:55:46cisco manual you may be familiar with
- 00:55:49these type of you know
- 00:55:51notations that they use so you should be
- 00:55:54familiar with these type of notations
- 00:55:56even though i haven't gone through them
- 00:55:57a lot
- 00:55:58so
- 00:55:59uh
- 00:56:00in here
- 00:56:01it shows a command clear ipna
- 00:56:03translation with a star and it gives you
- 00:56:04a description it clears all dynamic
- 00:56:06address translation entries from the nat
- 00:56:09translation table typically the star
- 00:56:11command will mean that it will clear
- 00:56:13everything associated with that command
- 00:56:15behind it
- 00:56:17the clear ip net transaction inside with
- 00:56:19these
- 00:56:20type of you know how it's written here
- 00:56:22those are like variables that you can
- 00:56:24change
- 00:56:25so this clears a simple dynamic
- 00:56:27translation entry containing an inside
- 00:56:29translation or both inside and outside
- 00:56:32translations so
- 00:56:34in here these are things the variables
- 00:56:36that you can enter the outside is a
- 00:56:38keyword these are all keywords so this
- 00:56:40is a key command so this is a full
- 00:56:42command that needs keywords and this is
- 00:56:44the keyword and these are like the
- 00:56:45variables that you can enter
- 00:56:47the next one it clears an external
- 00:56:49dynamic translation entry it is clear
- 00:56:51ipnet translation then
- 00:56:54you can enter the protocol here and then
- 00:56:56inside is a keyword and these are the
- 00:56:57options and then the outside is a
- 00:56:58keyword and again options right here
- 00:57:01if you are reading again uh those uh
- 00:57:03cisco manuals they are usually written
- 00:57:05like this way and i will go maybe i will
- 00:57:08do a quick video on how to read cisco
- 00:57:10manuals uh later sometime
- 00:57:12but for now just remember these
- 00:57:14you know commands exist
- 00:57:18the show ipnat statistics
- 00:57:21command display information about the
- 00:57:24total number of active translations net
- 00:57:26configuration parameters the number of
- 00:57:29addresses in the pool and how many of
- 00:57:32the addresses have been allocated so
- 00:57:35remember in the dynamic nat we have
- 00:57:37created a pool of ip addresses that can
- 00:57:40be
- 00:57:41automatically assigned so the show ipnat
- 00:57:43statistics will show
- 00:57:45how many of those ip addresses are in
- 00:57:47use and associated statistics related to
- 00:57:50that such as the now such as how you
- 00:57:52know the net configuration parameters so
- 00:57:55if you run show ip net statuses this is
- 00:57:57the screen that you're gonna see on your
- 00:57:59cisco routers
- 00:58:00if you have the dynamic nat configured
- 00:58:03and right here it says the name of the
- 00:58:05net pool so remember from our previous
- 00:58:07example we use the nat pool one as our
- 00:58:11pool name of the net pool and it shows
- 00:58:14the configuration options right here the
- 00:58:16pool uh
- 00:58:17range the net mask and
- 00:58:20the
- 00:58:20how many addresses are now allocated so
- 00:58:22in this example we have 15 addresses
- 00:58:25allocated sorry uh two addresses
- 00:58:27allocated out of 15 that is 13
- 00:58:31usage of this entire pool because pool
- 00:58:33have 15. so if you divide 2 by 15
- 00:58:36multiply by 100 that will give you 13 so
- 00:58:38that's 13 of your pool have been used
- 00:58:41and it's clearly nicely displayed up
- 00:58:43here so you for that you use this
- 00:58:45command
- 00:58:48the show running dash config command
- 00:58:51with the piping character this
- 00:58:54line character
- 00:58:55uh with the uh nat uh cal interface or
- 00:58:59pool commands associate with the
- 00:59:00associated value can be used to also uh
- 00:59:04you know display some net information in
- 00:59:06this example we have the show running
- 00:59:09dash config and we are piping or
- 00:59:11filtering whatever
- 00:59:13the information that includes nat in it
- 00:59:16and in here we have the display of that
- 00:59:19nat information uh on these two lines so
- 00:59:22you can use the show running dash config
- 00:59:25pipe include nat include cal include
- 00:59:28interface or exclude nat so you will see
- 00:59:31everything except the
- 00:59:32nat so i have gone through what this
- 00:59:35character do it's like it's called a
- 00:59:36piping character it basically filter out
- 00:59:39certain things and as you go through
- 00:59:41these courses you'll get to know how to
- 00:59:43use those so this is basically
- 00:59:45limiting the fee or filtering out the
- 00:59:48information so it's easy for you to read
- 00:59:54there's a packet tracer file called
- 00:59:55configure
- 00:59:57dynamic nat
- 00:59:59i will try to find a copy of that packet
- 01:00:01tracer file and post to my sanju.com
- 01:00:03website
- 01:00:04if you do have access to cisco netacad
- 01:00:07or you have access to this packet tracer
- 01:00:09file through your academic institution
- 01:00:11please go back to those
- 01:00:14institution and download those and then
- 01:00:16do them as you go through these lectures
- 01:00:21pad
- 01:00:25configure pat
- 01:00:27to use a single ip address
- 01:00:31to configure pad to use a single ipv4
- 01:00:34address
- 01:00:35add the keyword overload to the ipnat
- 01:00:38inside source command
- 01:00:40remember from my previous
- 01:00:43you know lectures and slides i mentioned
- 01:00:45pad is also known as
- 01:00:47nat overload right
- 01:00:49that is also known as nat overload
- 01:00:52so this is why you can you know simply
- 01:00:54use the overload command to the ipnet
- 01:00:57inside source command in order to create
- 01:01:00your netpad
- 01:01:02in the example below on the bottom of
- 01:01:04your screen all hosts from network
- 01:01:06192.168.0.0
- 01:01:10matching acl1
- 01:01:12that send traffic through router r2 to
- 01:01:15the internet will be translated to the
- 01:01:17ip address 192.165.200.225
- 01:01:23which is ipv4 address of interface s0111
- 01:01:28the traffic flows will be identified by
- 01:01:31port number in the net table because
- 01:01:34the overload keyword is configured see
- 01:01:39in right here you can see
- 01:01:41that the overload keyword is
- 01:01:44entered along with the net insight
- 01:01:46source list serial interface serial 0 1
- 01:01:490 therefore what's going to happen is
- 01:01:50the traffic flow will be identified by
- 01:01:54the port in the nat table because of
- 01:01:57that key keyword command right that
- 01:02:00that's a key
- 01:02:01it's a a keyword that can be used in
- 01:02:04this command so what happening here is
- 01:02:06the nat overload
- 01:02:08which is also known as pat
- 01:02:10right remember that
- 01:02:14configure pad to use an address pool
- 01:02:18an isp may allocate more than one public
- 01:02:21ipv4 address to an organization
- 01:02:24in this scenario the organization can
- 01:02:26configure pat to use a pool of ipv4
- 01:02:29public addresses for translation
- 01:02:32remember i have mentioned previously
- 01:02:34that most of the home routers and modem
- 01:02:37combinations as well as small business
- 01:02:40uh
- 01:02:41routers even large
- 01:02:43you know networks sometimes the isp
- 01:02:46provided devices actually using pad even
- 01:02:48though we keep calling it snap nat all
- 01:02:51the time it's actually using pad because
- 01:02:54you probably most likely have one or
- 01:02:56very
- 01:02:58few very limited number of
- 01:03:00outside uh globally travel
- 01:03:02internationally globally routable ip
- 01:03:04addresses outside so what's going to
- 01:03:06happen is the pat will be used
- 01:03:09for the ipv address translation process
- 01:03:13even though
- 01:03:14we often hear network engineers and
- 01:03:16technicians keep using nat um
- 01:03:18as a like a misnomer right
- 01:03:21um so remember that but however uh your
- 01:03:25isp may have provided to you more than
- 01:03:27one external ip address for example
- 01:03:31i am with show cable canada
- 01:03:33and show cable because i have a higher
- 01:03:36tier internet service so they have
- 01:03:38different tiers of internet i have two
- 01:03:41globally routable public ip addresses so
- 01:03:44i have two ipv4 global addresses
- 01:03:47assigned to my internet connection so in
- 01:03:49that situation a pat can use a pool of
- 01:03:52ipv4 i add public addresses for
- 01:03:55translation
- 01:03:56so to configure pat for a dynamic nat
- 01:03:58address pool in a cisco router you need
- 01:04:02to add the keyword overload to the ipnet
- 01:04:05insight source command so overload
- 01:04:08keyword will be added to the ip nat
- 01:04:10inside source command in this scenario
- 01:04:12so in this example the nat dash pool 2
- 01:04:15is bound to an acl to permit
- 01:04:18192.168.0.0.16
- 01:04:22to be translated
- 01:04:25so these hosts can share an ipv4 address
- 01:04:28from pool because pad is enabled with
- 01:04:31the keyword overload right here so right
- 01:04:34here we have the ip nat inside source
- 01:04:36list one
- 01:04:38pool
- 01:04:39and nat dash
- 01:04:41pool 2 is now
- 01:04:43you know uh associated now been
- 01:04:46associated with that access list one but
- 01:04:48now we have the overload command enter
- 01:04:50right here as a result of that
- 01:04:53these hosts now can share ipv4 addresses
- 01:04:56from the pool of pat that is enable
- 01:04:59via that keyword so that's what
- 01:05:02happening right here
- 01:05:03so again as i mentioned pad is what is
- 01:05:06commonly used today
- 01:05:08in most ipv4 associated uh isp devices
- 01:05:12whether home
- 01:05:13modems and routers or small business
- 01:05:16homes uh in modem and routers so they
- 01:05:18typically use the pad
- 01:05:20because remember pad is the port address
- 01:05:22translation and it has both uh
- 01:05:25layer 3 and layer 4 um you know headers
- 01:05:28that gonna be
- 01:05:30modified in pad as opposed to nat right
- 01:05:34so that's why we use pad because it is
- 01:05:36more versatile and flexible
- 01:05:41so let's analyze pat
- 01:05:42in this scenario the server to pc
- 01:05:46so on the right hand side
- 01:05:48we have a router that is configured with
- 01:05:51pad it is a similar configuration but we
- 01:05:54have two servers on the outside now
- 01:05:57and
- 01:05:57uh based on that information here uh
- 01:06:00let's see what's gonna happen when you
- 01:06:02know it's trying to uh connect
- 01:06:05with the inside and outside networks
- 01:06:07so the pc one and pcs2 send packet to
- 01:06:10server one and server two so the pc one
- 01:06:12and pc2 are sending packers to both
- 01:06:14server one and server two
- 01:06:16both servers are being now
- 01:06:18accessed by these two devices trying to
- 01:06:20access right now
- 01:06:21so what's going to happen next is the
- 01:06:23packet from pc1 reaches the uh a router
- 01:06:26to this router where the path is
- 01:06:28happening first
- 01:06:30so as a result the r2 modifies the
- 01:06:32source ipv4 address to 209.165.200.225
- 01:06:38which is the inside global address
- 01:06:40the packet is then forward
- 01:06:43to the server one
- 01:06:45so they are to get it and it use the the
- 01:06:49inside global address
- 01:06:51uh assignment to assign this uh global
- 01:06:55insight address to the uh the pc one the
- 01:07:00packet from pc2 next arrive at the r2
- 01:07:03so the pat changes the source
- 01:07:05ipv4 address of pc2 to the inside global
- 01:07:10address of
- 01:07:11209.165.200
- 01:07:16notice the inside global address of
- 01:07:18these two are now the same so the pc2
- 01:07:22has the same source port number as the
- 01:07:24translation for the pc one because these
- 01:07:27are the same
- 01:07:28so the path increments the source port
- 01:07:31number until it is a unique value in its
- 01:07:34table in this instance it's going to be
- 01:07:37445. so in this patch scenario unlike
- 01:07:41the previous example what's going to
- 01:07:43happen is the inside global address for
- 01:07:46both pc1 and pc2 trying to reach these
- 01:07:49servers are the same
- 01:07:51it's the same 209.165.200.225.
- 01:07:55however
- 01:07:57the port number now gonna be different
- 01:08:00in the inside global address for these
- 01:08:02two pcs hence it is we can be it can be
- 01:08:05used to identify traffic goods that are
- 01:08:08supposed to go to one pc from the other
- 01:08:10in this case
- 01:08:11140
- 01:08:131444 port is used by the pc1 and
- 01:08:181445 port is used by the pc2 because
- 01:08:22what happened in pat it increments the
- 01:08:24source port number until it is unique
- 01:08:27value in its table and
- 01:08:30as a result now you can identify traffic
- 01:08:32that's supposed to go to the pc one from
- 01:08:34traffic that's supposed to go to the pc2
- 01:08:36and that table in this scenario in this
- 01:08:39packed scenario looks like this on the
- 01:08:41bottom of your screen
- 01:08:43one thing you should notice
- 01:08:45as i mentioned
- 01:08:47because now we are using both the ip
- 01:08:49address and
- 01:08:51the port number
- 01:08:53pat has the ability to modify both layer
- 01:08:563 and layer 2. in other words it can
- 01:08:58modify the ip address as well as the
- 01:09:02port number and it is displayed clearly
- 01:09:04on the right hand side of your screen
- 01:09:06right here
- 01:09:10so let's look at what happened in pat
- 01:09:12when the pc to server traffic so in this
- 01:09:15case now we are going to look at pc2
- 01:09:17server traffic so pc1 and pc2 send
- 01:09:20packets to server 1 and server 2. the
- 01:09:23packet from pc1 reaches the r2 first
- 01:09:26just like before and r2 modifies the
- 01:09:28source ipv4 address to
- 01:09:32209.165.200.225. which is the inside
- 01:09:34global address the packet is then
- 01:09:36forwarded to server 1.
- 01:09:39the packet from pc
- 01:09:412 arrives at r2
- 01:09:46pat changes the source ipv4 address to
- 01:09:48pc2
- 01:09:50to the inside global address of 209 or
- 01:09:53165 200.225 again
- 01:09:55look it's the same so the pc2 has the
- 01:09:57same source number as the translator pc1
- 01:10:00so the pat increments the source port
- 01:10:02number until it is unique value in its
- 01:10:04table in this instance is 445 so you can
- 01:10:06see that right here
- 01:10:08so this is server to pce
- 01:10:11and this is pc2 server but notice it is
- 01:10:16the same process but is slightly
- 01:10:18different
- 01:10:20right so notice that so it's the same
- 01:10:22thing
- 01:10:23right sorry so this is server to pc
- 01:10:28and this is pc to server but the process
- 01:10:31is very similar because it's using pat
- 01:10:35so next we're going to look at finally
- 01:10:37the server to pc so in this case server
- 01:10:41use the source port from the receive
- 01:10:43packet as the destination port and the
- 01:10:46source address as the destination
- 01:10:48address for the return traffic
- 01:10:51r2 changes the destination ipv4 address
- 01:10:54of the packet from server 1 from
- 01:10:57209.165.200.225
- 01:11:00to the internal ip address of pc1 which
- 01:11:03is 192.168.10.10
- 01:11:05and forward that packet to the pc one r2
- 01:11:08also changes the destination ip address
- 01:11:10of the packet from server 2
- 01:11:13from 209.165.200.225
- 01:11:16to the internal ip address of pc2 in
- 01:11:19this case 192.168.10.11
- 01:11:22and modifies the destination port back
- 01:11:24to its original value of 144
- 01:11:271444 so the packet is then forwarded to
- 01:11:31pc2 so that's the basic operation you
- 01:11:34know how exactly the the pat operation
- 01:11:37works uh when the internal inside
- 01:11:39network and outside network communicate
- 01:11:42uh with each other
- 01:11:44so
- 01:11:45if you find this a lot of information
- 01:11:47that is really hard to remember please
- 01:11:49go back on this video and watch those
- 01:11:51few slides again and you will understand
- 01:11:53exactly you know what is described here
- 01:11:56because not only i have explained what's
- 01:11:58shown here on the right hand side but
- 01:12:00you also have this diagram and the
- 01:12:02information shown
- 01:12:03in what's happening here and remember
- 01:12:06pads can pat can modify
- 01:12:08both layer 3 and layer 4 so it's a port
- 01:12:11number and the ip address while the nat
- 01:12:13cannot that doesn't do that so that's
- 01:12:15the difference between pat and nat and
- 01:12:17that is why we use pad a lot in home and
- 01:12:22you know small business use
- 01:12:25so how do you verify pad
- 01:12:28the same commands used to verify static
- 01:12:30and dynamic net are used to verify pat
- 01:12:33the show ipnat translations remember
- 01:12:36that command show ipnet translation can
- 01:12:39be used
- 01:12:40to display the translations from two
- 01:12:42different hosts to different
- 01:12:44web servers in the previous example so
- 01:12:47the notice that the two different inside
- 01:12:49hosts are allocated the same ipv4
- 01:12:51address of 209.165.200.226
- 01:12:55inside global address in that patex
- 01:12:57sample
- 01:12:58but the source port numbers in the net
- 01:13:00table differentiate the two transactions
- 01:13:03so right here we ran the show ipnet
- 01:13:05translation hey look at that the inside
- 01:13:07global ip address is the same for the
- 01:13:09both tcp requests but however the port
- 01:13:13number is different in here 1444
- 01:13:15the other one is 1445 so you have two
- 01:13:18different port numbers hence
- 01:13:20differentiating one pce from the other
- 01:13:23pc on the inside network
- 01:13:28the show ipnet statistics the same
- 01:13:31command we have used previously can
- 01:13:34verifies that the nat pool uh
- 01:13:37nat dash pool 2 has allocated a single
- 01:13:40address to both translations
- 01:13:42how do you know that because allocated
- 01:13:45is showing here it's one because we only
- 01:13:47ran that part in this example so also
- 01:13:49shown there are number of number and
- 01:13:52type of active translations net
- 01:13:54configuration parameters the number of
- 01:13:56address in the addresses in the pool and
- 01:13:58how many have been allocated so just
- 01:14:00like before the show ipnet statistics
- 01:14:03show all of these data
- 01:14:05on your cisco routers if you run that
- 01:14:07command then that's what you'll see if
- 01:14:09you have the
- 01:14:10the path configured in that router
- 01:14:15there is a packet tracer file called
- 01:14:17configure pad if you have access to this
- 01:14:19packet tracer file please go ahead and
- 01:14:22do it if you do not i will try to find a
- 01:14:24copy of this packet trace file and post
- 01:14:26to my sandwich.com website and then you
- 01:14:29can download from there and go ahead and
- 01:14:30do it and again i will go through these
- 01:14:33lab demonstration and packet tracer
- 01:14:34demonstration videos on a separate video
- 01:14:37clips and post it to my youtube channel
- 01:14:39later sometime
- 01:14:44nat 64 which is basically for ipv6
- 01:14:52nat for ipv6 ipv6 was developed with the
- 01:14:56intention of making nat for ipv4 with
- 01:14:59translation between public and powered
- 01:15:03ipv4 address unnecessary so basically
- 01:15:06the only the one of the primary reasons
- 01:15:08why we made ipv4 so that we don't need
- 01:15:11the nat at the first place
- 01:15:13however
- 01:15:15ipv6 does include its own ipv6 private
- 01:15:18address space unique local addresses
- 01:15:21also known as
- 01:15:22ulas so
- 01:15:24even though ipv6 technically do not need
- 01:15:28a net translation to be used because we
- 01:15:31have more than enough ips v6 addresses
- 01:15:34you can have globally routable ip v6
- 01:15:36addresses from your inside network all
- 01:15:38the way to the internet
- 01:15:41ipv6 still have its own ipv6 private
- 01:15:44address space
- 01:15:45called unique global
- 01:15:48sorry unique local addresses uls
- 01:15:50ipv6 unique local addresses also known
- 01:15:53as ulas are similar to that of the rfc
- 01:15:561918 private addresses in the ipv4 but
- 01:16:00have a different purpose
- 01:16:03ula addresses are meant for only local
- 01:16:06communication within a site
- 01:16:09ula addresses are not meant to provide
- 01:16:11additional ipv6 address space
- 01:16:14no to provide a level of security so
- 01:16:16remember
- 01:16:18in
- 01:16:18ipv4 you can use
- 01:16:21nat for multiple reasons including
- 01:16:23hiding your internal ipv4 addresses
- 01:16:26because it's doing net translations at
- 01:16:28the router
- 01:16:30and also to conserve
- 01:16:32the ipv4 uh internationally globally
- 01:16:35routable addresses because we are
- 01:16:37running out of we are exhausting those
- 01:16:39ipv4 addresses
- 01:16:40but however
- 01:16:42the
- 01:16:43ula addresses in ipv6
- 01:16:46are not meant for low you know
- 01:16:48for doing you know that kind of security
- 01:16:51or to provide any additional ipv6
- 01:16:54addresses instead ula addresses are
- 01:16:56meant for only local communication
- 01:16:58within a site so remember those are the
- 01:17:00key chain differences that you should
- 01:17:02know for your exams and quizzes
- 01:17:04ipv6 does provide for protocol
- 01:17:07translation between ipv4 and ipv6 known
- 01:17:10as the nat 64. so that's that's another
- 01:17:14thing that you should remember so ipv6
- 01:17:16does provide the protocol translation
- 01:17:18between ipv4 and ipv6 devices so known
- 01:17:21as the nat 64.
- 01:17:26nat 64.
- 01:17:28nat for ipv6 is used in a much different
- 01:17:31context than the net for ipv4 so
- 01:17:33everything you you learn about the nat
- 01:17:36in ipv4
- 01:17:38uh most of the items that i have covered
- 01:17:40does not apply to nat 64. so nat for
- 01:17:43ipv4 also known as nat in general
- 01:17:46does not behave the same way as nat 64
- 01:17:50which is a part of ipv6
- 01:17:53the varieties of nat for ipv6 are used
- 01:17:56to transparently provide access between
- 01:18:00ipv6 only and ipv4 only networks as
- 01:18:04shown on the right hand side
- 01:18:06in this figure
- 01:18:07right here if you look at it so
- 01:18:10it is used it is not used as a form of
- 01:18:14private ipv6 to global ipv6 translation
- 01:18:18but it is to just to make the
- 01:18:19communication between ipvs for online
- 01:18:22devices and ipv6 only devices possible
- 01:18:25that's the primary purpose of nat 64.
- 01:18:28natural ipv6 should not be used as a
- 01:18:30long term
- 01:18:32you know method
- 01:18:33but as a temporary mechanism to assist
- 01:18:36in mitigation from ipv to ipv6 so if you
- 01:18:40are creating a brand new network in 2022
- 01:18:44for example
- 01:18:45you should not be using nat 64 at all
- 01:18:47you should be just using ipv6 addresses
- 01:18:50but it can i the this nat 64 can be used
- 01:18:54for communication be across
- 01:18:57ipv6 only and ipvs for only networks as
- 01:19:00a temporary measure
- 01:19:02during the transition period
- 01:19:05in this class for this module right now
- 01:19:08i will not go into any more details on
- 01:19:10nat 64 because that is not part of the
- 01:19:13curriculum
- 01:19:14for cisco this lecture series
- 01:19:18so for now this is all what you need to
- 01:19:21know about nat 64. it is different from
- 01:19:23that of an ipv4 nat
- 01:19:26it is you know not even close to what
- 01:19:28the functionalities uh why we use it uh
- 01:19:31you know when you compare net 64 against
- 01:19:34the nat so they are completely two
- 01:19:36different things and the primary reason
- 01:19:38why we use nad and today in 2022 is to
- 01:19:42make sure the transition between ipv6
- 01:19:44only and the ipv4 only networks happen
- 01:19:48smoothly so for now that's all you need
- 01:19:50to remember for your exams and questions
- 01:19:53when it's come to the point at 64.
- 01:19:58so that will bring us to the end of this
- 01:20:00lecture i'll introduce you to few more
- 01:20:03um you know packet tracer files as well
- 01:20:05as uh go over what we have covered
- 01:20:10so there are two packet tracer files
- 01:20:12called configure nat for ipv4 so if you
- 01:20:14have access to these files
- 01:20:16through your cisco netacad please go
- 01:20:18ahead and do it if you do not i will try
- 01:20:20to find a copies of those files and post
- 01:20:23to my sanjit.com website so you can
- 01:20:25download and do them
- 01:20:28so here is a summary of what we have
- 01:20:31learned so next few slides i will go
- 01:20:33through
- 01:20:34the items that we have covered in this
- 01:20:36lecture
- 01:20:37we learned that there are not enough
- 01:20:38public ipv4 addresses to assign a unique
- 01:20:41address to each device connected to the
- 01:20:43internet that's where the term ipv4
- 01:20:46address extend came from
- 01:20:49the primary use of the nat or network
- 01:20:51address translation is to pre conserve
- 01:20:54public ipv for addresses in nat
- 01:20:57terminology the inside network is the
- 01:21:00set of networks that is subject to
- 01:21:02translation
- 01:21:03the outside network refers to all other
- 01:21:06networks
- 01:21:08we learned that the net
- 01:21:09terminology is always applied from the
- 01:21:12perspective of the device with the
- 01:21:14translated address remember that's a
- 01:21:16very important concept the net
- 01:21:18terminology is always applied from the
- 01:21:21perspective of the device with the
- 01:21:23translated address
- 01:21:25so what is considered as the inside and
- 01:21:27what is considered as outside is from
- 01:21:29the perspective of the device that with
- 01:21:31the translated address
- 01:21:33inside address
- 01:21:35are the addresses of the device which is
- 01:21:38being translated by
- 01:21:40nat outside addresses are the addresses
- 01:21:44of the destination device
- 01:21:46local address is any address that
- 01:21:49appears on the inside portion of the
- 01:21:51network while the global address sees
- 01:21:53any address that appears on the outside
- 01:21:56portion of the network
- 01:21:57we also learned static nat uses a
- 01:22:00one-to-one mapping of local and global
- 01:22:03addresses
- 01:22:04while the dynamic nad uses a pool of ip
- 01:22:07addresses
- 01:22:09public ip addresses and assign them on
- 01:22:12first come first serve basis
- 01:22:16we learn about a
- 01:22:18the concept of pat
- 01:22:20also known as port address translation
- 01:22:24the pad is also
- 01:22:26being called net overload because it
- 01:22:29maps multiple private ipv4 addresses to
- 01:22:32a single public ipv4 address for a few
- 01:22:36addresses or for a few addresses so it
- 01:22:39can do either you know map multiple
- 01:22:42private ipv4 addresses to a single
- 01:22:44public ipv4 address or a handful of
- 01:22:47public ipv4 addresses
- 01:22:49nat increases
- 01:22:51forwarding delays because the
- 01:22:53translation of each ipv4 address within
- 01:22:56the packet headers take time remember
- 01:22:59um nat
- 01:23:00is basically using the i you know packet
- 01:23:03headers to do the translation then it
- 01:23:06does increase the the for forwarding
- 01:23:08times
- 01:23:09nat complicates the use of tunneling
- 01:23:11protocols such as ipv sorry such as uh
- 01:23:14ipsec
- 01:23:16because nat modifies values in the
- 01:23:18headers causing some
- 01:23:21issues with the the network
- 01:23:23configuration associated with ip6
- 01:23:26remember i did not cover ipsec and vpns
- 01:23:30yet but i will cover that in the future
- 01:23:32just for now remember that nat do
- 01:23:35complicate the vpn and ipsec
- 01:23:38configuration just for now but in the in
- 01:23:40next few weeks i will explain how ipsec
- 01:23:43and vpn tunnels can are created and we
- 01:23:46will go into depth later
- 01:23:48the we learned the show ipnet
- 01:23:51translations command uh display all
- 01:23:53statistic
- 01:23:54uh all statistical information related
- 01:23:57to translations that have been
- 01:23:59configured and any dynamic translation
- 01:24:02that have been created by traffic
- 01:24:04we learn about uh how we can clear the
- 01:24:06those entries in dynamic entries before
- 01:24:09timeout has expired uh to do that we're
- 01:24:11going to use the clear ipnat
- 01:24:13translations
- 01:24:14command vlan ipv6 was developed with the
- 01:24:18intention of making nat or network
- 01:24:20address translation for ipv4 with the
- 01:24:23translation between public and private
- 01:24:26ipv4 addresses unnecessary
- 01:24:28however ipv6 unique local address also
- 01:24:32known as ula are similar to that of rfc
- 01:24:351980 private address in the ipv4 but
- 01:24:39have a completely different purpose
- 01:24:41which we didn't go into depth in this
- 01:24:43lecture
- 01:24:44however we mentioned that the ipv6 does
- 01:24:47provide for a protocol translation
- 01:24:50between ipv4 and ipv6 known
- 01:24:54as nat 64. so ipv46 still have a type of
- 01:24:59nat
- 01:25:00which allow the communication between
- 01:25:02ipv4 and ipv6 uh networks and those that
- 01:25:07particular system you know methodology
- 01:25:09is called nat 64.
- 01:25:13that is the end of this module
- 01:25:15if you like these type of lectures
- 01:25:17please thumbs up this video and
- 01:25:19subscribe to my channel
- 01:25:21as i mentioned before i will go through
- 01:25:24lab demonstration within next few weeks
- 01:25:27so that you will have a comprehensive
- 01:25:29idea about nat and pat that we have
- 01:25:32covered
- 01:25:33if you have any questions or concerns
- 01:25:35regarding any of the items that we have
- 01:25:36covered please don't hesitate to reach
- 01:25:38out to me until next time good luck with
- 01:25:41your exams and have a nice day
- NAT
- IPv4
- Cisco CCNA
- Static NAT
- Dynamic NAT
- PAT
- Network Configuration
- IP Address Translation
- IPv6
- NAT64