SlideShare uma empresa Scribd logo
1 de 173
Baixar para ler offline
Network Layer
• https://www.youtube.com/watch?v=vv4y_uOneC0
Comparison Chart
BASIS FOR
COMPARISON
LOGICAL ADDRESS PHYSICAL ADDRESS
Basic
It is the virtual address generated
by CPU
The physical address is a location
in a memory unit.
Address Space
Set of all logical addresses
generated by CPU in reference to
a program is referred as Logical
Address Space.
Set of all physical addresses
mapped to the corresponding
logical addresses is referred as
Physical Address.
Visibility
The user can view the logical
address of a program.
The user can never view physical
address of program
Access
The user uses the logical address
to access the physical address.
The user can not directly access
physical address.
Generation
The Logical Address is generated
by the CPU
Physical Address is Computed by
MMU
Network Layer – Logical Addressing
• In this lesson, you will learn about logical addressing
scheme of networking layer, this layer deals with IP
addressing and has a class based and class addressing
scheme.
Logical Addressing
• Network layer protocols use logical addressing,
where a given device can have multiple possible
addresses.
• IP is a packet-switched protocol.
• IP is a connectionless protocol - each packet is
treated separately.
• No flow or error control - best-effort for delivery.
• Being paired with TCP makes it reliable.
Internet Protocol
The network layer
• The purpose of the physical layer is to provide a
physical mechanism for transmitting data as signals.
• The purpose of the data link layer is to ensure the
integrity of the data sent over a given physical link
(such as MAC or NIC addresses).
• The purpose of the network layer is to provide a
mechanism for data to be sent from one device to
another over a route that might span many different
physical links.
• Routing is the process by which data is directed across
multiple links from one host to another.
IP Addresses
• Each connection to the Internet is given an IP address of
some form or another.
• No two connections on the Internet can have the same IP
address at the same time.
• However, these are still logical addresses because a given
connection’s IP address can change, or it can be
reassigned to a new device if the first one is disconnected
from the Internet.
• If a given device has multiple connections to the internet
(such as a router), each connection needs its own IP
address.
• All current IP addresses are 4 bytes.
• Once upon a time, IP address were arranged somewhat
hierarchically:
• The first byte would indicate the class of the site, usually reflective of its
size.
• The second byte would further uniquely identify the site.
• The third byte would be the subnet within the site.
• The fourth byte would specify the actual machine.
• This was wasteful. Small organizations did not need 65,546 IP
addresses. Lots of potential addresses were being wasted.
• This was fine when the number of machines connected to
the internet could be measured in the hundred-thousands.
Addressing
Network Addresses
• An IP address has network address of which we need to find
the first and last address for two reasons –
• first address is address of routing or hub device and
• last address gives the total size of a block of addresses.
Internet Protocol (IP)
• Switching at the network layer in the Internet uses the datagram
approach
• Communication at the network layer in the Internet is connectionless
• Position of IPv4 in TCP/IP protocol suite
Internet Protocol (IP)
• IP: Host-to-host network layer delivery protocol
• Unreliable and connectionless datagram protocol for a best-effort delivery
service
IP Header : Version: IPv6, IPv4
• Differentiated services defines the class of the datagram for Quality of
Service (QoS)
• Time to live (TTL): Used to control the max. number of hops (router) visited
by the datagram
IPv4 Addresses
• An IPv4 address is 32 bit address that uniquely and universally
defines the connection of a device.
• Unique means no two devices can have same address at the
same time on Internet.
Address Space
• It is the total number of addresses used by IPv4 protocol.
• If N bit address is used, the total addresses in the address space
will be 2N.
• IPv4 uses 32 bit addresses then the total number of addresses in
the address space is
•232 = 4,29,49,67,296
What is IPv4 ?
1. An IP2v4 address has 32 bits. (Binary Notation)
10000000. 00001011. 00000011. 00011111
NOTE:-Above notation is representation of IPv4 address in binary
format.
2. Another notation is Dotted Decimal Notation
128.11.3.31
NOTE:- Above notation is representation of IPv4 address in
dotted decimal notation.
3. Each of the octet range 0 to 255.
4. IPv4 address are unique and universal.
Types of IP addressing
• Classful addressing
• Classless Addressing
Classful Addressing
Class
First
Octet
Second
octet
Third
octet
Fourth
octet
A 0 Any Any Any
B 10 Any Any Any
C 110 Any Any Any
D 1110 Any Any any
E 1111 Any Any any
Class First Octet
A 0 -127
B 128 – 191
C 192 – 223
D 224 – 239
E 240 – 255
• In classful addressing, the address space is divided in to 5
classes: A, B, C, D, and E.
• Binary Notation starting bits of first octet will tell the class.
• In decimal notation, range of first octet tells the class to which
the address belongs.
Classful addressing cont..
• Finding the Class in Binary and Dotted Decimal Notation
Classful addressing cont..
• In classless addressing every entity is granted a block of
addresses as per requirement.
• In class addesing the address block must be contiguous.
• The number of addresses in a block must be a power of 2
(1, 2, 4 ,8…………..)
Classes and Blocks
Class Number of Blocks Block Size Application
A 128 16,777,216 Unicast
B 16384 65536 Unicast
C 2,097,152 256 Unicast
D 1 268,435,456 Multicast
E 1 268,435,456 Reserved
• Each of the class is divided into fixed number of blocks and each block
has a fixed size.
• There is flaw with this classful addressing.
• Class A is used by large organization with large number of hosts and
routers, but it’s too big for any organization.
• Class B for mid-size organization, but this also too big for
organization leading to waste of IP address.
• Class C is too small for organizations.
Network ID & Host ID
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.
Network ID & Host ID
Network ID & Host ID cont..
• In classful logical addressing, the address is divided into two parts
– Net-id and host-id
For example,
• Class A address, the first byte is network-id and the rest 3 bytes
are Host-id.
Class Binary Dotted-Decimal CIDR
A 11111111. 00000000.00000000.00000000 255.0.0.0 /8
B 11111111. 11111111. 00000000.00000000 255.255.0.0 /16
C 11111111.11111111.11111111.00000000 255.255.255.0 /24
Default mask help us find the Net-id and hosted of an ip-address.
The class in the form /n is called CIDR (Classless Inter Domain Routing) which is used
for Classless logical addressing.
Two levels of hierarchy in an IPv4 address
A frame in a character-oriented protocol
Subnetting & Supernetting
• Subnetting
• Classful logical addressing is obsolete now. An organization would
get large number of class A or Class B address and then these
address would be subnetted means assign in logical groups to
small networks called Subnets.
• Supernetting
• Large number of addresses of class A and B were depleted. To
create a larger network, organizations combined class C address
into one group called Supernets and process is known
as Supernetting.
Classless Addressing
• Classless Addressing
• Due to depletion of addresses, Classless Logical Addressing was
introduced to connect more organizations to the Internet.
• Address blocks and Restrictions
• In classless logical addressing, size of the address block depends on
size and nature of the entity.
• For example, ISP may get thousands of address; home user may
get 2 addresses. To manage IP address, three restrictions were
imposed
• Address in a block must be contagious
• Number of address in the block must be power of 2.
• The first address must be evenly divisible by the number of addresses.
IPv6 addressing
• It is almost a certainty that we will run out of IP addresses
someday. IPv6 tries to address this by expanding the
address space available.
• IPv4 addresses were 32 bits. IPv6 addresses are 128 bits.
Need of IPv6
• IPv6addressesarefourtimesthesizeofIPv4addresses.
• For IPv4, this space is 32-bits (232) in size and contains 4,294,967,296
IPv4addresses.
• The IPv6 address space is 128-bits (2128) in size, containing
340,282,366,920,938,463,463,374,607,431,768,211,456IPv6addresses.
IPv6 address
IPv4
• The use of address space is inefficient
• Minimum delay strategies and reservation of resources are required to
accommodate real-time audio and video transmission
• No security mechanism (encryption and authentication) is provided
• IPv6 (IPng: Internetworking Protocol, next generation)
• Larger address space (128 bits)
• Better header format
• New options
• Allowance for extention
• Support for resource allocation: flow label to enable the source to request
special handling of the packet
• Support for more security
IPv6 address header
IPv6 address header
Field Description
Version Indicates the IP version. Always contains 0110 (6 in decimal – IPv6).
Traffic Class
Similar and functions the same as the Type of Service field in IPv4.
Used to tag the packet with a traffic class that can be used
in Differentiated Class of Service (DiffServ). IPv6 allows this field to
be rewritten at each router hop.
Flow Label
A new field introduced in IPv6 used to tag or label packets in a
particular traffic flow – packets that are not just originated from the
same source to the same destination, but belong to the same
application at the source or destination. This allows faster
identification and differentiation of packets at the network layer –
routers no longer required to process the application data to identify
the flow, as the information is available in the packet header.
It can also be used for multilayer switching techniques and achieve
faster packet-switching performance, eg: QoS for IPsec-encrypted
packets.
IPv6 address header
Field Description
Payload Length
Similar to the Total Length field in IPv4. Used to indicate the total
length of application data (IP Payload).
Note: The IPv4 Total Length field is 16 bit; the IPv6 Payload Length
field is 20 bits. Theoretically IPv6 packets are capable of carrying
larger payload (1,048,575 bytes in IPv6 vs 65,535 bytes in IPv4).
Next Header
Similar to the Protocol field in IPv4. Used to specify the type of
header (following the basic header) – a transport layer (TCP, UDP)
header, or an IPv6 extension header. IPv6 uses extension headers to
manage optional header information.
Hop Limit
Similar to the TTL field in IPv4. Used to specify the maximum number
of hops that a packet can pass through before it is considered invalid.
Each router decrements the value by 1 without recalculating the
checksum (there is no checksum field in the IPv6 header).
Recalculation costs processing time on IPv4 routers.
Source Address Indicates the source address of an IPv6 packet.
Destination
Address
Indicates the destination address of an IPv6 packet.
What is IPv6 ?
• An IPv6 address has 128 bits.
• 0010 0000 0000 0001 0000 1101 1011 1000
• 0000 0000 0000 0000 0000 0000 0000 0000
• 0000 0000 0000 0000 0000 0000 0101 0010
• 0000 0000 0000 0000 0000 0000 0000 0001
• NOTE:- Above notation is representation of IPv6 address in binary
format.
• To convert the above binary notation into IPv6 format
2001:0db8:0000:0000:0000:0052:0000:0001.
• This is an entirely “legal” representation, a well-formed
address
Preferred Format of IPv6Addresses
0000:0000:0000:0000:0000:0000:0000:0000
0000:0000:0000:0000:0000:0000:0000:0001
2001:0410:0000:1234:FB00:1400:5000:45FF
3ffe:0000:0000:0000:1010:2a2a:0000:0001
3FFE:0B00:0C18:0001:0000:1234:AB34:0002
FE80:0000:0000:0000:0000:0000:0000:0009
FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
Examples of IPv6 Addresses in the
Preferred Format
Comparison between IPv4 and IPv6
Transition IPv4 to IPv6
Integration and Co-existence Strategy
• The transition from IPv4 to IPv6 does not require an upgrade on all
nodes at the same time.
• Many transition mechanisms enable smooth integration of IPv4 to
IPv6.
• There are mechanisms available that allow IPv4 nodes to
communicate with IPv6 nodes.
• All of these mechanisms can be applied to different situations.
Integration Methods
1. Dual Stack (Dual IP)
• Complete support for both Internet protocols, IPv4 and IPv6, in
hosts and routers.
• Most preferred mechanism.
2. Tunnelling Techniques
• The encapsulation of packets of one IP version number within
packets of a second IP version number in order to traverse clouds
of the second IP version number.
3. Translation Techniques
• Enables IPv6-only devices to communicate with IPv4-only devices
and vice versa.
• Least desirable set of mechanisms.
Dual Stack
• Conceptually easiest ways of introducing IPv6 to a network is called the
“dual stack mechanism”.
• A host or a router is equipped with both IPv4 and IPv6 protocol stacks
in the operating system (though this may typically be implemented in a
hybrid way).
• Each node, called an “IPv4/IPv6 node”, is configured with both IPv4 and
IPv6 addresses.
• It can both send and receive datagrams belonging to both protocols and
thus communicate with every node in the IPv4 and IPv6 network.
• Well known and has been applied in the past for other protocol
transitions.
Dual stack
Application Supporting both IPv4 and
IPv6 Can use both stacks
Querying the Naming Service for an IPv4
Address
• When an application is IPv4 aware only, it asks the DNS
server to get only the IPv4 address for the host name to
communicate.
Querying the Naming Service for an IPv6
Address
• Application may also support IPv6 only. It asks the DNS
server to resolve an FQDN to get the host name ‘s IPv6
address to communicate.
IPv6 application requesting an FQDN AAAA record from DNS
Tunnelling IPv6 Packets over Existing
IPv4 Network
Note: Tunnelling is an intermediate integration and
transition technique that should not be considered a final
solution.
Tunneling strategy
Header translation strategy
Why Tunnelling?
• Tunnels are generally used on the network to carry incompatible protocols
or specific data over an existing network.
• For deployment of IPv6, it provides a basic way for IPv6 hosts, servers, and
routers to reach other IPv6 networks using IPv4 routing domain as the
transport layer.
• Tunnelling can be configured between border routers or between a border
router and a host;
• however, both tunnel endpoints must support both the IPv4 and IPv6
protocol stacks.
How Does Tunnelling IPv6 Packets in
IPv4 Work?
• Tunnelling encapsulates IPv6 packets in IPv4 packets for
delivery across an IPv4 infrastructure (a core network or
the Internet).
• When IPv6 packets are tunnelled in IPv4, their original
header and payload are not modified. One IPv4 header is
inserted over the IPv6 header.
• At each side of the tunnel, encapsulation and decapsulation
of IPv6 packets are performed.
• Edge device must support both IPv4 and IPv6.
IPv6 Packets Delivered Through IPv4
Tunnel
Mapping
Address Mapping
• Internet protocol is designed to as a best effort delivery protocol,
but it lacks some features such as flow control and error control.
• We need a protocol to create a mapping between physical and
logical address.
• IP packets use logical address (host to host).
• But to the packets to travel from one node to another node physical
address is used.
• So we need to encapsulate the logical address with physical
address, we need set of protocols called ARP(address Resolution
Protocol).
• Similarly for reverse mapping : RARP, BOOTP and DHCP is used.
Address mapping
• Physical address and logical address are two different identifiers.
• Mapping can be done in two ways
• Static mapping
• Dynamic mapping
Static mapping
• It involves the creation of routing tables that associates a logical
address with physical address.
• It is stored in each machine on the network.
• It has some limitations because physical address may change in the
following ways;
• A machine could change its NIC, resulting in a new physical address.
• In some LAN, the physical address changes every time when the
computer turned on (Apple).
• A mobile computer can move from one physical network to another,
resulting physical address changes.
Dynamic mapping
• Each time a machine knows one of the two address (either logical
or physical).
• It can use a protocol to find the other one (either logical or
physical).
 ARP: Address Resolution Protocol
 Map a logical address to a physical address
 RARP: Reverse Address Resolution Protocol
 Map a physical address to a logical address
