0% found this document useful (0 votes)
8 views43 pages

Working

Uploaded by

headshot3540
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)
8 views43 pages

Working

Uploaded by

headshot3540
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

Data communication

It means exchange of data between two devices via transmission medium


such as wire.
Characteristics of Data Communications:
1. Delivery:The system must deliver data to the correct destination.
2. Accuracy:The system must deliver the data accurately.
3. Timeliness: system deliver data in timely manner. Data delivered late
can become useless.
4. Jitter: Jitter refers to the variation of packet arrival time. Data is sent
as packets. These packets get joined back in the target device .Each
packet is sent with a predefined delay or acceptable delay.
Protocol:
protocol means set of rules used for data communications. It determines what
is communicated ,when it is communicated and how it is communicated.

DATA FLOW (Transmission Modes)


Data flow is the flow of data between two points
There are three types of data transmission or data flow:-
Simplex Mode:
In simplex mode, the communication between sender and receiver
occurs in only one direction. The sender can only send the data, and the
receiver can only receive the data. The receiver cannot reply to the sender.
Simplex transmission can be thought of as a one-way road where vehicle can
travels only in one direction. Example: consider the keyboard and monitor
relationship. The keyboard can only send the input to the monitor, and the
monitor can only receive the input and display it on the screen. The monitor
cannot reply, or send any feedback, to the keyboard.
Half-Duplex Mode:
In half-duplex mode, the communication is bidirectional, but not at the
same time. When one device is sending, the other can only receive, and vice
versa. An example of a half-duplex system is walkie-talkie.
Full duplex mode:
In full duplex mode, the communication is bidirectional. Both stations
can transmit and receive the data simultaneously. Example of Full Duplex is a
Telephone Network where two person can talk and listen at the same time.

Topology
Network topology is combination of nodes and connecting lines b/w nodes. It
describe how computers are connected among them
Category of topology:
a) Mesh Topology :
In mesh topology, each device is connected to every another device via
particular connecting lines. These connecting lines are known as channels.

Advantages of this topology :


Data is reliable (believable) because data is transferred among the devices
through dedicated links.
Provides security and privacy.
Problems with this topology:
Each device need n-1 [Link] total nc2 cable required.
Installation and configuration is difficult.
It’s Cost efficient Topology .so it’s suitable for less number of devices.
b) Star Topology:
In star topology, all the devices are connected to
a single hub through a cable.
Advantages of this topology: Each device require
only 1 port and total N cable required to connect
to the hub.
Problems with this topology :
If the hub fails, the whole system will crash down.
c) Bus Topology :
In Bus topology each device is connected to single cable(backbone cable)
through drop line. Data transmits from one end to another in single direction.
No bi-directional feature is in bus topology.

Advantages of this topology:


If bus topology contain N devices, it will require 1 cable which is known as
backbone cable and N drop lines are required.
Cost of the cable is less as compared to other topology, but it is used to build
small networks.
Problems with this topology :
If the common cable fails, then the whole system will crash down.
In this topology ,collision will occur if two station want to transmit data at a
same time.
Note: A network collision occurs when two or more devices attempt to
transmit data over a network at the same time. For example, if two computers
on an Ethernet network send data at the same moment, the data will "collide"
and not finish transmitting.
d) Ring Topology :
In ring topology, each device is exactly connected to two neighbouring
devices.
In ring topology,
One station is known as monitor station which is responsible to perform the
operations.
To transmit the data, station has to hold the token. After the transmission is
done, the token is to be released for other stations to use.
Advantages of this topology :
The possibility of collision is minimum in this type of topology.
Cheap to install and expandable.
Problems with this topology :
Troubleshooting is difficult in this topology.
Addition or removal of stations can disturb the whole topology.
e) Hybrid Topology:
This topology is a collection of two or more topologies which are described
above. This is a scalable topology which can be expanded easily and costly
topology.
For example if in an office, one department use bus topology and in another
department use star topology. Connecting these topologies will result in Hybrid
Topology .
Advantage:
1) Unlike other networks, fault detection and troubleshooting is easy in this
type of topology.
2) Easy to increase the size of network by adding new components, without
disturbing existing architecture.
Disadvantage:
1) Complexity of Design: One of the biggest drawback of hybrid topology is its
design
2) Costly Hub: The hubs used to connect two distinct networks, are very
expensive.

Category of Network

Local Area Network (LAN)


It is designed for small physical areas such as an office, group of buildings. LAN
can be a simple network like connecting two computers, to share files by each
other. LAN networks are also widely used to share resources like printers,
hard-drive etc. LAN's are private networks.
Communication medium for LAN: twisted pair, coaxial cable
Advantages of LAN
Resource Sharing: Computer resources like printers and hard disks can be
shared with the help of local area networks. This reduces cost of printer,
hardware purchases.
Software Applications Sharing: It is cheaper to use same software over network
instead of purchasing separate licensed software for each client network.
Internet Sharing: Local Area Network provides the facility to share a single
internet connection among all the LAN users. In Net Cafes, single internet
connection sharing system keeps the internet expenses cheaper.
Data Security: Here, Data is shared among computers which are located in
small physical [Link], Data is highly secured.
Disadvantages of LAN
 High Setup Cost
 Covers Limited Area: Local Area Network covers a small area like one
office, one building or a group of nearby buildings.

Metropolitan Area Network (MAN):


It is a bigger version of LAN. It is designed to extend over the entire city. It is
hold and operated by single private company or a public company.
Communication medium used for MAN are optical fibers.
Advantages of MAN
It provide fast communication via fibre optic cables.
Disadvantages of MAN
More cable required for a MAN connection from one place to another.
It is difficult to make the system secure from hackers.
Wide Area Network (WAN)
It is designed for larger physical area such as states of a country,continents.
WAN can be private or it can be public.
Communication medium used are satellite
Advantages of WAN
Covers a large geographical area
Shares software and resources with connecting workstations.
Disadvantages of WAN
Setting up a network can be an expensive, slow and complicated. The bigger
the network the more expensive it is.
Security is a real issue.
PAN(Personal Area Network)
 Connecting the computer devices for personal use is known as Personal
