Chapter 2
Chapter 2
Network Basics
Dipa Soni
DATA LINK LAYER
Error Detection and Correction
Services provided by Data Link Layer
Framing
Encapsulate datagram into frame.
Adding header and trailer.
Link Access
“MAC” addresses used in frame headers to identify source and destination. It is
different from IP address
Reliable delivery
If this layer protocol provides reliable delivery service, it guarantees to move each
network-layer datagram across the link without error.
A link –layer reliable delivery service can be achieved with acknowledgments and
retransmission
Services provided by Data Link Layer
Flow Control
Flow control is a technique that allows two stations working at different speeds to
communicate with each other.
Error Detection and Correction
Error detection − Error detection involves checking whether any error has
occurred or not. The number of error bits and the type of error does not matter.
Error correction − Error correction involves ascertaining the exact number of bits
that has been corrupted and the location of the corrupted bits.
Error correction and detection
Single-bit error
Burst Error
Single-bit Error
The term single-bit error means that only 1 bit of a given data unit (such as a
byte, character, or packet) is changed from 1 to 0 or from 0 to 1.
Below figure shows the effect of a single-bit error on a data unit.
Burst Error
The term burst error means that 2 or more bits in the data unit have changed
from 1 to 0 or from 0 to 1.
Below figure shows the effect of a burst error on a data unit. In this case,
0100010001000011 was sent, but 0101110101100011 was received.
Detection Versus Correction
It is the simplest technique for detecting and correcting errors. One extra bit
is sent along with the original bits to make number of 1s either even in case
of even parity, or odd in case of odd parity.
For example, if even parity is used and number of 1s is even then one bit with
value 0 is added. This way number of 1s remains even.
If the number of 1s is odd, to make it even a bit with value 1 is added.
Simple Parity Check
Logical addressing:
The data link layer implements the physical addressing and network layer
implements the logical addressing.
The network layer adds a header to the packet which includes the logical addresses
of both the sender and the receiver.
Routing
When two independent networks or links are attached to create an internetwork
that is the network of networks or a large network, the connecting devices route
the packets to its destination.
The forwarding of the data request to servers is known as routing.
Services Provided by Network Layer
In Virtual circuits as all the resources and On other hand in case Datagram network,
bandwidth get reserved before the the path is not fixed as data packets are free
transmission, the path which is utilized or to decide the path on any intermediate
followed by first data packet would get fixed router on the go by dynamically changing
and all other data packets will use the same routing tables on routers.
path and consume same resources.
All the packets follow the same path and Every packet is free to choose any path, and
hence a global header is required only for hence all the packets must be associated
the first packet of connection and other with a header containing information about
packets will not require it. the source and the upper layer data.
Virtual Circuit vs Datagram Packet
Switching
Virtual Circuits Datagram Networks
Packets reach in order to the destination as Data packets reach the destination in
data follows the same path. random order, which means they need not
reach in the order in which they were sent
out.
Due to fixed path and assurance of fixed On other hand Datagram network due to
resources, Virtual Circuits are more reliable dynamic resource allocation and follow
for data transmission as compared to dynamic path is more prone to error and is
Datagram network. less reliable than Virtual circuits.
Virtual circuits are costlier in installation On the other hand Datagram network are
and maintenance and are widely used by ATM cheaper as compared to the Virtual Circuits
(Asynchronous Transfer Mode) Network, and are mainly used by IP network, which is
which is used for the Telephone calls.. used for Data services like Internet.
IP Addressing
IP stands for Internet Protocol
Every node in computer network is identified with the help of IP address
Logical address(Can change based on the location)
IP Addressing
The Internet addresses are 32 bits in length; this gives us a maximum of 232
addresses. These addresses are referred to as IPv4 (IP version 4) addresses or
simply IP addresses.
The need for more addresses, in addition to other concerns about the IP layer,
motivated a new design of the IP layer called the new generation of IP or IPv6
(lP version 6).
In this version, the Internet uses 128-bit addresses that give much greater
flexibility in address allocation. These addresses are referred to as IPv6 (IP
version 6) addresses.
IPv4 Addresses
An IPv4 address is a 32-bit address that uniquely and universally defines the
connection of a device (for example, a computer or a router) to the Internet.
IPv4 addresses are unique. They are unique in the sense that each address
defines one, and only one, connection to the Internet. Two devices on the
Internet can never have the same address at the same time.
IPv4 Addresses
Address Space:
A protocol such as IPv4 that defines addresses 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 because
each bit can have two different values (0 or 1) and N bits can have 2N values.
IPv4 uses 32-bit addresses, which means that the address space is 232 or
4,294,967,296 (more than 4 billion). This means that, theoretically, if there
were no restrictions, more than 4 billion devices could be connected to the
Internet.
IPv4 Addresses
Notations:
There are two prevalent notations to show an IPv4 address: binary notation and
dotted-decimal notation and it has 4 octets(x.x.x.x).
0.0.0.0 to 255.255.255.255(32 bits)
Binary Notation
In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred
to as a byte. So it is common to hear an IPv4 address referred to as a 32-bit address or a
4-byte address. The following is an example of an IPv4 address in binary notation:
01110101 10010101 00011101 00000010
Dotted-Decimal Notation
To make the IPv4 address more compact and easier to read, Internet addresses are
usually written in decimal form with a decimal point (dot) separating the bytes. The
following is the dotted-decimal notation of the above address:
117.149.29.2
IPv4 Addresses
The problem with this classful addressing method is that millions of class A
address are wasted, many of the class B address are wasted, whereas,
number of addresses available in class C is so small that it cannot cater the
needs of organizations. Class D addresses are used for multicast routing and
are therefore available as a single block only. Class E addresses are reserved.
Subnetting
To divide a network into four (22) parts you need to choose two bits from host
id part for each subnet i.e, (00, 01, 10, 11).
To divide a network into eight (23) parts you need to choose three bits from
host id part for each subnet i.e, (000, 001, 010, 011, 100, 101, 110, 111) and
so on.