You are on page 1of 63

• In large networks, there can be multiple paths

from sender to receiver. The switching


technique will decide the best route for data
transmission.
• Switching technique is used to connect the
systems for making one-to-one
communication
Circuit Switching
• Circuit switching is a switching technique that
establishes a dedicated path between sender and
receiver.
• In the Circuit Switching Technique, once the
connection is established then the dedicated path will
remain to exist until the connection is terminated.
• Circuit switching in a network operates in a similar way
as the telephone works.
• A complete end-to-end path must exist before the
communication takes place.
Circuit Switching
• In case of circuit switching technique, when any user
wants to send the data, voice, video, a request signal
is sent to the receiver then the receiver sends back
the acknowledgment to ensure the availability of the
dedicated path. After receiving the acknowledgment,
dedicated path transfers the data.
• Circuit switching is used in public telephone network.
It is used for voice transmission.
• Fixed data can be transferred at a time in circuit
switching technology.
• Communication through circuit switching has
3 phases:
• Circuit establishment
• Data transfer
• Circuit Disconnect
Advantages Of Circuit Switching:
• In the case of Circuit Switching technique, the
communication channel is dedicated.
• It has fixed bandwidth.
Disadvantages Of Circuit Switching:
• Once the dedicated path is established, the only delay occurs
in the speed of data transmission.
• It takes a long time to establish a connection approx 10
seconds during which no data can be transmitted.
• It is more expensive than other switching techniques as a
dedicated path is required for each connection.
• It is inefficient to use because once the path is established
and no data is transferred, then the capacity of the path is
wasted.
• In this case, the connection is dedicated therefore no other
data can be transferred even if the channel is free.
Message 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 Switching
• 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.
Packet Switching
• The packet switching is a switching technique in
which the message is sent in one go, but it is divided
into smaller pieces, and they are sent individually.
• The message splits into smaller pieces known as
packets and packets are given a unique number to
identify their order at the receiving end.
• Every packet contains some information in its
headers such as source address, destination address
and sequence number.
Packet Switching
• Packets will travel across the network, taking
the shortest path as possible.
• All the packets are reassembled at the receiving
end in correct order.
• If any packet is missing or corrupted, then the
message will be sent to resend the message.
• If the correct order of the packets is reached,
then the acknowledgment message will be sent.
Packet Switching
Datagram Packet switching:
• It is a packet switching technology in which packet is known as a
datagram, is considered as an independent entity. Each packet
contains the information about the destination and switch uses
this information to forward the packet to the correct destination.
• The packets are reassembled at the receiving end in correct
order.
• In Datagram Packet Switching technique, the path is not fixed.
• Intermediate nodes take the routing decisions to forward the
packets.
• Datagram Packet Switching is also known as connectionless
switching.
Virtual Circuit Switching
• Virtual Circuit Switching is also known as
connection-oriented switching.
• In the case of Virtual circuit switching, a preplanned
route is established before the messages are sent.
• Call request and call accept packets are used to
establish the connection between sender and
receiver.
• In this case, the path is fixed for the duration of a
logical connection
Virtual Circuit Switching

•diagram, A and B are the


sender and receiver
respectively. 1 and 2 are the
nodes.
•Call request and call accept
packets are used to establish
a connection between the
sender and receiver.
•When a route is established,
data will be transferred.
Virtual Circuit Switching
•After transmission of data,
an acknowledgment signal
is sent by the receiver that
the message has been
received.
•If the user wants to
terminate the connection,
a clear signal is sent for the
termination.
Differences b/w Datagram approach and Virtual Circuit approach

Datagram approach Virtual Circuit approach


• Node takes routing • Node does not take any
decisions to forward routing decision.
the packets. • Congestion can occur
• Congestion cannot when the node is busy,
occur as all the packets and it does not allow
travel in different other packets to pass
directions through
• It is more flexible as all • It is not very flexible
the packets are treated
as an independent
entity
Advantages Of Packet Switching:

• Cost-effective: In packet switching technique, switching devices


