Advance Computer Networks
Pintu R Shah
Classroom Rules
Please Switch off your mobile phones or put it in
a silent mode.
Late comers are not allowed.
Maintain Discipline in the class.
No cross talk is allowed during the lecture.
Pintu R Shah MPSTME SVKM's NMIMS 2
Assignments
Assignments are due at the beginning of class.
Late assignment will be given less grade.
Submit a hard copy as well as soft copy
(whenever told) of your assignment with your
name, class, roll no. date on it. Mail soft copy at
[email protected] Pintu R Shah MPSTME SVKM's NMIMS 3
Test
Two Class test will be conducted during the
trimester.
First test will be in the fifth week and second
test will be in 9th week.
Dates for the test will be finalized in first
lecture in consultation with students.
Kindly note that no third test or retest will be
conducted.
Pintu R Shah MPSTME SVKM's NMIMS 4
Attendance
It is expected that students will attend all
classes. Attendance will be checked at the
beginning of each class so make sure to be in
on time; tardiness disturbs everyone. If you miss
any classes, it is your responsibility to learn any
missed material and then discuss your doubts
with the faculty.
Missing number of classes more than the
percentage allowed by the institute regulations
will result in a defaulter for the student.
Pintu R Shah MPSTME SVKM's NMIMS 5
Ask Question!
I appreciate people asking questions during my lectures - it lets me know
which concepts you are having difficulty with. Any question student asks is
an important question regardless how he/she or others feels about it. Ask
any question you think of directly or not directly pertinent to the lecture, I
would be happy to entertain them during or/and at the end of the class.
Sometimes I don't know the answer, but I'm happy to dig around and report
back at the beginning of the next class.
I've learned a lot over the years as a result of student questions!
Pintu R Shah MPSTME SVKM's NMIMS 6
Frequency of Meeting
4hrs of lecture per week
2hrs of practical per week
Pintu R Shah MPSTME SVKM's NMIMS 7
Evaluation
Term end exam - 50marks
Term work – 30 marks (includes lab work,
assignment, attendance, conduct etc.)
Class test – 20 marks
- 1st test on 12 /11/10
- 2nd test on 10/12/10
Note: best of the two test will be considered.
Pintu R Shah MPSTME SVKM's NMIMS 8
Scribe note
A group of student will scribe and submit the same within
three days after completion of lecture.
What I expect for the scribe requirement is for you to
give a written summary of the lecture, probably about 4-5
pages. The scribed lecture must be given in doc/docx
format . It is important that you not only write what was
said in lecture, but also clarify things, as these scribe
notes provide the text for the class.
Scribe must include the reference in the end.
Pintu R Shah MPSTME SVKM's NMIMS 9
Let’s Start..
Syllabus
Pintu R Shah MPSTME SVKM's NMIMS 11
Unit 1: Introduction and Overview
Pintu R Shah MPSTME SVKM's NMIMS 12
In this unit..
The motivation For Internetworking,
OSI model
The TCP/IP protocol suite
IP addressing (Classful and classless)
Pintu R Shah MPSTME SVKM's NMIMS 13
Motivation for internetworking
A desire to withstand a potential nuclear strike. This
explains the need for packet switching, in which
routes from sender to receiver can vary as needed,
as long as a valid route exists. Hence the
requirement for robust and reliable delivery of data.
A desire to permit different kinds of computer
systems to communicate easily with one another.
A need to interconnect systems across long
distances.
Cisco Video
Pintu R Shah MPSTME SVKM's NMIMS 14
The Origins and History of TCP/IP
1969
Advanced Research Projects Agency (ARPA)
funded research for packet-switched networking
ARPANET
Network built as a result of this project
In a packet-switched network
Sender and receiver are identified by unique
network addresses
History of Internet
Pintu R Shah MPSTME SVKM's NMIMS 15
What is network?
Connection of systems capable of
communicating.
Pintu R Shah MPSTME SVKM's NMIMS 16
Advantages
Connectivity and Communication
Data Sharing
Hardware Sharing
Internet Access & Sharing
Data Security and Management
Performance Enhancement and Balancing
Entertainment
Pintu R Shah MPSTME SVKM's NMIMS 17
Disadvantages
Network Hardware, Software and Setup
Costs
Hardware and Software Management and
Administration Costs
Undesirable Sharing
Illegal or Undesirable Behavior
Data Security Concerns
Pintu R Shah MPSTME SVKM's NMIMS 18
What are Protocols?
Syntax:concerns the format of the data
blocks
Semantics: Includes control information for
coordination and error handling
Timing: Includes speed matching and
sequencing
Pintu R Shah MPSTME SVKM's NMIMS 19
Layered architecture
Divide and conquer approach
Separates networking hardware concerns from
those related to networking software
Pintu R Shah MPSTME SVKM's NMIMS 20
Advantages
Easier to learn
Easier to develop
Multi vendor interoperatibility
Modular engineering
Pintu R Shah MPSTME SVKM's NMIMS 21
OSI Model
OSI reference model
A network reference model
Formally known as ISO/OSI
Designed to replace TCP/IP
Standard way to explain how networks operate
TCP/IP is the open standard protocol suite of
choice
Pintu R Shah MPSTME SVKM's NMIMS 22
OSI Model
Application
Presentation
Session
Transport
Network
Datalink
Physical
Pintu R Shah MPSTME SVKM's NMIMS 23
How Protocol Layers Behave
Layers
Exist to encapsulate or isolate specific types of
functionality
Provide services to the layer above
Deliver data to or accept data from the layer
below
Protocol Data Units (PDUs)
Include “envelope information” in the form of
specific headers and trailers
Pintu R Shah MPSTME SVKM's NMIMS 24
Physical Layer
Includes the physical transmission medium
Job is to activate, maintain, and deactivate
network connections
Manages communications with the network
medium going down the protocol stack
Handles conversion of outgoing data
Pintu R Shah MPSTME SVKM's NMIMS 25
Data Link Layer
Situated between the Physical layer and the
Network layer in the reference model
Job is to
Enable reliable transmission of data through the
Physical layer at the sending end
Check reliability at the receiving end
Manages point-to-point transmission across
the networking medium
Pintu R Shah MPSTME SVKM's NMIMS 26
Network Layer
Handles logical addresses associated with
individual machines on a network
Uses addressing information to
Determine how to send a PDU
Embodies notion of multiple simultaneous
connections between different IP addresses
Flexible enough to
Recognize and use multiple routes between a
sender and a receiver
Pintu R Shah MPSTME SVKM's NMIMS 27
Transport Layer
Ensures reliable end-to-end transmission of
PDUs
Includes end-to-end error-detection and
error-recovery
Segmentation
Involves cutting up a big message into a
numbered sequence of chunks, called segments
PDUs used at the Transport layer are called
segments, or data segments
Pintu R Shah MPSTME SVKM's NMIMS 28
Session Layer
Defines mechanisms to
Permit senders and receivers to request that a
conversation start or stop
Keep a conversation going even when traffic may
not otherwise flow between the parties involved
Checkpoints
Define the last point up to which successful
communications are known to have occurred
Pintu R Shah MPSTME SVKM's NMIMS 29
Presentation Layer
Handles transforming data from
Generic, network-oriented forms of expression to
more specific, platform-oriented forms of
expression
A redirector or network shell
Special computer facility that resides here
Can supply special data-handling functions
for applications
Pintu R Shah MPSTME SVKM's NMIMS 30
Application Layer
Defines an interface that applications can use
to request network services
Defines a set of access controls over the
network
PDUs
Generically called Application PDUs
Pintu R Shah MPSTME SVKM's NMIMS 31
Pintu R Shah MPSTME SVKM's NMIMS 32
TCP/IP Model
Pintu R Shah MPSTME SVKM's NMIMS 33
Pintu R Shah MPSTME SVKM's NMIMS 34
Addresses in TCP/IP
Pintu R Shah MPSTME SVKM's NMIMS 35
Pintu R Shah MPSTME SVKM's NMIMS 36
IP addresses : Classful
Addressing
Introduction
IPv4 addresses are 32 bit address
IP addresses are unique
Address space of IPv4 is 4,294,967,296 (232)
Pintu R Shah MPSTME SVKM's NMIMS 38
Notation
Binary notation
01110101 10010101 00011101 11101010
Dotted Decimal notation
Pintu R Shah MPSTME SVKM's NMIMS 39
Hexadecimal Notation
0111 0101 1001 0101 0001 1101 1110 1010
75 95 1D EA
0x75951DEA
Pintu R Shah MPSTME SVKM's NMIMS 40
Example 1
Change the following IP address from
binary notation to dotted-decimal notation.
10000001 00001011 00001011 11101111
129.11.11.239
Pintu R Shah MPSTME SVKM's NMIMS 41
Example 2
Change the following IP address from
dotted-decimal notation to binary notation.
111.56.45.78
01101111 00111000 00101101 01001110
Pintu R Shah MPSTME SVKM's NMIMS 42
Example 3
Find the error, if any, in the following IP
addresses:
111.56.045.78
75.45.301.14
Pintu R Shah MPSTME SVKM's NMIMS 43
Classful addressing
Class A
Class B
Class C
Class D
Class E
Pintu R Shah MPSTME SVKM's NMIMS 44
Occupation of the address space
Pintu R Shah MPSTME SVKM's NMIMS 45
Finding the class in binary notation
Pintu R Shah MPSTME SVKM's NMIMS 46
Finding the address class
Pintu R Shah MPSTME SVKM's NMIMS 47
Finding the class in decimal notation
Pintu R Shah MPSTME SVKM's NMIMS 48
Netid and hostid
Pintu R Shah MPSTME SVKM's NMIMS 49
Blocks in class A
Pintu R Shah MPSTME SVKM's NMIMS 50
Network Addresses
The network address is the first address.
The network address defines the network to
the rest of the Internet.
Given the network address, we can find
the class of the address, the block, and the
range of the addresses in the block
Pintu R Shah MPSTME SVKM's NMIMS 51
Example
Given the network address 17.0.0.0, find the
class, the block, and the range of the addresses.
Pintu R Shah MPSTME SVKM's NMIMS 52
Solution
The class is A because the first byte is
between 0 and 127. The block has a netid of
17. The addresses range from 17.0.0.0 to
17.255.255.255.
Pintu R Shah MPSTME SVKM's NMIMS 53
Mask
A mask is a 32-bit binary number that gives the
first address in the block (the network address)
when bitwise ANDed with an address in the
block.
Pintu R Shah MPSTME SVKM's NMIMS 54
Other issues
Pintu R Shah MPSTME SVKM's NMIMS 55
Multihomed devices
Pintu R Shah MPSTME SVKM's NMIMS 56
Special Addresses
Network address
Directed broadcast address
Limited broadcast address
This host on this network
Specific host on this network
Loopback address
Pintu R Shah MPSTME SVKM's NMIMS 57
Network addresses
Pintu R Shah MPSTME SVKM's NMIMS 58
Example of direct broadcast address
Pintu R Shah MPSTME SVKM's NMIMS 59
Example of limited broadcast address
Pintu R Shah MPSTME SVKM's NMIMS 60
Example of this host on this address
Pintu R Shah MPSTME SVKM's NMIMS 61
Example of specific host on this network
Pintu R Shah MPSTME SVKM's NMIMS 62
Example of loopback address
Pintu R Shah MPSTME SVKM's NMIMS 63
Private Addresses
A number of blocks in each class are assigned
for private use. They are not recognized
globally. These blocks are depicted in Table
Pintu R Shah MPSTME SVKM's NMIMS 64
Private Addresses
Class Netids Blocks
A 10.0.0.0 1
B 172.16 to 172.31 16
C 192.168.0 to 256
192.168.255
Pintu R Shah MPSTME SVKM's NMIMS 65
Unicast, Multicast, and Broadcast
Addresses
Unicast communication is one-to-one.
Multicast communication is one-to-many.
Broadcast communication is one-to-all.
Pintu R Shah MPSTME SVKM's NMIMS 66
Subnetting
Reduced network traffic
Optimized network performance
Simplified network management
Facilitated spanning of large geographical
distances.
Pintu R Shah MPSTME SVKM's NMIMS 67
Steps to create subnets
For example refer class work
Pintu R Shah MPSTME SVKM's NMIMS 68
Variable length subnet mask (VLSM)
Consider a corporation that has been assigned the
Class C network 195.214.32.0. The corporation has
the requirement to split this address range into five
separate networks each with the following number of
hosts:
Subnet 1: 50 hosts
Subnet 2: 50 hosts
Subnet 3: 50 hosts
Subnet 4: 30 hosts
Subnet 5: 30 hosts
Pintu R Shah MPSTME SVKM's NMIMS 69
Pintu R Shah MPSTME SVKM's NMIMS 70
VLSM design
Pintu R Shah MPSTME SVKM's NMIMS 71
Design VLSM addressing scheme for the
given scenario
Pintu R Shah MPSTME SVKM's NMIMS 72
Step I for VLSM design
Pintu R Shah MPSTME SVKM's NMIMS 73
Step II: fill the chart
Pintu R Shah MPSTME SVKM's NMIMS 74
Supernetting
and
Classless Addressing
Pintu R Shah MPSTME SVKM's NMIMS 75
A network with two levels of
hierarchy (not subnetted)
Pintu R Shah MPSTME SVKM's NMIMS 76
A network with three levels of
hierarchy (subnetted)
Pintu R Shah MPSTME SVKM's NMIMS 77
Addresses in a network with
and without subnetting
Pintu R Shah MPSTME SVKM's NMIMS 78
SUPERNETTING
Pintu R Shah MPSTME SVKM's NMIMS 79
A supernetwork
Pintu R Shah MPSTME SVKM's NMIMS 80
Rules:
** The number of blocks must be a power of 2 (1,
2, 4, 8, 16, . . .).
** The blocks must be contiguous in the address
space (no gaps between the blocks).
** The third byte of the first address in the
superblock must be evenly divisible by the number
of blocks. In other words, if the number of blocks is
N, the third byte must be divisible by N.
Pintu R Shah MPSTME SVKM's NMIMS 81
Example
A company needs 600 addresses. Which of
the following set of class C blocks can be
used to form a supernet for this company?
198.47.32.0 198.47.33.0 198.47.34.0
198.47.32.0 198.47.42.0 198.47.52.0 198.47.62.0
198.47.31.0 198.47.32.0 198.47.33.0 198.47.52.0
198.47.32.0 198.47.33.0 198.47.34.0 198.47.35.0
Pintu R Shah MPSTME SVKM's NMIMS 82
Solution
1: No, there are only three blocks.
2: No, the blocks are not contiguous.
3: No, 31 in the first block is not divisible by 4.
4: Yes, all three requirements are fulfilled.
Pintu R Shah MPSTME SVKM's NMIMS 83
In subnetting,
we need the first address of the
subnet and the subnet mask to
define the range of addresses.
Pintu R Shah MPSTME SVKM's NMIMS 84
In supernetting,
we need the first address of
the supernet
and the supernet mask to
define the range of addresses.
Pintu R Shah MPSTME SVKM's NMIMS 85
Comparison of subnet, default,
and supernet masks
Pintu R Shah MPSTME SVKM's NMIMS 86
Example
We need to make a supernetwork out of 16
class C blocks. What is the supernet mask?
Solution
We need 16 blocks. For 16 blocks we need to
change four 1s to 0s in the default mask. So the
mask is
11111111 11111111 11110000 00000000
or
255.255.240.0
Pintu R Shah MPSTME SVKM's NMIMS 87
Example
A supernet has a first address of 205.16.32.0 and a
supernet mask of 255.255.248.0. A router receives three
packets with the following destination addresses:
205.16.37.44
205.16.42.56
205.17.33.76
Which packet belongs to the supernet?
Pintu R Shah MPSTME SVKM's NMIMS 88
Solution
We apply the supernet mask to see if we can find
the beginning address.
205.16.37.44 AND 255.255.248.0 205.16.32.0
205.16.42.56 AND 255.255.248.0 205.16.40.0
205.17.33.76 AND 255.255.248.0 205.17.32.0
Only the first address belongs to this supernet.
Pintu R Shah MPSTME SVKM's NMIMS 89
Example
A supernet has a first address of 205.16.32.0 and a
supernet mask of 255.255.248.0. How many blocks are in
this supernet and what is the range of addresses?
Solution
The supernet has 21 1s. The default mask has 24
1s. Since the difference is 3, there are 23 or 8
blocks in this supernet. The blocks are 205.16.32.0
to 205.16.39.0. The first address is 205.16.32.0.
The last address is 205.16.39.255.
Pintu R Shah MPSTME SVKM's NMIMS 90
CLASSLESS
ADDRESSING
Pintu R Shah MPSTME SVKM's NMIMS 91
Variable-length blocks
Pintu R Shah MPSTME SVKM's NMIMS 92
Number of Addresses in a Block
There is only one condition on the number
of addresses in a block; it must be a power
of 2 (2, 4, 8, . . .). A household may be given
a block of 2 addresses. A small business
may be given 16 addresses. A large
organization may be given 1024 addresses.
Pintu R Shah MPSTME SVKM's NMIMS 93
Beginning Address
The beginning address must be evenly divisible
by the number of addresses. For example, if a
block contains 4 addresses, the beginning
address must be divisible by 4. If the block has
less than 256 addresses, we need to check only
the rightmost byte. If it has less than 65,536
addresses, we need to check only the two
rightmost bytes, and so on.
Pintu R Shah MPSTME SVKM's NMIMS 94
Example
Which of the following can be the beginning address of a
block that contains 16 addresses?
205.16.37.32
190.16.42.44
17.17.33.80
123.45.24.52
Solution
The address 205.16.37.32 is eligible because 32 is
divisible by 16. The address 17.17.33.80 is eligible
because 80 is divisible by 16.
Pintu R Shah MPSTME SVKM's NMIMS 95
Slash notation
Pintu R Shah MPSTME SVKM's NMIMS 96
Example
A small organization is given a block with the beginning
address and the prefix length 205.16.37.24/29 (in slash
notation). What is the range of the block?
Solution
The beginning address is 205.16.37.24. To find the
last address we keep the first 29 bits and change the
last 3 bits to 1s.
Beginning:11001111 00010000 00100101 00011000
Ending : 11001111 00010000 00100101 00011111
There are only 8 addresses in this block.
Pintu R Shah MPSTME SVKM's NMIMS 97
Example
What is the network address if one of the addresses is
167.199.170.82/27?
Solution
The prefix length is 27, which means that we must
keep the first 27 bits as is and change the remaining
bits (5) to 0s. The 5 bits affect only the last byte.
The last byte is 01010010. Changing the last 5 bits
to 0s, we get 01000000 or 64. The network address
is 167.199.170.64/27.
Pintu R Shah MPSTME SVKM's NMIMS 98
Example
An organization is granted the block 130.34.12.64/26.
The organization needs to have four subnets. What are the
subnet addresses and the range of addresses for each
subnet?
Solution
The suffix length is 6. This means the total number
of addresses in the block is 64 (26). If we create
four subnets, each subnet will have 16 addresses.
Pintu R Shah MPSTME SVKM's NMIMS 99
Solution (Continued)
Let us first find the subnet prefix (subnet mask).
We need four subnets, which means we need to add
two more 1s to the site prefix. The subnet prefix is
then /28.
Subnet 1: 130.34.12.64/28 to 130.34.12.79/28.
Subnet 2 : 130.34.12.80/28 to 130.34.12.95/28.
Subnet 3: 130.34.12.96/28 to 130.34.12.111/28.
Subnet 4: 130.34.12.112/28 to 130.34.12.127/28.
See Figure Pintu R Shah MPSTME SVKM's NMIMS 100
Pintu R Shah MPSTME SVKM's NMIMS 101
Example
An ISP is granted a block of addresses starting with
190.100.0.0/16. The ISP needs to distribute these
addresses to three groups of customers as follows:
1. The first group has 64 customers; each needs 256 addresses.
2. The second group has 128 customers; each needs 128 addresses.
3. The third group has 128 customers; each needs 64 addresses.
Design the subblocks and give the slash notation for each
subblock. Find out how many addresses are still available
after these allocations.
Pintu R Shah MPSTME SVKM's NMIMS 102
Solution
Group 1
For this group, each customer needs 256 addresses.
This means the suffix length is 8 (28 = 256). The
prefix length is then 32 − 8 = 24.
01: 190.100.0.0/24 190.100.0.255/24
02: 190.100.1.0/24 190.100.1.255/24
…………………………………..
64: 190.100.63.0/24190.100.63.255/24
Total = 64 × 256 = 16,384
Pintu R Shah MPSTME SVKM's NMIMS 103
Solution (Continued)
Group 2
For this group, each customer needs 128 addresses.
This means the suffix length is 7 (27 = 128). The
prefix length is then 32 − 7 = 25. The addresses
are:
001: 190.100.64.0/25 190.100.64.127/25
002: 190.100.64.128/25 190.100.64.255/25
003: 190.100.127.128/25 190.100.127.255/25
Total = 128 × 128 = 16,384
Pintu R Shah MPSTME SVKM's NMIMS 104
Solution (Continued)
Group 3
For this group, each customer needs 64 addresses.
This means the suffix length is 6 (26 = 64). The
prefix length is then 32 − 6 = 26.
001:190.100.128.0/26 190.100.128.63/26
002:190.100.128.64/26 190.100.128.127/26
…………………………
128:190.100.159.192/26 190.100.159.255/26
Total = 128 × 64 = 8,192
Pintu R Shah MPSTME SVKM's NMIMS 105
Solution (Continued)
Number of granted addresses: 65,536
Number of allocated addresses: 40,960
Number of available addresses: 24,576
Pintu R Shah MPSTME SVKM's NMIMS 106