Area Network.
 It designed to cover small physical area such as house, apartment.
personal area network developed with wifi from the laptop, mobile
phones.

OSI MODEL: (look note book)


OSI(open system interconnection model) Layers, Data units and Functions:
LAYERS DATA FUNCTIONS DEVICES/APPS PROTOCOLS
UNITS
Application Data Mail Services, web Webserver DNS,DHCP ,FTP,
Layer services ,mail server, TELNET, HTTP,HTTPS,
web browser, NTP,SSH
Presentation Data Encryption/Decryption,
Gateway,
Layer Compression
Firewall
Session Layer Data Session Establishment,
Dialog Controller,
Synchronization

Transport Segments, Segmentation, flow Gateway , TCP,UDP,SCTP


Layer Datagram control, error control, Firewall
sequencing
Network Packets Fragmentation, Routing, Router, IP,ICMP,IGMP
Layer logical addressing, Brouter ,layer 3
Traffic control switch
Data Link Frames Physical addressing & Layer 2 switch, ARP,PPP
Layer Framing, Flow control, bridge,NIC
Error control
Physical Bits Bit Synchronization, Bit HUB, Repeater, ETHERNET,TOKEN RING
Layer rate control, Physical Modem, Cables
Topologies,
Transmission modes
[Link] layer:
 It is first layer at OSI MODEL.
 Physical Connectivity of network like using wires takes place at physical
[Link] is responsible for bit rate control, physical topologies, and
transmission modes.
 It converts data into bits and forward into the physical layer available on
receiver side.
 Hub, Repeater, Modem, Cables are Physical Layer devices.
 Protocols: Ethernet, Token ring.
 Datagram at physical layer called as bits.

The functions of the physical layer are :


Bit rate control: The Physical layer defines the transmission rate i.e. the
number of bits sent per second.
Physical topologies: Physical layer defines the different
topologies(arrangement of devices) in a network i.e. bus, star or mesh topolgy.
Transmission mode: Physical layer defines the different transmission
mode(data flows between the two connected devices). The various
transmission modes possible are: Simplex, half-duplex and full-duplex.
2. Data Link Layer (DLL) (Layer 2)
 It is Second layer of OSI Model.
 It provides connection b/w hosts on same [Link] is responsible for
framing and physical addressing (adds physical addresses (MAC address)
of sender and receiver to the frame.), flow control, error control.
 it convert packets into frames and assign physical addresses to frames
then forward it to physical layer.
 Device under this layer :switch, bridge, NIC
 Protocols: ARP,PPP
 Datagram at DLL called as frames.
The functions of the data Link layer :
(physical address, error control, flow control )
Physical addressing:
After creating frames, Data link layer adds physical addresses (MAC address) of
sender and receiver to the frame.
Error control:
Data link layer provides the error control [Link] detects and retransmits
damaged or lost frames. It used ARQ(AUTOMAIC REPEAT REQUEST) protocol.
Flow Control:
The data rate must be constant on both sides else the data may get corrupted.,
flow control determine which amount of data can be sent and receive.
Flow Control Techniques: Stop-and-wait, and Sliding Window
Stop and Wait Flow control:
In Stop and wait protocol, a sender after sending a frame waits for an
acknowledgment of the frame and sends the next frame only when
acknowledgment of the frame has received.
Sliding Window:
 It works by having the sender and receiver have a “window” of frames.
 Each frame has to be numbered in relation to the sliding window. For a
window of size n, frames get a number from 0 to n - 1. Subsequent
frames get a number mod n.
Sender Sliding Window

For example, Let the window size is 7 (see diagram), if frames 0 through 3 have
been sent and no acknowledgment has been received, then the sender's
window contains three frames - 4,5,6.
Now, if an ACK numbered 3 is received by source, it means three frames (0, 1,
2) have been received by receiver and are undamaged.
The sender's window will now expand to include the next three frames in its
buffer.
It contains two sub-layers:
Sub-Layer:
Logical link control:
Data link layer handles framing & physical addressing, flow
control, and error control. Flow control, error control handled by logical link
control layer. Framing is handled in both the LLC sublayer and the MAC
sublayer
Media Access Control (MAC) sublayer:
The framing function is also handled by the MAC layer. In order to
communicate or transfer the data from one computer to another computer we
need some address. Media Access Control (MAC) sublayer use the MAC
Address. MAC Address is word wide unique.
Type of Addressing:
A source address is always a unicast address—the frame comes from
only one station. The destination address, can be unicast, multicast, or
broadcast
Unicast:
A unicast destination address defines only one recipient; the relationship
between the sender and the receiver is one-to-one(from one source to one
destination). ( Whats up msg)
Multicast :
A multicast destination address defines a group of addresses; the relationship
between the sender and the receivers is one-to-many( from one source to
multiple destinations). (video conferencing,tele conferencing)
Broadcast :
The broadcast address is a special case of the multicast address; If the message
is sent to all the nodes in a network it is called Broadcasting.( [Link]
channels),the relationship between the sender and the receivers is One-to-All
(from one source to all possible destinations)
About Mac address:
MAC addresses are unique 48-bits(6 bytes) physical address which works at
data link layer of a [Link] address is embedded into network card
(known as Network Interface Card) during the time of manufacturing. Usually,
MAC address usually represented by 12-digit hexadecimal number.
The least significant bit of the first byte defines the type of address.
If the bit is 0, the address is unicast otherwise, it is multicast . if all the bits are
1s ,it is called Broadcast address.
Address Resolution Protocol (ARP)
A system wants to communicate with other system it must know the logical(ip)
and physical(mac) address of the other system.
ARP Used to create a mapping between physical and logical addresses of both
sender and receiver. An ARP request is broadcast; an ARP reply is unicast
The steps involved in ARP process
1. The sender knows the IP address of the target.
2. Sender asks ARP to create an ARP request message .this message
contain sender physical address, the sender IP address, and the
target IP address.
3. The message is passed to the data link layer.
4. Every connected host receives the frame. The target machine
recognizes its IP address.
5. The target machine replies with an ARP reply message. This message
contains target physical address. The message is unicast.
6. The sender receives the reply message with target physical address.
7. Now sender send data gram to target machine in unicast approach.
3. Network Layer (Layer 3) :
(logical addressing, routing, fragmentation)
 It is 3rd layer of OSI model.
 It converts segments into packets and assign logical address(adds logical
addresses (IP address) of sender and receiver) to packets then forward it
to data link layer which is called logical addressing.
 It decides the best route to send the data in a network which is called
Routing and responsible for Fragmentation.
 Device works under this layer: Router, Brouter, L3 switch
 Protocols: IP (ipv4 & ipv6) ,ICMP,IGMP
 Here datagram called as packets
Function of Network layer
Routing:
The network layer protocols determine which route is suitable from source to
destination. This function of network layer is known as routing.
logical addressing.
Network layer adds logical addresses (IP address) of sender and receiver to the
packets and forward to data link layer
Fragmentation:
The fragmentation is a process of breaking the packets into the smallest
individual data units which travel through different networks.
Important protocols:
IPV4:
If a computer needs to communicate with another computer in the
world through internet, The packet will transmit through several LANs or
WANs before reaching the destination computer. For this level of
communication, we need a global addressing scheme such as IP address.
IP address is a logical address of network layer. The IP address is 32 bits length;
this gives us a maximum of 2^32 addresses.
The Internet Protocol version 4 (IPv4) is the delivery mechanism used by the
TCP/IP protocols.IPv4 provides no error control and flow control mechanism.
IPv6 ADDRESSES
IPV6(Internet protocol version 6) introduced due to the shortage of IPV4. An
IPv6 address is 128 bits long.
Advantages
• In real-time audio and video transmission requires minimum delay
strategies. This functionality not provided in the IPv4 design.
• No encryption or authentication is provided by IPv4.
• Ipv6 has Large Address space( I.e.:128bit)
Understand:
IP and IPv4 are not same because IPv4(internet protocol version 4) is a part of
IP(internet Protocol).
Two versions of the Internet Protocol are available
1.IPv4(32-bit) address
2. IPv6(128-bit) address

Ipv4 vs ipv6:
IPv4 and IPv6 are internet protocol version 4 and internet protocol version 6,
IPV6 is the new version of Internet Protocol, which is better than IPV4 in terms
of complexity and efficiency
Basis for IPv4 IPv6
differences
Basic IPv4 is a 32-Bit IP Address. It is a IPv6 is 128 Bit IP Address. It is an
numeric address alphanumeric address
Type of Unicast, broadcast, and multicast. Unicast, multicast, and anycast.
Addresses
Number of IPV4 offers five different classes of lPV6 allows storing an unlimited
classes IP Address. Class A to E. number of IP Address.
Best feature NAT implemented because of It allows direct addressing
shortage of ipv4 address. NAT used because of vast address Space.
to convert public IP address into
private IP address vise versa
support Not support audio and video Supports audio and video
transmission transmission
security Not providing authentication and IPSEC is inbuilt security feature in
encryption feature the IPv6 protocol

fragmentation Fragmentation performed by In IPv6 fragmentation performed


Sender and forwarding routers only by sender

TRANSITION FROM IPv4 TO IPv6


These strategies ensure the transition from ipv4 to ipv6
Source queries the DNS for choosing ip [Link] DNS returns ipv4 ,source will
send ipv4 [Link] DNS returns ipv6,source will send ipv6 packets.
Tunnelling is a strategy used when 2 computers using ipv6 but they wants to
communicate through ipv4 region. the packet must have an ipv4 address for
passing through this region. In this situation, ipv4 packet carrying an ipv6
packet as data.
ADDRESS MAPPING
The delivery of a packet to a host requires two levels of addressing: logical and
physical.
Logical (IP address)(host-to-host)
Physical addresses(MAC address) (node-to-node).
Terminology:
NODE: A node is a device Connected to a computer Network.
Host: Host offers services to other nodes connected in a network .Ex. Server (
all servers are host but not all hosts are severs)
ICMP
The IP protocol has no error control mechanism. The Internet Control Message
Protocol (ICMP) used for over come the above problem. It is a companion to
the IP protocol.
ICMP messages are divided into two broad categories: error-reporting
messages and query messages.
The error-reporting message reports problems of a receiver.
The query message helps receiver to a get specific data from sender.
IGMP
The Internet protocol can be involved in two types of communication:
unicasting and multicasting. The Internet Group Management Protocol (IGMP)
is one of the necessary protocols which is involved in multicasting. IGMP is a
companion to the IP protocol.
IGMP helps a multicast router to create and update a list of loyal members.
And gives the information about multicast routers to the network.
Class full Addressing:
Nowadays this scheme is becoming obsolete. In class full addressing, the
address space is divided into five classes: A, B, C, D, and E. Each class occupies
some part of the address space.
A block in ,
 Class A address- is too large for almost any organization.
 Class B is also very large
 Class C is probably too small for many organizations.
 Class D addresses were designed for multicasting.
 Class E are reserved for experimental and research purposes and future