do not require massive secondary storage to store the packets,
so cost is minimized to some extent. Therefore, we can say that
the packet switching technique is a cost-effective technique.
• Reliable: If any node is busy, then the packets can be rerouted.
This ensures that the Packet Switching technique provides
reliable communication.
• Efficient: Packet Switching is an efficient technique. It does not
require any established path prior to the transmission, and many
users can use the same communication channel simultaneously,
hence makes use of available bandwidth very efficiently.
Disadvantages Of Packet Switching:
• Packet Switching technique cannot be implemented
in those applications that require low delay and high-
quality services.
• The protocols used in a packet switching technique
are very complex and requires high implementation
cost.
• If the network is overloaded or corrupted, then it
requires retransmission of lost packets. It can also
lead to the loss of critical information if errors are
nor recovered
IPv4 Datagram Header
• VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4
• HLEN: IP header length (4 bits), which is the number of 32 bit words in the
header. The minimum value for this field is 5 and the maximum is 15.
• Type of service: Low Delay, High Throughput, Reliability (8 bits)
• Total Length: Length of header + Data (16 bits), which has a minimum
value 20 bytes and the maximum is 65,535 bytes.
• Identification: Unique Packet Id for identifying the group of fragments of a
single IP datagram (16 bits)
• Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment
flag, more fragments flag (same order)
• Fragment Offset: Represents the number of Data Bytes ahead of the
particular fragment in the particular Datagram. Specified in terms of
number of 8 bytes, which has the maximum value of 65,528 bytes.
• Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop
through the network by restricting the number of Hops taken by a Packet
before delivering to the Destination.
• Protocol: Name of the protocol to which the data is to be passed (8 bits)
An IP datagram can encapsulate data from several higher level protocols
such as TCP, UDP, ICMP, and IGMP.
• Header Checksum: 16 bits header checksum for checking errors in the
datagram header

Source IP address: 32 bits IP address of the sender
• Destination IP address: 32 bits IP address of the receiver
• Option: Optional information such as source route, record route. Used by
the Network administrator to check whether a path is working or not.
Classful Addressing
• The 32 bit IP address is divided into five sub-
classes. These are:
• Class A
• Class B
• Class C
• Class D
• Class E
• Each of these classes has a valid range of IP addresses. Classes D
and E are reserved for multicast and experimental purposes
respectively. The order of bits in the first octet determine the
classes of IP address.
IPv4 address is divided into two parts:
• Network ID
• Host ID
• The class of IP address is used to determine the bits used for
network ID and host ID and the number of total networks and
hosts possible in that particular class. Each ISP or network
administrator assigns IP address to each device that is connected
to its network
• IP addresses are globally managed by Internet
Assigned Numbers Authority(IANA) and
regional Internet registries(RIR).
• While finding the total number of host IP
addresses, 2 IP addresses are not counted and
are therefore, decreased from the total count
because the first IP address of any network is
the network number and whereas the last IP
address is reserved for broadcast IP.
Class A:
• IP address belonging to class A are assigned to the networks that contain
a large number of hosts.
• The network ID is 8 bits long.
• The host ID is 24 bits long.
• The higher order bit of the first octet in class A is always set to 0. The
remaining 7 bits in first octet are used to determine network ID. The 24
bits of host ID are used to determine the host in any network. The
default subnet mask for class A is 255.x.x.x. Therefore, class A has a total
of:
• 2^7-2= 126 network ID(Here 2 address is subracted because 0.0.0.0 and
127.x.y.z are special address. )
• 2^24 – 2 = 16,777,214 host ID
• IP addresses belonging to class A ranges from 1.x.x.x – 126.x.x.x
Class B:
• IP address belonging to class B are assigned to the networks that
ranges from medium-sized to large-sized networks.
• The network ID is 16 bits long.
• The host ID is 16 bits long.
• The higher order bits of the first octet of IP addresses of class B are
always set to 10. The remaining 14 bits are used to determine
network ID. The 16 bits of host ID is used to determine the host in
any network. The default sub-net mask for class B is 255.255.x.x.
Class B has a total of:
• 2^14 = 16384 network address
• 2^16 – 2 = 65534 host address
• IP addresses belonging to class B ranges from 128.0.x.x – 191.255.x.x
Class C:
• IP address belonging to class C are assigned to small-sized networks.
– The network ID is 24 bits long.
– The host ID is 8 bits long.
• The higher order bits of the first octet of IP addresses of class C are
always set to 110. The remaining 21 bits are used to determine network
ID. The 8 bits of host ID is used to determine the host in any network.
The default sub-net mask for class C is 255.255.255.x. Class C has a total
of:

– 2^21 = 2097152 network address


– 2^8 – 2 = 254 host address
• IP addresses belonging to class C ranges from 192.0.0.x – 223.255.255.x.
Class D:
• IP address belonging to class D are reserved for
multi-casting. The higher order bits of the first
octet of IP addresses belonging to class D are
always set to 1110. The remaining bits are for
the address that interested hosts recognize.
• Class D does not posses any sub-net mask. IP
addresses belonging to class D ranges from
224.0.0.0 – 239.255.255.255.
Class E:
• IP addresses belonging to class E are reserved
for experimental and research purposes. IP
addresses of class E ranges from 240.0.0.0 –
255.255.255.254. This class doesn’t have any
sub-net mask. The higher order bits of first
octet of class E are always set to 1111.
• Range of special IP addresses:
• 169.254.0.0 – 169.254.0.16 : Link local
addresses
127.0.0.0 – 127.0.0.8 : Loop-back addresses
0.0.0.0 – 0.0.0.8 : used to communicate within
the current network.
Rules for assigning Host ID
• Within any network, the host ID must be unique
to that network.
• Host ID in which all bits are set to 0 cannot be
assigned because this host ID is used to
represent the network ID of the IP address.
• Host ID in which all bits are set to 1 cannot be
assigned because this host ID is reserved as a
broadcast address to send packets to all the
hosts present on that particular network.
Rules for assigning Network ID:
• Hosts that are located on the same physical
network are identified by the network ID, as
all host on the same physical network is
assigned the same network ID. The network ID
is assigned based on the following rules:
• The network ID cannot start with 127 because
127 belongs to class A address and is reserved
for internal loop-back functions.
• All bits of network ID set to 1 are reserved for
use as an IP broadcast address and therefore,
cannot be used.
• All bits of network ID set to 0 are used to
denote a specific host on the local network and
are not routed and therefore, aren’t used.
• Problems with Classful Addressing:
• The problem with this classful addressing method is that
millions of class A address are wasted, many of the class B
address are wasted, whereas, number of addresses
available in class C is so small that it cannot cater the
needs of organizations. Class D addresses are used for
multicast routing and are therefore available as a single
block only. Class E addresses are reserved.
• Since there are these problems, Classful networking was
replaced by Classless Inter-Domain Routing (CIDR) in 1993
• Larger Address Space
• In contrast to IPv4, IPv6 uses 4 times more bits to address a device on the Internet.
This much of extra bits can provide approximately 3.4×10 38 different combinations of
addresses. This address can accumulate the aggressive requirement of address
allotment for almost everything in this world. According to an estimate, 1564
addresses can be allocated to every square meter of this earth.
• Simplified Header
• IPv6’s header has been simplified by moving all unnecessary information and options
(which are present in IPv4 header) to the end of the IPv6 header. IPv6 header is only
twice as bigger than IPv4 provided the fact that IPv6 address is four times longer
• End-to-end Connectivity
• Every system now has unique IP address and can traverse through the Internet
without using NAT or other translating components. After IPv6 is fully implemented,
every host can directly reach other hosts on the Internet, with some limitations
involved like Firewall, organization policies, etc.
• Auto-configuration
• IPv6 supports both stateful and stateless auto configuration mode of
its host devices. This way, absence of a DHCP server does not put a
halt on inter segment communication
• Faster Forwarding/Routing
• Simplified header puts all unnecessary information at the end of the
header. The information contained in the first part of the header is
adequate for a Router to take routing decisions, thus making routing
decision as quickly as looking at the mandatory header
• IPSec
• Initially it was decided that IPv6 must have IPSec security, making it
more secure than IPv4. This feature has now been made optional
• No Broadcast
• Though Ethernet/Token Ring are considered as broadcast network
because they support Broadcasting, IPv6 does not have any
broadcast support any more. It uses multicast to communicate with
multiple hosts.
• Anycast Support
• This is another characteristic of IPv6. IPv6 has introduced Anycast
mode of packet routing. In this mode, multiple interfaces over the
Internet are assigned same Anycast IP address. Routers, while
routing, send the packet to the nearest destination
• IPv4 and IPv6 cannot communicate with other but can exist
together on the same network. This is known as Dual Stack.
• Unicast
• In unicast mode of addressing, an IPv6 interface (host) is uniquely
identified in a network segment. The IPv6 packet contains both source and
destination IP addresses. A host interface is equipped with an IP address
which is unique in that network segment.When a network switch or a
router receives a unicast IP packet, destined to a single host, it sends out
one of its outgoing interface which connects to that particular host
• Multicast
• The IPv6 multicast mode is same as that of IPv4. The packet destined to
multiple hosts is sent on a special multicast address. All the hosts interested
in that multicast information, need to join that multicast group first. All the
interfaces that joined the group receive the multicast packet and process it,
while other hosts not interested in multicast packets ignore the multicast
information
• Anycast
• IPv6 has introduced a new type of addressing, which is called Anycast addressing. In this
addressing mode, multiple interfaces (hosts) are assigned same Anycast IP address. When
a host wishes to communicate with a host equipped with an Anycast IP address, it sends a
Unicast message. With the help of complex routing mechanism, that Unicast message is
delivered to the host closest to the Sender in terms of Routing cost.
• Let’s take an example of TutorialPoints.com Web Servers, located in all continents.
Assume that all the Web Servers are assigned a single IPv6 Anycast IP Address. Now when
a user from Europe wants to reach TutorialsPoint.com the DNS points to the server that is
physically located in Europe itself. If a user from India tries to reach Tutorialspoint.com,
the DNS will then point to the Web Server physically located in Asia. Nearest or Closest
terms are used in terms of Routing Cost
IPv6 has reserved a few addresses and
address notations for special purposes
• As shown in the table, the address 0:0:0:0:0:0:0:0/128 does not specify
anything and is said to be an unspecified address. After simplifying, all the 0s
are compacted to ::/128.
• In IPv4, the address 0.0.0.0 with netmask 0.0.0.0 represents the default route.
The same concept is also applied to IPv6, address 0:0:0:0:0:0:0:0 with netmask
all 0s represents the default route. After applying IPv6 rule, this address is
compressed to ::/0.
• Loopback addresses in IPv4 are represented by 127.0.0.1 to 127.255.255.255
series. But in IPv6, only 0:0:0:0:0:0:0:1/128 represents the Loopback address.
After loopback address, it can be represented as ::1/128.
Basis for differencesI Pv4 IPv6

