Discovering computer networks: hands on in the Open Networking Lab
Discovering computer networks: hands on in the Open Networking Lab

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

Free course

Discovering computer networks: hands on in the Open Networking Lab

5.2 Private addresses

In this part you will look at the problem raised by the use of private IPv4 addresses that are commonly set up for home networks.

Now watch the video below, which is about 4 minutes long.

Private addresses

Download this video clip.Video player: 29_private_addresses.mp4
Skip transcript

Transcript

Welcome to a session about NAT, network address translation.

Here I am at home, with a typical setup: I’ve got a desktop and a laptop connected to a home gateway which connects to the internet.

Let’s just check that everything is set up correctly. I’ll open a terminal on my desktop, type in ipconfig. My desktop has got an IP address of 192.168.0.100, and is connected through my home gateway which has an IP address 192.168.0.1. That looks good.

I can check that I can ping that gateway. And there we are, I’ve got some pings coming back from that.

I can also check to see if I can ping my laptop, which has got the IP address 192.168.0.101. Again, I’ve got some pings in return.

So that’s all good – the gateway is working as a switch, it’s dealing with traffic on the local area network, the LAN, which is my home network.

MSo my colleague Helen is also at home, with her desktop and her laptop. Her LAN is working fine too. She has the same gateway from the same ISP. So in fact the configuration is identical.

If Helen opens a terminal on her machine and does ipconfig, she should see exactly the same configuration as I did: 192.168.0.100 for her own IP address, the default gateway 192.168.0.1 for her home gateway.

Now on the face of it, this can’t be right. On the internet, every connected device has to have a unique IP address or the traffic can’t be routed correctly, but here we clearly have two PCs with the same IP address.

If I tried pinging from my machine to Helen’s machine, that’s clearly not going to work because they have the same IP address.

But in fact there is another reason why it wouldn’t work. The addresses used here, starting 192.168, are in a private address range. These are intended for use in private networks, like a home network, and routers will never pass those addresses through to the rest of the internet. They can be used to network within each LAN happily enough, but they can’t be reached over the internet.

You might have spotted another potential issue: we also have two identical home gateway routers on the internet, and both are set up as a gateway at private address 192.168.1.1, so is that a problem?

Well, no, it’s not a problem, because a router is always a two-faced device. It has one network interface that sits on the local area network, the inside. And it has another interface that sits on the outside, on the internet. Each interface will have a different IP address.

So if I just reveal the setup of this gateway, you can see both IP addresses: 192.168.0.1 on the LAN side and 88.0.0.2 on the internet. And on the other home gateway: 192.168.0.1 on the LAN and 99.0.0.2 on the internet. So the outside IP addresses, the ones which are on the internet, are different, and there’s no clash between them.

The domestic gateways will have been supplied by an ISP, in this case the same ISP, and they will be configured to have different IP addresses – probably by DHCP running from a central server at the ISP.

So we’ve seen that in a typical home network, the devices on it use private addresses, and different networks might in fact use identical IP addresses, so they can’t be visible on the internet. But the IP address of the outward side of the gateway router will have a unique IP address, so the gateway itself can be part of the internet. We’ll see how this lets home devices communicate with the internet through the gateway.

End transcript
 
Interactive feature not available in single page view (see it in standard view).

Home networks normally use addresses in an IPv4 private address range, most commonly starting 192.168.0.0. Addresses are obtained by DHCP from the home gateway provided by an internet service provider (ISP). (An ISP is the company who provides – and charges for – access to the internet from your home over broadband, optical fibre or satellite.) The ISP has many thousands of customers, each of whom has a home network on which devices might end up with the same IP address.

Since private addresses are not forwarded by routers, using the same IP address in different home networks does not cause clashes. However, private addresses can’t communicate with the internet. The gateway does connect to the internet; it is a router and has two network interfaces: one on the internal LAN and one on the internet. The IP address for the router’s external interface is not private so the router is able to communicate with the internet.

Activity 4 Test yourself

5 minutes

Identify the two correct statements in the list below.

a. 

IP addresses starting 192.168.0.0 are private addresses and are commonly used in home networks.


b. 

ISP stands for Internet Secret Protocol and is used to deliver packets to private addresses.


c. 

Devices can never have the same IP address, even on different home networks.


d. 

ISP is an abbreviation for internet service provider.


The correct answers are a and d.

OPNL_1

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to university level study, find out more about the types of qualifications we offer, including our entry level Access courses and Certificates.

Not ready for University study then browse over 900 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus