You are on page 1of 110

Computer Networks,

Internet Tech. &


Security

Unit - 2
Computer Network Switching

• Switched network: Series of interlinked nodes, called switches.


• Switches: Devices capable of creating temporary connections between two or more
devices linked to the switches . Some of these switches are connected to the end systems
( computers or telephones) . Others used only for routing
Computer Network Switching
CIRCUIT-SWITCHED NETWORKS

A circuit switched network consists of a ­set of switches


connected by physical links.
A connection between 2 stations is a dedicated path made of one or more
links.
However each connection uses only onededicated channel on
each link.
Each link is divided into n channels using FDM or
TDM
• Three phases are need to communicate two parties or multiple parties in a
conference call:

• Connection setup
• data transfer

• Connection teardown

• The setup phase: means creating dedicated channels between the switches.

• Data Transfer Phase: After the establishment of the dedicated circuit (channels), the two parties can
transfer data.

• Teardown Phase: When one of the parties needs to disconnect, a signal is sent to each switch to
release the resources
Example : when system A needs to connect to system M - A sends a setup request that includes the address of system M, to switch I. Switch I
finds a channel between itself and switch IV. Switch I then sends the request to switch IV, which finds a dedicated channel between itself and
switch III. Switch III informs system M of system A's intention at this time.
An acknowledgment from system M needs to be sent in the opposite direction to system A.
After system A receives this acknowledgment the connection established.

• Circuit switching takes place at the physical layer


• Data transferred between the two stations are not packetized. The data are a
continuous flow sent by the source station and received by the destination station

• There is no addressing involved during data transfer. Of course, there is end-


to-end addressing used during
• Efficiency
• circuit-switched networks are not so efficient as the resources are allocated
during the entire duration of the connection.

• These resources are unavailable to other connections.


Delay :
• PACKET SWITCHED NETWORK
•  
• Messages need to be divided into packets.
• Size of the packet is determined by the network and the governing protocol.
• no resource reservation, but allocated on demand.
• The allocation is done first come, first served based
• When a switch receives a packets , the packet must wait if there are other
packets being processed, this lack of reservation may create delay
DATAGRAM NETWORKS

• Each packet (called as datagrams in this approach) is treated independently of


all others

• All packets (or datagrams) belong to the same message may travel different
paths to reach their destination
• Datagram Switching is done at the network layer
• This approach can cause the datagrams of a transmission to arrive at their
destination out of order with different delays between the packets.
• Packets may also be lost or dropped because of a lack of resources.
• In most protocols, it is the responsibility of an upper- layer protocol to reorder
the datagrams or ask for lost datagrams before passing them on to the
application.
• The datagram networks are referred to connectionless networks. There are no
setup or teardown phases.

• How are the packets routed to their destination??


Routing table in a datagram network
• Each packet switch has a routing table which is based on the destination
address. The routing tables are dynamic and are updated periodically.

• The destination addresses and the corresponding forwarding output


ports are recorded in the tables.

• The destination address in the header of a packet in a datagram


network remains the same during the entire journey of the packet.

• When the switch receives the packet, this destination address is


examined; the routing table is consulted to find the corresponding port
through which the packet should be forwarded.
• Efficiency
• Better than that of a circuit-switched network.
• Resources are allocated only when there are packets to be transferred. If a source sends a packet and there is a delay of a
few minutes before another packet can be sent, the resources can be reallocated during these minutes for other packets
from other sources.

• Switching in the Internet is done by using the datagram approach to packet switching at the network layer

• Total delay =3T + 3t + WI + W2 Delay in a datagram network


• T: transmission times t: propagation delays
• (WI + W2) : waiting times
VIRTUAL-CIRCUIT NETWORKS
• It’s a cross between circuit switchednetwork and datagram network, and has some
characteristics of both
Characteristics
• Packets from a single message travel along the same path.
• Three phases to transfer data (set up, data transfer and tear down)
• Data are packetized and each packet carries an address in the header
• Resources can be allocated during setup phase
• Implemented in data link layer
• Virtual-circuit network Addressing

• Global addressing: - Source and destination needs unique addresses (used by the switches only to
create a virtual-circuit identifier ) during the set up phase

• Local addressing (virtual-circuit identifier –VCI): Actually used for data transfer

