0% found this document useful (0 votes)
6 views

Lecture 05-Data Communication & Network IP Addressing

The document outlines the course details for 'Data Communication and Network' (EENG 513), including objectives such as understanding computer networking fundamentals, IP addressing, and subnetting. It explains key concepts like network addresses, broadcast addresses, and the differences between public and private IP addresses, as well as the importance of subnetting for network management. Additionally, it provides examples of subnetting Class C addresses and the calculations involved in determining subnets and valid hosts.

Uploaded by

Harrison Forde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Lecture 05-Data Communication & Network IP Addressing

The document outlines the course details for 'Data Communication and Network' (EENG 513), including objectives such as understanding computer networking fundamentals, IP addressing, and subnetting. It explains key concepts like network addresses, broadcast addresses, and the differences between public and private IP addresses, as well as the importance of subnetting for network management. Additionally, it provides examples of subnetting Class C addresses and the calculations involved in determining subnets and valid hosts.

Uploaded by

Harrison Forde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

MODULE TITLE Data Communication and Network

MODULE CODE EENG 513


MODULE LECTURER Dr. ABDULAI SANKOH
LECTURE HOURS-LAB/PRACTICALS- 3-0-3
CREDIT HOURS
After completing this course the student must demonstrate the knowledge and ability to:.

 Build an understanding of the fundamental concepts of computer networking.


 Understand and explain Data Communications System and its components.
OBJECTIVES AND OUTCOMES  Identify the different types of network topologies and protocols.
 Enumerate the layers of the OSI model and TCP/IP. Explain the function(s) of each layer.
 Identify the different types of network devices and their functions within a network
 Understand and building the skills of subnetting and routing mechanisms.
 Familiarity with the basic protocols of computer networks, and how they can be used to
assist in network design and implementation.
MODULE DESCRIPTION (Optional??)
References
Computer Networks - A Tanenbaum - 5th edition
Computer Networks and Internets By Douglas E Comer
Computer Networking A Top-Down. Approach 6th Edition
REFERENCE TEXTS/WEBSITES
www.firewall.cx
LECTURE NUMBER 05
LECTURE DURATION (HOURS) 03
Internet Protocol Version 4 (IPv4)
IP Addressing
One of the most important topics in any discussion of TCP/IP is IP addressing. An IP address is a numeric identifier assigned to each machine
on an IP network. It designates the specific location of a device on the network.

An IP address is a software address, not a hardware address. The latter is hard-coded on a network interface card (NIC) and used for finding
hosts on a local network. IP addressing was designed to allow hosts on one network to communicate with a host on a different network
regardless of the type of LANs the hosts are participating in.

IP Terminology

In this section several important terms that are vital to your understanding of the Internet Protocol. Here are a few to get you started:

Bit A bit is one digit, either a 1 or a 0.

Byte A byte is 7 or 8 bits, depending on whether parity is used. For this course, always assume that a byte is 8 bits.

Octet An octet, made up of 8 bits, is just an ordinary 8-bit binary number. In this course, the terms byte and octet are completely

interchangeable.
Network address: This is the designation used in routing to send packets to a remote network Eg. 10.0.0.0, 172.16.0.0, and 192.168.10.0.
Broadcast address The address used by applications and hosts to send information to all nodes on a network is called the broadcast address.
Examples include 255.255.255.255, which is all networks, all nodes; 172.16.255.255, which is all subnets and hosts on network 172.16.0.0;
and 10.255.255.255, which broadcasts to all subnets and hosts on network 10.0.0.0.

An IP address consists of 32 bits of information. These bits are divided into four sections, referred to as octets or bytes, each containing 1 byte
(8 bits). You can depict an IP address using one of three methods:
 Dotted-decimal, as in 172.16.30.56
 Binary, as in 10101100.00010000.00011110.00111000
 Hexadecimal, as in AC.10.1E.38
Network Addressing
The network address (which can also be called the network number) uniquely identifies each network. Every machine on the same network
shares that network address as part of its IP address. In the IP address 172.16.30.56, for example, 172.16 is the network address.

The node address is assigned to, and uniquely identifies, each machine on a network. This part of the address must be unique because it
identifies a particular machine, an individual as opposed to a network, which is a group. This number can also be referred to as a host address.
In the sample IP address 172.16.30.56, the 30.56 is the node address.

