1 00:00:00,510 --> 00:00:04,140 So what we're doing in this example is source address translation. 2 00:00:04,320 --> 00:00:10,110 We're not going to do destination address translation as source address. 3 00:00:10,110 --> 00:00:15,360 Translation tends to be the most common implementation of net, and that's what you need to know for 4 00:00:15,360 --> 00:00:22,980 the CNA certification with source address translation, you're typically netting devices on your internal 5 00:00:22,980 --> 00:00:26,370 network that use RFC 1918 addresses. 6 00:00:27,110 --> 00:00:34,430 For those devices to access devices on the Internet, their addresses need to be translated or changed 7 00:00:34,430 --> 00:00:39,590 from an RFC 1918 address to a publicly readable address. 8 00:00:39,950 --> 00:00:49,600 In this example, the router has an IP address of 1.1, 1.1, and we're going to net host 10.1, 1.1 9 00:00:49,610 --> 00:00:52,640 to an IP address of 1.1.1 or two. 10 00:00:52,940 --> 00:00:58,400 So in this example, we not netting the PC's IP address to the Router's IP address. 11 00:00:58,880 --> 00:01:01,430 I'll show you that example in a moment. 12 00:01:01,790 --> 00:01:09,920 In this example, we are netting one internal IP address or private IP address to a dedicated public 13 00:01:09,920 --> 00:01:10,940 IP address. 14 00:01:11,510 --> 00:01:16,550 In this example, we've also got a server on the Internet with an IP address of 2.22222. 15 00:01:16,640 --> 00:01:23,660 So the router will populate the net table as follows inside local addresses ten .1.1.1. 16 00:01:23,900 --> 00:01:27,110 Inside global is 1.1. 1 to 2. 17 00:01:27,140 --> 00:01:32,570 Outside local and outside global are set to 2.2.2.2. 18 00:01:32,870 --> 00:01:35,720 In this example, we're not netting the outside address. 19 00:01:35,720 --> 00:01:39,170 We are only netting the inside address. 20 00:01:39,930 --> 00:01:46,620 If you were sniffing this local area network connection between the PC and the router using Wireshark, 21 00:01:46,620 --> 00:01:48,810 and I'm going to demonstrate that in a moment. 22 00:01:48,960 --> 00:01:54,540 What you would see is that the source address of the packet is set to 10.1. 23 00:01:54,550 --> 00:01:55,590 Point one, point one. 24 00:01:55,770 --> 00:01:58,350 That's the physical IP address of this host. 25 00:01:58,590 --> 00:02:02,940 The destination address for traffic is 2.2 to 2.2. 26 00:02:02,970 --> 00:02:09,240 In other words, the PC has initiated a session to the server and if you capture traffic on the local 27 00:02:09,240 --> 00:02:16,230 network source addresses the PC's actual IP address and destination address is the server's IP address. 28 00:02:16,560 --> 00:02:23,220 However, when the traffic hits the rudder, the router will look in the net table because it's receiving 29 00:02:23,250 --> 00:02:30,240 traffic on an inside interface which you configure and the traffic is destined to an outside interface. 30 00:02:30,240 --> 00:02:33,840 So you configure the router with the inside and outside interfaces. 31 00:02:33,840 --> 00:02:39,690 And because of that configuration, the router looks in the net table to see if addresses should be 32 00:02:39,690 --> 00:02:40,440 netted. 33 00:02:40,560 --> 00:02:44,790 In this case, the source IP address matches an entry in the table. 34 00:02:44,970 --> 00:02:48,270 So the source IP address is going to be changed to one point. 35 00:02:48,270 --> 00:02:52,140 1.1 to the destination address is not going to be changed. 36 00:02:52,140 --> 00:02:55,590 It's going to remain as 2.2.22.2. 37 00:02:56,010 --> 00:03:00,360 The router will change the source address and then forward the traffic to the internet. 38 00:03:00,720 --> 00:03:06,870 The source address matches the century of 10.1, point one, point one and the destination address matches 39 00:03:06,870 --> 00:03:09,890 this entry to to 2.222. 40 00:03:09,900 --> 00:03:18,420 So the router is going to change the source IP address to 1.1. 1 to 2 as per the inside global entry 41 00:03:18,420 --> 00:03:19,980 in the net table. 42 00:03:20,190 --> 00:03:26,100 In this example, the outside, local and outside global addresses are the same, so the router doesn't 43 00:03:26,100 --> 00:03:29,160 change the destination address in the packet. 44 00:03:29,220 --> 00:03:35,430 If you sniffed the traffic using Wireshark on this link from the router to the internet, you would 45 00:03:35,430 --> 00:03:44,340 see that the source address is set now to 1.1. 1 to 2 rather than 10.1 1.1, which it was set to on 46 00:03:44,340 --> 00:03:45,840 the inside network. 47 00:03:46,050 --> 00:03:52,380 When the traffic arrives at the server and the server receives the traffic, the server believes that 48 00:03:52,380 --> 00:03:57,240 it's talking with a host with an IP address of 1.1.122. 49 00:03:57,600 --> 00:04:02,730 The server never sees that the actual source IP address was ten .1.1.1. 50 00:04:02,820 --> 00:04:07,710 When the server replies, the source and destination addresses are swapped around. 51 00:04:07,710 --> 00:04:15,870 So the source address is now 2.2 to 2.2 and the destination address is now 1.1.122. 52 00:04:16,140 --> 00:04:21,930 The packet is now routed across the internet and arrives at the net router. 53 00:04:22,050 --> 00:04:28,230 When the router receives the traffic, it sees that the traffic is destined to an IP address of 1.1.1 54 00:04:28,260 --> 00:04:29,010 or two. 55 00:04:29,250 --> 00:04:34,020 The router will check in its net table whether it has a matching entry. 56 00:04:34,020 --> 00:04:35,460 In this case it does. 57 00:04:35,460 --> 00:04:41,310 The inside global address is one point, 1.122, which matches the destination address. 58 00:04:41,610 --> 00:04:50,790 So what the router will do is it will know that the IP address 1.1 and 1.2 and change it to ten .1.1.1 59 00:04:50,790 --> 00:04:54,090 before forwarding the traffic onto the local network. 60 00:04:54,360 --> 00:05:00,870 The source address of quadruple t is not changed because those entries are the same in the net table 61 00:05:00,870 --> 00:05:03,660 for outside local and outside global. 62 00:05:03,840 --> 00:05:10,440 So once again, if you sniffed the traffic between the router and the PC, you would see that the destination 63 00:05:10,440 --> 00:05:11,430 address is 10.1. 64 00:05:11,550 --> 00:05:14,640 1.1 source address is two, two, two, two, two, two, two. 65 00:05:14,640 --> 00:05:21,060 And that's because the router has changed the destination IP address based on the inside local entry. 66 00:05:21,180 --> 00:05:23,910 Now that's essentially how Nat works. 67 00:05:23,910 --> 00:05:28,500 This is a simple 1 to 1 mapping with basic net.