• A small address used by a frame between two switches.


• The switch, in the setup phase • Setup acknowledgement
acts as a packet switch ; it has a • When Destination B receives the
routing table used to know the up frame , and it is ready to receive
output port number frames from A, it assign a VCI (in
this case :77). This VCI lets the
destination know that the frames
comes from A not other sources.
Data Transfer and Tear down Phase

• After sending all frames, a special frame is send to end the connection
• Destination B responds with a teardown confirmation frame
Delay in Virtual Circuit switching
• Total delay = 3T+ 3t +setup delay +
teardown delay
• In datagram network, each packet may
experience a wait at a switch before it is
forwarded. In addition, the delay is not
uniform for the packets of a message.
• In a virtual-circuit network, there is a
one- time delay for setup and a one-
time delay for teardown. If resources
are allocated during the setup phase,
there is no wait time for individual
packets
Message switching
• It was a precursor of packet switching.
• Message Switching is a switching technique in which a message is transferred as a complete unit
and routed through intermediate nodes at which it is stored and forwarded.
• In Message Switching technique, there is no establishment of a dedicated path between the sender
and receiver.
• The destination address is appended to the message. Message Switching provides a dynamic routing
as the message is routed through the intermediate nodes based on the information available in the
message.
• Message switches are programmed in such a way so that they can provide the most efficient routes.
• Each and every node stores the entire message and then forward it to the next node. This type of
network is known as store and forward network.
• Message switching treats each message as an independent entity.
• Advantages Of Message Switching
• Data channels are shared among the communicating devices that improve the efficiency of using available bandwidth.

• Traffic congestion can be reduced because the message is temporarily stored in the nodes.

• Message priority can be used to manage the network.

• The size of the message which is sent over the network can be varied. Therefore, it supports the data of unlimited size.

• Disadvantages Of Message Switching


• The message switches must be equipped with sufficient storage to enable them to store the messages until the message
is forwarded.

• The Long delay can occur due to the storing and forwarding facility provided by the message switching technique.
Multiplexing
• Multiplexing is a technique used to combine and send the multiple data
streams over a single medium.
• The process of combining the data streams is known as multiplexing and
hardware used for multiplexing is known as a multiplexer.
• The purpose of multiplexing is to enable signals to be transmitted more
efficiently over a given communication channel, thereby decreasing
transmission costs..
The 'n' input lines are transmitted through a multiplexer and multiplexer combines the signals to form a
composite signal.

The composite signal is passed through a Demultiplexer and demultiplexer separates a signal to
component signals and transfers them to their respective destinations.
Advantages of Multiplexing:

• More than one signal can be sent over a single medium.


• The bandwidth of a medium can be utilized effectively.
• Reduce transmission costs..
Types of Multiplexing Techniques
• Frequency Division Multiplexing (FDM)
• Wavelength Division Multiplexing (WDM)
• Time Division Multiplexing (TDM)
Frequency Division Multiplexing
• In telecommunications, frequency-division multiplexing (FDM) is a technique by
which the total bandwidth available in a communication medium is divided into a
series of non-overlapping frequency bands, each of which is used to carry a separate
signal.
• It is an analog technique.
• FDM is commonly used in TV networks.
• It is used in FM and AM broadcasting. Each FM radio station has different
frequencies, and they are multiplexed to form a composite signal. The multiplexed
signal is transmitted in the air.
• Advantages Of FDM:
• FDM is used for analog signals.
• FDM process is very simple and easy modulation.
• A Large number of signals can be sent through an FDM simultaneously.
• It does not require any synchronization between sender and receiver.
• Disadvantages Of FDM:
• FDM technique is used only when low-speed channels are required.
• It suffers the problem of crosstalk.
• A Large number of modulators are required.
• It requires a high bandwidth channel.
Wavelength Division Multiplexing (WDM)
• Wavelength Division Multiplexing is same as FDM except that the optical signals are transmitted
through the fibre optic cable.
• WDM is used on fibre optics to increase the capacity of a single fibre.
• It is used to utilize the high data rate capability of fibre optic cable.
• It is an analog multiplexing technique.
• Optical signals from different source are combined to form a wider band of light with the help of
multiplexer.
• At the receiving end, demultiplexer separates the signals to transmit them to their respective
destinations.
• Multiplexing and Demultiplexing can be achieved by using a prism.
• Prism can perform a role of multiplexer by combining the various optical signals to form a composite
signal, and the composite signal is transmitted through a fibre optical cable.
• Prism also performs a reverse operation, i.e., demultiplexing the signal.
Time Division Multiplexing (TDM)
• It is a digital technique.
• In Frequency Division Multiplexing Technique, all signals operate at the same time with different frequency,
but in case of Time Division Multiplexing technique, all signals operate at the same frequency with different
time.
• In Time Division Multiplexing technique, the total time available in the channel is distributed among
different users. Therefore, each user is allocated with different time interval known as a Time slot at which
data is to be transmitted by the sender.
• A user takes control of the channel for a fixed amount of time.
• In Time Division Multiplexing technique, data is not transmitted simultaneously rather the data is transmitted
one-by-one.
• In TDM, the signal is transmitted in the form of frames. Frames contain a cycle of time slots in which each
frame contains one or more slots dedicated to each user.
• It can be used to multiplex both digital and analog signals but mainly used to multiplex digital signals.
Types of TDM:

• Synchronous TDM
• Asynchronous TDM
Synchronous TDM
• A Synchronous TDM is a technique in which time slot is preassigned to every device.

• In Synchronous TDM, each device is given some time slot irrespective of the fact that the device contains
the data or not.

• If the device does not have any data, then the slot will remain empty.

• In Synchronous TDM, signals are sent in the form of frames. Time slots are organized in the form of
frames. If a device does not have data for a particular time slot, then the empty slot will be transmitted.

• The most popular Synchronous TDM are T-1 multiplexing, ISDN multiplexing, and SONET
multiplexing.

• If there are n devices, then there are n slots.


 Disadvantages Of Synchronous TDM:
The capacity of the channel is not fully utilized as the empty slots are also transmitted which is having no
data.
In the above figure, the first frame is completely filled, but in the last two frames, some slots are empty.
Therefore, we can say that the capacity of the channel is not utilized efficiently.
The speed of the transmission medium should be greater than the total speed of the input lines.
An alternative approach to the Synchronous TDM is Asynchronous Time Division Multiplexing.
Asynchronous TDM
• An asynchronous TDM is also known as Statistical TDM.
• An asynchronous TDM is a technique in which time slots are not fixed as in the case of Synchronous
TDM. Time slots are allocated to only those devices which have the data to send. Therefore, we can
say that Asynchronous Time Division multiplexor transmits only the data from active workstations.
• An asynchronous TDM technique dynamically allocates the time slots to the devices.
• In Asynchronous TDM, total speed of the input lines can be greater than the capacity of the channel.
• Asynchronous Time Division multiplexor accepts the incoming data streams and creates a frame that
contains only data with no empty slots.
• In Asynchronous TDM, each slot contains an address part that identifies the source of the data.
Asynchronous TDM
• The difference between Asynchronous TDM and Synchronous TDM is that many
slots in Synchronous TDM are unutilized, but in Asynchronous TDM, slots are
fully utilized. This leads to the smaller transmission time and efficient utilization of
the capacity of the channel.
• In Synchronous TDM, if there are n sending devices, then there are n time slots. In
Asynchronous TDM, if there are n sending devices, then there are m time slots
where m is less than n (m<n).
• The number of slots in a frame depends on the statistical analysis of the number of
input lines.
Asynchronous TDM
SONET
• Synchronous optical networking and synchronous digital hierarchy are
standardized protocols that transfer multiple digital bit streams
synchronously over optical fibber using lasers or highly coherent light
from light-emitting diodes. At low transmission rates data can also be
transferred via an electrical interface.
• Synchronous optical networking (SONET) is a standardized digital
communication protocol that is used to transmit a large volume of data
over relatively long distances using a fiber optic medium.
SONET functional layers
• the photonic,
• the section,
• the line,
• the path layer.
• They correspond to both the physical and the data link layers .
• The path layer is responsible for the movement of a signal from its optical
source to its optical destination.
• At the optical source, the signal is changed from an electronic form into an
optical form, multiplexed with other signals, and encapsulated in a frame.
• At the optical destination, the received frame is demultiplexed, and the
individual optical signals are changed back into their electronic forms.
• Line Layer
• The line layer is responsible for the movement of a signal across a physical line.
Line layer overhead is added to the frame at this layer.
• Section Layer
• The section layer is responsible for the movement of a signal across a physical
section. It handles framing, scrambling, and error control.
• Photonic Layer
• The photonic layer corresponds to the physical layer of the OSI model.
• It includes physical specifications for the optical fibber channel, the sensitivity of
the receiver, multiplexing functions, and so on.
• SONET uses NRZ encoding with the presence of light representing 1 and the
absence of light representing 0.
Cellular network
• A cellular network or mobile network is a communication network where
the last link is wireless. The network is distributed over land areas called
"cells", each served by at least one fixed-location transceiver, but more
normally, three cell sites or base transceiver stations.
Working of Cellular Network
• Cell towers connect to each other to hand off packets of signals—data, voice, and
text messaging—ultimately bringing these signals to mobile devices such as
phones and tablets that act as receivers.
• A basic analog cellular system, consists of three subsystems: a mobile unit, a cell
site, and a mobile telephone switching office (MTSO), as Fig. ... Cell site. The cell
site provides interface between the MTSO and the mobile units. It has a control
unit, radio cabinets, antennas, a power plant, and data terminals.
Advantages of the cellular system

