Computer Networks CSU 07412: Sub - Enabling Outcomes
Computer Networks CSU 07412: Sub - Enabling Outcomes
CSU 07412
Delivery Methods:
The course will be delivered using a combination of several classroom teaching strategies and
techniques including Lectures, Case Studies, Group Discussion, Seminars/Tutorials.
Method of Assessment:
Students will be assessed through continuous assessments (coursework) that comprise of ONE compulsory test,
quizzes and assignments, case studies and end of semester examination at the end of the semester. Continuous
assessment carries 40% (forty marks) and a final examination carries 60% (sixty marks).
Recommended Readings:
1. Behrouz Forouzan. (2009). TCP/IP Protocol Sutite, 4th Edition. Oxford University Press, USA.
2. Tanenbaum, A.S., and Wetherall, D. J. (2010). Computer Networks, 5th Edition. Prentice Hall.
3. Peterson, L. L., and Davie, B. S. (2011). Computer Networks: A system Approach, 5th Edition. Morgan Kaufmann .
1
Network Layer Functions
The network layer is responsible for the delivery of packets from the
2
original source to the final destination.
Source-to-destination delivery
3
Network Layer Functions
Routing
4
The typical functionalities of network layer
5
IP Addresses
IP Addresses:
Classful Addressing
6
INTRODUCTION
At the network layer, we need to uniquely identify each device on the
Internet to allow global communication between devices
The identifer used in the IP layer of the TCP/IP protocol suite to identify
each device connected to the Internet is called Internet address
or IP address
7 08/08/2020
What is an IP Address?
Two devices on the Internet can never have the same address.
8
Address Space
…………..
addr1 …………..
addr15
addr2 ………….. …………..
…………..
addr41 addr226
addr31
………….. …………..
IP adresses has an address space. An address space is the total
number of addresses used by the protocol. If a protocol uses N
bits to define an address, the address space is 2N
9 08/08/2020
Address space rule
…………..
addr1 …………..
addr15
Theaddr2 …………..
address space in a protocol
…………..
…………..
That uses N-bits to define an
Address is: addr41 addr226
addr31
………….. 2N …………..
Because each bit can have two different values (0 and 1) and
N bits can have 2N values
10
IPv4 address space
11
Notation
12
Binary Notation
To make the address more readable, one or more space is usually inserted
between each octet (8 bits) or byte
Example:
01110101 10010101 00011101 11101010
13
Figure 4-1
Dotted-decimal notation
Note that, because each byte (octet) is only 8 bits, each number in the
dotted decimal is between 0 and 255.
14
Hexadecimal Notation
75 95 1D EA
0x75951DEA
15 08/08/2020
Example 1
Solution
18 08/08/2020
Example 3 (continued)
Solution
In decimal notation each number <= 255
301 is out of the range
19
Example 4
Solution
0X810B0BEF or 810B0BEF16
0xC1831CFF or C1831CFF16
20 08/08/2020
IP address with appending port number
158.128.1.108:25
the four octet before colon is the IP address
The number of colon (25) is the port number
21 08/08/2020
CLASSFUL ADDRESSING
IP address, when started, used the concept of classes, this architecture
Is called classful addressing. Later, new architecture called classless
addressing was introduced. However, most of the Internet is still using
classful addrssing and the migration is slow.
Each class occupy occupies some part of the whole address space
22 08/08/2020
In classful addressing the address space is
divided into 5 classes:
A, B, C, D, and E.
23 08/08/2020
Figure 4-3
24 08/08/2020
Figure 4-4
25 08/08/2020
Figure 4-2
26
Example 5
Class A has
231 = 2,147,483,648 addresses
27 08/08/2020
Example 5
Solution
In class A, only 1 bit defines the class. The remaining 31 bits are
available for the address. With 31 bits, we can have 231
or 2,147,483,648 addresses.
28
Example 6
Solution
• 00000001 00001011 00001011 11101111
1st is 0, hence it is Class A
• 11000001 00001011 00001011 11101111
1st and 2nd bits are 1, and 3rd bit is 0 hence, Class C
29 08/08/2020
Figure 4-5
30 08/08/2020
Example 7
Solution
• 158.223.1.108
1st byte = 158 (128<158<191) class B
• 227.13.14.88
1st byte = 227 (224<227<239) class D
31 08/08/2020
Figure 4-6
32 08/08/2020
Class and Blocks
Each class is divided into a fixed number of blocks, with fixed size.
Class A is divided into 128 blocks, with each block having a different
NetID.
– The first covers address from 0.0.0.0 – 0.255.255.255 (netid 0)
– The second covers 1.0.0.0 – 1.255.255.255 (netid 1)
– The last block covers 127.0.0.0 – 127.255.255.255 (netid 127)
Note, for each block the first byte (NetID) is the same, but the other 3
bytes (HostID) can take any value in the given range.
The first and the last blocks are reserved for special purposes.One
block (netid 10) is used for private addresses.The remaining 125
blocks can be assigned to organisation (total number of organisation)
Each block contains 16, 777, 216 addresses, organization should be
really large (larger than the needs of most organisation)
33
All-Zeros Address
0.0.0.0
The block 0.0.0.0, which contains only one single address, is
reserved for communication when a host needs to send an
IPv4 packet but it does not know its own address.
This is normally used by a host at bootstrap time when it does
not know its IPv4 address.
The host sends an IPv4 packet to a bootstrap server (called
DHCP server using this address as the source address and a
limited broadcast address as the destination address to find
its own address
34
All-Ones Address: Limited
Broadcast Address
255.255.255.255
The block 255.255.255.255, which contains one
single address, is reserved for limited broadcast
address in the current network.
A host that wants to send a message to every other
host can use this address as a destination address in
an IPv4 packet
However, a router will block a packet having this type
of address to confine the broadcasting to the local
network.
35
Figure 4-7
Blocks in class A
36
Direct Broadcast Address
The last address in a block or sub-block (with the suffix set all to 1s) can be
used as a direct broadcast address.
Note that this address can be used only as a destination address in an IPv4
packet. If the router sends a datagram using a destination IPv4 address with
a suffix of all 1s, all devices on the network receive and process the
datagram.
37 08/08/2020
Network Address
The first address (with the suffix set all to 0s) in a block defines the
network address. It actually defines the network itself (cabling) and not
any host in the network.
38
Millions of class A addresses
are wasted.
39 08/08/2020
Class B
40
Figure 4-8
Blocks in class B
41
Many class B addresses
are wasted.
42 08/08/2020
Class C
44
The number of addresses in
a class C block
is smaller than
the needs of most organizations.
45 08/08/2020
Class D addresses
are used for multicasting;
there is only
one block in this class.
46 08/08/2020
Class E addresses are reserved
for special purposes;
most of the block is wasted.
47 08/08/2020
Network Addresses
Solution
49
Given the IP addresss 23.56.7.91; 132.6.17.85 and 201.180.56.5
find the begining address, class and blocks
50
In classful addressing,
the network address
(the first address in the block)
is the one that is assigned
to the organization.
51 08/08/2020
Mask
52 08/08/2020
Figure 4-10
Masking concept
53 08/08/2020
Figure 4-11
AND operation
54 08/08/2020
The network address is the
beginning address of each block.
It can be found by applying
the default mask to
any of the addresses in the block
(including itself).
It retains the netid of the block
and sets the hostid to zero.
55 08/08/2020
Default Mak
56 08/08/2020
Given the IP addresss 23.56.7.91; 132.6.17.85 and 201.180.56.5
find the begining address, class and blocks
57