use.
An IP address has two components, the network address and the host address.
For example, consider the IP address [Link]. Assuming this is part of
a Class B network, the first two numbers (150.215) represent the Class B
network address, and the second two numbers (017.009) identify a particular
host(server) on this network.
Subnet mask vs subnetting
Subnet
In Subnetting we break a single large network in multiple small networks.
These networks are known as subnets. So, A subnet is a single small network
created from a large network. In subnetting Bits borrowed from host portion.
Superneting:
Used to combine small network into big network. its applicable for two or
more network. Bits borrowed from network portion.
Subnet mask:
[Link]
Its used to find the net id and host id in the IP address. With help of this net id
and host id ,the particular destination system can be easily found on local
network or global network.
Netid and Hostid:
In classful addressing, an IP address in class A, B, or C is divided into netid and
hostid. Note that the concept does not apply to classes D and E. In class A, one
byte defines the netid and remaining three bytes define the hostid. In class B,
first two bytes define the netid and remaining two bytes define the hostid. In
class C, three bytes define the netid and last one byte defines the hostid.

Classful addressing, which is almost obsolete, is replaced with classless


addressing.
Problem of classless subnetting: (sunny youtube problem)
[Link]
Wprc&list=PLSNNzog5eydueOR_p6dezKr2tosjGvdNH&index=1
well explained…sunny classroom
Solution:
Create table:

Table change according to CIDR [Link] 24 is CIDR value.


Problem-2:
Note:table vary according to [Link] start from 8 ,16,24,32 according to class
of the ip address

Classless Addressing
Classless Addressing is an improved IP Addressing system. It makes the
allocation of IP Addresses more efficient.
It replaces the older classful addressing system which is based on classes.
It is also known as Classless Inter Domain Routing (CIDR).
Rules For Creating CIDR Block
A CIDR block is created based on the following 3 rules-
Rules:
 All the IP Addresses in the CIDR block must be contiguous.
 The size of the block must be representable as power of 2. Size of any
CIDR block will always be in the form 21, 22, 23, 24, 25 and so on.
FOR UNDERSTANDING:

Above example tell simple things.192.---.---.--- represent calss [Link] CLASS C ,24
bit reserved for network [Link],8(32-24) bits for host id. here, CIDR also
24([Link]/24).so,no need to borrow bit from host [Link]:network bit
represent by 1 and host bit represent by [Link] of that ,the numerical value
[Link] is the starting subnet address of class c. which is network [Link]
get subnet from network bit not from host bit.
An example of CIDR IP Address is-
[Link] / 28
It suggests-
28 bits are used for the identification of network.
Remaining 4 bits are used for the identification of hosts in the network.
Note:
 In ipv4 addressing a block of addresses can be defined as x.y.z.t/n .Here,
x.y.z.t is one of the address and n is mask
 The first address in the block can be found by setting the rightmost 32-n
bits to 0
 The last address in the block can be found by setting the rightmost 32-n
bits to 1
 The number of address can be found by 232-n
NAT(Network address translation):
NAT is stands for Network address translation. NAT Used widely because of the
shortage of IP address. NAT used to convert public ip address into private ip
address and private ip address into public ip address. To implement this,
Internet authorities have reserved three set of addresses as private addresses.

note:ipv4 is 32 bit address and it has around 4.2 billion of ip address but the
population of our world is more then 7.4 billion according to [Link]
internet all devices need ip [Link] ,4.2 billion ip address not sufficient for
7.4 billion users for this reason we use NAT.
Here, all the 4 computer assign to the private ip address. whenever pc wants to
access the internet it will request the router. the router going to convert the
private address of pc into public address add a unique port number to [Link]
save this information to NAT table. After that router forward the request into
the internet. when the router receive the reply from the internet,it will send
the reply to the particular pc by the help of NAT table. the unique port number
used to identify the particular pc.
[Link] Layer (Layer 4) :
(flow control, error control)
 It is forth layer of OSI model.
 This layer is responsible for segmentation (divide data into multiple
segment) and flow control and error control and sequencing.
 It converts data into segments and forward to network layer
 Devices: Gateway ,Firewall
 Protocols: TCP, UDP, SCTP
 Datagram at transport layer called segment.
Note: Revise function of transport layer from your notes.
Functions of Transport Layer:
Flow control:
The transport layer also responsible for flow control but it is performed end-
to-end rather than a single link.
Error control:
The transport layer is also responsible for Error control. Error control is
performed end-to-end rather than the single link. The sender transport layer
ensures that message reach at the destination without any error.
Important Protocols
Transmission Control Protocol
It allows the different systems to communicate over the internet. It is used for
transfer file and error checking.
TCP is a connection-oriented protocol and reliable .Because it provides flow
control and error control and congestion control mechanism at transport
layer.
TCP is a byte-oriented protocol not a message oriented protocol. It receives a
messages from a process, stores them as bytes, and sends them as a
segments. There is no preservation of the message boundaries.
Note: A "message boundary" is the separation between two messages being
sent over a protocol. UDP preserves message boundaries. If you send "FOO"
and then "BAR" over UDP, the other end will receive two datagrams, one
containing "FOO" and the other containing "BAR".
If you send "FOO" and then "BAR" over TCP, no message boundary is
preserved. The other end might get "FOO" and then "BAR". Or it might get
"FOOBAR". Or it might get "F" and then "OOB" and then "AR"

User Datagram Protocol


User Datagram Protocol is a transport layer protocol. It is used for video
conferencing and playing online video game. It is a connectionless and
unreliable transport protocol. Because, receiver does not send any
acknowledgment when the packet is received and the sender does not wait for
any acknowledgment And No Error control or flow control is provided by UDP.
Hence UDP depends on IP and ICMP for error reporting.
Also, transport layer use UDP when process need to send small message. It
take less time compare to TCP and SCTP. It is providing message boundaries.