ARP and RARP
Position of ARP and RARP
Notice that ARP and RARP are supplemental to IP.
Definition of ARP
• In order to send the data to destination, IP address is necessary but not sufficient;
we also need the physical address of the destination machine. ARP is used to get
the physical address (MAC address) of destination machine.
• Address Resolution Protocol is a communication protocol used for discovering
physical address associated with given network address. Typically, ARP is a network
layer to data link layer mapping process, which is used to discover MAC address for
given Internet Protocol Address.
• Before sending the IP packet, the MAC address of destination must be known. If not
so, then sender broadcasts the ARP-discovery packet requesting the MAC address of
intended destination.
• Since ARP-discovery is broadcast, every host inside that network will get this
message but the packet will be discarded by everyone except that intended receiver
host whose IP is associated. Now, this receiver will send a unicast packet with its
MAC address (ARP-reply) to the sender of ARP-discovery packet.
ARP operation
ARP packet
• Hardware Type -
Ethernet is type
1
• Protocol Type-
IPv4=x0800
• Hardware
Length: length
of Ethernet
Address (6)
• Protocol
Length: length
of IPv4 address
(4)
Packet Format
 HTYPE (Hardware type)
 16-bit field defining the underlying type of the network
• Ethernet is given the type 1
• ARP can be used on any physical network
 PTYPE (Protocol type)
 16-bit field defining the protocol
• IPv4 is 080016
• ARP can be used with any higher-level protocol
 HLEN (Hardware length)
 8-bit field defining the length of the physical address in bytes
• Ethernet has the value of 6
 PLEN (Protocol length)
 8-bit field defining the length of the logical address in bytes
• IPv4 has the value of 4
 OPER (Operation)
 16-bit field defining the type of packet
 (1) = ARP request, (2) = ARP reply
Packet Format
 SHA (Sender hardware address)
 A variable-length field defining the physical address of the
sender
 SPA (Sender protocol address)
 A variable-length field defining the logical address of the
sender
 THA (Target hardware address)
 A variable-length field defining the physical address of the
target
 For an ARP request operation packet
• This field is all 0s
 TPA (Target protocol address)
 A variable-length field defining the logical address of the
target
Encapsulation of ARP packet
Note: Type field for Ethernet is x0806
 An ARP packet is encapsulated directly into a data link frame
(Ethernet packet).
 Type field indicates that the data carried by the frame is an ARP
packet
Operation
 The sender knows the target’s IP address
 IP asks ARP to create an ARP request message
 The sender physical address
 The sender IP address
 The target physical address field is filled with 0s
 The target IP address
 The message is passed to the data link layer to
encapsulate in a data link frame
 Physical destination address is broadcast address