The designers of the Internet decided to create classes of networks based on network size. The figure below summarizes the three classes of
network
To ensure efficient routing, Internet designers defined a mandate for the leading-bits section of the address for each different network class.
For example, since a router knows that a Class A network address always starts with a 0, the router might be able to speed a packet on its
way after reading only the first bit of its address. This is where the address schemes define the difference between a Class A, a Class B, and a
Class C address.

Network Address Range: Class A

The first bit of the first byte in a Class A network address must always be off, or 0.

Consider the following network address:


0xxxxxxx

If we turn the other 7 bits all off and then turn them all on, we’ll find the Class A range of network addresses:

00000000 = 0
01111111 = 127

This means a Class A address must be between 0 and 127 in the first byte, inclusive. Network 127.0.0.1 is reserved for loopback tests.
Designates the local node and allows that node to send a test packet to itself without generating network traffic.

Network Address Range: Class B

The first bit of the first byte must always be turned on but the second bit must always be turned off. If you turn the other 6 bits all off and then
all on, you will find the range for a

Class B network:
10000000 = 128
10111111 = 191

This means a Class A address must be between from 128 to 191 in the first byte, inclusive.

Network Address Range: Class C

The first 2 bits of the first octet are always turned on, but the third bit can never be on. Following the same process as the previous classes,
convert from binary to decimal to find the range. Here’s the range for a Class C network:

11000000 = 192
11011111 = 223

So, if you see an IP address that starts at 192 and goes to 223, you’ll know it is a Class C IP address.
Network Address Ranges: Classes D and E
The addresses between 224 to 255 are reserved for Class D and E networks. Class D (224–239) is used for multicast addresses and Class E
(240–255) for scientific purposes. For this course we don’t need to know them.

There are two types of IPv4 addresses:

 Private IP address
 Public IP address

Public IP Addresses

These are IP addresses that are routable on the internet.

Private IP Addresses

These are IP addresses that can be used on a private network, but they’re not routable through the internet.

This is designed for the purpose of creating a measure of well-needed security, but it also conveniently saves valuable IP address space. If
every host on every network had to have real routable IP addresses, we would have run out of IP addresses. But by using private IP addresses
ISPs and home users only need a relatively tiny group of bona fide IP addresses to connect their networks to the Internet. This is economical
because they can use private IP addresses on their inside networks and get along just fine.
To accomplish this task, the ISP and the corporation, the end user, no matter who they are need to use something called Network Address
Translation (NAT), which basically takes a private IP address and converts it for use on the Internet. The reserved private addresses are listed
in table below.

Note: An IP address that does not lie in the address space table above is a public IP addresses.

Subnetting Basics
At the introduction of the course, we were defining only one network. What happens if we wanted to take one network address and create six
networks from it? We would have to do something called subnetting, because that’s what allows you to take one larger network and break it
into a bunch of smaller networks. There are loads of reasons in favor of subnetting, including the following benefits:
Reduced network traffic
We all appreciate less traffic of any kind. Networks are no different. Without trusty routers, packet traffic could grind the entire network down
to a near standstill. With routers, most traffic will stay on the local network; only packets destined for other networks will pass through the
router. Routers create broadcast domains. The more broadcast domains you create, the smaller the broadcast domains and the less network
traffic on each network segment.
Optimized network performance

This is a result of reduced network traffic.

Simplified management
It’s easier to identify and isolate network problems in a group of smaller connected networks than within one gigantic network.

Facilitated spanning of large geographical distances


Because WAN links are considerably slower and more expensive than LAN links, a single large network that spans long distances can create
problems in every area previously listed. Connecting multiple smaller networks makes the system more efficient.

How to Create Subnets


To create subnetworks, you take bits from the host portion of the IP address and reserve them to define the subnet address. This means fewer
bits for hosts, so the more subnets, the fewer bits available for defining hosts.

To create a subnet follow these steps: When you’ve chosen a possible subnet mask for your network and need to determine the number of
subnets, valid hosts, and broadcast addresses of a subnet that the mask provides, all you need to do is answer five simple questions:
 How many subnets does the chosen subnet mask produce?
 How many valid hosts per subnet are available?
 What are the valid subnets?
 What’s the broadcast address of each subnet?
 What are the valid hosts in each subnet?