SCTP: (Stream control transmission protocol)


SCTP combines the best features of UDP and TCP. SCTP is a reliable and
connection oriented and message oriented protocol. It preserves the message
boundaries and at the same time detects lost data. It also has congestion
control and flow control mechanisms. SCTP, designed for Internet applications
like email and web browsing.

SCTP Services :
Full- Duplex Communication :
SCTP provides full-duplex service ( the data can flow in both directions at the
same time).
Reliability
SCTP uses an acknowledgement mechanism to check the arrival of data.

Note:
UDP is connectionless and unreliable; TCP and SCTP are connection oriented
and reliable.
Multihoming
(one connection and multiple IP addresses)
Multihoming is the practice of connecting a computer network to more than
one network. This can be done in order to increase reliability(if a single link
fails, packets can still be routed through the remaining networks).because if
one network goes down, another network quickly takes over. Multihoming
allows both sender and receiver to define multiple IP addresses for
communication. But, only one of these can be defined as primary address and
the remaining can be used as alternative addresses.
Port numbers:
A frame in data link layer needs a destination MAC address(physical) for
delivery and a source MAC address for destination’s reply. A packet in the
network layer needs a destination IP address(logical) for delivery and a source
IP address for the destination's reply.
At the transport layer, we need a transport layer address, called a port
number. The destination port number is needed for delivery; the source port
number is needed for the reply. In the Internet model, the port numbers are
16-bit integers between 0 and 65,535.
The lANA (Internet Assigned Number Authority) has divided the port numbers
into three ranges: well known, registered, and dynamic (or private)
 Well-known ports. The ports ranging from 0 to 1023 are registered and
controlled by lANA.
 Registered ports. The ports ranging from 1024 to 49,151 are not
controlled by lANA. They can only be registered with lANA .
 Dynamic ports. The ports ranging from 49,152 to 65,535 are neither
controlled nor registered. They can be used by any process.
Socket
Process-to-process delivery needs IP address and the port number at each end
to make a connection. The combination of an IP address and a port number is
called a socket address. Client socket defines the client process uniquely
.server socket address defines the server process uniquely. A transport layer
needs both server socket address and client socket address. ip header contain
ip address. The udp and tcp header contains the port numbers.
Note:
The data link layer is responsible for delivery of frames between two
neighbouring nodes over a link. This is called node-to-node delivery.
The network layer is responsible for delivery of packets between two hosts.
This is called host-to-host delivery.
The transport layer is responsible for delivery of segments between two
processes (applications programs). This is called process-to-process delivery.
Connectionless Service

In a connectionless service, the packets are sent from one party to another with
no need for connection establishment or connection release. The packets are not
numbered; they may be delayed or lost or may arrive out of sequence. There is
no acknowledgment either.

Connection~Oriented Service

In a connection-oriented service, a connection is first established between the


sender and the receiver. Data are transferred. At the end, the connection is
released.
Multiplexing and DE multiplexing
Multiplexing
At the sender side, there may be several processes which need to send
packets. But, there is only one transport layer protocol at any time. The
process of combining the multiple packets is known as multiplexing and
hardware used for multiplexing is known as a multiplexer. Multiplexing follows
many-to-one relationship, i.e., n input lines and one output line.
Demultiplexing:
At the receiver side, The transport layer receives datagrams from the network
layer. After error checking, the transport layer delivers each message to the
appropriate process based on the port number. This process is called
demultiplexing and the hardware used for demultiplexing is known as a
demultiplexer. Demultiplexing follows the one-to-many approach.

5. Session Layer (Layer 5)


 It is 5th layer of OSI model
 This layer is responsible for establishment of connection, Dialog control,
maintenance of connection, and terminate the connection.
 This layer control weather data can be send in simplex ,half duplex or
Full Duplex mode.
 Protocol: NETBIOS, SAP
 Devices: Gateway, Firewall
Refer notebook.
6. Presentation Layer (Layer 6)
 Presentation layer is 6th layer of OSI Model.
 This layer responsible for translation(communication b/w linux &
windows machine) and Encryption/Decryption(For security purpose) and
compression(ex.:Msg size 10mb to 5mb)
 Protocol : SSL(Secure Socket Layer)
7. Application Layer (Layer 7) :
 Application layer is the 7th layer of the OSI model.
 This is the only layer where user can directly communicate with data.
 It provides user interface and supports services such as mailing, file
transfer, browsing internet ,remote desktop connection.
 Application layer is implemented by the network applications such as
email and web browser.
 Protocol: SMTP(for sending email), HTTP (browsing internet via web
browser), POP3(for access mail), DNS,TELNET, FTP(for file transfer)
 These applications produce the data, which has to be transferred over
the network. And also this layer displaying the received information to
the user.
 Devices : web browser, email server, Firewall

Important Functions:
 File transfer access and management
 Mail Services

Type of Connecting Devices

We divide connecting devices into five different categories based on the layer
 A device which operate below the physical layer is called passive hub.
 A device which operate at the physical layer is called repeater or an
active hub.
 A device which operate at the physical and data link layers is called
bridge or two-layer switch
 A device which operate at the physical, data link, and network layers is
called router or three-layer switch.
 A device which can operate at all five layers is called gateway.