Definition of RARP
• RARP (Reverse Address Resolution Protocol) is also a network layer
protocol
• RARP is adapted from the ARP protocol and it is just reverse of ARP.
• RARP perform following steps to obtain an IP address from the
server.
• The sender broadcast the RARP request to all the other host present
in the network.
• The RARP request packet contains the physical address of the sender.
• The authorized RARP server replies directly to requesting host with
the RARP response packet which contains IP address for the sender.
• RARP is not being used in today’s networks. Because we have much
great featured protocols like BOOTP (Bootstrap Protocol) and DHCP
(Dynamic Host Configuration Protocol).
RARP Operation
RARP packet
Encapsulation of RARP packet
Comparison Chart
BASIS FOR
COMPARISON
ARP RARP
Full Form
Address Resolution
Protocol.
Reverse Address
Resolution Protocol.
Basic
Retrieves the physical
address of the receiver.
Retrieves the logical
address for a computer
from the server.
Mapping
ARP maps 32-bit logical
(IP) address to 48-bit
physical address.
RARP maps 48-bit
physical address to 32-bit
logical (IP) address.
ICMP
Why ICMP is needed?
• The IP protocol is a best-effort delivery service that delivers a
datagram from its original source to its final destination
• However, it has two deficiencies: lack of error control and lack of
assistance mechanisms
• What happens if something goes wrong? What happens if a router
must discard a datagram because it cannot find a router to the final
destination, or because the time-to-live field has a zero value?
• The Internet Control Message Protocol (ICMP) has been designed
to compensate for the two deficiencies
ICMP Encapsulation
• ICMP itself is a network layer protocol. However, its messages are not
passed directly to the data link layer as would be expected.
• Instead, the messages are first encapsulated inside IP datagrams before
going to the lower layer
• The value of the protocol field in the IP datagram is 1 to indicate that the
IP data is an ICMP message
Types of ICMP Messages
• ICMP message are divided into two broad categories: error-reporting
messages and query messages
• The error-reporting messages report problems that a router or a host
(destination) may encounter when it processes an IP packet
• The query messages help a host or a network manager get specific
information from a router or another host
Types of ICMP Messages (cont.)
Message Format
• An ICMP message has an 8-byte header and a variable-size data section
• The first field, ICMP type defines the type of the message and the Code
field specifies the reason for the particular message type , checksum is
used for error detection and correction.
• The rest of the header is specific for each message type
• The data section in error messages carries information for finding the
original packet that had the error
• In query messages, the data section carries extra information based on the
type of the query
General format of ICMP messages
Error Reporting
• IP is not concerned with error checking and error control
• ICMP does not correct errors, it simply reports them
• Five types of errors are handled: destination unreachable,
source quench, time exceeded, parameter problems, and
redirection
Contents of data field for the error
messages
Destination Unreachable
• When a router cannot route a datagram or a host cannot
deliver a datagram, the datagram is discarded and the router
or the host sends a destination-unreachable message back to
the source host that initiated the datagram
Source Quench
• The source-quench message in ICMP was designed to add a kind of flow
control to the IP
• When a router or host discards a datagram due to congestion, it sends a
source-quench message to the sender of the datagram
• This messages has two purposes: First, it informs the source that the
datagram has been discarded, Second, it warns the source that there is
congestion somewhere in the path and that the source should slow down
(quench) the sending process
Time Exceeded
• The time-exceeded message is generated in 2 cases:
• When a datagram is discarded due to the value of time to live field is
zero
• When all fragments that make up a message do not arrive at the
destination host within a certain time limit
In a time-exceeded message, code 0 is used only by routers to show that the
value of the time-to-live field is zero. Code 1 is used only by the destination
host to show that not all of the fragments have arrived within a set time.
Parameter Problem
• An ambiguity in the header part of a datagram can create serious
problems as the datagram travels through the Internet
• If a router or the destination host discovers an ambiguous or missing value
in any field of the datagram, it discards the datagram and sends a
parameter-problem message back to the source
Redirection
• Normally, hosts do not take part in the routing update process because
there are many more hosts in an internet than routers
• The hosts usually use static routing and their routing table has a limited
number of entries
• They usually know the IP address of a router, the default router
• Fore this reason, the hosts may send a datagram, which is destined for
another network, to the wrong router
• In this case, the router that receives the datagram will forward the
datagram to the correct router
• To update the routing table of the host, it sends a redirect message to the
host
IP packet 1
RM
2
IP packet
3
IP packet
4
Query
• ICMP can also diagnose some network problems through the
query messages, a group of four different pairs of messages
• In this type of ICMP message, a node sends a message that is
answered in a specific format by the destination node.
Echo Request and Reply
• The echo-request and echo-reply messages are designed for
diagnostic purposes
• The combination of echo-request and echo-reply messages
determines whether two systems (hosts or routers) can
communication with each other at the IP level
• Echo-request and echo-reply can determine whether or not a
node is functioning properly. The node to be tested is sent an
echo-request message. The optional data field contains a
message that must be repeated exactly by the responding
node in its echo-request message
Timestamp Request and Reply
• Two machines (hosts or routers) can use the timestamp-
request and timestamp-reply messages to determine the
round-trip time needed for an IP datagram to travel between
them
• It can also use to synchronize the clocks in two machines
Timestamp Request and Reply
-------
---
• Media Access Control (MAC) addresses in the
network access layer
▫ Associated w/ network interface card (NIC)
▫ 48 bits or 64 bits
• IP addresses for the network layer
▫ 32 bits for IPv4, and 128 bits for IPv6
▫ E.g., 123.4.56.7
• IP addresses + ports for the transport layer
▫ E.g., 123.4.56.7:80
• Domain names for the application/human layer
▫ E.g., www.google.com
Types of Addresses in Internet
Packet Delivery
• The network layer supervises the handling of the packets by
the underlying physical networks.
• The delivery of a packet to its final destination is
accomplished using two different methods of delivery:
direct and indirect.
• Direct Delivery
• Indirect Delivery
Direct vs. Indirect Delivery
• Direct delivery - transmit datagram across a single
physical network to the destination.
• Indirect delivery - transmit datagram across multiple
physical networks (with the support of routers) to the
destination.
• How does a machine know which method of delivery to
use?
Direct Delivery and Indirect Delivery
Direct Delivery
• Map the destination IP address to a physical address.
• Encapsulate the datagram in a physical frame.
• Send the frame over the physical network to the
destination.
Direct delivery
Direct delivery
Direct Delivery
Indirect Delivery
• Encapsulate the datagram in a frame.
• Choose a router on the physical network.
• Send the frame to that router.
• Router forwards the datagram on towards its final
destination.
• How does the host choose a router?
• How does the router forward the datagram?
Indirect Delivery
Link LinkLink
A B
Indirect delivery Indirect delivery
• Forwarding means to deliver the packet to the next hop (which
can be the final destination or the intermediate connecting
device).
• Although the IP protocol was originally designed as a
connectionless protocol, today the tendency is to use IP as a
connection-oriented protocol.
Forwarding
• Based on Destination Address or the Label
Next-hop method
Network-specific method
N2 R1
Destination Next Hop
Network-specific
routing table for host S
A
B
C
D
Destination
R1
R1
R1
R1
Next Hop
Host-specific
routing table for host S
Host-specific routing
R2
Host B
R3
Host A
R1
N1
N2 N3
Routing table for host A
R3
R1
R3
......
Destination Next Hop
Host B
N2
N3
......
Simplified forwarding module in classless
address
Definition of Unicast
• In Computer Networks, the term unicast and multicast
are the information transmission methods.
• In unicast, one station transfers the information to only
one receiver station.
• In multicast, the sender transfers the information to a
group of interested receiver stations.
• That is unicast is a one-to-one communication and
multicast is a one-to-many communication process.
• In multicast, you can clearly see that the sender station has
created a single packet only which now will be delivered to the
group of interested stations only. A single packet is forwarded
to the group of receiving stations.
• It’s hard to use multicasting across a large network because
only small sections of the internet are enabled in multicast .
Difference Between Unicast and Multicast
COMPARISON UNICAST MULTICAST
Basic One sender and one
receiver.
One sender and multiple
receivers.
Bandwidth Multiple unicasting utilizes
more bandwidth as
compared to multicast.
Multicasting utilizes
bandwidth efficiently.
Mapping One-to-one. One-to-many.
Application Web surfing, file transfer. Multimedia delivery, stock
exchange.
Routing
• Router - a computer that performs routing.
• Routing - the process of choosing a path which to send
data packets from host to another host.
• Routing is one of the Internet Protocol’s (IP) primary
functions.
Hosts vs Routers
• Hosts make routing decisions
• Hosts don’t typically transfer packets from one network
to another
• Routers make routing decisions
• Routers typically transfer packets from one network to
another
Router
• A router that accepts incoming packets from one of the input
ports (interfaces), uses a routing table to find the output port
from which the packet departs, and sends the packet from
this output port.
Router input port and output port
Router
Static routing table: The administrator enters the route for each destination
into the table. When a table is created, it cannot update automatically when
there is a change in the Internet.
A static routing table can be used in a small internet that does not change
very often, or in an experimental internet for troubleshooting.
Dynamic Routing Table: A dynamic routing table is updated periodically by
using one of the dynamic routing protocols such as RIP, OSPF, or BGP.
Whenever there is a change in the Internet, such as a shutdown of a router or
breaking of a link, the dynamic routing protocols update all the tables in the
routers automatically. The routers in a big internet such as the Internet need
to be updated dynamically for efficient delivery of the IP packets.
RIP: Routing Information Protocol , OSPF: Open Shortest Path First ,
BGP: Border Gateway Protocol
Routing algorithm
Algorithm is used to determine the routing function.
For each node of a network, the algorithm determines a
routing table, in which each destination, matches an output
line.
There are three main types of routing algorithms:
• Distance Vector (distance-vector routing);
• To link state (link state routing);
• Path to vector (path-vector routing).
Routing Table
• Routing table - each machine stores information about other
destination and how to reach them.
• Using net-id i.e. the portion of the IP address keeps routing
tables:
• Small
• Relatively stable
Questions:
• How does a host or router initialize its routing table?
• How are routing tables updated as the network changes?
Unicast Routing Protocols
1. A routing table can be either static or dynamic.
2. A static table is one with manual entries.
3. A dynamic table is one that is updated automatically when
there is a change somewhere in the Internet.
4. A routing protocol is a combination of rules and procedures
that lets routers in the Internet inform each other of
changes.
Distance Vector
1. It is a dynamic routing algorithm in which each router computes distance
between itself and each possible destination i.e. its immediate neighbors.
2. Distance vector protocols are estimate the distance to work out the best
path for packets transmission with in a network.
3. Generally, distance vector protocols send a routing table full information
to neighboring devices. The sharing of information with the neighbors
takes place at regular intervals.
4. This approach makes them low investment for administrators as they can
be deployed without much need to be managed.
5. The only issue is that they require more bandwidth to send on the
routing tables and can run into routing loops as well.
6. It makes use of Bellman Ford Algorithm for making routing tables.
Initialization of tables in distance vector
routing
In distance vector routing, each node shares its routing table with its
immediate neighbors periodically and when there is a change.
Distance Vector Routing Tables
Link State Routing
1. It is a dynamic routing algorithm in which each router shares knowledge of
its neighbors with every other router in the network.
2. A router sends its information about its neighbors only to all the routers
through flooding.
3. Information sharing takes place only whenever there is a change.
4. It makes use of Dijkastra’s Algorithm for making routing tables.
5. Problems – Heavy traffic due to flooding of packets.
– Flooding can result in infinite looping which can be solved by using Time
to leave (TTL) field.
Link State Protocols
1. Link state protocols take a different approach to finding the best path
in that they share information with other routers in proximity.
2. The route is calculated based on the speed of the path to the
destination and the cost of resources.
3. Link state protocols use an algorithm to work this out. One of the key
differences to a distance vector protocol is that link state protocols
don’t send out routing tables; instead, routers notify each other when
changes are detected.
Link State Protocols
1. Routers using the link state protocol creates three types of tables;
• neighbour table,
• topology table, and
• routing table.
2. The neighbor table stores details of neighboring routers using the link
state protocol,
3. the topology table stores the entire network topology, and
4. the routing table stores the most efficient routes.
link state routing cont.
Distance Vector and Link State Protocols
Distance Vector Link State
Sends entire routing table during
updates
Only provides link state information
Sends periodic updates every 30-90
seconds
Uses triggered updates
Broadcasts updates Multi casts updates
Vulnerable to routing loops No risk of routing loops
RIP, IGRP OSPF, IS-IS
The Internet Control Message Protocol (ICMP) is a supporting protocol in
the Internet protocol suite. It is used by network devices, including routers, to
send error messages and operational information indicating, for example, that a
requested service is not available or that a host or router could not be
reached.[1] ICMP differs from transport protocols such as TCP and UDP in that it is
not typically used to exchange data between systems, nor is it regularly employed
by end-user network applications (with the exception of some diagnostic tools
like ping and traceroute).
ICMP (Internet Control Message
Protocol)
•ICMP (Internet Control Message Protocol) is an error-reporting protocol
network devices like routers use to generate error messages to the
source IP address when network problems prevent delivery of IP
packets. ICMP creates and sends messages to the source IP address
indicating that a gateway to the Internet that a router, service or host
cannot be reached for packet delivery. Any IP network device has the
capability to send, receive or process ICMP messages.
ICMP is not a transport protocol that sends data between systems.
While ICMP is not used regularly in end-user applications, it is used by
network administrators to troubleshoot Internet connections in diagnostic
utilities including ping and traceroute.
One of the main protocols of the Internet Protocol suite, ICMP is used by
routers, intermediary devices or hosts to communicate error information
or updates to other routers, intermediary devices or hosts. The widely
used IPv4 (Internet Protocol version 4) and the newer IPv6 use similar
versions of the ICMP protocol (ICMPv4 and ICMPv6, respectively).
ICMP (Internet Control Message Protocol)
ICMP messages are transmitted as datagrams and consist of an IP
header that encapsulates the ICMP data. ICMP packets are IP packets
with ICMP in the IP data portion. ICMP messages also contain the entire
IP header from the original message, so the end system knows which
packet failed
The ICMP header appears after the IPv4 or IPv6 packet header and is
identified as IP protocol number 1. The complex protocol contains three
fields:
•The major type that identifies the ICMP message;
•The minor code that contains more information about the type field; and
•The checksum that helps detect errors introduced during transmission.
Following the three fields is the ICMP data and the original IP header to
identify which packets actually failed.
ICMP has been used to execute denial-of-service attacks (also called
the ping of death) by sending an IP packet larger than the number of
bytes allowed by the IP protocol.
ICMP (Internet Control Message Protocol)
Routing
Routing
• Task
• To define the route of packets through the network
• From the source to the destination system
• Routing algorithm
• Defines on which outgoing line packet will be transmitted
• Route determination
• Datagram
• Routing algorithm makes individual decision for each packet
• Virtual circuit
• Routing algorithm runs only during connect (session routing)
Routing: Routing and Forwarding
• Distinction can be made
• Routing: makes decision which route to use
• Forwarding: what happens when a packet arrives
desti-
nation
link
A 0
B 3
C 1
D 4
Routing
Process
Topology, link utilization, etc.
information
Fills & Updates
Uses & Looks up
Data packets
Incoming
lines
Outgoing
lines
Forwarding
Process
Routing
table
Router
Properties for Routing Algorithms
• Simplicity
• Minimize load of routers
• Robustness
• Compensation for IS and link failures
• Handling of topology and traffic changes
• Stability
• Constant results
• No volatile adaptations to new conditions
• Fairness
• Optimality
Classes of Routing Algorithms
• Class Non-adaptive Algorithms
• Current network state not taken into consideration
• Assume average values
• No change during operation (static routing)
• With knowledge of the overall topology
• Spanning tree
• Flow-based routing
• Without knowledge of the overall topology
• Flooding
• Class Adaptive Algorithms
• Decisions are based on current network state
• Measurements / estimates of the topology and the traffic volume
• Further sub-classification into
• Centralized algorithms
• Isolated algorithms
• Distributed algorithms
Definition of ARP
ARP (Address Resolution Protocol) is a network layer protocol.
As ARP is a dynamic mapping protocol, each host in the network knows the Logical
address of another host. Now, suppose a host needs to send the IP datagram to
another host. But, the IP datagram must be encapsulated in a frame so that it can pass
through the physical network between sender and receiver. Here, the sender needs
the physical address of the receiver so that it is being identified that to which receiver
the packet belong to when the packet travel in the physical network.
For retrieving the physical address of the receiver the sender performs the following
action.
The sender sends the ARP query packet on the network which is broadcasted to all
the other host or router present in the network.
The ARP query packet contains the logical and physical address of the sender and the
logical address of the receiver.
All the host and router receiving the ARP query packet process it but, only the
intended receiver identifies its logical address present in the ARP query packet.
The receiver then sends ARP response packet which contains the logical (IP) address
and physical address of the receiver.
The ARP response packet is unicast directly to the sender whose physical address is
present in the ARP query packet.
Four cases using ARP
Definition of RARP
Reverse ARP is a networking protocol used by a client machine in a local area network
to request its Internet Protocol address (IPv4) from the gateway-router’s ARP table.
The network administrator creates a table in gateway-router, which is used to map the
MAC address to corresponding IP address.
When a new machine is setup or any machine which don’t have memory to store IP
address, needs an IP address for its own use. So the machine sends a RARP broadcast
packet which contains its own MAC address in both sender and receiver hardware
address field.
LAN technologies like Ethernet, Ethernet II, Token Ring and Fiber Distributed Data
Interface (FDDI) support the Address Resolution Protocol.
RARP is not being used in today’s networks. Because we have much great featured
protocols like BOOTP (Bootstrap Protocol) and DHCP( Dynamic Host Configuration
Protocol).
• RARP is outdated now because of two reasons. First, the RARP is
using the broadcast service of the data-link layer; that means the
RARP must be present at each network. Second, RARP only provides
IP address but today the computer also need other information.
Key Differences Between ARP and RARP
1. The full form of ARP is Address Resolution Protocol whereas, the full
form of RARP is Reverse Address Resolution Protocol.
2. ARP protocol retrieves the physical address of the receiver. On the
other hand, the RARP protocol retrieves logical (IP) address of the
protocol.
3. ARP maps 32 bit logical (IPv4) address to a 48-bit physical address
of the receiver. On the other hand, RARP maps 48-bit physical
address to 32-bit logical address of the receiver.
Difference Between ARP and RARP
• ARP and RARP both are the Network layer protocol.
• Whenever a host needs to send an IP datagram to another host, the
sender requires both the logical address and physical address of the
receiver.
• The dynamic mapping provides two protocols ARP and RARP. The
basic difference between ARP and RARP is that ARP when provided
with the logical address of the receiver it obtains the physical
address of the receiver whereas in RARP when provided with the
physical address of the host, it obtains the logical address of the
host from the server.
Mapping logical to physical : ARP
• Each time a machine knows one of the two address (either logical
or physical).
• It can use a protocol to find the other one (either logical or
physical).
Mapping physical to logical : RARP
• Each time a machine knows one of the two address (either logical
or physical). It can use a protocol to find the other one (either
logical or physical).
• RARP finds the logical address for a machine that only knows its
physical address.
• This if often encountered on thin-client workstations. No disk, so
when machine is booted, it needs to know its IP address (don’t
want to burn the IP address into the ROM).
• So we need something more than RARP. BOOTP, and now DHCP
have replaced RARP.
Simplified forwarding module
Review: Internet Architecture
R2
R4 R5
Host
R1
R3
Net
1
Net
2
The IP Routing Algorithm
1. Extract the destination IP address, D, from the datagram
and compute the net-id, N
2. If N matches any directly connected network address
deliver the datagram directly
3. else if the routing table contains a host-specific address for
D send the datagram to the next-hop specified in the table
4. else if the routing table contains a route for network N send
the datagram to the next-hop specified in the table
5. else if the routing table contains a default router send the
datagram there
6. else declare a routing error
Routing Protocols