Here’s how you get the answers to those five big questions:
 How many subnets? 2x = number of subnets. x is the number of masked bits, or the 1s. For example, in 11000000, the number of 1s
gives us 22 subnets. In this example, there are 4 subnets.

 How many hosts per subnet? 2y – 2 = number of hosts per subnet. y is the number of unmasked bits, or the 0s. For example, in 11000000,
the number of 0s gives us 26 – 2 hosts. In this example, there are 62 hosts per subnet. You need to subtract 2 for the subnet address and
the broadcast address, which are not valid hosts.

 What are the valid subnets? 256 – subnet mask = block size, or increment number. An example would be 256 – 192 = 64. The block
size of a 192 mask is always 64. Start counting at zero in blocks of 64 until you reach the subnet mask value and these are your subnets.
0, 64, 128, 192.

 What’s the broadcast address for each subnet? Now here’s the really easy part. Since we counted our subnets in the last section as 0,
64, 128, and 192, the broadcast address is always the number right before the next subnet. For example, the 0 subnet has a broadcast
address of 63 because the next subnet is 64. The 64 subnet has a broadcast address of 127 because the next subnet is 128. And so on.
And remember, the broadcast address of the last subnet is always 255.
 What are the valid hosts? Valid hosts are the numbers between the subnets, omitting the all 0s and all 1s. For example, if 64 is the
subnet number and 127 is the broadcast address, then 65–126 is the valid host range. It’s always the numbers between the subnet
address and the broadcast address.

Note: Understanding the Powers of 2 is very important for use with IP subnetting. Each successive power of 2 is double the previous one.

Subnet Masks
For the subnet address scheme to work, every machine on the network must know which part of the host address will be used as the subnet
address. This is accomplished by assigning a subnet mask to each machine. A subnet mask is a 32-bit value that allows the recipient of IP
packets to distinguish the network ID portion of the IP address from the host ID portion of the IP address.

The network administrator creates a 32-bit subnet mask composed of 1s and 0s. The 1s in the subnet mask represent the positions that refer
to the network or subnet addresses. Not all networks need subnets, meaning they use the default subnet mask. This is basically the same as
saying that a network doesn’t have a subnet address. The table shows the default subnet masks for Classes A, B, and C. These default masks
cannot change.

In other words, you can’t make a Class B subnet mask read 255.0.0.0. If you try, the host will read that address as invalid and usually won’t
even let you type it in. For a Class A network, you can’t change the first byte in a subnet mask; it must read 255.0.0.0 at a minimum.
Similarly, you cannot assign 255.255.255.255, as this is all 1s, a broadcast address. A Class B address must start with 255.255.0.0, and a
Class C has to start with 255.255.255.0.
Subnetting Class C Addresses
In a Class C address, only 8 bits are available for defining the hosts. Remember that subnet bits start at the left and go to the right, without
skipping bits. This means that the only Class C subnet masks can be the following:

We can’t use a /31 or /32 because we have to have at least 2 host bits for assigning IP addresses to hosts.
Example #1: 255.255.255.128 (/25)
Since 128 is 10000000 in binary, there is only 1 bit for subnetting and 7 bits for hosts. We’re
going to subnet the Class C network address 192.168.10.0.
192.168.10.0 = Network address
255.255.255.128 = Subnet mask
Now, let’s answer the big five:
 How many subnets? Since 128 is 1 bit on (10000000), the answer would be 21 = 2.

 How many hosts per subnet? We have 7 host bits off (10000000), so the equation would be 27 – 2 = 126 hosts.

 What are the valid subnets? 256 – 128 = 128. Remember, we’ll start at zero and count in our block size, so our subnets are 0, 128.

 What’s the broadcast address for each subnet? The number right before the value of the next subnet is all host bits turned on and equals
the broadcast address. For the zero subnet, the next subnet is 128, so the broadcast of the 0 subnet is 127.

 What are the valid hosts? These are the numbers between the subnet and broadcast address. The easiest way to find the hosts is to write
out the subnet address and the broadcast address. This way, the valid hosts are obvious. The following table shows the 0 and 128
subnets, the valid host ranges of each, and the broadcast address of both subnets:
Example #2: 255.255.255.192 (/26)