Passive Hubs:
A passive hub is a device that operates below the physical layer. A passive hub
is just a connector. It connects the wires coming from different station. In a
star-topology , a passive hub is a point where the signals coming from different
stations ; Collision may occur at hub.
Repeaters
A repeater is a device that operates only in the physical layer. A repeater
receives a signal and regenerates the original bit pattern before it corrupted.
Then it sends the refreshed signal. A repeater can extend the physical length of
a LAN.
Active Hubs
An active Hub is a device that operates only in the physical layer. It is actually a
multipart repeater. It is normally used to create connections between stations
in a star topology.
Bridges
A bridge operates in both the physical and the data link layer. As a physical
layer device, it regenerates the signal . As a data link layer device, the bridge
can check the MAC addresses (source and destination) contained in the frame.
Two layer Switch
We have two-layer switches and three-layer switches. The two-layer switch
performs at the physical and data link layers. A two-layer switch is a bridge
with many ports. It’s design allows better performance. A bridge with a few
ports can connect a few LANs together. A bridge with many ports may be able
to allocate a unique port to each station.
Routers
A router perform at physical ,data-link, and network layer. it’s three layer
[Link] routes the packets based on their logical addresses. A router normally
connects LANs and WANs in the Internet and it has a routing table which is
used for routing. It is used to transfer information from the source to the
destination
SWITCHING
A network is a set of connected devices. Whenever we have
multiple devices, we have The problem of how to connect them to make one-
to-one communication possible. One solution is to make a point-to-point
connection between each pair of devices (a mesh Topology). These methods,
however, are impractical and wasteful when applied to very large networks. A
better solution is switching. A switched network contain of a series of
interlinked Nodes, called switches. Switches are devices used for creating
temporary connections between two or more devices
Two types of Switched networks available.
Circuit switched networks
Packet switched networks
CIRCUIT-SWITCHED NETWORKS:
A circuit-switched network consists of a set of switches connected by physical
links. Usually, Circuit switching takes place at the physical layer. A connection
between two stations is a dedicated [Link] connection uses only one link
Example: traditional telephone network uses the circuit-switching approach.
Packet switching:
In data communications, we need to send messages from
one system to another. In packet-switched network, message divided into
packets of fixed or variable [Link] packets are sent out to the network
sequentially one at a time. In packet switching, there is no resource allocation
for a packet.
Resources are allocated on demand. The allocation is done on a first come,
first-served basis. Example: internet based on the packet switching.

Widely used protocols:

Simple Mail Transfer Protocol-smtp


File Transfer Protocol-ftp
Trivial File Transfer Protocol-tftp
Domain Name System-dns
Stream Control Transmission Protocol-sctp
Transmission Control Protocol-tcp
User Datagram Protocol-udp
Internet Group Management Protocol-igmp
Internet Control Message Protocol-icmp
Address Resolution Protocol-arp
Reverse Address Resolution Protocol-rarp

Conceptual questions:

What is Network Topology?


Network topology is a physical layout of the computer network and it defines
how the computers are connected to each other.
Differences between Hub, Switch and Router?
Hub Switch Router
Physical Layer Device Data Link Layer Device Network Layer
Device
Connects devices Connect multiple sub- Connect
within a single LAN LANs within a single LAN multiple LANS and
WANS together.
Collision domain of all Switch divides collision It divides both
hosts connected domain, but broadcast collision and
through Hub i.e., if domain of connected broadcast domains,
signal sent by any two devices remains same.
devices can get
collision.
Hub is a common Switch is a device used to Router is a network
connection point for forwards packets in a device that connects
devices connected to network two or more
the network. network segments.

What is HTTP and what port does it use?


Answer: HTTP is HyperText Transfer Protocol .Many web pages are using HTTP
to transmit the web content. Port used here is TCP port 80
What is HTTPs and what port does it use?
HTTPs is a Secure HTTP. HTTPs is used for secure communication over a
computer network. HTTPs provides authentication of websites that prevents
unwanted attacks.
With the help of an SSL certificate, it verifies if the requested server connection
is a valid connection or not. HTTPs use TCP with port 443.

What is a Firewall?
Firewall is a network security system that is used to protect computer
networks from unauthorized access. It prevents malicious access from outside
to the computer network and provide limited access to outside users
What is DNS?
Answer: Domain Name Server (DNS).we can call it an Internet’s phone book.
All the public IP addresses and their hostnames are stored in the DNS .
For a human being, it is easy to remember and recognize the domain name,
however, the computer is a machine that does not understand the human
language and they only understand the machine language .
There is a “Central Registry” where all the domain names are stored and it gets
updated on a periodic basis. All Internet service providers and different host
companies usually interact with this central registry to get the updated DNS
details.
For Example, When you type a website [Link], then
your Internet service provider looks for the DNS associated with this domain
name and translates this website command into a machine language – IP
address – [Link] (note that, this is the imaginary IP address and not
the actual IP for the given website) so that you will get redirected to the
appropriate destination.
This process is explained in the below diagram:
What are IP classes and how can you identify the IP class of given
an IP address?
Classes used to cluster the IP address in to 5 different classes

i.e.:Class A,class B ,class C, class D, class E

classful ip address are obsolete in today world.

What is meant by [Link] and localhost?