Mais conteúdo relacionado

Mais procurados

Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.pptForouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Jayaprasanna4
 

Mais procurados (20)

Unicast multicast & broadcast
Unicast multicast & broadcastUnicast multicast & broadcast
Unicast multicast & broadcast
 
Subnetting
SubnettingSubnetting
Subnetting
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer Networks
 
MAC & IP addresses
MAC & IP addressesMAC & IP addresses
MAC & IP addresses
 
Ip addressing
Ip addressingIp addressing
Ip addressing
 
HDLC
HDLCHDLC
HDLC
 
Transport layer
Transport layer Transport layer
Transport layer
 
Network layer
Network layerNetwork layer
Network layer
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
 
Link state routing protocol
Link state routing protocolLink state routing protocol
Link state routing protocol
 
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.pptForouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
 
TCP/IP
TCP/IPTCP/IP
TCP/IP
 
Presentation Routing algorithm
Presentation Routing algorithmPresentation Routing algorithm
Presentation Routing algorithm
 
Internet Protocol version 6
Internet Protocol version 6Internet Protocol version 6
Internet Protocol version 6
 
Ipv4 and Ipv6
Ipv4 and Ipv6Ipv4 and Ipv6
Ipv4 and Ipv6
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Presentation on arp protocol
Presentation on arp protocolPresentation on arp protocol
Presentation on arp protocol
 

Semelhante a Network layer logical addressing

chapter 6.pptx
chapter 6.pptxchapter 6.pptx
chapter 6.pptx
MelkamtseganewTigabi1
 
8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx
ZahouAmel1
 

Semelhante a Network layer logical addressing (20)

4. Understanding Internet Protocol.pptx
4. Understanding Internet Protocol.pptx4. Understanding Internet Protocol.pptx
4. Understanding Internet Protocol.pptx
 
MVA slides lesson 4
MVA slides lesson 4MVA slides lesson 4
MVA slides lesson 4
 
IPV4 addresses
IPV4 addressesIPV4 addresses
IPV4 addresses
 
Unit 1- Network Layer and Protocols-4.pptx
Unit 1- Network Layer and Protocols-4.pptxUnit 1- Network Layer and Protocols-4.pptx
Unit 1- Network Layer and Protocols-4.pptx
 
network-addressing.pptx
network-addressing.pptxnetwork-addressing.pptx
network-addressing.pptx
 
chapter 6.pptx
chapter 6.pptxchapter 6.pptx
chapter 6.pptx
 
IPv4
IPv4IPv4
IPv4
 
Computer network coe351- part3-final
Computer network coe351- part3-finalComputer network coe351- part3-final
Computer network coe351- part3-final
 
Basics of IP Addressing
Basics of IP AddressingBasics of IP Addressing
Basics of IP Addressing
 
Ip addressing
Ip addressingIp addressing
Ip addressing
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
UNIT-2.pptx
UNIT-2.pptxUNIT-2.pptx
UNIT-2.pptx
 
Network_Layer_and_Internet_Protocols_IPv.pptx
Network_Layer_and_Internet_Protocols_IPv.pptxNetwork_Layer_and_Internet_Protocols_IPv.pptx
Network_Layer_and_Internet_Protocols_IPv.pptx
 
Ray ipv4 addresses
Ray   ipv4 addressesRay   ipv4 addresses
Ray ipv4 addresses
 