Size of IP address IPv4 is a 32-Bit IP Address. IPv6 is 128 Bit IP Address

IPv4 is a numeric address, IPv6 is an alphanumeric


address whose binary bits
Addressing method and its binary bits are
separated by a dot (.) are separated by a colon (:).
It also contains hexadecimal.
Number of header fields 12 8
Length of header filed 20 40
Does not have checksum
Checksum Has checksum fields fields
2001:0db8:0000:0000:0000:
Example 12.244.233.165 ff00:0042:7879
Unicast, broadcast, and Unicast, multicast, and
Type of Addresses
multicast. anycast.
IPv4 offers five different lPv6 allows storing an
Number of classes classes of IP Address. Class A unlimited number of IP
to E. Address.
You have to configure a
newly installed system In IPv6, the configuration is
Configuration optional, depending upon on
before it can communicate
with other systems. functions needed
VLSM support IPv4 support VLSM (Virtual Length IPv6 does not offer support for
Subnet Mask). VLSM.
Fragmentation is done by sending
Fragmentation and forwarding routes. Fragmentation is done by the sender.

Routing Information Protocol (RIP) RIP is a routing protocol supported RIP does not support IPv6. It uses
by the routed daemon. static routes.
Networks need to be configured
either manually or with DHCP. IPv4
Network Configuration had several overlays to handle IPv6 support autoconfiguration
capabilities.
Internet growth, which require more
maintenance efforts.
Widespread use of NAT (Network
address translation) devices which
allows single NAT address can mask It allows direct addressing because
Best feature thousands of non-routable of vast address Space.
addresses, making end-to-end
integrity achievable.
Address Mask Use for the designated network Not used.
from host portion.
SNMP is a protocol used for system
SNMP management. SNMP does not support IPv6.