IP address [Link], is reserved for loopback or localhost connections. These
networks are usually reserved for the biggest customers or some of the
original members of the Internet. To identify any connection issue, the initial
step is to ping the server and check if it is responding.
If there is no response from the server then there are various causes like the
network is down or the cable needs to be replaced or the network card is not
in good condition. [Link] is a loopback connection on the Network Interface
Card (NIC) and if you are able to ping this server successfully, then it means
that the hardware is in a good shape and condition.
[Link] and localhost are the same things in most of the computer network
functioning.
What is NIC?
NIC stands for Network Interface Card. It is also known as Network Adapter or
Ethernet Card. It is in the form of an add-in card and is installed on a computer
so that the computer can be connected to a network.
Each NIC has a MAC address which helps in identifying the computer on a
[Link] address is [Link] address is attached into NIC during the
computer manufacturing.
What is the difference between the Internet, Intranet, and
Extranet?
The terminologies Internet, Intranet, and Extranet are used to define how the
applications in the network can be accessed. They use similar TCP/IP
technology but differ in terms of access levels.
Internet: Applications are accessed by anyone from any location using the web.
Intranet: It allows limited access to users in the same organization.
Extranet: External users are allowed or provided with access to use the
network application of the organization.
What are Ipconfig and Ifconfig?
Ipconfig stands for Internet Protocol Configuration and this command is used
on Microsoft Windows to view and configure the network interface.
The command Ipconfig is useful for displaying all TCP/IP network summary
information currently available on a network. It also helps to modify the DHCP
protocol and DNS setting.
Ifconfig (Interface Configuration) is a command that is used on Linux, Mac, and
UNIX operating systems. It is used to configure, control the TCP/IP network
interface parameters from CLI i.e. Command Line Interface. It allows you to see
the IP addresses of these network interfaces.
Define Piggybacking?
In real life, In a real example, if someone already traveling towards a
destination, with his bike where you also need to reach, you just take the lift
over the bike. If someone not traveling, then you use your own bike for the
ride. A similar concept is very common in computer networks called
piggybacking.
Piggybacking in networking is a technique to utilize the available bandwidth
more efficiently. The host does not send the acknowledgement for the
received frame immediately, but waits for some time and includes the
acknowledgement in the next outgoing packet.
Consider a 2 way communication between two hosts A and B, in which A sends
some data to B and in response B sends some data to A.
Initially, A sends some data to B, on receiving this, B has to send an
acknowledgement to A.
This acknowledgement can be sent in two ways,
 B sends the acknowledgement to A immediately and in the next packet
it sends the data/response to A. Thus sending two packets.
 B waits for some time and sends the acknowledgement along with the
response/data as one packet.
The second approach of sending both data and acknowledgement in the same
packet us known as piggybacking.
Advantages
Better utilization of network bandwidth.
Disadvantages
If the B waits for a long time before sending the acknowledgement, A may
retransmit the packet.
Define Brouter?
Brouter or Bridge Router is a device that acts as both a bridge and a router. As
a bridge, it forwards data between the networks. And as a router, it routes the
data to specified systems within a network.
Define Static IP and Dynamic IP?
Answer: When a device or computer is assigned a specified IP address then it is
named as Static IP. It is assigned by the Internet Service Provider as a
permanent address.
Dynamic IP is the temporary IP address assigned by the network to a
computing device. Dynamic IP is automatically assigned by the server to the
network device.
How VPN is used in the corporate world?
VPN is the Virtual Private Network .Internet-based VPNs are less expensive
and can be connected from anywhere in the world.
VPNs are used to connect offices remotely and are less expensive when
compared to WAN connections. VPNs are used for secure transactions and
confidential data can be transferred between multiple offices. VPN keeps
company information secure against any potential [Link] the help of a
VPN, remote users can securely connect to the organization’s network.
Corporate companies, educational institutions, government offices, etc use
this VPN.
Types of vpn:
Access VPN: Access VPN's provide connectivity to mobile users and
telecommuters. It is an alternative option for dial-up connections or ISDN
connections. It provides low-cost solutions and a wide range of connectivity.
Intranet VPN: They are useful for connecting remote offices using shared
infrastructure with the same policy as a private network.
Extranet VPN: Using shared infrastructure over an intranet, suppliers,
customers, and partners are connected using dedicated connections.
Expand DHCP and describe how it works?
Answer: DHCP stands for Dynamic Host Configuration Protocol.
DHCP is used to assign IP addresses automatically to the devices over the
network. When a new device is added to the network, it broadcasts a message
stating that it is new to the network. Then the message is transmitted to all the
devices of the network.
Only the DHCP server will react to the message and assigns a new IP address to
the newly added device of the network. With the help of DHCP, IP
management became very easy.
What is the use of encryption and decryption?
Answer: Encryption is the process of converting the transmission data into
another form that is not read by any other device other than the intended
receiver.
Decryption is the process of converting back the encrypted data to its normal
form. An algorithm called cipher is used in this conversion process.
Brief Ethernet?
Answer: Ethernet is a technology that is used to connect computers all over
the network to transmit the data between each other.
For Example, if we connect a computer and laptop to a printer, then we can
call it as an Ethernet network. Ethernet acts as the carrier for the Internet
within short distance networks like a network in a building.
The main difference between the Internet and Ethernet is security. Ethernet is
safer than the Internet as Ethernet is a closed-loop and has only limited access.
Explain Data Encapsulation?
Answer: Encapsulation means adding one thing on top of the other thing.
When a message or a packet is passed through the communication network
(OSI layers), every layer adds its header information to the actual packet. This
process is termed as Data Encapsulation.
Note: Decapsulation is exactly the opposite of encapsulation. The process of
removing the headers added by the OSI layers from the actual packet is termed
as Decapsulation.
What is an Encoder?
Answer: Encoder is a circuit that uses an algorithm to convert any data or
compress audio data or video data for transmission purposes. An encoder
converts the analog signal into the digital signal.
What is a Decoder?
Answer: Decoder is a circuit that converts the encoded data to its actual
format. It converts the digital signal into an analog signal.
How can you recover the data from a system which is infected with
a Virus?
Answer: In another system (not infected with a virus) install an OS and
antivirus with the latest updates. Then connect the HDD of the infected system
as a secondary drive. Now scan the secondary HDD and clean it. Then copy the
data into the system.
What happens when you type a URL in the web browser?