• High capacity.
• Reduced in process.
• Less transmission power.
• Reduced set up times.
• It reduced the interference which increases the total system capacity.
• It improved S/N ratio.
• Reduced the cluster size.
• More robust against the failure of single components.
Satellite Network
• Satellite Internet access is Internet access provided through communication satellites. Modern consumer
grade satellite Internet service is typically provided to individual users through geostationary satellites that
can offer relatively high data speeds
• Satellite networks are the key to staying connected, no matter where you go. 
• Satellite phones and other communication solutions use one of two types of networks. The first type, low
earth orbit (LEO) networks, are made up of multiple satellites orbiting Earth at an altitude of 1,000 miles or
less. These satellites are constantly on the move. So when one moves out of range, your communication is
handed off to another satellite that is within range.
• The second type is known as a geostationary or geosynchronus orbit (GEO) network. In this configuration,
satellites are placed at a higher altitude — about 22,000 miles above Earth – along the equator. They are set
to orbit at the same speed of Earth’s rotation, essentially keeping them stationary above us.
• A satellite is basically a self-contained communications system with the
ability to receive signals from Earth and to retransmit those signals back
with the use of a transponder—an integrated receiver and transmitter of
radio signals.
• Satellites provide information about Earth's clouds, oceans, land and air.
They also can observe wildfires, volcanoes and smoke. All this
information helps scientists predict weather and climate. It helps farmers
know what crops to plant.
IEEE
• Stands for the "Institute of Electrical and Electronics Engineers" and is
produced "I triple E." The IEEE is a professional association that
develops, defines, and reviews electronics and computer
science standards. Its mission is "to foster technological innovation and
excellence for the benefit of humanity.“
• Getting involved in IEEE standards provides you with opportunities to
network with industry peers and broaden your understanding of your
industry and technology, as well as gain familiarity with the content
of standards in which you are involved—facilitating early compliance
and anticipating market requirements.
IEEE 802

• IEEE 802 is a family of Institute of Electrical and Electronics Engineers


(IEEE) standards for local area networks (LAN), personal area network
(PAN), and metropolitan area networks (MAN).
• The number 802 has no significance: it was simply the next number in the
sequence that the IEEE used for standards projects.
Carrier-sense multiple access with collision de
tection
...
• Carrier-sense multiple access with collision detection (CSMA/CD) is a media access
control (MAC) method used most notably in early Ethernet technology for local area
networking. It uses carrier-sensing to defer transmissions until no other stations are
transmitting.
• When a device wants to gain access to the network, it checks to see if the network is free.
If the network is not free, the device waits a random amount of time before retrying.
• CSMA/CD is generally used in wired networks
• A collision occurs, and both devices stop transmission, wait for a random amount of time,
then retransmit.
the basic operating principles behind  CSMA/CD: Listen to medium, if no
one transmitting, transmit. Continue to listen for collisions. If someone is
transmitting, wait.
Carrier-sense multiple access with collision
avoidance (CSMA/CA)
• Carrier-sense multiple access with collision avoidance (CSMA/CA) in computer
networking, is a network multiple access method in which carrier sensing is used,
but nodes attempt to avoid collisions by beginning transmission only after the
channel is sensed to be “
• CSMA/CA is mainly used in wireless networks
• The algorithm of CSMA/CD is: When a frame is ready, the transmitting station
checks whether the channel is idle or busy. If the channel is busy, the station waits
until the channel becomes idle. If the channel is idle, the station starts transmitting
and continually monitors the channel to detect collision.idle".
Token Ring
• A token-ring network arranges nodes in a logical ring, as shown below.
The nodes forward frames in one direction around the ring, removing a
frame when it has circled the ring once. The ring initializes by creating
a token, which is a special type of frame that gives a station permission to
transmit.
• A token-ring network is a local area network (LAN) topology that sends
data in one direction throughout a specified number of locations by using
a token. The token is the symbol of authority for control of the
transmission line.
TOKEN BUS