IPV6.ppt
IPV6.pptIPV6.ppt
IPV6.ppt
 
IP Addressing
IP AddressingIP Addressing
IP Addressing
 
6 ccna (fundamentals of i pv4 addressing and routing)
6  ccna (fundamentals of i pv4 addressing and routing)6  ccna (fundamentals of i pv4 addressing and routing)
6 ccna (fundamentals of i pv4 addressing and routing)
 
8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx8-Lect_8 Addressing the Network.tcp.pptx
8-Lect_8 Addressing the Network.tcp.pptx
 
21 Scheme_ MODULE-3_CCN.pdf
21 Scheme_ MODULE-3_CCN.pdf21 Scheme_ MODULE-3_CCN.pdf
21 Scheme_ MODULE-3_CCN.pdf
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 

Mais de Sri Manakula Vinayagar Engineering College

Mais de Sri Manakula Vinayagar Engineering College (20)

IoT Methodology.pptx
IoT Methodology.pptxIoT Methodology.pptx
IoT Methodology.pptx
 
ACNS UNIT-5.pdf
ACNS UNIT-5.pdfACNS UNIT-5.pdf
ACNS UNIT-5.pdf
 
2. ACNS UNIT-1.pptx
2. ACNS UNIT-1.pptx2. ACNS UNIT-1.pptx
2. ACNS UNIT-1.pptx
 
1. ACNS UNIT-1.pptx
1. ACNS UNIT-1.pptx1. ACNS UNIT-1.pptx
1. ACNS UNIT-1.pptx
 
7. Multi-operator D2D communication.pptx
7. Multi-operator D2D communication.pptx7. Multi-operator D2D communication.pptx
7. Multi-operator D2D communication.pptx
 
11. New challenges in the 5G modelling.pptx
11. New challenges in the 5G modelling.pptx11. New challenges in the 5G modelling.pptx
11. New challenges in the 5G modelling.pptx
 
8. Simulation methodology.pptx
8. Simulation methodology.pptx8. Simulation methodology.pptx
8. Simulation methodology.pptx
 
10. Calibration.pptx
10. Calibration.pptx10. Calibration.pptx
10. Calibration.pptx
 
9. Evaluation methodology.pptx
9. Evaluation methodology.pptx9. Evaluation methodology.pptx
9. Evaluation methodology.pptx
 
4. Ultra Reliable and Low Latency Communications.pptx
4. Ultra Reliable and Low Latency Communications.pptx4. Ultra Reliable and Low Latency Communications.pptx
4. Ultra Reliable and Low Latency Communications.pptx
 
1. Massive Machine-Type Communication.pptx
1. Massive Machine-Type Communication.pptx1. Massive Machine-Type Communication.pptx
1. Massive Machine-Type Communication.pptx
 
1. Coordinated Multi-Point Transmission in 5G.pptx
1. Coordinated Multi-Point Transmission in 5G.pptx1. Coordinated Multi-Point Transmission in 5G.pptx
1. Coordinated Multi-Point Transmission in 5G.pptx
 
Real time operating systems
Real time operating systemsReal time operating systems
Real time operating systems
 
Reliability and clock synchronization
Reliability and clock synchronizationReliability and clock synchronization
Reliability and clock synchronization
 
Low power embedded system design
Low power embedded system designLow power embedded system design
Low power embedded system design
 
Performance Analysis of MIMO–OFDM for PCHBF , RELAY Technique with MMSE For T...
Performance Analysis of MIMO–OFDM for PCHBF , RELAY Technique with MMSE For T...Performance Analysis of MIMO–OFDM for PCHBF , RELAY Technique with MMSE For T...
Performance Analysis of MIMO–OFDM for PCHBF , RELAY Technique with MMSE For T...
 
Telecommunication systems
Telecommunication systemsTelecommunication systems
Telecommunication systems
 
Home appliances
Home appliancesHome appliances
Home appliances
 
loudspeakers and microphones
loudspeakers and microphonesloudspeakers and microphones
loudspeakers and microphones
 
Television standards and systems
Television standards and systemsTelevision standards and systems
Television standards and systems
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

Network layer logical addressing

  • 3. Comparison Chart BASIS FOR COMPARISON LOGICAL ADDRESS PHYSICAL ADDRESS Basic It is the virtual address generated by CPU The physical address is a location in a memory unit. Address Space Set of all logical addresses generated by CPU in reference to a program is referred as Logical Address Space. Set of all physical addresses mapped to the corresponding logical addresses is referred as Physical Address. Visibility The user can view the logical address of a program. The user can never view physical address of program Access The user uses the logical address to access the physical address. The user can not directly access physical address. Generation The Logical Address is generated by the CPU Physical Address is Computed by MMU
  • 4. Network Layer – Logical Addressing • In this lesson, you will learn about logical addressing scheme of networking layer, this layer deals with IP addressing and has a class based and class addressing scheme. Logical Addressing • Network layer protocols use logical addressing, where a given device can have multiple possible addresses.
  • 5. • IP is a packet-switched protocol. • IP is a connectionless protocol - each packet is treated separately. • No flow or error control - best-effort for delivery. • Being paired with TCP makes it reliable. Internet Protocol
  • 6. The network layer • The purpose of the physical layer is to provide a physical mechanism for transmitting data as signals. • The purpose of the data link layer is to ensure the integrity of the data sent over a given physical link (such as MAC or NIC addresses). • The purpose of the network layer is to provide a mechanism for data to be sent from one device to another over a route that might span many different physical links. • Routing is the process by which data is directed across multiple links from one host to another.
  • 7. IP Addresses • Each connection to the Internet is given an IP address of some form or another. • No two connections on the Internet can have the same IP address at the same time. • However, these are still logical addresses because a given connection’s IP address can change, or it can be reassigned to a new device if the first one is disconnected from the Internet. • If a given device has multiple connections to the internet (such as a router), each connection needs its own IP address.
  • 8. • All current IP addresses are 4 bytes. • Once upon a time, IP address were arranged somewhat hierarchically: • The first byte would indicate the class of the site, usually reflective of its size. • The second byte would further uniquely identify the site. • The third byte would be the subnet within the site. • The fourth byte would specify the actual machine. • This was wasteful. Small organizations did not need 65,546 IP addresses. Lots of potential addresses were being wasted. • This was fine when the number of machines connected to the internet could be measured in the hundred-thousands. Addressing
  • 9. Network Addresses • An IP address has network address of which we need to find the first and last address for two reasons – • first address is address of routing or hub device and • last address gives the total size of a block of addresses.
  • 10. Internet Protocol (IP) • Switching at the network layer in the Internet uses the datagram approach • Communication at the network layer in the Internet is connectionless • Position of IPv4 in TCP/IP protocol suite
  • 11. Internet Protocol (IP) • IP: Host-to-host network layer delivery protocol • Unreliable and connectionless datagram protocol for a best-effort delivery service
  • 12. IP Header : Version: IPv6, IPv4 • Differentiated services defines the class of the datagram for Quality of Service (QoS) • Time to live (TTL): Used to control the max. number of hops (router) visited by the datagram
  • 13. IPv4 Addresses • An IPv4 address is 32 bit address that uniquely and universally defines the connection of a device. • Unique means no two devices can have same address at the same time on Internet. Address Space • It is the total number of addresses used by IPv4 protocol. • If N bit address is used, the total addresses in the address space will be 2N. • IPv4 uses 32 bit addresses then the total number of addresses in the address space is •232 = 4,29,49,67,296
  • 14. What is IPv4 ? 1. An IP2v4 address has 32 bits. (Binary Notation) 10000000. 00001011. 00000011. 00011111 NOTE:-Above notation is representation of IPv4 address in binary format. 2. Another notation is Dotted Decimal Notation 128.11.3.31 NOTE:- Above notation is representation of IPv4 address in dotted decimal notation. 3. Each of the octet range 0 to 255. 4. IPv4 address are unique and universal.
  • 15.
  • 16. Types of IP addressing • Classful addressing • Classless Addressing
  • 17. Classful Addressing Class First Octet Second octet Third octet Fourth octet A 0 Any Any Any B 10 Any Any Any C 110 Any Any Any D 1110 Any Any any E 1111 Any Any any Class First Octet A 0 -127 B 128 – 191 C 192 – 223 D 224 – 239 E 240 – 255 • In classful addressing, the address space is divided in to 5 classes: A, B, C, D, and E. • Binary Notation starting bits of first octet will tell the class. • In decimal notation, range of first octet tells the class to which the address belongs.
  • 18. Classful addressing cont.. • Finding the Class in Binary and Dotted Decimal Notation
  • 19. Classful addressing cont.. • In classless addressing every entity is granted a block of addresses as per requirement. • In class addesing the address block must be contiguous. • The number of addresses in a block must be a power of 2 (1, 2, 4 ,8…………..)
  • 20. Classes and Blocks Class Number of Blocks Block Size Application A 128 16,777,216 Unicast B 16384 65536 Unicast C 2,097,152 256 Unicast D 1 268,435,456 Multicast E 1 268,435,456 Reserved • Each of the class is divided into fixed number of blocks and each block has a fixed size. • There is flaw with this classful addressing. • Class A is used by large organization with large number of hosts and routers, but it’s too big for any organization. • Class B for mid-size organization, but this also too big for organization leading to waste of IP address. • Class C is too small for organizations.
  • 21. Network ID & Host ID 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.
  • 22. Network ID & Host ID
  • 23. Network ID & Host ID cont.. • In classful logical addressing, the address is divided into two parts – Net-id and host-id For example, • Class A address, the first byte is network-id and the rest 3 bytes are Host-id. Class Binary Dotted-Decimal CIDR A 11111111. 00000000.00000000.00000000 255.0.0.0 /8 B 11111111. 11111111. 00000000.00000000 255.255.0.0 /16 C 11111111.11111111.11111111.00000000 255.255.255.0 /24 Default mask help us find the Net-id and hosted of an ip-address. The class in the form /n is called CIDR (Classless Inter Domain Routing) which is used for Classless logical addressing.
  • 24. Two levels of hierarchy in an IPv4 address
  • 25. A frame in a character-oriented protocol
  • 26. Subnetting & Supernetting • Subnetting • Classful logical addressing is obsolete now. An organization would get large number of class A or Class B address and then these address would be subnetted means assign in logical groups to small networks called Subnets. • Supernetting • Large number of addresses of class A and B were depleted. To create a larger network, organizations combined class C address into one group called Supernets and process is known as Supernetting.
  • 27.
  • 28. Classless Addressing • Classless Addressing • Due to depletion of addresses, Classless Logical Addressing was introduced to connect more organizations to the Internet. • Address blocks and Restrictions • In classless logical addressing, size of the address block depends on size and nature of the entity. • For example, ISP may get thousands of address; home user may get 2 addresses. To manage IP address, three restrictions were imposed • Address in a block must be contagious • Number of address in the block must be power of 2. • The first address must be evenly divisible by the number of addresses.
  • 29. IPv6 addressing • It is almost a certainty that we will run out of IP addresses someday. IPv6 tries to address this by expanding the address space available. • IPv4 addresses were 32 bits. IPv6 addresses are 128 bits.
  • 30. Need of IPv6 • IPv6addressesarefourtimesthesizeofIPv4addresses. • For IPv4, this space is 32-bits (232) in size and contains 4,294,967,296 IPv4addresses. • The IPv6 address space is 128-bits (2128) in size, containing 340,282,366,920,938,463,463,374,607,431,768,211,456IPv6addresses.
  • 31. IPv6 address IPv4 • The use of address space is inefficient • Minimum delay strategies and reservation of resources are required to accommodate real-time audio and video transmission • No security mechanism (encryption and authentication) is provided • IPv6 (IPng: Internetworking Protocol, next generation) • Larger address space (128 bits) • Better header format • New options • Allowance for extention • Support for resource allocation: flow label to enable the source to request special handling of the packet • Support for more security
  • 33. IPv6 address header Field Description Version Indicates the IP version. Always contains 0110 (6 in decimal – IPv6). Traffic Class Similar and functions the same as the Type of Service field in IPv4. Used to tag the packet with a traffic class that can be used in Differentiated Class of Service (DiffServ). IPv6 allows this field to be rewritten at each router hop. Flow Label A new field introduced in IPv6 used to tag or label packets in a particular traffic flow – packets that are not just originated from the same source to the same destination, but belong to the same application at the source or destination. This allows faster identification and differentiation of packets at the network layer – routers no longer required to process the application data to identify the flow, as the information is available in the packet header. It can also be used for multilayer switching techniques and achieve faster packet-switching performance, eg: QoS for IPsec-encrypted packets.
  • 34. IPv6 address header Field Description Payload Length Similar to the Total Length field in IPv4. Used to indicate the total length of application data (IP Payload). Note: The IPv4 Total Length field is 16 bit; the IPv6 Payload Length field is 20 bits. Theoretically IPv6 packets are capable of carrying larger payload (1,048,575 bytes in IPv6 vs 65,535 bytes in IPv4). Next Header Similar to the Protocol field in IPv4. Used to specify the type of header (following the basic header) – a transport layer (TCP, UDP) header, or an IPv6 extension header. IPv6 uses extension headers to manage optional header information. Hop Limit Similar to the TTL field in IPv4. Used to specify the maximum number of hops that a packet can pass through before it is considered invalid. Each router decrements the value by 1 without recalculating the checksum (there is no checksum field in the IPv6 header). Recalculation costs processing time on IPv4 routers. Source Address Indicates the source address of an IPv6 packet. Destination Address Indicates the destination address of an IPv6 packet.
  • 35. What is IPv6 ? • An IPv6 address has 128 bits. • 0010 0000 0000 0001 0000 1101 1011 1000 • 0000 0000 0000 0000 0000 0000 0000 0000 • 0000 0000 0000 0000 0000 0000 0101 0010 • 0000 0000 0000 0000 0000 0000 0000 0001 • NOTE:- Above notation is representation of IPv6 address in binary format. • To convert the above binary notation into IPv6 format 2001:0db8:0000:0000:0000:0052:0000:0001. • This is an entirely “legal” representation, a well-formed address
  • 36. Preferred Format of IPv6Addresses 0000:0000:0000:0000:0000:0000:0000:0000 0000:0000:0000:0000:0000:0000:0000:0001 2001:0410:0000:1234:FB00:1400:5000:45FF 3ffe:0000:0000:0000:1010:2a2a:0000:0001 3FFE:0B00:0C18:0001:0000:1234:AB34:0002 FE80:0000:0000:0000:0000:0000:0000:0009 FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF Examples of IPv6 Addresses in the Preferred Format
  • 37.
  • 38.
  • 41. Integration and Co-existence Strategy • The transition from IPv4 to IPv6 does not require an upgrade on all nodes at the same time. • Many transition mechanisms enable smooth integration of IPv4 to IPv6. • There are mechanisms available that allow IPv4 nodes to communicate with IPv6 nodes. • All of these mechanisms can be applied to different situations.
  • 42. Integration Methods 1. Dual Stack (Dual IP) • Complete support for both Internet protocols, IPv4 and IPv6, in hosts and routers. • Most preferred mechanism. 2. Tunnelling Techniques • The encapsulation of packets of one IP version number within packets of a second IP version number in order to traverse clouds of the second IP version number. 3. Translation Techniques • Enables IPv6-only devices to communicate with IPv4-only devices and vice versa. • Least desirable set of mechanisms.
  • 43. Dual Stack • Conceptually easiest ways of introducing IPv6 to a network is called the “dual stack mechanism”. • A host or a router is equipped with both IPv4 and IPv6 protocol stacks in the operating system (though this may typically be implemented in a hybrid way). • Each node, called an “IPv4/IPv6 node”, is configured with both IPv4 and IPv6 addresses. • It can both send and receive datagrams belonging to both protocols and thus communicate with every node in the IPv4 and IPv6 network. • Well known and has been applied in the past for other protocol transitions.
  • 45. Application Supporting both IPv4 and IPv6 Can use both stacks
  • 46. Querying the Naming Service for an IPv4 Address • When an application is IPv4 aware only, it asks the DNS server to get only the IPv4 address for the host name to communicate.
  • 47. Querying the Naming Service for an IPv6 Address • Application may also support IPv6 only. It asks the DNS server to resolve an FQDN to get the host name ‘s IPv6 address to communicate. IPv6 application requesting an FQDN AAAA record from DNS
  • 48. Tunnelling IPv6 Packets over Existing IPv4 Network Note: Tunnelling is an intermediate integration and transition technique that should not be considered a final solution.
  • 50. Why Tunnelling? • Tunnels are generally used on the network to carry incompatible protocols or specific data over an existing network. • For deployment of IPv6, it provides a basic way for IPv6 hosts, servers, and routers to reach other IPv6 networks using IPv4 routing domain as the transport layer. • Tunnelling can be configured between border routers or between a border router and a host; • however, both tunnel endpoints must support both the IPv4 and IPv6 protocol stacks.
  • 51. How Does Tunnelling IPv6 Packets in IPv4 Work? • Tunnelling encapsulates IPv6 packets in IPv4 packets for delivery across an IPv4 infrastructure (a core network or the Internet). • When IPv6 packets are tunnelled in IPv4, their original header and payload are not modified. One IPv4 header is inserted over the IPv6 header. • At each side of the tunnel, encapsulation and decapsulation of IPv6 packets are performed. • Edge device must support both IPv4 and IPv6.
  • 52. IPv6 Packets Delivered Through IPv4 Tunnel
  • 54. Address Mapping • Internet protocol is designed to as a best effort delivery protocol, but it lacks some features such as flow control and error control. • We need a protocol to create a mapping between physical and logical address. • IP packets use logical address (host to host). • But to the packets to travel from one node to another node physical address is used. • So we need to encapsulate the logical address with physical address, we need set of protocols called ARP(address Resolution Protocol). • Similarly for reverse mapping : RARP, BOOTP and DHCP is used.
  • 55. Address mapping • Physical address and logical address are two different identifiers. • Mapping can be done in two ways • Static mapping • Dynamic mapping
  • 56. Static mapping • It involves the creation of routing tables that associates a logical address with physical address. • It is stored in each machine on the network. • It has some limitations because physical address may change in the following ways; • A machine could change its NIC, resulting in a new physical address. • In some LAN, the physical address changes every time when the computer turned on (Apple). • A mobile computer can move from one physical network to another, resulting physical address changes.
  • 57. Dynamic mapping • Each time a machine knows one of the two address (either logical or physical). • It can use a protocol to find the other one (either logical or physical).  ARP: Address Resolution Protocol  Map a logical address to a physical address  RARP: Reverse Address Resolution Protocol  Map a physical address to a logical address
  • 58. ARP and RARP Position of ARP and RARP Notice that ARP and RARP are supplemental to IP.
  • 59. Definition of ARP • In order to send the data to destination, IP address is necessary but not sufficient; we also need the physical address of the destination machine. ARP is used to get the physical address (MAC address) of destination machine. • Address Resolution Protocol is a communication protocol used for discovering physical address associated with given network address. Typically, ARP is a network layer to data link layer mapping process, which is used to discover MAC address for given Internet Protocol Address. • Before sending the IP packet, the MAC address of destination must be known. If not so, then sender broadcasts the ARP-discovery packet requesting the MAC address of intended destination. • Since ARP-discovery is broadcast, every host inside that network will get this message but the packet will be discarded by everyone except that intended receiver host whose IP is associated. Now, this receiver will send a unicast packet with its MAC address (ARP-reply) to the sender of ARP-discovery packet.
  • 61.
  • 62.
  • 63.
  • 64. ARP packet • Hardware Type - Ethernet is type 1 • Protocol Type- IPv4=x0800 • Hardware Length: length of Ethernet Address (6) • Protocol Length: length of IPv4 address (4)
  • 65. Packet Format  HTYPE (Hardware type)  16-bit field defining the underlying type of the network • Ethernet is given the type 1 • ARP can be used on any physical network  PTYPE (Protocol type)  16-bit field defining the protocol • IPv4 is 080016 • ARP can be used with any higher-level protocol  HLEN (Hardware length)  8-bit field defining the length of the physical address in bytes • Ethernet has the value of 6  PLEN (Protocol length)  8-bit field defining the length of the logical address in bytes • IPv4 has the value of 4  OPER (Operation)  16-bit field defining the type of packet  (1) = ARP request, (2) = ARP reply
  • 66. Packet Format  SHA (Sender hardware address)  A variable-length field defining the physical address of the sender  SPA (Sender protocol address)  A variable-length field defining the logical address of the sender  THA (Target hardware address)  A variable-length field defining the physical address of the target  For an ARP request operation packet • This field is all 0s  TPA (Target protocol address)  A variable-length field defining the logical address of the target
  • 67. Encapsulation of ARP packet Note: Type field for Ethernet is x0806  An ARP packet is encapsulated directly into a data link frame (Ethernet packet).  Type field indicates that the data carried by the frame is an ARP packet
  • 68. Operation  The sender knows the target’s IP address  IP asks ARP to create an ARP request message  The sender physical address  The sender IP address  The target physical address field is filled with 0s  The target IP address  The message is passed to the data link layer to encapsulate in a data link frame  Physical destination address is broadcast address
  • 69. Definition of RARP • RARP (Reverse Address Resolution Protocol) is also a network layer protocol • RARP is adapted from the ARP protocol and it is just reverse of ARP. • RARP perform following steps to obtain an IP address from the server. • The sender broadcast the RARP request to all the other host present in the network. • The RARP request packet contains the physical address of the sender. • The authorized RARP server replies directly to requesting host with the RARP response packet which contains IP address for the sender. • RARP is not being used in today’s networks. Because we have much great featured protocols like BOOTP (Bootstrap Protocol) and DHCP (Dynamic Host Configuration Protocol).
  • 73. Comparison Chart BASIS FOR COMPARISON ARP RARP Full Form Address Resolution Protocol. Reverse Address Resolution Protocol. Basic Retrieves the physical address of the receiver. Retrieves the logical address for a computer from the server. Mapping ARP maps 32-bit logical (IP) address to 48-bit physical address. RARP maps 48-bit physical address to 32-bit logical (IP) address.
  • 74. ICMP
  • 75. Why ICMP is needed? • The IP protocol is a best-effort delivery service that delivers a datagram from its original source to its final destination • However, it has two deficiencies: lack of error control and lack of assistance mechanisms • What happens if something goes wrong? What happens if a router must discard a datagram because it cannot find a router to the final destination, or because the time-to-live field has a zero value? • The Internet Control Message Protocol (ICMP) has been designed to compensate for the two deficiencies
  • 76. ICMP Encapsulation • ICMP itself is a network layer protocol. However, its messages are not passed directly to the data link layer as would be expected. • Instead, the messages are first encapsulated inside IP datagrams before going to the lower layer • The value of the protocol field in the IP datagram is 1 to indicate that the IP data is an ICMP message
  • 77. Types of ICMP Messages • ICMP message are divided into two broad categories: error-reporting messages and query messages • The error-reporting messages report problems that a router or a host (destination) may encounter when it processes an IP packet • The query messages help a host or a network manager get specific information from a router or another host
  • 78. Types of ICMP Messages (cont.)
  • 79. Message Format • An ICMP message has an 8-byte header and a variable-size data section • The first field, ICMP type defines the type of the message and the Code field specifies the reason for the particular message type , checksum is used for error detection and correction. • The rest of the header is specific for each message type • The data section in error messages carries information for finding the original packet that had the error • In query messages, the data section carries extra information based on the type of the query General format of ICMP messages
  • 80. Error Reporting • IP is not concerned with error checking and error control • ICMP does not correct errors, it simply reports them • Five types of errors are handled: destination unreachable, source quench, time exceeded, parameter problems, and redirection
  • 81. Contents of data field for the error messages
  • 82. Destination Unreachable • When a router cannot route a datagram or a host cannot deliver a datagram, the datagram is discarded and the router or the host sends a destination-unreachable message back to the source host that initiated the datagram
  • 83. Source Quench • The source-quench message in ICMP was designed to add a kind of flow control to the IP • When a router or host discards a datagram due to congestion, it sends a source-quench message to the sender of the datagram • This messages has two purposes: First, it informs the source that the datagram has been discarded, Second, it warns the source that there is congestion somewhere in the path and that the source should slow down (quench) the sending process
  • 84. Time Exceeded • The time-exceeded message is generated in 2 cases: • When a datagram is discarded due to the value of time to live field is zero • When all fragments that make up a message do not arrive at the destination host within a certain time limit In a time-exceeded message, code 0 is used only by routers to show that the value of the time-to-live field is zero. Code 1 is used only by the destination host to show that not all of the fragments have arrived within a set time.
  • 85. Parameter Problem • An ambiguity in the header part of a datagram can create serious problems as the datagram travels through the Internet • If a router or the destination host discovers an ambiguous or missing value in any field of the datagram, it discards the datagram and sends a parameter-problem message back to the source
  • 86. Redirection • Normally, hosts do not take part in the routing update process because there are many more hosts in an internet than routers • The hosts usually use static routing and their routing table has a limited number of entries • They usually know the IP address of a router, the default router • Fore this reason, the hosts may send a datagram, which is destined for another network, to the wrong router • In this case, the router that receives the datagram will forward the datagram to the correct router • To update the routing table of the host, it sends a redirect message to the host IP packet 1 RM 2 IP packet 3 IP packet 4
  • 87. Query • ICMP can also diagnose some network problems through the query messages, a group of four different pairs of messages • In this type of ICMP message, a node sends a message that is answered in a specific format by the destination node.
  • 88. Echo Request and Reply • The echo-request and echo-reply messages are designed for diagnostic purposes • The combination of echo-request and echo-reply messages determines whether two systems (hosts or routers) can communication with each other at the IP level • Echo-request and echo-reply can determine whether or not a node is functioning properly. The node to be tested is sent an echo-request message. The optional data field contains a message that must be repeated exactly by the responding node in its echo-request message
  • 89. Timestamp Request and Reply • Two machines (hosts or routers) can use the timestamp- request and timestamp-reply messages to determine the round-trip time needed for an IP datagram to travel between them • It can also use to synchronize the clocks in two machines
  • 92. • Media Access Control (MAC) addresses in the network access layer ▫ Associated w/ network interface card (NIC) ▫ 48 bits or 64 bits • IP addresses for the network layer ▫ 32 bits for IPv4, and 128 bits for IPv6 ▫ E.g., 123.4.56.7 • IP addresses + ports for the transport layer ▫ E.g., 123.4.56.7:80 • Domain names for the application/human layer ▫ E.g., www.google.com Types of Addresses in Internet
  • 93.
  • 94. Packet Delivery • The network layer supervises the handling of the packets by the underlying physical networks. • The delivery of a packet to its final destination is accomplished using two different methods of delivery: direct and indirect. • Direct Delivery • Indirect Delivery
  • 95. Direct vs. Indirect Delivery • Direct delivery - transmit datagram across a single physical network to the destination. • Indirect delivery - transmit datagram across multiple physical networks (with the support of routers) to the destination. • How does a machine know which method of delivery to use?
  • 96. Direct Delivery and Indirect Delivery
  • 97. Direct Delivery • Map the destination IP address to a physical address. • Encapsulate the datagram in a physical frame. • Send the frame over the physical network to the destination.
  • 99. Indirect Delivery • Encapsulate the datagram in a frame. • Choose a router on the physical network. • Send the frame to that router. • Router forwards the datagram on towards its final destination. • How does the host choose a router? • How does the router forward the datagram?
  • 100. Indirect Delivery Link LinkLink A B Indirect delivery Indirect delivery
  • 101. • Forwarding means to deliver the packet to the next hop (which can be the final destination or the intermediate connecting device). • Although the IP protocol was originally designed as a connectionless protocol, today the tendency is to use IP as a connection-oriented protocol. Forwarding • Based on Destination Address or the Label
  • 103. Network-specific method N2 R1 Destination Next Hop Network-specific routing table for host S A B C D Destination R1 R1 R1 R1 Next Hop Host-specific routing table for host S
  • 104. Host-specific routing R2 Host B R3 Host A R1 N1 N2 N3 Routing table for host A R3 R1 R3 ...... Destination Next Hop Host B N2 N3 ......
  • 105. Simplified forwarding module in classless address
  • 106. Definition of Unicast • In Computer Networks, the term unicast and multicast are the information transmission methods. • In unicast, one station transfers the information to only one receiver station. • In multicast, the sender transfers the information to a group of interested receiver stations. • That is unicast is a one-to-one communication and multicast is a one-to-many communication process.
  • 107.
  • 108. • In multicast, you can clearly see that the sender station has created a single packet only which now will be delivered to the group of interested stations only. A single packet is forwarded to the group of receiving stations. • It’s hard to use multicasting across a large network because only small sections of the internet are enabled in multicast .
  • 109. Difference Between Unicast and Multicast COMPARISON UNICAST MULTICAST Basic One sender and one receiver. One sender and multiple receivers. Bandwidth Multiple unicasting utilizes more bandwidth as compared to multicast. Multicasting utilizes bandwidth efficiently. Mapping One-to-one. One-to-many. Application Web surfing, file transfer. Multimedia delivery, stock exchange.
  • 110. Routing • Router - a computer that performs routing. • Routing - the process of choosing a path which to send data packets from host to another host. • Routing is one of the Internet Protocol’s (IP) primary functions.
  • 111. Hosts vs Routers • Hosts make routing decisions • Hosts don’t typically transfer packets from one network to another • Routers make routing decisions • Routers typically transfer packets from one network to another
  • 112. Router • A router that accepts incoming packets from one of the input ports (interfaces), uses a routing table to find the output port from which the packet departs, and sends the packet from this output port.
  • 113. Router input port and output port
  • 114. Router Static routing table: The administrator enters the route for each destination into the table. When a table is created, it cannot update automatically when there is a change in the Internet. A static routing table can be used in a small internet that does not change very often, or in an experimental internet for troubleshooting. Dynamic Routing Table: A dynamic routing table is updated periodically by using one of the dynamic routing protocols such as RIP, OSPF, or BGP. Whenever there is a change in the Internet, such as a shutdown of a router or breaking of a link, the dynamic routing protocols update all the tables in the routers automatically. The routers in a big internet such as the Internet need to be updated dynamically for efficient delivery of the IP packets. RIP: Routing Information Protocol , OSPF: Open Shortest Path First , BGP: Border Gateway Protocol
  • 115. Routing algorithm Algorithm is used to determine the routing function. For each node of a network, the algorithm determines a routing table, in which each destination, matches an output line. There are three main types of routing algorithms: • Distance Vector (distance-vector routing); • To link state (link state routing); • Path to vector (path-vector routing).
  • 116. Routing Table • Routing table - each machine stores information about other destination and how to reach them. • Using net-id i.e. the portion of the IP address keeps routing tables: • Small • Relatively stable Questions: • How does a host or router initialize its routing table? • How are routing tables updated as the network changes?
  • 117. Unicast Routing Protocols 1. A routing table can be either static or dynamic. 2. A static table is one with manual entries. 3. A dynamic table is one that is updated automatically when there is a change somewhere in the Internet. 4. A routing protocol is a combination of rules and procedures that lets routers in the Internet inform each other of changes.
  • 118. Distance Vector 1. It is a dynamic routing algorithm in which each router computes distance between itself and each possible destination i.e. its immediate neighbors. 2. Distance vector protocols are estimate the distance to work out the best path for packets transmission with in a network. 3. Generally, distance vector protocols send a routing table full information to neighboring devices. The sharing of information with the neighbors takes place at regular intervals. 4. This approach makes them low investment for administrators as they can be deployed without much need to be managed. 5. The only issue is that they require more bandwidth to send on the routing tables and can run into routing loops as well. 6. It makes use of Bellman Ford Algorithm for making routing tables.
  • 119. Initialization of tables in distance vector routing In distance vector routing, each node shares its routing table with its immediate neighbors periodically and when there is a change.
  • 121. Link State Routing 1. It is a dynamic routing algorithm in which each router shares knowledge of its neighbors with every other router in the network. 2. A router sends its information about its neighbors only to all the routers through flooding. 3. Information sharing takes place only whenever there is a change. 4. It makes use of Dijkastra’s Algorithm for making routing tables. 5. Problems – Heavy traffic due to flooding of packets. – Flooding can result in infinite looping which can be solved by using Time to leave (TTL) field.
  • 122. Link State Protocols 1. Link state protocols take a different approach to finding the best path in that they share information with other routers in proximity. 2. The route is calculated based on the speed of the path to the destination and the cost of resources. 3. Link state protocols use an algorithm to work this out. One of the key differences to a distance vector protocol is that link state protocols don’t send out routing tables; instead, routers notify each other when changes are detected.
  • 123. Link State Protocols 1. Routers using the link state protocol creates three types of tables; • neighbour table, • topology table, and • routing table. 2. The neighbor table stores details of neighboring routers using the link state protocol, 3. the topology table stores the entire network topology, and 4. the routing table stores the most efficient routes.
  • 125. Distance Vector and Link State Protocols Distance Vector Link State Sends entire routing table during updates Only provides link state information Sends periodic updates every 30-90 seconds Uses triggered updates Broadcasts updates Multi casts updates Vulnerable to routing loops No risk of routing loops RIP, IGRP OSPF, IS-IS
  • 126.
  • 127.
  • 128.
  • 129.
  • 130.
  • 131.
  • 132.
  • 133.
  • 134.
  • 135.
  • 136.
  • 137.
  • 138.
  • 139.
  • 140.
  • 141.
  • 142.
  • 143.
  • 144.
  • 145.
  • 146.
  • 147.
  • 148.
  • 149.
  • 150.
  • 151.
  • 152. The Internet Control Message Protocol (ICMP) is a supporting protocol in the Internet protocol suite. It is used by network devices, including routers, to send error messages and operational information indicating, for example, that a requested service is not available or that a host or router could not be reached.[1] ICMP differs from transport protocols such as TCP and UDP in that it is not typically used to exchange data between systems, nor is it regularly employed by end-user network applications (with the exception of some diagnostic tools like ping and traceroute). ICMP (Internet Control Message Protocol)
  • 153. •ICMP (Internet Control Message Protocol) is an error-reporting protocol network devices like routers use to generate error messages to the source IP address when network problems prevent delivery of IP packets. ICMP creates and sends messages to the source IP address indicating that a gateway to the Internet that a router, service or host cannot be reached for packet delivery. Any IP network device has the capability to send, receive or process ICMP messages. ICMP is not a transport protocol that sends data between systems. While ICMP is not used regularly in end-user applications, it is used by network administrators to troubleshoot Internet connections in diagnostic utilities including ping and traceroute. One of the main protocols of the Internet Protocol suite, ICMP is used by routers, intermediary devices or hosts to communicate error information or updates to other routers, intermediary devices or hosts. The widely used IPv4 (Internet Protocol version 4) and the newer IPv6 use similar versions of the ICMP protocol (ICMPv4 and ICMPv6, respectively). ICMP (Internet Control Message Protocol)
  • 154. ICMP messages are transmitted as datagrams and consist of an IP header that encapsulates the ICMP data. ICMP packets are IP packets with ICMP in the IP data portion. ICMP messages also contain the entire IP header from the original message, so the end system knows which packet failed The ICMP header appears after the IPv4 or IPv6 packet header and is identified as IP protocol number 1. The complex protocol contains three fields: •The major type that identifies the ICMP message; •The minor code that contains more information about the type field; and •The checksum that helps detect errors introduced during transmission. Following the three fields is the ICMP data and the original IP header to identify which packets actually failed. ICMP has been used to execute denial-of-service attacks (also called the ping of death) by sending an IP packet larger than the number of bytes allowed by the IP protocol. ICMP (Internet Control Message Protocol)
  • 156. Routing • Task • To define the route of packets through the network • From the source to the destination system • Routing algorithm • Defines on which outgoing line packet will be transmitted • Route determination • Datagram • Routing algorithm makes individual decision for each packet • Virtual circuit • Routing algorithm runs only during connect (session routing)
  • 157. Routing: Routing and Forwarding • Distinction can be made • Routing: makes decision which route to use • Forwarding: what happens when a packet arrives desti- nation link A 0 B 3 C 1 D 4 Routing Process Topology, link utilization, etc. information Fills & Updates Uses & Looks up Data packets Incoming lines Outgoing lines Forwarding Process Routing table Router
  • 158. Properties for Routing Algorithms • Simplicity • Minimize load of routers • Robustness • Compensation for IS and link failures • Handling of topology and traffic changes • Stability • Constant results • No volatile adaptations to new conditions • Fairness • Optimality
  • 159. Classes of Routing Algorithms • Class Non-adaptive Algorithms • Current network state not taken into consideration • Assume average values • No change during operation (static routing) • With knowledge of the overall topology • Spanning tree • Flow-based routing • Without knowledge of the overall topology • Flooding • Class Adaptive Algorithms • Decisions are based on current network state • Measurements / estimates of the topology and the traffic volume • Further sub-classification into • Centralized algorithms • Isolated algorithms • Distributed algorithms
  • 160.
  • 161.
  • 162. Definition of ARP ARP (Address Resolution Protocol) is a network layer protocol. As ARP is a dynamic mapping protocol, each host in the network knows the Logical address of another host. Now, suppose a host needs to send the IP datagram to another host. But, the IP datagram must be encapsulated in a frame so that it can pass through the physical network between sender and receiver. Here, the sender needs the physical address of the receiver so that it is being identified that to which receiver the packet belong to when the packet travel in the physical network. For retrieving the physical address of the receiver the sender performs the following action. The sender sends the ARP query packet on the network which is broadcasted to all the other host or router present in the network. The ARP query packet contains the logical and physical address of the sender and the logical address of the receiver. All the host and router receiving the ARP query packet process it but, only the intended receiver identifies its logical address present in the ARP query packet. The receiver then sends ARP response packet which contains the logical (IP) address and physical address of the receiver. The ARP response packet is unicast directly to the sender whose physical address is present in the ARP query packet.
  • 164. Definition of RARP Reverse ARP is a networking protocol used by a client machine in a local area network to request its Internet Protocol address (IPv4) from the gateway-router’s ARP table. The network administrator creates a table in gateway-router, which is used to map the MAC address to corresponding IP address. When a new machine is setup or any machine which don’t have memory to store IP address, needs an IP address for its own use. So the machine sends a RARP broadcast packet which contains its own MAC address in both sender and receiver hardware address field. LAN technologies like Ethernet, Ethernet II, Token Ring and Fiber Distributed Data Interface (FDDI) support the Address Resolution Protocol. RARP is not being used in today’s networks. Because we have much great featured protocols like BOOTP (Bootstrap Protocol) and DHCP( Dynamic Host Configuration Protocol).
  • 165. • RARP is outdated now because of two reasons. First, the RARP is using the broadcast service of the data-link layer; that means the RARP must be present at each network. Second, RARP only provides IP address but today the computer also need other information. Key Differences Between ARP and RARP 1. The full form of ARP is Address Resolution Protocol whereas, the full form of RARP is Reverse Address Resolution Protocol. 2. ARP protocol retrieves the physical address of the receiver. On the other hand, the RARP protocol retrieves logical (IP) address of the protocol. 3. ARP maps 32 bit logical (IPv4) address to a 48-bit physical address of the receiver. On the other hand, RARP maps 48-bit physical address to 32-bit logical address of the receiver.
  • 166.
  • 167. Difference Between ARP and RARP • ARP and RARP both are the Network layer protocol. • Whenever a host needs to send an IP datagram to another host, the sender requires both the logical address and physical address of the receiver. • The dynamic mapping provides two protocols ARP and RARP. The basic difference between ARP and RARP is that ARP when provided with the logical address of the receiver it obtains the physical address of the receiver whereas in RARP when provided with the physical address of the host, it obtains the logical address of the host from the server.
  • 168. Mapping logical to physical : ARP • Each time a machine knows one of the two address (either logical or physical). • It can use a protocol to find the other one (either logical or physical).
  • 169. Mapping physical to logical : RARP • Each time a machine knows one of the two address (either logical or physical). It can use a protocol to find the other one (either logical or physical). • RARP finds the logical address for a machine that only knows its physical address. • This if often encountered on thin-client workstations. No disk, so when machine is booted, it needs to know its IP address (don’t want to burn the IP address into the ROM). • So we need something more than RARP. BOOTP, and now DHCP have replaced RARP.
  • 171. Review: Internet Architecture R2 R4 R5 Host R1 R3 Net 1 Net 2
  • 172. The IP Routing Algorithm 1. Extract the destination IP address, D, from the datagram and compute the net-id, N 2. If N matches any directly connected network address deliver the datagram directly 3. else if the routing table contains a host-specific address for D send the datagram to the next-hop specified in the table 4. else if the routing table contains a route for network N send the datagram to the next-hop specified in the table 5. else if the routing table contains a default router send the datagram there 6. else declare a routing error