March 31, 2021

Is this an accurate representation of DHCP and IP addresses?


I’m learning from a YouTube lecture and I can’t really ask the teacher for help so is this how DHCP sends IP addresses to routers and devices?

[http://imgur.com/a/9gJQPj6](http://imgur.com/a/9gJQPj6)

Comments

culb321

I’m not sure but your drawing seems to be about NAT, you may want to have a look into that

luxgertalot

The Internet is basically a whole bunch of TCP/IP networks connected together through routers. Every device on such a network needs an IP address to be able to talk to other devices on the network. DHCP is one mechanism to assign IP addresses to devices on a local network (there are other ways, such as static IP addresses or the bootp protocol).

You may have heard of TCP/IP “subnets” – that’s a way to describe which IP addresses are part of the same local network. For instance, if you are creating a network, you could configure it so that all addresses between 192.168.0.1 and 192.168.0.254 are part of the same network (the addresses ending with 0 and 255 have a special meaning in TCP/IP so they don’t count).

You can configure your subnet in many other ways btw – you could set it up so that only the addresses between …1 and …14 are part of your subnet.

As long as both the source and destination devices are within the subnet’s address range, you don’t need a router: the devices can directly talk to each other on the same network.

If you want to make two devices in different networks talk to each other, let’s say 192.168.1.2 and 10.10.0.3, you need the help of one or more routers along the way. Every router is connected to two or more networks, and it has a “routing table” that basically says “traffic for this network needs to go to network A, that network goes to B”, etcetera.

The global public Internet is made up of lots and lots of different smaller networks that are connected via routers, and the “big” routers have large routing tables that make up the global topology of the Internet (in addition to physical connections of course). All devices on this big global Internet have globally unique IP addresses so every device can talk to every other device.

You can imagine in today’s world that we’re running out of globally unique IP addresses (since your laptop, phone, watch, tv, fridge, washing machine, car, and tons of other things are on the Internet). There are two ways to get around this issue: The first is IPv6, which is like IPv4 (with the aaa.bbb.ccc.ddd addresses) but the address space is MUCH bigger, and the way routing works is a bit different as well. It’s proven quite difficult to get the world to fully move to IPv6, perhaps because there’s another way to get more addresses out of the IPv4 space: Network Address Translation, or NAT.

The image you’re describing is a typical NAT setup: It shows two networks, your ISP’s network and your home network. There’s a router in between, which in your case does three things: It connects the two networks so your home devices can talk to other devices on the Internet, it uses DHCP to give your home devices a unique local IP address for your network, and it uses a technique called NAT to “hide” many local IP addresses behind a single “public” IP address that you get from your ISP.

For every network packet that one of your home devices sends to a device on the Internet, your NAT router keeps track of which home device is talking to which device on the Internet, and before sending the packet out, it replaces the home network address with your single public IP address. That’s because the device on the Internet you’re talking to needs to know which public IP address to send the response back to. When your NAT router receives the response packet, it looks in its internal book keeping, replaces the destination address with your local home device’s address, and everything works smoothly. It’s a pretty clever system!

Anyway, I hope that helps. A very long time ago I did a degree in networking so it’s fun to share some of that knowledge. But there are lots of videos and books that probably do a better job, so have fun learning it all!

KStieers

In the sense that what you drew is what you have at home.
Your ISP gives your router 1 IP for its outside interface from their pool of IP addresses.

Your router gives each system on your home network from its pool.

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: By filling this form and submitting your commen, you acknowledge, agree and comply with our terms of service. In addition you acknowledge that you are willingly sharing your email address with AiOWikis and you might receive notification emails from AiOWikis for comment notifications. AiOWiksi guarantees that your email address WILL NOT be used for advertisement or email marketting purposes.

This site uses Akismet to reduce spam. Learn how your comment data is processed.