Relatively constrained network IPv6 provides interoperability and


topologies to which move restrict
Mobility & Interoperability mobility capabilities which are
mobility and interoperability
embedded in network devices.
capabilities.
Security is dependent on IPSec(Internet Protocol Security) is
Security applications - IPv4 was not built into the IPv6 protocol, usable
designed with security in mind. with a proper key infrastructure.

Packet size Packet size 576 bytes required, 1208 bytes required without
fragmentation optional fragmentation
Allows from routers and
Packet fragmentation Sending hosts only
sending host
Does not identify packet Packet head contains Flow
flow for QoS handling Label field that specifies
Packet header
which includes checksum packet flow for QoS
options. handling
Address (A) records, maps Address (AAAA) records,
DNS records
hostnames maps hostnames
Stateless address
autoconfiguration using
Address configuration Manual or via DHCP Internet Control Message
Protocol version 6
(ICMPv6) or DHCPv6
Multicast Neighbour
IP to MAC resolution Broadcast ARP
Solicitation
Local subnet Group Internet Group Management Multicast Listener Discovery
management Protocol GMP) (MLD)
Does not have optional fields.
Optional Fields Has Optional Fields But Extension headers are
available.
Internet Protocol Security Internet Protocol Security
IPSec (IPSec) concerning network (IPSec) Concerning network
security is optional security is mandatory
Clients have approach DHCS A Client does not have to
Dynamic host configuration (Dynamic Host Configuration approach any such server as
Server server) whenever they want to they are given permanent
connect to a network. addresses.
Uses ARP(Address Resolution Uses NDP(Neighbour
Mapping Protocol) to map to MAC Discovery Protocol) to map to
address MAC address
IPv4 address uses the dot- IPv6 address is represented in
Combability with mobile decimal notation. That's why it hexadecimal, colon- separated
devices is not suitable for mobile notation. IPv6 is better suited
networks. to mobile networks.
KEY DIFFERENCE

• 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.
Address Structure
• An IPv6 address is made of 128 bits divided
into eight 16-bits blocks. Each block is then
converted into 4-digit Hexadecimal numbers
separated by colon symbols
• 2001:0000:3238:DFE1:0063:0000:0000:FEFB
Global Unicast Address

• This address type is equivalent to IPv4’s public address.


Global Unicast addresses in IPv6 are globally
identifiable and uniquely addressable.
• [Image: Global Unicast Address]Global Routing Prefix:
The most significant 48-bits are designated as Global
Routing Prefix which is assigned to specific
autonomous system. The three most significant bits of
Global Routing Prefix is always set to 00
Link-Local Address

• Auto-configured IPv6 address is known as Link-Local address. This


address always starts with FE80. The first 16 bits of link-local
address is always set to 1111 1110 1000 0000 (FE80). The next 48-
bits are set to 0, thus:
• [Image: Link-Local Address]Link-local addresses are used for
communication among IPv6 hosts on a link (broadcast segment)
only. These addresses are not routable, so a Router never forwards
these addresses outside the link
Unique-Local Address

• This type of IPv6 address is globally unique, but it should be


used in local communication. The second half of this address
contain Interface ID and the first half is divided among Prefix,
Local Bit, Global ID and Subnet ID.
• [Image: Unique-Local Address]Prefix is always set to 1111 110. L
bit, is set to 1 if the address is locally assigned. So far, the
meaning of L bit to 0 is not defined. Therefore, Unique Local
IPv6 address always starts with ‘FD’

You might also like