• Token bus is a network implementing the token ring protocol over a virtual ring on


a coaxial cable.[1] A token is passed around the network nodes and only the node
possessing the token may transmit. If a node doesn't have anything to send, the
token is passed on to the next node on the virtual ring. Each node must know the
address of its neighbour in the ring, so a special protocol is needed to notify the
other nodes of connections to, and disconnections from, the ring.[
FDDI
• Fiber Distributed Data Interface (FDDI) is a set of ANSI and ISO
standards for transmission of data in local area network (LAN) over fiber
optic cables. It is applicable in large LANs that can extend up to 200
kilometers in diameter.
• Features
• FDDI uses optical fiber as its physical medium.
• It operates in the physical and medium access control (MAC layer) of the Open
Systems Interconnection (OSI) network model.
• It provides high data rate of 100 Mbps and can support thousands of users.
• It is used in LANs up to 200 kilometers for long distance voice and multimedia
communication.
• It uses ring based token passing mechanism and is derived from IEEE 802.4 token
bus standard.
• It contains two token rings, a primary ring for data and token transmission and a
secondary ring that provides backup if the primary ring fails.
• FDDI technology can also be used as a backbone for a wide area network (WAN).
Fiber Distributed Data Interface
Routing

• Routing is the process of selecting a path for traffic in a network or between or across

multiple networks. ... Packet forwarding is the transit of network packets from

one network interface to another.

• Intermediate nodes are typically network hardware devices such as routers, gateways,

firewalls, or switches.
Routing algorithms

• In order to transfer the packets from source to the destination, the network layer must

determine the best route through which packets can be transmitted. The routing protocol

is a routing algorithm that provides the best path from the source to the destination.

Types of Routing Algorithms

• Static or Dynamic Routing,
• Distributed or Centralized,
• Single path or Multi-path,
• Flat or Hierarchical,
• Intra Domain or Inter-Domain,
• link State or Distance Vector.
Distance-vector routing protocol
• A distance-vector routing protocol in data networks determines the best route for data packets based on distance. ...

• Distance-vector routing protocols measure the distance by the number of routers a packet has to pass, one router

counts as one hop. Some distance-vector protocols also take into account network latency and other factors that

influence traffic on a given route. To determine the best route across a network, routers, on which a distance-vector

protocol is implemented, exchange information with one another, usually routing tables plus hop counts for

destination networks and possibly other traffic information. Distance-vector routing protocols also require that a

router informs its neighbours of network topology changes periodically.


• The term distance vector refers to the fact that the protocol manipulates vectors (arrays) of

distances to other nodes in the network. The distance vector algorithm was the original 

ARPANET routing algorithm and was implemented more widely in local area networks with the 

Routing Information Protocol (RIP).

• Distance-vector routing protocols use the Bellman–Ford algorithm to calculate the best route


Distance Vector routing
• Least cost between each node
• Bellman ford A/g
• One routing table per node

• dx(y)=cost of least – cost of path from x to y


• Update distance
• dx(y)=min{ cost(x,v)+dv(y)}
D_Node Dis N_Node

B 3 B

C 6 B

D 10 B

E 10 B

F 7 F

     

Example from A to C
A,B–C =3+3=6
A,F,E - C = 7+4+4=15
A,F,B - C = 7+5+3= 15
A,F,E,D - C = 7 + 4+ 3+4 = 18
Link state routing

• Link state routing is a technique in which each router shares the knowledge of its
neighbourhood with every other router in the internetwork.
• The three keys to understand the Link State Routing algorithm:
• Knowledge about the neighbourhood: Instead of sending its routing table, a router sends
the information about its neighbourhood only. A router broadcast its identities and cost of the
directly attached links to other routers.
• Flooding: Each router sends the information to every other router on the internetwork except
its neighbours. This process is known as Flooding. Every router that receives the packet
sends the copies to all its neighbours. Finally, each and every router receives a copy of the
same information.
• Information sharing: A router sends the information to every other router only when the
change occurs in the information.
• Link State Routing has two phases:

• Reliable Flooding
• Initial state: Each node knows the cost of its neighbours.

• Final state: Each node knows the entire graph.

• Route Calculation
• Each node uses Dijkstra's algorithm on the graph to calculate the optimal routes to all nodes.

• The Link state routing algorithm is also known as Dijkstra's algorithm which is used to find the shortest path from
one node to every other node in the network.

• The Dijkstra's algorithm is an iterative, and it has the property that after k th iteration of the algorithm, the least cost
paths are well known for k destination nodes.
• some notations:

• c( i , j): Link cost from node i to node j. If i and j nodes are not directly linked, then c(i , j) = ∞.

• D(v): It defines the cost of the path from source node to destination v that has the least cost currently.

• P(v): It defines the previous node (neighbour of v) along with current least cost path from source to v.

• N: It is the total number of nodes available in the network.


Step 1:
The first step is an initialization step. The currently known least cost path from A to its directly attached
neighbours, B, C, D are 2,5,1 respectively. The cost from A to B is set to 2, from A to D is set to 1 and from A to
C is set to 5. The cost from A to E and F are set to infinity as they are not directly linked to A.


• Step 2:
• In the above table, we observe that vertex D contains the least cost path in step 1. Therefore, it is
added in N. Now, we need to determine a least-cost path through D vertex.
• This way find out shortest path through all nodes then get a final Table

Step N D(B),P(B D(C),P(C D(D),P(D D(E),P(E) D(F),P(F)


) ) )

1 A 2,A 5,A 1,A ∞ ∞

2 AD 2,A 4,D 2,D ∞

3 ADE 2,A 3,E 4,E

4 ADEB 3,E 4,E

5 ADEBC 4,E

6 ADEBCF
TCP/IP
• TCP/IP means Transmission Control Protocol and Internet Protocol.
• It is the network model used in the current Internet architecture as well.
• Protocols are set of rules which govern every possible communication over a network.
• These protocols describe the movement of data between the source and destination or the
internet.

• These protocols offer simple naming and addressing schemes.


• TCP/IP that is Transmission Control Protocol and Internet Protocol was developed by
Department of Defence's Project Research Agency (ARPA, later DARPA) as a part of a
research project of network interconnection to connect remote machines.
Overview
• Flexible architecture: Adding more machines to a network was easy.
• Robust: Connections remained intact until the source and destination machines
were functioning.

• Communication: The overall idea was to allow one application on one computer
send data packets another application running on different computer.
Architectures


Functions of each layers
• Layer 1: Host-to-network Layer
• Lowest layer.
• Protocol is used to connect to the host, so that the packets can be sent over it.
• Varies from host to host and network to network.
• Layer 2: Internet layer
• Selection of a packet switching network which is based on a connectionless
internetwork layer is called a internet layer.
• It is the layer which holds the whole architecture together.
• It helps the packet to travel independently to the destination.
• Order in which packets are received is different from the way they are sent.
• IP (Internet Protocol) is used in this layer.
• Layer 3: Transport Layer
• It decides if data transmission should be on parallel path or single path.
• Functions such as multiplexing, segmenting or splitting on the data is done by transport
layer.

• The applications can read and write to the transport layer.


• Transport layer adds header information to the data.
• Transport layer breaks the message (data) into small units so that they are handled more
efficiently by the network layer.

• Transport layer also arrange the packets to be sent, in sequence.


• Layer 4: Application Layer

• The TCP/IP specifications described a lot of applications that were at the top of the

protocol stack.

• Some of them were TELNET, FTP, SMTP, DNS etc.

• TELNET is a two-way communication protocol which allows connecting to a

remote machine and run applications on it.


Protocols

• FTP(File Transfer Protocol) is a protocol, that allows File transfer amongst

computer users connected over a network. It is reliable, simple and efficient.

• SMTP(Simple Mail Transport Protocol) is a protocol, which is used to transport

electronic mail between a source and destination, directed via a route.

• DNS(Domain Name Server) resolves an IP address into a textual address for Hosts

connected over a network.




Sr. No. OSI TCP / IP

1 OSI model Developed after TCP/IP TCP/IP model Developed before OSI
2 OSI model has 7 layers TCP/IP has 4 layers
3 OSI model developed before protocols TCP/IP model developed after protocols
of OSI were developed of TCP/IP were developed

4 OSI differentiates Services , protocols TCP/IP doesn’t differentiate them.


and interfaces.

5 Connection oriented and Connection oriented and connectionless


connectionless in network layer and in transport layer and connection
connection oriented in transport layer oriented in network layer in tcp / ip
in OSI model model
IP addressing
• An IP (Internet Protocol) Address is the numerical identification (logical address) used to identify a
unique host on a network, the same as a telephone number that uniquely identifies a single phone. As

devices send information across a network, a process will add the Source and Destination IP Address

to each packet sent. IP Addresses are

sent as binary numbers by the devices on the network, but they are typically displayed in human-

readable notations (decimal) such as 192.168.100.1. The decimal format makes it easier for people,

rather than the 32-bit long binary equivalent.


• An IP Address is divided into (4) octets each divided by a period – Octet1.
Octet2. Octet3. Octet4. This method is used to make working with IP Addresses a
little easier for people; the periods used to separate the octets have no relevance
to networking hardware, a network device “sees” IP Addresses as a string of bits,
binary.

• Each of the 4 Octets are made up of 8 binary bits (one byte). The formula 28 =
256 dictates that the largest number for any octet would be 255. Counting always
starts with zero, 0 → 255 = 256 unique addresses per octet. You can address 256
things 0 → 255, but you cannot count to the decimal number 256, the count starts
with 0 not 1.
• An IP address serves two main functions: host or network interface identification and location
addressing. 

• Internet Protocol version 4 (IPv4) defines an IP address as a 32-bit number.

• a new version of IP (IPv6), using 128 bits for the IP address

• IP addresses are written and displayed in human-readable notations, such as 172.16.254.1 in IPv4,


and 2001:db8:0:1234:0:567:8:1 in IPv6. 

• Two addresses that cannot be used in your example are 192.168.123.0 and 192.168.123.255 because
binary addresses with a host portion of all ones and all zeros are invalid. The zero address is invalid
because it is used to specify a network without specifying a host. The 255 address is used to broadcast
a message to every host on a network. Just remember that the first and last address in any network or
subnet cannot be assigned to any individual host.
IP Address
A device’s IP address actually consists of two separate parts:
Network ID: The network ID is a part of the IP address starting from the left that identifies the specific
network on which the device is located. On a typical home network, where a device has the IP address
192.168.1.34, the 192.168.1 part of the address will be the network ID. It’s custom to fill in the missing
final part with a zero, so we might say that the network ID of the device is 192.168.1.0.
Host ID: The host ID is the part of the IP address not taken up by the network ID. It identifies a specific
device on that network. Continuing our example of the IP address 192.168.1.34, the host ID would be 34
—the host’s unique ID on the 192.168.1.0 network.
subnet and subnet mask
• A subnetwork or subnet is a logical subdivision of an IP network. The practice of dividing
a network into two or more networks is called subnetting. Computers that belong to a subnet are
addressed with an identical most-significant bit-group in their IP addresses.
• Subnetting is the practice of dividing up a network into two or more networks.
Common advantages of subnetting include enhancing routing efficiency, network management
control, and improving network security.
• A subnet mask is used to divide an IP address into two parts. One part identifies the host
(computer), the other part identifies the network to which it belongs. 
• The subnet mask is used by the TCP/IP protocol to determine whether a host is on the local subnet
or on a remote network.
• The first 24 bits (the number of ones in the subnet mask) are identified as the network address, with the last 8 bits
(the number of remaining zeros in the subnet mask) identified as the host address. This gives you the following:
• 11000000.10101000.01111011.00000000 -- Network address (192.168.123.0)
• 00000000.00000000.00000000.10000100 -- Host address (000.000.000.132)
• So now you know, for this example using a 255.255.255.0 subnet mask, that the network ID is 192.168.123.0, and
the host address is 0.0.0.132. When a packet arrives on the 192.168.123.0 subnet (from the local subnet or a remote
network), and it has a destination address of 192.168.123.132, your computer will receive it from the network and
process it.
• Almost all decimal subnet masks convert to binary numbers that are all ones on the left and all zeros on the right.
Some other common subnet masks are:
• Decimal Binary 255.255.255.192 1111111.11111111.1111111.11000000 255.255.255.224
1111111.11111111.1111111.11100000
• Internet RFC 1878 (available from InterNIC
-Public Information Regarding Internet Domain Name Registration Services) describes the valid subnets and
subnet masks that can be used on TCP/IP networks.
• You should now be able to give IP addresses to 254 hosts. This works fine if all 150
computers are on a single network. However, your 150 computers are on three separate
physical networks. Instead of requesting more address blocks for each network, you
divide your network into subnets that enable you to use one block of addresses on
multiple physical networks.

• Using a subnet mask of 255.255.255.192, your 192.168.123.0 network then becomes the
four networks 192.168.123.0, 192.168.123.64, 192.168.123.128 and 192.168.123.192.
These four networks would have as valid host addresses:

• 192.168.123.1-62 192.168.123.65-126 192.168.123.129-190 192.168.123.193-254


IP addressing-classes
• Class A IP addresses are used for huge networks, like those deployed by Internet Service Providers (ISPs). Class A IP
addresses support up to 16 million hosts (hosts are devices that connect to a network (computers, servers, switches,
routers, printers…etc.) and a Class A network can be divided into 128 different networks.

Class B IP addresses are used for medium and large-sized networks in enterprises and organizations. They support up to
65,000 hosts on 16,000 individual networks.

Class C addresses are most common and used in small business and home networks. These support up to 256 hosts on
each of 2 million networks.
 class D for multicast and class E for experimental purposes
Class D and E addresses are least used. Class D is reserved for a not widely used, and reserved for special cases largely
for services and applications to stream audio and video to many subscribers at once. Class E addresses are reserved for
research purposes by those responsible for Internet networking and IP address research, management, and development.
IPV4
Features of IPv4

• Connectionless Protocol.
• Allow creating a simple virtual communication layer over diversified devices.
• It requires less memory, and ease of remembering addresses.
• Already supported protocol by millions of devices.
• Offers video libraries and conferences.
IPV6
• Internet Protocol version 6 is the most recent version of the Internet Protocol, the communications protocol
that provides an identification and location system for computers on networks and routes traffic across the
Internet.
Major Features of IPv6

• Expanded Addressing. IP address size increases from 32 bits in IPv4 to 128 bits in IPv6, to support
more levels of addressing hierarchy. ...

• Address Auto-configuration and Neighbour Discovery. ...

• Header Format Simplification. ...

• Improved Support for IP Header Options. ...

• Application Support for IPv6 Addressing. ...

• Additional IPv6 Resources.

• Support for quality of service (QoS)

• An ideal protocol for neighbouring node interaction


IPV4 v/s IPV6

• IPv4 is 32-Bit IP address whereas IPv6 is a 128-Bit IP address.


• IPv4 is a numeric addressing method whereas IPv6 is an alphanumeric addressing method.
• IPv4 binary bits are separated by a dot(.) whereas IPv6 binary bits are separated by a colon(:).
• IPv4 offers 12 header fields whereas IPv6 offers 8 header fields.
• IPv4 supports broadcast whereas IPv6 doesn’t support broadcast.
• IPv4 has checksum fields while IPv6 doesn’t have checksum fields
• IPv4 supports VLSM (Virtual Length Subnet Mask) whereas IPv6 doesn’t support VLSM.
• IPv4 uses ARP (Address Resolution Protocol) to map to MAC address whereas IPv6 uses NDP (Neighbour
Discovery Protocol) to map to MAC address.

• https://www.guru99.com/difference-ipv4-vs-ipv6.html#:~:text=KEY%20DIFFERENCE,separated%20by%20a
%20colon(%3A).
y o u
Th an k

You might also like