In this second example, we’re going to subnet the network address 192.168.10.0 using the subnet mask 255.255.255.192.
192.168.10.0 = Network address
255.255.255.192 = Subnet mask
Now, let’s answer the big five:
 How many subnets? Since 192 is 2 bits on (11000000), the answer would be 22 = 4 subnets.

 How many hosts per subnet? We have 6 host bits off (11000000), so the equation would be 26 – 2 = 62 hosts.

 What are the valid subnets? 256 – 192 = 64. Remember, we start at zero and count in our block size, so our subnets are 0, 64, 128, and
192.

 What’s the broadcast address for each subnet? The number right before the value of the next subnet is all host bits turned on and equals
the broadcast address. For the zero subnet, the next subnet is 64, so the broadcast address for the zero subnet is 63.
 What are the valid hosts? These are the numbers between the subnet and broadcast address. The easiest way to find the hosts is to write
out the subnet address and the broadcast address. This way, the valid hosts are obvious. The following table shows the 0, 64, 128, and
192 subnets, the valid host ranges of each, and the broadcast address of each subnet:

Subnetting Class B Addresses


With Class B addresses, we have a lot more possible subnet masks than we do with a Class C network address:

We know the Class B network address has 16 bits available for host addressing. This means we can use up to 14 bits for subnetting (because
we have to leave at least 2 bits for host addressing). Using a /16 means you are not subnetting with class B, but it is a mask you can use.
This section will give you an opportunity to practice subnetting Class B addresses. Again, I have to mention that this is the same as
subnetting with Class C, except we start in the third octet with the exact same numbers.

Example #1: 255.255.128.0 (/17)


172.16.0.0 = Network address
255.255.128.0 = Subnet mask
 Subnets? 21 = 2 (same as Class C).
 Hosts? 215 – 2 = 32,766 (7 bits in the third octet, and 8 in the fourth).

 Valid subnets? 256 – 128 = 128. 0, 128. Remember that subnetting is performed in the third octet, so the subnet numbers are really
0.0 and 128.0, as shown in the next table. These are the exact numbers we used with Class C; we use them in the third octet and add a
0 in the fourth octet for the network address.

 Broadcast address for each subnet?

 Valid hosts?

The following table shows the two subnets available, the valid host range, and the broadcast address of each:
Example #2: 255.255.192.0 (/18)

172.16.0.0 = Network address


255.255.192.0 = Subnet mask
 Subnets? 22 = 4.

 Hosts? 214 – 2 = 16,382 (6 bits in the third octet, and 8 in the fourth).

 Valid subnets? 256 – 192 = 64. 0, 64, 128, 192. Remember that the subnetting is performed in the third octet, so the subnet numbers
are really 0.0, 64.0, 128.0, and 192.0, as shown in the next table.

 Broadcast address for each subnet?

 Valid hosts?

The following table shows the four subnets available, the valid host range, and the broadcast address of each:
Subnetting Class A Addresses
Class A subnetting is not performed any differently than Classes B and C, but there are 24 bits to play with instead of the 16 in a Class B
address and the 8 in a Class C address.

Let’s start by listing all the Class A masks:


Example #1: 255.255.0.0 (/16)

Class A addresses use a default mask of 255.0.0.0, which leaves 22 bits for subnetting since you must leave 2 bits for host addressing. The
255.255.0.0 mask with a Class A address is using 8 subnet bits.
 Subnets? 28 = 256.
 Hosts? 216 – 2 = 65,534.
 Valid subnets? What is the interesting octet? 256 – 255 = 1. 0, 1, 2, 3, etc. (all in the second octet). The subnets would be 10.0.0.0,
10.1.0.0, 10.2.0.0, 10.3.0.0, etc., up to 10.255.0.0.
 Broadcast address for each subnet?
 Valid hosts?

The following table shows the first two and last two subnets, valid host range, and broadcast addresses for the private Class A 10.0.0.0
network:

Example #2: 255.255.240.0 (/20)

255.255.240.0 gives us 12 bits of subnetting and leaves us 12 bits for host addressing.
 Subnets? 212 = 4096.
 Hosts? 212 – 2 = 4094.
 Valid subnets? What is your interesting octet? 256 – 240 = 16. The subnets in the second octet are a block size of 1 and the subnets in
the third octet are 0, 16, 32, etc.
 Broadcast address for each subnet?
 Valid hosts?
The following table shows some examples of the host ranges the first three and the last subnets:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy