{"id":37723,"date":"2019-10-31T22:19:20","date_gmt":"2019-10-31T19:19:20","guid":{"rendered":"https:\/\/prohoster.info\/blog\/trening-cisco-200-125-ccna-v3-0-den-29-pat-i-nat\/"},"modified":"2019-10-31T22:19:20","modified_gmt":"2019-10-31T19:19:20","slug":"trening-cisco-200-125-ccna-v3-0-den-29-pat-i-nat","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/trening-cisco-200-125-ccna-v3-0-den-29-pat-i-nat","title":{"rendered":"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Today we will study PAT (Port Address Translation), a technology for translating IP addresses using ports, and NAT (Network Address Translation), a technology for converting IP addresses of transit packets. PAT is a specific case of NAT. We will cover three topics: <\/p>\n<p> \u2014 private, or internal (intranet, local) IP addresses and public, or external IP addresses;<br \/>\n \u2014 NAT and PAT;<br \/>\n \u2014 configuring NAT\/PAT.<\/p>\n<p>Let's start with Private IP addresses. We know they are divided into three classes: A, B, and C. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/0bb1aa42bce98cf59184fa678f94a071.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nInternal addresses of Class A occupy the range of 'tens' from 10.0.0.0 to 10.255.255.255, while external ones occupy the range from 1.0.0.0 to 9.255.255.255 and from 11.0.0.0 to 126.255.255.255. <\/p>\n<p>Internal addresses of Class B occupy the range from 172.16.0.0 to 172.31.255.255, while external ones range from 128.0.0.0 to 172.15.255.255 and from 172.32.0.0 to 191.255.255.255.<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>Internal addresses of Class C occupy the range from 192.168.0.0 to 192.168.255.255, while external ones are from 192.0.0.0 to 192.167.255.255 and from 192.169.0.0 to 223.255.255.255.<\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/e8c33c20423db3d916dd2b5164c84b9c.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nClass A addresses are \/8, Class B addresses are \/12, and Class C addresses are \/16. Thus, external and internal IP addresses of different classes occupy different ranges. <\/p>\n<p>We have discussed the difference between private and public IP addresses multiple times. In general, if we have a router and a group of internal IP addresses, when they attempt to access the internet, the router converts them to external IP addresses. Internal addresses are used exclusively in local networks, not on the Internet. <\/p>\n<p>If I check my computer's network parameters using the command line, I will see my internal LAN IP address 192.168.1.103.<\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/15742410dd5b0b7eb0d845ccd6ef4ddc.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nTo find out my public IP address, I can use an internet service like 'What is my IP?'. As you can see, the external address of the computer 78.100.196.163 differs from its internal address. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/ebf4e4040d30ac25ff540356ce16c3eb.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nIn all cases, my computer is visible on the internet by its external IP address. So, the internal address of my computer is 192.168.1.103, and the external one is 78.100.196.163. The internal address is used only for local communication; it cannot access the internet. For that, you need a public IP address. You might recall why the division into private and public addresses was made by reviewing the video tutorial Day 3. <\/p>\n<p>Let's consider what NAT is. There are three types of NAT: static, dynamic, and 'overloaded' NAT, or PAT.<\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/ff62b6b296682722436c45f6a9a3da75.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nCisco defines four terms describing NAT. As mentioned, NAT is a mechanism that converts internal addresses to external ones. If a device connected to the internet receives a packet from another device in the local network, it simply drops that packet since the format of the internal address doesn\u2019t match the format of addresses used in the global internet. Therefore, the device must obtain a public IP address to access the internet. <br \/>\nThe first term is Inside Local, which refers to the IP address of a host in the internal, local network. Simply put, it's the primary source address like 192.168.1.10. The second term, Inside Global, is the IP address of the local host as seen in the external network. In our case, this is the external port IP address of the router, 200.124.22.10.<\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/486085260247bf6da22c96ba6a3fc804.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nIt can be said that Inside Local is a private IP address, while Inside Global is a public IP address. Remember that the term Inside refers to the source of the traffic, whereas Outside pertains to the destination of the traffic. Outside Local is the IP address of a host in the external network as seen by the internal network. In simpler terms, it\u2019s the recipient's address visible from the internal network. An example of such an address is the IP address 200.124.22.100 of a device located on the internet. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/6e53432b17156d7d031cfa7d83dc6d68.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nOutside Global is the IP address of a host visible in the external network. In most cases, the Outside Local and Outside Global addresses appear the same, because even after the conversion, the destination IP address remains visible to the source as it was before the conversion. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/678a3bb319c407dbc8f9aaccd01b64ab.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nLet\u2019s consider what static NAT represents. Static NAT refers to a one-to-one conversion of internal IP addresses to external ones, or 'one-to-one' mapping. When devices send traffic to the internet, their Inside Local addresses are converted to Inside Global addresses.<\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/406206cf1f961fff48abeb00f4c8c741.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nIn our local network, there are three devices, and when they are about to access the internet, each one obtains its own Inside Global address. These addresses are statically assigned to the traffic sources. The 'one-to-one' principle means that if there are 100 devices in the local network, they receive 100 external addresses. <\/p>\n<p>NAT was created to save the Internet from running out of public IP addresses. Thanks to NAT, many companies and networks can share a common external IP address, to which local device addresses are converted when accessing the Internet. You could argue that in this case, there is no saving of address space with static NAT since a hundred local computers are assigned a hundred external addresses, and you would be absolutely correct. However, static NAT still has a number of advantages.<\/p>\n<p>For example, we have a server with an internal IP address of 192.168.1.100. If a device from the Internet wants to communicate with it, it cannot use the internal destination address; it must use the server's external address of 200.124.22.3. If static NAT is configured on the router, all traffic directed to 200.124.22.3 is automatically redirected to 192.168.1.100. This ensures external access to local network devices, in this case, to the company's web server, which may be necessary in certain situations. <\/p>\n<p>Let's consider dynamic NAT. It is very similar to static NAT but does not assign permanent external addresses to each local device. For instance, we have 3 local devices and only 2 external addresses. If the second device wants to access the Internet, it will be assigned the first available IP address. If after it a web server wants to access the Internet, the router will assign it the second available external address. If after that the first device wants to go to the external network, there will be no available IP address for it, and the router will drop its packet. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/0d79a84392f1b4822e5883777d307f20.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nWe may have a hundred devices with internal IP addresses, and each of these devices can access the Internet. But since we do not have static external address assignments, no more than 2 devices out of a hundred can go online simultaneously, because we only have two dynamically assignable external addresses. <\/p>\n<p>Cisco devices have a fixed address translation time, which by default is set to 24 hours. This can be changed to 1, 2, 3, or 10 minutes, or any other desired time. After this period, external addresses are released and automatically returned to the address pool. If at that moment the first device wants to access the internet and an external address is available, it will receive that address. The router contains a NAT table that updates dynamically, and as long as the translation time has not expired, the assigned address remains with the device. In simpler terms, dynamic NAT operates on the principle of 'first come, first served.' <\/p>\n<p>Let\u2019s consider what overloaded NAT, or PAT, entails. This is the most common type of NAT. In your home network, there may be many devices \u2013 a PC, smartphone, laptop, tablet, and they all connect to a router that has one external IP address. PAT allows multiple devices with internal IP addresses to access the internet simultaneously under a single external IP address. This is made possible because each private internal IP address uses a specific port number during the communication session. <br \/>\nSuppose we have a single public address 200.124.22.1 and numerous local devices. When they access the internet, all these hosts will receive the same address 200.124.22.1. The only difference that will distinguish them from each other is the port number. <br \/>\nIf you recall the discussion on the transport layer, you know that the transport layer contains port numbers, and the source port number is a random number. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/925a623821633f1159c6aaac50f4a97f.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nAssume there is a host in the external network with the IP address 200.124.22.10, which is connected to the internet. If the computer 192.168.1.11 wants to communicate with the computer 200.124.22.10, it will create a random source port 51772. Meanwhile, the destination port of the external network computer will be 80. <\/p>\n<p>When the router receives a packet from the local computer directed towards the external network, it translates its local address Inside Local to the Inside Global address 200.124.22.1 and assigns port number 23556. The packet will reach the computer 200.124.22.10, which must then send back a response according to the handshake procedure, with the destination being address 200.124.22.1 and port 23556. <\/p>\n<p>The router has a NAT translation table, so when it receives a packet from an external computer, it will identify the Inside Local address that corresponds to the Inside Global address as 192.168.1.11:51772 and will forward the packet to it. After this, the connection between the two computers can be considered established. <br \/>\nAt the same time, you could have a hundred devices using the same address 200.124.22.1 for communication, but with different port numbers, allowing them all to simultaneously connect to the internet. This is why PAT is such a popular method of translation.<\/p>\n<p>Let's look at the configuration of static NAT. For any network, it is first necessary to define the incoming and outgoing interfaces. The diagram shows a router that passes traffic from port G0\/0 to port G0\/1, meaning from the internal network to the external network. Thus, we have an incoming interface 192.168.1.1 and an outgoing interface 200.124.22.1. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/d87aaf1b23645fc51784f49654eb85e3.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nTo configure NAT, we go to the interface G0\/0 and set the parameters ip address 192.168.1.1 255.255.255.0 and specify that this interface is the incoming one using the command ip nat inside. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/f1389dae6c9a8bab133cab0dd02b3510.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nSimilarly, we configure NAT on the outgoing interface G0\/1, specifying ip address 200.124.22.1, the subnet mask 255.255.255.0, and ip nat outside. Remember that dynamic NAT translation always occurs from the incoming to the outgoing interface, from inside to outside. Naturally, for dynamic NAT, the response comes to the incoming interface through the outgoing one, but during traffic initiation, the in-out direction is activated. In the case of static NAT, traffic initiation can occur in either direction\u2014 in-out or out-in. <\/p>\n<p>Next, we need to create a static NAT table, where each local address corresponds to a separate global address. In our case, there are 3 devices, so the table will consist of 3 entries that indicate the Inside Local IP address of the source being transformed into the Inside Global address: ip nat inside static 192.168.1.10 200.124.22.1. <br \/>\nThus, in static NAT, you manually specify the translation for each local host address. Now I will switch to Packet Tracer and perform the settings described above. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/aecdf044cb8b82154e984446cdbcd477.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nAt the top, we have server 192.168.1.100, below it is computer 192.168.1.10, and at the very bottom is computer 192.168.1.11. The port G0\/0 of router Router0 has the IP address 192.168.1.1, while port G0\/1 has 200.124.22.1. In the 'cloud' representing the internet, I placed Router1, which has been assigned the IP address 200.124.22.10.<\/p>\n<p>I access the settings of Router1 and type the command debug ip icmp. Now, as soon as the ping reaches this device, a debug message will appear in the settings window, indicating what kind of packet it is. <br \/>\nLet's proceed to configure router Router0. I enter global configuration mode and call up interface G0\/0. Next, I enter the command ip nat inside, then proceed to interface g0\/1 and enter the command ip nat outside. This way, I assigned the router's inbound and outbound interfaces. Now I need to manually configure the IP addresses, that is, transfer the rows from the previously mentioned table into the settings: <\/p>\n<p>Ip nat inside source static 192.168.1.10 200.124.22.1 <br \/>\nIp nat inside source static 192.168.1.11 200.124.22.2<br \/>\nIp nat inside source static 192.168.1.100 200.124.22.3 <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/bfdf965dadab11e562685d9be358a1a2.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nNow I will ping Router1 from each of our devices and see which IP addresses the received ping will show. To do this, I place the open CLI window of router R1 on the right side of the screen to see the debug messages. Now I go to the command line terminal of PC0 and ping the address 200.124.22.10. After this, a message appears in the window, indicating that the ping was received from the IP address 200.124.22.1. This means that the local computer's IP address 192.168.1.10 was converted to the global address 200.124.22.1.<\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/64f2d89214b4e49d29f5b131630555ce.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nI do the same with the next local computer and see that its address was converted to 200.124.22.2. Then I send a ping from the server and see the address 200.124.22.3.<br \/>\nThus, when traffic from a local network device reaches the router configured with static NAT, the router converts the local IP address to a global one according to the table and sends the traffic to the external network. To check the NAT table, I type the command show ip nat translations.<\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/e7eab03a79633d7d99890584a705ad39.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nNow we can view all the translations that the router performs. The first column Inside Global shows the device's address before translation, which is the address under which the device is visible from the external network. Next is the Inside Local address, which is the address of the device in the local network. The third column shows Outside Local, while the fourth displays the Outside Global address; both of these addresses are the same because we do not alter the destination IP address. As you can see, after a few seconds, the table cleared because Packet Tracer has a short ping timeout. <\/p>\n<p>I can ping the server at address 200.124.22.3 from router R1, and if we go back to the router settings, we can see that the table has filled up again with four ping rows, showing the translated destination address 192.168.1.100.<\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/63aadbc9f15afb27d708e6fe1d87908c.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nAs I mentioned, even if the translation timeout occurs, when traffic is initiated from an external source, the NAT mechanism is automatically activated. This happens only when using static NAT. <\/p>\n<p>Now let's look at how dynamic NAT works. In our example, we have 2 public addresses for three local network devices, but there can be dozens or even hundreds of such private hosts. At the same time, only 2 devices can access the internet. Let's examine how static and dynamic NAT differ beyond this.<\/p>\n<p>As in the previous case, we first need to identify the router's incoming and outgoing interfaces. Next, we create a sort of access list, but this is not the ACL we discussed in the previous lesson. This access list is used to identify the traffic we want to translate. Here appears a new term: 'interesting traffic.' This is the traffic that interests you for some reason, and when this traffic matches the conditions of the access list, it falls under NAT and is translated. This term applies to traffic in many cases; for example, in the case of a VPN, the 'interesting' traffic is the traffic meant to be passed through the VPN tunnel. <\/p>\n<p>We need to create an ACL that identifies interesting traffic; in our case, this is the entire network traffic 192.168.1.0, along with the corresponding reverse mask 0.0.0.255. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/243fdeb9693c2e7eee9122e6f2436ff6.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nNext, we need to create a NAT pool using the command ip nat pool  and specify the IP address pool 200.124.22.1 200.124.22.2. This means that we provide only two external IP addresses. Furthermore, the command uses the keyword netmask and enters the subnet mask 255.255.255.252. The last octet of the mask is (255 - the number of pool addresses - 1), so if you have 254 addresses in the pool, the subnet mask would be 255.255.255.0. This is a very important parameter, so when configuring dynamic NAT, ensure that you enter the correct value for netmask. <\/p>\n<p>Next, we use the command that activates the NAT mechanism: ip nat inside source list 1 pool NWKING, where NWKING is the name of the pool and list 1 refers to access list ACL number 1. Remember \u2014 for this command to work, you must first create a pool of dynamic addresses and an access list. <\/p>\n<p>So, under our conditions, the first device wishing to access the internet will be able to do so, the second device will also be able to, but the third will have to wait until one of the pool's addresses becomes available. Configuring dynamic NAT consists of four steps: defining the inbound and outbound interfaces, determining 'interesting' traffic, creating the NAT pool, and the actual configuration. <br \/>\nNow we will switch to Packet Tracer and attempt to configure dynamic NAT. First, we need to remove the static NAT settings by sequentially entering the commands:<\/p>\n<p>no Ip nat inside source static 192.168.1.10 200.124.22.1 <br \/>\nno Ip nat inside source static 192.168.1.11 200.124.22.2<br \/>\nno Ip nat inside source static 192.168.1.100 200.124.22.3. <\/p>\n<p>Next, I create access list List 1 for the entire network with the command access-list 1 permit 192.168.1.0 0.0.0.255 and form the NAT pool using the command ip nat pool NWKING 200.124.22.1 200.124.22.2 netmask 255.255.255.252. In this command, I specified the name of the pool, the addresses included in it, and the subnet mask.<\/p>\n<p>Then I specify what type of NAT it is \u2013 inside or outside, and the source from which NAT should gather information, in our case it's the list, using the command ip nat inside source list 1. After that, the system will prompt whether a whole pool or a specific interface is needed. I choose pool because we have more than one external address. If you select interface, you will need to specify the port with a specific IP address. The final command will look like this: ip nat inside source list 1 pool NWKING. Currently, this pool consists of two addresses 200.124.22.1 200.124.22.2, but you can freely change them or add new addresses that are not tied to a specific interface. <\/p>\n<p>You must ensure that your routing table has updated so that any of these IP addresses in the pool point to this device; otherwise, you will not receive return traffic. To verify the settings are working, we will repeat the procedure of pinging the cloud router that we did for static NAT. I will open the Router 1 window to see the debug mode messages and ping it from each of the 3 devices.<\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/b768b7208a21f1eefe8893394f6e538b.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nWe see that all source addresses from where the ping packets come match the settings. At the same time, the ping from the PC0 computer does not go through because it ran out of a free external address. If you look at the settings of Router 1, you will see that currently, the pool addresses 200.124.22.1 and 200.124.22.2 are in use. Now I will disable the translation, and you will see how the lines disappear one by one. I restart the ping from PC0, and as you can see, now everything works because it was able to acquire the freed up external address 200.124.22.1. <\/p>\n<p>How can you clear the NAT table and revert the specified address translation? Go to the settings of Router0 and type the command clear ip nat translation * with an asterisk at the end of the line. If you check the translation status now with the command show ip nat translation, the system will return an empty line. <\/p>\n<p>To view NAT statistics, the command show ip nat statistics is used. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/edf20f51bdabbe9d7a62c538c1155470.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nThis is a very useful command that allows you to view the total number of dynamic, static, and extended NAT\/PAT translations. You see that it equals 0 because we cleared the translation data with the previous command. Here, the incoming and outgoing interfaces are displayed, along with the number of successful and unsuccessful translation hits and misses (the number of misses is related to the lack of available external addresses for the internal host), the access list name, and the pool. <\/p>\n<p>Now we will move on to the most popular type of IP address conversion \u2013 extended NAT, or PAT. To configure PAT, you need to go through the same steps as for dynamic NAT: identify the incoming and outgoing interfaces of the router, identify the 'interesting' traffic, create a NAT pool, and configure PAT. We can create the same pool from multiple addresses as in the previous case, but this is not necessary because in PAT the same external address is always used. The difference between setting up dynamic NAT and PAT lies solely in the keyword overload, which concludes the last configuration command. Once this word is entered, dynamic NAT automatically turns into PAT.<\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/d372483678c9f08c33caf1eb9c8046a2.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nAdditionally, you are using only one address in the NWKING pool, for example, 200.124.22.1, but specifying it twice as the starting and ending external address with a subnet mask of 255.255.255.0. You can simplify this by using the source interface parameter and the fixed address 200.124.22.1 of interface G0\/1 instead of the line ip nat 1 pool NWKING 200.124.22.1 200.124.22.1 netmask 255.255.255.0. In this case, all local addresses when accessing the internet will be translated to this IP address. <\/p>\n<p>You can also use any other IP address in the pool, not necessarily corresponding to a specific physical interface. However, in this case, you must ensure that all routers in the network can route the return traffic to the device you have chosen. The downside of NAT is that it cannot be used for end-to-end addressing because by the time the return packet gets back to the local device, its dynamic NAT IP address may have changed. In other words, you need to be sure that the selected IP address will remain available for the duration of the session. <\/p>\n<p>Let's take a look at this through Packet Tracer. First, I need to remove the dynamic NAT with the command no Ip nat inside source list 1 NWKING and delete the NAT pool using the command no Ip nat pool NWKING 200.124.22.1 200.124.22.2 netmask 255.255.255.252. <\/p>\n<p>Then I need to create a PAT pool using the command Ip nat pool NWKING 200.124.22.2 200.124.22.2 netmask 255.255.255.255. This time I am using an IP address that does not belong to a physical device because the physical device has the address 200.124.22.1, and I want to use 200.124.22.2. In our case, this works because we have a local network.<\/p>\n<p>Next, I configure PAT with the command Ip nat inside source list 1 pool NWKING overload. After entering this command, we enable PAT address translation. To check the configuration's correctness, I go to our devices, the server, and two computers, and I ping from PC0 to Router1 at the address 200.124.22.10. In the router's settings window, I see debug lines showing that the source of the ping, as we expected, is the IP address 200.124.22.2. The ping sent from PC1 and the server Server0 also comes from this address. <\/p>\n<p>Let's see what happens in the translation table of router Router0. You can see that all translations are successful; each device is assigned its own port, and all local addresses are linked to Router1 through the pool IP address 200.124.22.2. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/aa051ee41e877926d9b0313af7c75355.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nI use the command show ip nat statistics to view the PAT statistics. <\/p>\n<p><img decoding=\"async\" alt=\"Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT\" src=\"\/wp-content\/uploads\/2019\/09\/db763aa0c579d1c0d0759b6081b00847.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nWe see that the total number of translations, or address translations, is 12, and we can see the characteristics of the pool and other information. <\/p>\n<p>Now I will do one more thing \u2014 I will enter the command Ip nat inside source list 1 interface gigabit Ethernet g0\/1 overload. If after this I ping the router from PC0, it shows that the packet came from the address 200.124.22.1, that is, from the physical interface! This is an easier way: if you do not want to create a pool, which often happens when using home routers, you can use the IP address of the physical interface of the router as an external NAT address. This is how the address of your private host is most often translated for the public network. <br \/>\nToday we explored a very important topic, so you need to practice it. Use Packet Tracer to test your theoretical knowledge in solving practical tasks related to NAT and PAT configuration. We have reached the end of the ICND1 topic \u2014 the first exam of the CCNA course, so I will likely dedicate the next video lesson to summarizing. <\/p>\n<p><center><div class=\"youtube-placeholder\" data-id=\"l5wuJFoeVDQ\" onclick=\"loadVideo(this)\">\r\n        <img decoding=\"async\" src=\"https:\/\/img.youtube.com\/vi\/l5wuJFoeVDQ\/hqdefault.jpg\" alt=\"Play video\" loading=\"lazy\" width=\"480\" height=\"360\" style=\"width:100%;height:auto;\">\r\n        <div class=\"play-button\"><\/div>\r\n    <\/div><\/center><br \/>\nThank you for staying with us. Do you enjoy our articles? Would you like to see more interesting materials? Support us by placing an order or recommending us to your friends. <b>30% discount for Habr users on a unique entry-level server designed by us for you:<\/b> <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/company\/ua-hosting\/blog\/347386\/\">The whole truth about VPS (KVM) E5-2650 v4 (6 Cores) 10GB DDR4 240GB SSD 1Gbps starting at $20, or how to properly divide a server?<\/a><\/noindex> (options available with RAID1 and RAID10, up to 24 cores and up to 40GB DDR4).<\/p>\n<p><b>Dell R730xd for half the price?<\/b> Only with us <b><noindex><a rel=\"nofollow\" href=\"https:\/\/ua-hosting.company\/serversnl\">2 x Intel TetraDeca-Core Xeon 2x E5-2697v3 2.6GHz 14C 64GB DDR4 4x960GB SSD 1Gbps 100TB starting at $199<\/a><\/noindex> in the Netherlands! <b>Dell R420 \u2014 2x E5-2430 2.2GHz 6C 128GB DDR3 2x960GB SSD 1Gbps 100TB \u2014 from $99!<\/b><\/b> Read about how <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/company\/ua-hosting\/blog\/329618\/\">To build a corporate-class infrastructure using Dell R730xd E5-2650 v4 servers costing 9000 euros for peanuts?<\/a><\/noindex><br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/ua-hosting\/blog\/465789\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u0443\u0447\u0430\u0442\u044c PAT (Port Address Translation), \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 IP- \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0440\u0442\u043e\u0432, \u0438 NAT (Network Address Translation), \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. PAT \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043d\u044b\u043c \u0441\u043b\u0443\u0447\u0430\u0435\u043c NAT. \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0440\u0438 \u0442\u0435\u043c\u044b: \u2014 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435, \u0438\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 (\u0432\u043d\u0443\u0442\u0440\u0438\u0441\u0435\u0442\u0435\u0432\u044b\u0435, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435) IP-\u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435, \u0438\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 IP-\u0430\u0434\u0440\u0435\u0441\u0430; \u2014 NAT \u0438 PAT; \u2014 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 NAT\/ PAT. \u041d\u0430\u0447\u043d\u0435\u043c [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":28314,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-37723","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u0443\u0447\u0430\u0442\u044c PAT (Port Address Translation), \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 IP- \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0440\u0442\u043e\u0432, \u0438 NAT (Network Address Translation), \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/trening-cisco-200-125-ccna-v3-0-den-29-pat-i-nat\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0422\u0440\u0435\u043d\u0438\u043d\u0433 Cisco 200-125 CCNA v3.0. \u0414\u0435\u043d\u044c 29. PAT \u0438 NAT | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u0443\u0447\u0430\u0442\u044c PAT (Port Address Translation), \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 IP- \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0440\u0442\u043e\u0432, \u0438 NAT (Network Address Translation), \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/trening-cisco-200-125-ccna-v3-0-den-29-pat-i-nat\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:19:20+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:19:20+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Cisco Training 200-125 CCNA v3.0. Day 29. PAT and NAT | ProHoster","description":"Today we will study PAT (Port Address Translation), a technology for translating IP addresses using ports, and NAT (Network Address Translation), a technology for modifying the IP addresses of transit packets.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/trening-cisco-200-125-ccna-v3-0-den-29-pat-i-nat","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0422\u0440\u0435\u043d\u0438\u043d\u0433 Cisco 200-125 CCNA v3.0. \u0414\u0435\u043d\u044c 29. PAT \u0438 NAT | ProHoster","og:description":"\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0437\u0443\u0447\u0430\u0442\u044c PAT (Port Address Translation), \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 IP- \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0440\u0442\u043e\u0432, \u0438 NAT (Network Address Translation), \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f IP-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/trening-cisco-200-125-ccna-v3-0-den-29-pat-i-nat","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:19:20+00:00","article:modified_time":"2019-10-31T19:19:20+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"37723","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-23 19:02:20","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:22:28","updated":"2026-01-23 19:02:20","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/37723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=37723"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/37723\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/28314"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=37723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=37723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=37723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}