A URL may contain a request to HTML, image file or any other type.
If the content of the typed URL is in the cache and fresh, then display the
content.
Else find the IP address for the domain so that a TCP connection can be set up.
Browser does a DNS lookup.
Browser needs to know the IP address for a URL so that it can set up a TCP
connection. This is why browser needs DNS service. The browser first looks for
URL-IP mapping browser cache, then in OS cache. If all caches are empty, then
it makes a recursive query to the local DNS server. The local DNS server
provides the IP address.
Browser sets up a TCP connection using three-way handshake.
Browser sends a HTTP request.
Server has a web server like Apache, IIS running that handles incoming HTTP
request and sends an HTTP response.
Browser receives the HTTP response and renders the content.
What is DHCP, how does it work?
The idea of DHCP (Dynamic Host Configuration Protocol) is to enable devices to
get IP address without any manual configuration.
The device sends a broadcast message saying “I am new here”
The DHCP server sees the message and responds back to the device and
typically allocates an IP address. All other devices on network ignore the
message of the new device as they are not DHCP server.
In Wi-Fi networks, Access Points generally work as a DHCP server.
What is ARP, how does it work?
ARP stands for Address Resolution Protocol. ARP is used to find LAN address
from the Network address. A node typically has destination IP to send a packet,
the nodes need link layer address to send a frame over a local link. The ARP
protocol helps here.
The node sends a broadcast message to all nodes saying what is the MAC
address of this IP address.
Node with the provided IP address replies with the MAC address.
Simple Mail Transfer Protocol (SMTP)
Email is emerging as one of the most valuable services on the internet today.
Most of the internet systems use SMTP as a method to transfer mail from one
user to another. SMTP is a push protocol and is used to send the mail whereas
POP (post office protocol) or IMAP (internet message access protocol) are used
to retrieve those mails at the receiver’s side.
SMTP Fundamentals
SMTP is an application layer protocol. The client who wants to send the mail
opens a TCP connection to the SMTP server and then sends the mail across the
connection. The SMTP server is always on listening mode. As soon as it listens
for a TCP connection from any client, the SMTP process initiates a connection
on that port (25). After successfully establishing the TCP connection the client
process sends the mail instantly.
SMTP Protocol
The SMTP model is of two type :
End-to- end method
Store-and- forward method
The end to end model is used to communicate between different organizations
whereas the store and forward method are used within an organization. A
SMTP client who wants to send the mail will contact the destination’s host
SMTP directly in order to send the mail to the destination. The SMTP server
will keep the mail to itself until it is successfully copied to the receiver’s SMTP.
The client SMTP is the one which initiates the session let us call it as the client-
SMTP and the server SMTP is the one which responds to the session request
and let us call it as receiver-SMTP. The client- SMTP will start the session and
the receiver-SMTP will respond to the request.
FTP
FTP stands for File transfer protocol.
FTP is a standard internet protocol provided by TCP/IP used for transmitting
the files from one host to another.
It is mainly used for transferring the web page files from their creator to the
computer that acts as a server for other computers on the internet.
It is also used for downloading the files to computer from other servers.
Objectives of FTP
It provides the sharing of files.
It is used to encourage the use of remote computers.
It transfers the data more reliably and efficiently.
Why FTP?
Although transferring files from one system to another is very simple and
straightforward, but sometimes it can cause problems. For example, two
systems may have different file conventions. Two systems may have different
ways to represent text and data. Two systems may have different directory
structures. FTP protocol overcomes these problems by establishing two
connections between hosts. One connection is used for data transfer, and
another connection is used for the control connection.
Simple Network Management Protocol (SNMP) :
SNMP is an application layer protocol which uses UDP port number
161/[Link] is used to monitor network, detect network faults and
sometimes even used to configure remote devices.
File Transfer Protocol (FTP): File Transfer Protocol(FTP) is an application layer
protocol which moves files between local and remote file systems. It runs on
the top of TCP, like HTTP. To transfer a file, 2 TCP connections are used by FTP
in parallel: control connection and data connection.
Hypertext Transfer Protocol (HTTP): is an application-level protocol that uses
TCP as an underlying transport and typically runs on port 80. HTTP is a stateless
protocol i.e. server maintains no information about past client requests.

Fragmentation vs segmentation:
Fragmentation is associated with IP whereas Segmentation is associated
with TCP.
First of all let us consider Segmentation : Suppose an application say wants to
send some data of say size 5MB. Now this data has to pass through the TCP/IP
stack so that it can can get delivered to the destination. The TCP/IP stack
consists of the following layers : Application , Transport , Internet and Physical
Network Layer. Now the Application layer is the one passing the data to the
next layers. When the data reaches the Transport layer, the datagram that is
produced by the Transport layer has some maximum size limit know as
Maximum Segment Size (MSS), i.e., the size of the datagram in Transport Layer
cannot exceed this size limit, and if a datagram from application layers arrives
to the Transport layer with a size greater than the Transport Layer Datagram
size, then what it does is, it splits the datagram into small size packets such
that the new size is equal to or less than the size of the TL Datagram, and as
such multiple datagrams are generated out of a given datagram. This is nothing
but Segmentation, Segmenting the data sent by Application Layer into smaller
size datagrams.

Same is the case with the Internet Layer. Datagram sent by Transport Layer to
the Internet Layer need to get further down the TCP/IP stack and as such
needs to get into the Physical Network Layer. Now the amount of data that can
be sent through the Physical Layer is also based on the type of medium that is
being used. Maximum Transmission Unit is the factor that defines how many
bytes of data that can be sent through the Physical Layer Medium. So if the
datagram at the Internet Layer has a size greater than the MTU, and if the Do
Not Fragment Bit in the IP Datagram is off, in that scenario the datagram will
be fragmented, i.e. it will be split into smaller size IP Datagrams. And if the Do
Not Fragment Flag is turned On in the IP Datagram , then an ICMP Error
message will be delivered to the sender, as the Internet Layer would have to
drop the datagram. This is Fragmentation in the Internet Layer.

With

You might also like