4.3 The Internet Protocol, part 2

96.83k views3125 WordsCopy TextShare
JimKurose
Video presentation: Network Layer: The Internet Protocol, part 2. Network address translation. NAT....
Video Transcript:
[Music] in the last section we spent quite a bit of time talking about ipv4 addressing and the limitations of a 32-bit ipv4 address space in this section the two topics were going to cover network address translation and ipv6 have their origins in the late mid to late 1990s when the networking community really began to understand that the exhaustion of the ipv4 address space was going to be an important concern as we'll see both network address translation and ipv6 have a number of other important advantages as well and are seeing increasingly widespread deployment so let's take a look well let's start with network address translation known as net and here's how that works the idea is pretty simple within a local area network a home network and institutional network and internet cafe all of the devices within that network have an IP address from a special range of addresses known as private IP addresses 10. 0. 0.
0 slash 8 is an example of such an address range now data grams that are exchanged between hosts within this network use these addresses as always there is no net involved but what about communication outside of this local area network that's where NAT comes into play in particular all data grams from any of the hosts inside this network and there could be tens hundreds or thousands of such devices that are sent to hosts outside of the network will all use the same single 32 bit IP address so for this example here although all hosts have IP addresses of the form 1000 / 24 when their data grams emerge from the router here into the larger Internet they'll all have they'll all use the same single source IP address of 138 about 76 29. 7 the source port numbers of these outgoing data grams will be remapped as we'll see the implementation and of this translation is performed by this router here which is referred to as an added router and that router or sometimes just as an app box so Frenette all devices in the local network have a 32-bit address that comes from one of three what are called private IP address ranges that you see here if you've looked at the IP address on your laptop tablet or computer when you're attached to a home network and institutional network or a cellular network you've maybe seen it has an address in one of these ranges take a look and that has a number of advantages there will only be a single same 32-bit source IP address that will be used for all data grams coming from all hosts behind the net router one can change the addresses of hosts within the local network without having to notify the outside world since they're all drawn from this private address range the network can change ISPs without having to change addresses of devices in the local area network and there are security benefits as well devices inside the local network are not directly addressable by or visible to the outside world so let's see how NAT is implemented well there's three things an added router will need to do first for the outgoing data grams then added router will need to replace the source IP address and port number for every outgoing data Graham with the NAT IP address and a new source port number it's important to know that NAT is transparent both to the local hosts and to the remote hosts all the remote host is going to see is an arriving data Graham it's got an IP address and a port number as usual and the remote host is going to respond using that IP address and port number as usual second the NAT router is going to need to remember every translation pair mapping the local source IP address and local source port number to the NAT IP address and a new source port number this translation will be stored in that translation table in third when data grams arrived from the external internet and are destined for a hosts within the local network the NAT router will need to replace the destination IP address and port number every incoming data gram with the corresponding IP address and source port number stored in the NAT table this will all become clear if we take a look at net in action in this example the local network addresses are in the range 1000 / 24 and the net address used by the router is 138 dot 76 that 29. 7 we see the net translation table here which is initially empty in step 1 host 1000 dot 1 sends a Datagram with source port 3 3 4 5 to destination IP address 128 119 dot 4186 port 80 it's a web server the data gram reaches the net router which then changes the data gram source IP address from 1000 1 and source port 3 3 4 5 to IP address 138 dot 76 29.
7 and source port number 5001 and updates the NAT table accordingly as we see here note that the destination address and port number are both unchanged in the outgoing data Graham in step 3 the remote host is replied note that the reply arrives with a destination address of 138 dot 76 dot 29.
Copyright © 2025. Made with ♥ in London by YTScribe.com