Download as pdf or txt
Download as pdf or txt
You are on page 1of 115

Introduction to

Chapter.18
Network Layer
18.1

Network Layer is the third layer in the


18.2 Internet model that provides services and
functionalities for the transmission of data packets
18.3 from a source to the destination.

18.4

18.5
What are the main services
Chapter.18
provided by the network layer?
• Packetizing - is encapsulating the
18.1 payload in a network-layer packet at
the source and decapsulating the
payload from the network-layer
18.2
packet at the destination.
• Routing - is the process of moving
data packet from its source to the
18.3
destination with the best route.
• Forwarding - is the action applied
by each router when a packet
18.4 arrives at one of its interfaces

18.5
Other Services from the
Network Layer
Chapter.18

18.1 • Error Control - Network layer added a checksum field to the datagram to
control any corruption in the header, but not in the whole datagram.
• Flow Control - regulates the amount of data a source can send without
overwhelming the receiver. The network-layer does not directly provide any flow
18.2 control.
• Congestion Control - occurs when the number of datagrams sent by the
source is beyond the capacity of the network or routers.
18.3
• Quality of Service - As the Internet has allowed new applications such as
multimedia communication, the quality of service (QoS) of the communication
18.4 has become more and more important.
• Security - is to ensure the confidentiality, integrity, and availability of data.

18.5
Chapter.18

Packet Switching
18.1

Packet Switching is a data transmission using a packet-switched network


Two Approaches to Route the Packets
18.2 • Datagram Approach: Connectionless Service
• Virtual-Circuit Approach: Connection-Oriented Service
18.3

18.4

18.5
Chapter.18
Datagram Approach:
Connectionless Service
• When the network layer provides a
connectionless service, each packet traveling
18.1
in the Internet is an independent entity; there
is no relationship between packets belonging
to the same message.
• The switches in this type of network are
18.2 called routers.
• Each packet is routed based on the
information contained in its header: source
18.3 and destination addresses.
• In the datagram approach, the forwarding
decision is based on the destination
18.4
address of the packet.

18.5
Virtual-Circuit Approach: Connection-Oriented
Chapter.18
Service
• In a connection-oriented service, there is a relationship between all packets belonging
18.1
to a message.
• a virtual connection should be set up to define the path for the datagrams.
• After connection setup, the datagrams can follow the same path.
• not only must the packet contain the source and destination addresses, it must also
contain a flow label, a virtual circuit identifier that defines the virtual path the packet
18.2 should follow.

18.3

18.4

18.5
Virtual-Circuit Approach: Connection-Oriented
Chapter.18
Service
To create a connection-oriented service, a three-phase process is used:
18.1
• Setup - In the virtual-circuit approach, the forwarding decision is based on the label of
the packet. Two auxiliary packets need to be exchanged between the sender and the
receiver:
• Request packet
• Acknowledgment Packet
18.2 • Data transfer - After all routers have created their forwarding table for a specific virtual
circuit, then the network-layer packets belonging to one message can be sent one
after another.
18.3
• Teardown - After sending all packets, sender sends a special packet called a
teardown packet, receiver responds with a confirmation packet. All routers delete the
18.4
corresponding entries from their tables.

18.5
Chapter.18

18.1
NETWORK-LAYER
PERFORMANCE
18.2 The performance of a network can be measured in
terms of delay, throughput, and packet loss.
18.3 Congestion control is an issue that can improve the
performance
18.4

18.5
Chapter.18

Delay
18.1
The delays in a network can be divided into five types:
• Transmission delay: Delaytr = (Packet length) / (Transmission rate)
• Propagation delay: Delaypg = (Distance) / (Propagation speed)
18.2
• Processing delay: Delaypr = Time required to process a packet in a router or a
destination host
• Queuing delay: Delayqu = The time a packet waits in input and output queues in
18.3
a router
• Total Delay: Total delay = (n + 1)(Delaytr + Delaypg + Delaypr) + (n)(Delayqu)
18.4

18.5
Chapter.18

Throughput
18.1

18.2 It is the number of bits that can pass through a


point in one second, which is actually the
transmission rate of data at that point.
18.3

18.4

18.5
How can we determine the
Chapter.18
throughput of the whole path?
18.1
𝑻𝒉𝒓𝒐𝒖𝒈𝒉𝒑𝒖𝒕 = 𝒎𝒊𝒏𝒊𝒎𝒖𝒎 {𝑻𝑹𝟏 , 𝑻𝑹𝟐 , … 𝑻𝑹𝒏 }

18.2

18.3 • The Internet backbone has a


very high transmission rate, in
the range of gigabits per
18.4
second.

18.5
Chapter.18

18.1
Packet Loss
When a router receives a packet while processing another
18.2 packet, the received packet needs to be stored in the input
buffer waiting for its turn. A router, however, has an input
buffer with a limited size. A time may come when the buffer
18.3
is full and the next packet needs to be dropped.
18.4

18.5
Chapter.18 Congestion Control
18.1 • It is a mechanism for improving performance.
• Congestion at the network layer is related to two issues,
throughput and delay.
18.2

18.3

18.4

18.5
Chapter.18
2 Categories of Congestion
Control Mechanism
18.1

• Open-Loop Congestion Control


18.2 • Closed-Loop Congestion Control

18.3

18.4

18.5
Chapter.18
2 Categories of Congestion
Control Mechanism
18.1

• Open-Loop Congestion Control


• Closed-Loop Congestion Control
18.2 • policies are applied to prevent congestion before it happens. In these
mechanisms, congestion control is handled by either the source or the
destination.
18.3 • list of policies that can prevent congestion.
• Retransmission Policy
• Window Policy
18.4 • Acknowledgment Policy
• Discarding Policy
• Admission Policy
18.5
Chapter.18
2 Categories of Congestion
Control Mechanism
18.1
• Open-Loop Congestion Control
• Closed-Loop Congestion Control
18.2
• mechanisms try to alleviate congestion after it happens.
• Several mechanisms have been used by different protocols
• Backpressure
18.3 • Choke Packet
• Implicit Signaling
18.4 • Explicit Signaling

18.5
Chapter.18

IPV4 ADDRESSES
18.1
Internet address or IP address
• It is the identifier used in the IP layer of the TCP/IP protocol suite to identify the connection of each
device to the Internet.
IPv4 address
18.2
• It is a 32-bit address that uniquely and universally defines the connection of a host or a router to the
Internet.
• IPv4 addresses are unique in the sense that each address defines one, and only one, connection to
18.3 the Internet.
• IPv4 addresses are universal in the sense that the addressing system must be accepted by any host
that wants to be connected to the Internet.
18.4

18.5
Chapter.18

Address Space
18.1
• It is the total number of addresses used by the protocol.
• If a protocol uses b bits to define an address, the address space is 2b because each bit can
have two different values (0 or 1).
18.2 • IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296
(more than four billion).
• If there were no restrictions, more than 4 billion devices could be connected to the Internet.
18.3

18.4

18.5
Chapter.18
Notation
• There are three common notations to show an IPv4 address:
18.1
• binary notation (base 2)
• dotted-decimal notation (base 256)
• hexadecimal notation (base 16).
18.2

18.3

18.4

18.5
Chapter.18
Hierarchy in Addressing
• A 32-bit IPv4 address is also hierarchical, but divided only into two parts.
18.1
• Prefix - defines the network.
• Suffix - defines the node (connection of a device to the Internet)

18.2

18.3

18.4

18.5
Chapter.18
Two Address Distribution
Mechanisms
18.1 Classful Addressing
Classless Addressing
• Three fixed-length prefixes were
designed instead of one (n = 8, n = 16, • It is an addressing mechanism in
18.2 and n = 24). The whole address space which the IP address space is not
was divided into five classes (class A, divided into classes.
B, C, D, and E). • In classless addressing, the address
space is divided into variable-size
18.3 blocks based on the demand.

18.4

18.5
Dynamic Host Configuration
Chapter.18
Protocol (DHCP)
18.1 • An extension to BOOTP that dynamically assigns configuration
information.
• DHCP is an application-layer program, using the client-server
18.2 paradigm, that actually helps TCP/IP at the network layer.
• It has found such widespread use in the Internet that it is often
called a plug-and-play protocol.
18.3
• It can also be configured to provide temporary, on demand, IP
addresses to hosts.
18.4

18.5
Dynamic Host Configuration
Chapter.18
Protocol (DHCP)
18.1 DHCP Message Format
• DHCP is a client-server protocol in
which the client sends a request
message and the server returns a
18.2 response message.
• The server uses a number, called
a magic cookie, in the format of an
18.3 IP address with the value of
99.130.83.99. When the client
finishes reading the message, it
18.4 looks for this magic cookie. If
present, the next 60 bytes are
options.
18.5
Dynamic Host Configuration
Chapter.18
Protocol (DHCP)
18.1
DHCP Operation

18.2

18.3

18.4

18.5
Dynamic Host
Chapter.18 Configuration Protocol
Two Well-Known Ports
(DHCP)
18.1
• DHCP uses two well-known ports (68 and 67) instead of one well-known and one
ephemeral.
Using FTP
• The server does not send all of the information that a client may need for joining the
18.2
network. In the DHCPACK message, the server defines the pathname of a file in which
the client can find complete information such as the address of the DNS server. The client
can then use a file transfer protocol to obtain the rest of the needed information.
18.3
Error Control
• DHCP uses the service of UDP, which is not reliable.
• To provide error control, DHCP uses two strategies.
18.4 • First, DHCP requires that UDP use the checksum.
• Second, the DHCP client uses timers and a retransmission policy if it does not
receive the DHCP reply to a request.
18.5
Dynamic Host Configuration
Chapter.18
Protocol (DHCP)
18.1 Transition States
• To provide dynamic address allocation, the DHCP client acts as
a state machine that performs transitions from one state to
18.2 another depending on the messages it receives or sends.

18.3

18.4

18.5
Network Address Translation (NAT)
Chapter.18

18.1 • It is a technology that allows a private network to use a set of


private addresses for internal communication and a set of global
Internet addresses for external communication.
18.2

18.3

18.4

18.5
Network Address Translation (NAT)
Chapter.18

Address Translation
18.1 • All of the outgoing packets go through the NAT router, which
replaces the source address in the packet with the global NAT
address. All incoming packets also pass through the NAT router,
18.2 which replaces the destination address in the packet (the NAT
router global address) with the appropriate private address.
18.3

18.4

18.5
Network Address Translation (NAT)
Chapter.18

Translation Table
18.1
• Using One IP Address: In this strategy, communication must always be
initiated by the private network. The NAT mechanism described requires
that the private network start the communication.
18.2
• Using a Pool of IP Addresses: The use of only one global address by the
NAT router allows only one private-network host to access a given external
host. To remove this restriction, the NAT router can use a pool of global
18.3 addresses.
• Using Both IP Addresses and Port Addresses: To allow a many-to-many
relationship between private-network hosts and external server programs,
18.4 we need more information in the translation table.

18.5
18.5

Chapter.19 FORWARDING OF IP PACKETS

19.1 • When IP is used as a connectionless protocol, forwarding is based on


the destination address of the IP datagram; when the IP is used as a
connection-oriented protocol, forwarding is based on the label attached
19.2 to an IP datagram.

19.3

Chapter.20
18.5
Forwarding Based on Destination
Chapter.19
Address
19.1 • In this case, forwarding requires a host or a router to have a
forwarding table.
• In classless addressing, the whole address space is one entity;
19.2
there are no classes. This means that forwarding requires one
row of information for each block involved.
• A classless forwarding table needs to include four pieces of
19.3 information: the mask, the network address, the interface
number, and the IP address of the next router
Chapter.20
18.5

Chapter.19
Forwarding Based on Label
• In the 1980s, an effort started to somehow change IP to behave
19.1
like a connection-oriented protocol in which the routing is
replaced by switching.
• Routing is normally based on searching the contents of a table;
19.2 switching can be done by accessing a table using an index.

19.3

Chapter.20
18.5

Chapter.19

Routers as Packet Switches


19.1

• Routers can be configured to act as either a datagram switch or


a virtual-circuit switch.
19.2

19.3

Chapter.20
18.5

Chapter.19
NETWORK-LAYER
19.1 PROTOCOLS
Outline:
• IPv4 Protocol
19.2
• ICMPv4
• Mobile IP
19.3

Chapter.20
18.5
INTERNET PROTOCOL (IP)
• The network layer in version 4 can be thought of as one main protocol
Chapter.19 and three auxiliary ones.
• The main protocol, Internet Protocol version 4 (IPv4), is responsible for
packetizing, forwarding, and delivery of a packet at the network layer.
19.1 • The Internet Control Message Protocol version 4 (ICMPv4) helps IPv4
to handle some errors that may occur in the network-layer delivery.
• The Internet Group Management Protocol (IGMP) is used to help IPv4
in multicasting.
19.2
• The Address Resolution Protocol (ARP) is used to glue the network
and data-link layers in mapping network-layer addresses to link-layer
addresses.
19.3
• IPv4 is an unreliable datagram protocol—a best-effort delivery service.
• IPv4 is also a connectionless protocol that uses the datagram
Chapter.20 approach.
18.5
INTERNET PROTOCOL (IP)
Chapter.19

19.1

19.2

19.3

Chapter.20
18.5
INTERNET PROTOCOL (IP)
Datagram Format
Chapter.19 • Packets used by the IP are called datagrams.

19.1

19.2

19.3

Chapter.20
18.5
INTERNET PROTOCOL (IP)
Datagram Format
Chapter.19
• Version Number: The 4-bit version number (VER) field defines the version of the
IPv4 protocol, which, obviously, has the value of 4.
• Header Length: The 4-bit header length (HLEN) field defines the total length of the
19.1 datagram header in 4-byte words.
• Service Type: The 8-bit service type field provides differentiated services (DiffServ).
• Total Length: This 16-bit field defines the total length (header plus data) of the IP
datagram in bytes. Length of data = total length − (HLEN) × 4
19.2 • Identification, Flags, and Fragmentation Offset: These three fields are related to
the fragmentation of the IP datagram when the size of the datagram is larger than the
underlying network can carry.
19.3 • Time-to-live: The time-to-live (TTL) field is used to control the maximum number of
hops (routers) visited by the datagram.
• Protocol: In TCP/IP, the data section of a packet, called the payload, carries the
Chapter.20 whole packet from another protocol.
18.5
INTERNET PROTOCOL (IP)
Datagram Format
Chapter.19 • Header checksum: IP adds a header checksum field to check the header, but not
the payload.
• Source and Destination Addresses: These 32-bit source and destination address
fields define the IP address of the source and destination respectively.
19.1
• Options: Options can be used for network testing and debugging.
• Payload: Payload is the packet coming from other protocols that use the service of
IP.
19.2

19.3

Chapter.20
18.5
INTERNET PROTOCOL (IP)
Fragmentation
Chapter.19
• It is the division of a packet into smaller units to accommodate
a protocol’s MTU.
• A datagram can travel through different networks.
19.1
• The format and size of the sent frame depend on the protocol
used by the physical network through which the frame is going
19.2
to travel.

Maximum Transfer
19.3 Unit (MTU)
It is the largest size data unit a
specific network can handle.
Chapter.20
18.5
INTERNET PROTOCOL (IP)
Chapter.19
Fields Related to Fragmentation
• Three fields in an IP datagram are related to fragmentation:
o 16-bit identification field identifies a datagram originating
19.1 from the source host.
o 3-bit flags field defines three flags.
❑ The leftmost bit is reserved (not used). The second bit
19.2 (D bit) is called the do not fragment bit.
❑ The third bit (M bit) is called the more fragment bit.
o 13-bit fragmentation offset field shows the relative
19.3 position of this fragment with respect to the whole
datagram. It is the offset of the data in the original datagram
Chapter.20 measured in units of 8 bytes.
18.5
INTERNET PROTOCOL (IP)
Options
Chapter.19
• can be used for network testing and debugging.
• Options are not a required part of the IPv4 header, option processing is required of the
IPv4 software
• Options are divided into two broad categories:
o Single-Byte Options - There are two single-byte options:
19.1 ❑ No Operation - is a 1-byte option used as a filler between options.
❑ End of Option - is a 1-byte option used for padding at the end of the option
field. It, however, can only be used as the last option.
o Multiple-Byte Options - There are four multiple-byte options:
19.2
❑ Record Route - is used to record the Internet routers that handle the
datagram.
❑ Strict Source Route - is used by the source to predetermine a route for the
19.3 datagram as it travels through the Internet.
❑ Loose Source Route - is similar to the strict source route, but it is less rigid.
Each router in the list must be visited, but the datagram can visit other routers
Chapter.20 as well.
❑ Timestamp - is used to record the time of datagram processing by a router.
18.5
INTERNET PROTOCOL (IP)
Security of IPv4 Datagrams
Chapter.19 • There are three security issues that are particularly applicable to the IP protocol:
o Packet Sniffing - is a passive attack, in which the attacker does not change the
contents of the packet.
o Packet Modification - The attacker intercepts the packet, changes its contents, and
19.1 sends the new packet to the receiver. The receiver believes that the packet is
coming from the original sender.
o IP Spoofing - An attacker can masquerade as somebody else and create an IP
packet that carries the source address of another computer.
19.2 o IPSec (IP Security) - This protocol, which is used in conjunction with the IP
protocol, creates a connection-oriented service between two entities in which they
can exchange IP packets without worrying about the three attacks. There are four
services of IPSec:
19.3
❑ Defining Algorithms and Keys
❑ Packet Encryption
Chapter.20
❑ Data Integrity
❑ Origin Authentication
18.5 Internet Control Message Protocol version 4
(ICMPv4)
• It supports the unreliable and connectionless Internet Protocol (IP).
Chapter.19
• It is a companion to the IP protocol.
• ICMP itself is a network-layer protocol.
• the messages are first encapsulated inside IP datagrams before going to
19.1
the lower layer
• ICMP messages are divided into two broad categories:
o Error-Reporting Messages report problems that a router or a host
(destination) may encounter when it processes an IP packet.
19.2 o Query Messages occurs in pairs, help a host or a network manager
get specific information from a router or another host.
19.3

Chapter.20
18.5 Internet Control Message Protocol version 4
(ICMPv4)
Chapter.19

19.1

Error-reporting Messages
• Destination Unreachable Message (type 3) - it uses different codes (0 to 15) to define the
19.2 type of error message and the reason why a datagram has not reached its final destination.
• Source Quench Message (type 4) - informs the sender that the network has encountered
congestion and the datagram has been dropped; the source needs to slow down sending more
19.3 datagrams.
• Redirection Message (type 5) - is used when the source uses a wrong router to send out its
message.
Chapter.20 • Parameter Problem Message (type 12) can be sent when either there is a problem in the
header of a datagram (code 0) or some options are missing or cannot be interpreted (code 1).
18.5 Internet Control Message Protocol version 4
(ICMPv4)
Chapter.19

19.1

Query Messages
• Echo Request (Type 8) And The Echo Reply (Type 0) Pair Of Messages are used by a host
19.2 or a router to test the liveliness of another host or router. A host or router sends Figure 19.9
Contents of data field for the error messages IP header Received datagram ICMP packet Sent
IP datagram Rest of IP data ICMP header IP header IP header ICMP header IP header 8 bytes
19.3 8 bytes 8 bytes 578 PART IV NETWORK LAYER an echo request message to another host or
router; if the latter is alive, it responds with an echo reply message.
• Timestamp Request (Type 13) And The Timestamp Reply (Type 14) Pair Of Messages are
Chapter.20 used to find the round-trip time between two devices or to check whether the clocks in two
devices are synchronized.
18.5 Internet Control Message Protocol version 4
(ICMPv4)
Chapter.19 Debugging Tools
• There are two tools that use ICMP for debugging:
o Ping – is used to find if a host is alive and
responding.
19.1
o Traceroute or Tracert - can be used to trace
the path of a packet from a source to the
destination. It can find the IP addresses of all
the routers that are visited along the path.
❑ The tracert messages are encapsulated
19.2 directly in IP datagrams. The tracert, like
traceroute, sends echo-request
messages.
19.3

Chapter.20
18.5 Internet Control Message Protocol version 4
(ICMPv4)
Chapter.19 ICMP Checksum
• It is calculated over the entire message (header and data).

19.1

19.2

19.3

Chapter.20
18.5

Chapter.19
MOBILE IP
• It is an enhanced version of the Internet Protocol (IP).
19.1
• It allows mobile computers to be connected to the Internet at any location
where the connection is possible.

19.2

19.3

Chapter.20
18.5 Mobile IP: Addressing
Stationary Hosts
Chapter.19
• It is a host that remains attached to one network.
Mobile Hosts
• It is a host that can move from one network to another.
19.1

19.2

19.3

Chapter.20
18.5 Mobile IP: Agent
• To make the change of address transparent to the rest of the Internet requires a
home agent and a foreign agent.
Chapter.19 o Home Agent - is Usually a router attached to the home network of the
mobile host that receives and sends packets (for the mobile host) to the
foreign agent.
19.1 o Foreign Agent – is usually a router attached to the foreign network. The
foreign agent receives and delivers packets sent by the home agent to the
mobile host.
❑ When the mobile host acts as a foreign agent, the care-of address is
19.2 called a collocated care-of address.

19.3

Chapter.20
18.5 THREE PHASES in Mobile Communication
1. Agent Discovery
2. Registration
Chapter.19
3. Data Transfer

19.1

19.2

19.3

Chapter.20
18.5 THREE PHASES in Mobile Communication
1. Agent Discovery - consists of two subphases. A mobile host must discover
(learn the address of) a home agent before it leaves its home network. A
Chapter.19
mobile host must also discover a foreign agent after it has moved to a foreign
network.
Agent Advertisement
19.1 When a router advertises its presence on a
network using an ICMP router
advertisement, it can append an agent
advertisement to the packet if it acts as an
19.2 agent.

19.3

Chapter.20
18.5 THREE PHASES in Mobile Communication
1. Agent Discovery - consists of two subphases. A mobile host must discover
(learn the address of) a home agent before it leaves its home network. A
Chapter.19
mobile host must also discover a foreign agent after it has moved to a foreign
network.
Agent Advertisement
19.1 When a router advertises its presence on a
network using an ICMP router
advertisement, it can append an agent
advertisement to the packet if it acts as an
19.2 agent.

Agent Solicitation
When a mobile host has moved to a new
19.3 network and has not received agent
advertisements, it can initiate an agent
solicitation. It can use the ICMP
Chapter.20 solicitation message to inform an
agent that it needs assistance.
18.5 THREE PHASES in Mobile Communication
2. Registration - After a mobile host has moved to a foreign network and
discovered the foreign agent, it must register. There are four aspects of registration:
Chapter.19
1. The mobile host must register itself with the foreign agent.
2. The mobile host must register itself with its home agent. This is normally
done by
19.1
the foreign agent on behalf of the mobile host.
3. The mobile host must renew registration if it has expired.
4. The mobile host must cancel its registration (deregistration) when it returns
19.2
home.

19.3

Chapter.20
18.5 THREE PHASES in Mobile Communication
2. Registration
Chapter.19

Registration Request
It is sent from the mobile host to the foreign
19.1 agent to register its care-of address and
also to announce its home address and
home agent address.

19.2 Registration Reply


It is sent from the home agent to the
foreign agent and then relayed to the
mobile host. The reply confirms or denies
19.3 the registration request.

Chapter.20
18.5 THREE PHASES in Mobile Communication
3. Data Transfer - After agent discovery and registration, a mobile host can
communicate with a remote host.
Chapter.19
From Remote Host to Home Agent
When a remote host wants to send a
packet to the mobile host, it uses its
19.1
address as the source address and the
home address of the mobile host as the
destination address.

19.2 From Home Agent to Foreign Agent


The home agent encapsulates the whole IP
packet inside another IP packet using its
address as the source and the foreign
19.3 agent’s address as the destination.

Chapter.20
18.5 THREE PHASES in Mobile Communication
3. Data Transfer - After agent discovery and registration, a mobile host can
communicate with a remote host.
Chapter.19
From Foreign Agent to Mobile Host
When the foreign agent receives the
packet, it removes the original packet.
19.1 However, since the destination address is
the home address of the mobile host, the
foreign agent consults a registry table to
find the care-of address of the mobile host.

19.2
From Mobile Host to Remote Host
When a mobile host wants to send a
packet to a remote host (for example, a
19.3 response to the packet it has received), it
sends as it does normally. The mobile host
prepares a packet with its home address
Chapter.20 as the source, and the address of the
remote host as the destination.
18.5 THREE PHASES in Mobile Communication
3. Data Transfer - After agent discovery and registration, a mobile host can
communicate with a remote host.
Chapter.19

Transparency
19.1 In this data transfer process, the remote
host is unaware of any movement by the
mobile host. The remote host sends
packets using the home address of the
mobile host as the destination address; it
19.2 receives packets that have the home
address of the mobile host as the source
address. The movement is totally
transparent. The rest of the Internet is
19.3 not aware of the movement of the mobile
host
Chapter.20
18.5 Inefficiency in Mobile IP
Communication involving mobile IP can be inefficient. The inefficiency can be severe or
moderate. The severe case is called double crossing or 2X. The moderate case is called
Chapter.19 triangle routing or dog-leg routing.
Double Crossing Triangle Routing
It occurs when a remote host It occurs when the remote host
19.1 communicates with a mobile host that has communicates with a mobile host that is
moved to the same network (or site) as the not attached to the same network (or site)
remote host as the mobile host.

19.2

19.3
Solution
Chapter.20
One solution to inefficiency is for the remote host to bind the care-of address to the home
address of a mobile host.
18.5

Chapter.19
Unicast Routing
19.1
• If a datagram is destined for only one destination (one-to-one
delivery), it is called as unicast routing.
19.2
• Unicast routing in the Internet, with a large number of routers and
a huge number of hosts, can be done only by using hierarchical
routing: routing in several steps using different routing algorithms.
19.3

Chapter.20
20.1 General Idea behind Unicast Routing
• In unicast routing, a packet is routed, hop by hop, from its source to its
20.2 destination by the help of forwarding tables. There are several routes that a
packet can travel from the source to the destination; what must be determined is
which route the packet should take.
20.3
• An internet is modeled as a weighted graph, in which each edge is associated
with a cost.

Chapter.21

21.1

22.1
Least-Cost Routing
20.1
• The source router chooses a route to the destination router in such a way that
the total cost for the route is the least cost among all possible routes.
20.2
Least-Cost Trees
• A least-cost tree is a tree with the source router as the root that spans the whole
graph (visits all other nodes) and in which the path between the root and any
20.3 other node is the shortest. In this way, we can have only one shortest-path tree
for each node; we have N least-cost trees for the whole internet.

Chapter.21

21.1

22.1
20.1
Routing Algorithms
1. Distance-Vector Routing
• In distance-vector routing, the first thing each node creates is its own least-cost tree with
the rudimentary information it has about its immediate neighbors. The incomplete trees
20.2 are exchanged between immediate neighbors to make the trees more and more complete
and to represent the whole internet
Bellman-Ford Equation
• This equation is used to find the least cost
20.3
between a source node, x, and a destination node,
y, through some intermediary nodes(a, b, c, . . .)
when the costs between the source and the
Chapter.21 intermediary nodes and the least costs between
the intermediary nodes and the destination are
given.
21.1
• In distance-vector routing, normally we want to update an existing least cost with a least
cost through an intermediary node, such as z, if the latter is shorter

22.1
20.1
Routing Algorithms
Distance Vectors
• The concept of a distance vector is the
rationale for the name distance-vector
routing.
20.2 • Distance-vector routing unglues these
paths and creates a distance vector, a
one-dimensional array to represent the
20.3 tree.
• Each node in an internet, when it is booted,
creates a very rudimentary distance vector
Chapter.21
with the minimum information the node can
obtain from its neighborhood.
• these vectors are made asynchronously,
when the corresponding node has been
21.1
booted; the existence of all of them in a
figure does not mean synchronous creation
of them.
22.1
20.1
Routing Algorithms
• After each node has created its vector, it sends a copy of the vector to all its immediate
neighbors. After a node receives a distance vector from a neighbor, it updates its
distance vector using the Bellman-Ford equation.
20.2

20.3

Chapter.21

21.1

22.1
20.1
Routing Algorithms
Distance-Vector Routing Algorithm
• a simplified pseudocode for the distance-vector routing algorithm:

20.2

20.3

Chapter.21

21.1

22.1
20.1
Routing Algorithms
Count to Infinity
• A problem with distance-vector routing is that any decrease in cost (good news)
propagates quickly, but any increase in cost (bad news) will propagate slowly.
20.2 For a routing protocol to work properly, if a link is broken (cost becomes infinity),
every other router should be aware of it immediately, but in distance-vector
routing, this takes some time.
20.3
Two-Node Loop
• One example of count to infinity is the two-node loop problem

Chapter.21

21.1
Split Horizon
• One solution to instability is called split horizon. In this strategy, instead of flooding the table
22.1 through each interface, each node sends only part of its table through each interface.
20.1
Routing Algorithms
Poison Reverse
• In the poison reverse strategy B can still advertise the value for X, but if the
source of information is A, it can replace the distance with infinity as a warning:
20.2 “Do not use this value; what I know about this route comes from you.”
Three-Node Instability
• It can be avoided using split horizon combined with poison reverse. However, if the
20.3 instability is between three nodes, stability cannot be guaranteed.

Chapter.21

21.1

22.1
20.1
Routing Algorithms
2. Link-State Routing
• Link-State Routing uses the term link-state to define the characteristic of a link (an edge)
that represents a network in the internet.
• In this algorithm the cost associated with an edge defines the state of the link.
20.2 Link-State Database (LSDB)
• To create a least-cost tree with this method, each node needs to have a complete map
of the network, which means it needs to know the state of each link. The collection of
20.3 states for all links is called the link-state database (LSDB).
• The LSDB can be represented as a two-dimensional array(matrix) in which the value
of each cell defines the cost of the corresponding link.

Chapter.21

21.1

22.1
20.1
Routing Algorithms
Link-State Database (LSDB)
• Each node can send some greeting
messages to all its immediate neighbors to
collect two pieces of information for each
20.2
neighboring node: the identity of the node
and the cost of the link. The combination of
these two pieces of information is called the
20.3 LS packet (LSP); the LSP is sent out of each
interface.
Formation of Least-Cost Trees
Chapter.21 To create a least-cost tree for itself, using the shared LSDB, each node needs to run the
famous Dijkstra Algorithm. This iterative algorithm uses the following steps:
a. The node chooses itself as the root of the tree, creating a tree with a single node, and
21.1
sets the total cost of each node based on the information in the LSDB.
b. The node selects one node, among all nodes not in the tree, which is closest to the
root, and adds this to the tree. After this node is added to the tree, the cost of all other
nodes not in the tree needs to be updated because the paths may have been changed.
22.1
c. The node repeats step 2 until all nodes are added to the tree.
20.1
Routing Algorithms
Dijkstra’s Algorithm:

20.2

20.3

Chapter.21

21.1

22.1
20.1
Routing Algorithms
3. Path-Vector Routing
• To provide safety, security, and to allow the packet to reach its destination more
efficiently without assigning costs to the route, path-vector (PV) routing has been
20.2 devised. The best route is determined by the source using the policy it imposes on the
route.
Spanning Trees
• In path-vector routing, the path from a source to all destinations is also determined by
20.3 the best spanning tree.

Chapter.21

21.1

22.1
20.1
Routing Algorithms
Creation of Spanning Trees
• Path-vector routing, like distance-vector routing, is an asynchronous and distributed
routing algorithm. The spanning trees are made, gradually and asynchronously, by each
node. When a node is booted, it creates a path vector based on the information it can
20.2 obtain about its immediate neighbor.

20.3

Chapter.21

21.1 • Each node, after the creation of the initial path vector, sends it to all its immediate
neighbors. Each node, when it receives a path vector from a neighbor, updates its path
vector using an equation similar to the Bellman-Ford, but applying its own policy instead
of looking for the least cost.
22.1
20.1
Routing Algorithms
• In the first event, node C receives a copy of B’s vector, which improves its vector: now it
knows how to reach node A. In the second event, node C receives a copy of D’s vector,
which does not change its vector. As a matter of fact, the vector for node C after the first
20.2 event is stabilized and serves as its forwarding table.

20.3

Chapter.21

21.1

22.1
20.1
Routing Algorithms
Path-Vector Algorithm

20.2

20.3

Chapter.21

21.1

22.1
20.1 UNICAST ROUTING PROTOCOLS
• There are three common unicast routing protocols:
1. Routing Information Protocol (RIP)
20.2 2. Open Shortest Path First (OSPF)
3. Border Gateway Protocol (BGP)

20.3

Chapter.21

21.1

21.2
20.1 UNICAST ROUTING PROTOCOLS
1. Routing Information Protocol (RIP)
• It is one of the most widely used intradomain routing protocols based on the distance-
vector routing algorithm.
20.2
Hop Count
• The cost is defined as the number of hops,
which means the number of networks a
packet needs to travel through from the
20.3 source router to the final destination host.
However, the maximum cost of a path can
be 15.
Forwarding Tables
Chapter.21
• A forwarding table in RIP is a three-column
table in which the first column is the
address of the destination network, the
21.1 second column is the address of the next
router to which the packet should be
forwarded, and the third column is the cost
to reach the destination network.
21.2
20.1 UNICAST ROUTING PROTOCOLS
1. Routing Information Protocol (RIP)
RIP Implementation
• RIP is implemented as a process that uses the service of UDP on the well-known port number
20.2
520. Although RIP is a routing protocol to help IP route its datagrams through the AS, the RIP
messages are encapsulated inside UDP user datagrams, which in turn are encapsulated inside
IP datagrams. RIP has gone through two versions: RIP-1 and RIP-2.
o RIP Messages
20.3 ❑ Two RIP processes, a client and a server, like any other processes, need to
exchange messages. RIP-2 defines the format of the message.

Chapter.21

21.1

❑ RIP has two types of messages: request and response.


21.2
20.1 UNICAST ROUTING PROTOCOLS
1. Routing Information Protocol (RIP)
RIP Algorithm
• RIP implements the distance-vector routing algorithm but some changes need to be made to
20.2 enable a router to update its forwarding table:
1. Instead of sending only distance vectors, a router needs to send the whole contents of its
forwarding table in a response message.
2. The receiver adds one hop to each cost and changes the next router field to the address of the
20.3 sending router. The received router selects the old routes as the new ones except in the
following three cases:
• If the received route does not exist in the old forwarding table, it should be added to the
route.
Chapter.21 • If the cost of the received route is lower than the cost of the old one, the received route
should be selected as the new one.
• If the cost of the received route is higher than the cost of the old one, but the value of the
21.1 next router is the same in both routes, the received route should be selected as the new
one. This is the case where the route was actually advertised by the same router in the
past, but now the situation has been changed.
3. The new forwarding table needs to be sorted according to the destination route.
21.2
20.1 UNICAST ROUTING PROTOCOLS
1. Routing Information Protocol (RIP)
Timers in RIP
• RIP uses three timers to support its operation:
20.2
1. The periodic timer controls the advertising of regular update messages.
2. The expiration timer governs the validity of a route.
3. The garbage collection timer is used to purge a route from the forwarding table.
Performance of RIP
20.3 • Update Messages: have a very simple format and are sent only to neighbors; they
are local.
• Convergence of Forwarding Tables: RIP uses the distance-vector algorithm, which
Chapter.21 can converge slowly if the domain is large, but, since RIP allows only 15 hops in a
domain (16 is considered as infinity), there is normally no problem in convergence.
• Robustness: the calculation of the forwarding table depends on information received
21.1
from immediate neighbors, which in turn receive their information from their own
neighbors.

21.2
20.1 UNICAST ROUTING PROTOCOLS
2. Open Shortest Path First (OSPF) - is also an intradomain routing protocol like RIP, but
it is based on the link-state routing protocol. OSPF is an open protocol, which means
20.2 that the specification is a public document.
Metric
• In OSPF, like RIP, the cost of reaching a destination
from the host is calculated from the source router to
20.3 the destination network. However, each link
(network) can be assigned a weight based on the
throughput, round-trip time, reliability, and so on.

Chapter.21
Forwarding Tables
• Each OSPF router can create a forwarding table
21.1 after finding the shortest-path tree between itself and
the destination using Dijkstra's algorithm.

21.2
20.1 UNICAST ROUTING PROTOCOLS
2. Open Shortest Path First (OSPF)
Areas
20.2 • The formation of shortest-path trees in OSPF requires that all routers flood the whole AS
with their LSPs to create the global LSDB.
• The AS is divided into small sections called areas. One of the areas in the AS is
designated as the backbone area, responsible for gluing the areas together.
20.3 • For the purpose of communication, each area has an area identification. The area
identification of the backbone is zero.

Chapter.21

21.1

21.2
20.1 UNICAST ROUTING PROTOCOLS
2. Open Shortest Path First (OSPF)
Link-State Advertisement
20.2 • OSPF is based on the link-state routing algorithm,
which requires that a router advertise the state of
each link to all neighbors for the formation of the
LSDB.
• There are five types of advertisements, each
20.3 capable of advertising different situations.
o Router link - advertises the existence of a
router as a node
❑ A transient link
Chapter.21
❑ A stub link
❑ A point-to-point link
o Network link - advertises the network as a node
21.1 o Summary link to network - advertises the summary of links collected by the backbone
o Summary link to AS - advertises the summary links from other ASs to the backbone area of
the current AS
o External link - done by an AS router to announce the existence of a single network outside
21.2
the AS
20.1 UNICAST ROUTING PROTOCOLS
2. Open Shortest Path First (OSPF)
OSPF Implementation
20.2 • OSPF is implemented as a program in the
network layer, using the service of the IP for
propagation. An IP datagram that carries a
message from OSPF sets the value of the
protocol field to 89.
20.3 OSPF Messages
• OSPF uses five types of messages:
a. The hello message (type 1) is used by a
Chapter.21 router to introduce itself to the neighbors and
announce all neighbors that it already knows.

b. The database description message (type 2) is normally sent in response to the hello message to allow
21.1
a newly joined router to acquire the full LSDB.
c. The link-state request message (type 3) is sent by a router that needs information about a specific LS.
d. The link-state update message (type 4) is the main OSPF message used for building the LSDB.
21.2 e. The link-state acknowledgment message (type 5) is used to create reliability in OSPF.
20.1 UNICAST ROUTING PROTOCOLS
2. Open Shortest Path First (OSPF)
Authentication
20.2 • The OSPF common header has the provision for authentication of the message sender.
OSPF Algorithm
• After each router has created the shortest-path tree, the algorithm needs to use it to create the
corresponding routing algorithm.
• The algorithm needs to be augmented to handle sending and receiving all five types of messages.
20.3
Performance
• Update Message: have a somewhat complex format.
Chapter.21 • Convergence of Forwarding Tables: When the flooding of LSPs is completed, each router can
create its own shortest-path tree and forwarding table; convergence is fairly quick.
• Robustness: OSPF protocol is more robust than RIP

21.1

21.2
20.1 UNICAST ROUTING PROTOCOLS
3. Border Gateway Protocol Version 4 (BGP4) - is the only interdomain routing protocol
used in the Internet today. BGP4 is based on the path-vector algorithm.
20.2 Operation of External BGP (eBGP)
• The eBGP variation of BGP allows two
physically connected border routers in two
different ASs to form pairs of eBGP speakers
20.3 and exchange messages.
• However, there is a need for a logical TCP
connection to be created to make the
exchange of information possible.
Chapter.21 • Each logical connection in BGP parlance is
referred to as a session.
• There are two problems that need to be
addressed:
21.1
o Some border routers do not know how to route a packet destined for nonneighbor ASs.
o None of the nonborder routers know how to route a packet destined for any networks in
other ASs.
21.2
20.1 UNICAST ROUTING PROTOCOLS
3. Border Gateway Protocol Version 4 (BGP4)
Operation of Internal BGP (iBGP)
20.2 • The iBGP protocol is similar to the eBGP protocol in that it uses the service of TCP on the well-
known port 179, but it creates a session between any possible pair of routers inside an
autonomous system.
• if an AS has only one router, there cannot be an iBGP session.
• if there are n routers in an autonomous system, there should be [n x (n - 1) / 2] iBGP sessions
20.3 in that autonomous system to prevent loops in the system.

Chapter.21

21.1

21.2
20.1 UNICAST ROUTING PROTOCOLS
3. Border Gateway Protocol Version 4 (BGP4)
Injection of Information into Intradomain Routing
20.2 • The role of an interdomain routing protocol such as BGP is to help the routers inside the AS to
augment their routing information. The cost is set to the foreign networks at the same cost value
as to reach the first AS in the path.
• In the case of a stub AS, the only area border router adds a default entry at the end of its
forwarding table and defines the next router to be the speaker router at the end of the eBGP
20.3 connection.
• In the case of a transient AS, it needs to inject the whole contents of the path table.

Chapter.21

21.1

21.2
20.1 UNICAST ROUTING PROTOCOLS
3. Border Gateway Protocol Version 4 (BGP4)
Path Attributes
20.2 • BGP allows a destination to be associated with up to seven path attributes.
• Path attribute are divided into two broad categories:
o Well-known attribute - must be recognized by all routers; it can be mandatory.
o Optional attribute - need not be recognized; it can be either transitive or
20.3 intransitive.
• All attributes are inserted after the corresponding destination prefix in an update
message.
Chapter.21

21.1

21.2
20.1 UNICAST ROUTING PROTOCOLS
3. Border Gateway Protocol Version 4 (BGP4)
Route Selection
• In the case where multiple routes are received to a destination, BGP needs to select one among
20.2
them.
• A route in BGP has some attributes attached to it and it may come from an eBGP session or an
iBGP session.
• Note that the first choice is related to the LOCAL-PREF attribute, which reflects the policy
20.3 imposed by the administration on the route.

Chapter.21

21.1

21.2
20.1 UNICAST ROUTING PROTOCOLS
3. Border Gateway Protocol Version 4 (BGP4)
Messages
20.2 • BGP uses four types of messages for
communication between the BGP speakers
across the ASs and inside an AS:
o Open Message: To create a neighborhood
relationship, a router running BGP opens a
20.3 TCP connection with a neighbor and sends
an open message.
o Update Message: It is used by a router to
Chapter.21 withdraw destinations that have been
advertised previously, to announce a route
to a new destination, or both.
o Keepalive Message: The BGP peers that are running exchange keepalive
21.1
messages regularly to tell each other that they are alive.
o Notification: A notification message is sent by a router whenever an error
condition is defected or a router wants to close the session.
21.2
20.1 UNICAST ROUTING PROTOCOLS
3. Border Gateway Protocol Version 4 (BGP4)
Performance
20.2 • BGP performance can be compared with RIP.
• BGP speakers exchange a lot of messages to create forwarding tables, but BGP is
free from loops and count-to-infinity.
• The same weakness in RIP about propagation of failure and corruption also exists in
20.3 BGP.

Chapter.21

21.1

21.2
20.1

20.2

Multicast Routing
20.3
• Multicasting is the sending of the same message to more than
one receiver simultaneously.
• Multicast Routing refers to moving a multicast packet to its
Chapter.21 destinations.

21.1

22.1
Difference Between Unicasting, Multicasting, And
20.1
Broadcasting
Unicasting Multicasting Broadcasting
20.2 There is one source and one There is one source and a group Broadcasting means one-to-all
destination network. The of destinations. The relationship communication: a host sends a
relationship between the source is one to many. A multicast router packet to all hosts in an internet.
and the destination network is one may have to send out copies of the
to one. Each router in the path of same datagram through more than
20.3
the datagram tries to forward the one interface.
packet to one and only one of its
interfaces.

Chapter.21

21.1

21.2
20.1
MULTICASTING BASICS
Multicast Addresses
• A multicast address is an identifier for a
group.
20.2

Multicast Addresses in IPv4


• Multicast addresses in IPv4 belong to a large
20.3 block of addresses. Four bits define the block; the
rest of the bits are used as the identifier for the
group.

Chapter.21

• However, the block is divided into several subblocks, and each subblock is used in a particular
multicast application. The following gives some of the common subblocks:
21.1
o Local Network Control Block - subblock 224.0.0.0/24
o Internetwork Control Block - subblock 224.0.1.0/24
o Source-Specific Multicast (SSM) Block - block 232.0.0.0/8
o GLOP Block - block 233.0.0.0/8
21.2 o Administratively Scoped Block - block 239.0.0.0/8
20.1
MULTICASTING BASICS
Delivery at Data-Link Layer
• In multicasting, the delivery at the Internet level is done using network-layer multicast
addresses (IP addresses allocated for multicasting).
20.2 • In the case of unicasting, this task is done by the ARP protocol, but, because the IP packet
has a multicast IP address, the ARP protocol cannot find the corresponding MAC address
to forward a multicast packet at the data-link layer.
Network with Multicast Support
20.3
• Most LANs support physical multicast addressing. Ethernet is one of them. An Ethernet
physical address (MAC address) is six octets (48 bits) long. If the first 25 bits in an
Ethernet address are 00000001 00000000 01011110 0, this identifies a physical multicast
Chapter.21 address for the TCP/IP protocol. The remaining 23 bits can be used to define a group.
• An Ethernet multicast physical address is in the range 01:00:5E:00:00:00 to
01:00:5E:7F:FF:FF.
21.1

21.2
20.1
MULTICASTING BASICS

Network with No Multicast Support


• Most WANs do not support physical multicast addressing. To send a multicast packet
20.2 through these networks, a process called tunneling is used. In tunneling, the multicast
packet is encapsulated in a unicast packet and sent through the network, where it
emerges from the other side as a multicast packet.
20.3

Chapter.21

21.1

21.2
20.1
MULTICASTING BASICS
Collecting Information about Groups
• Creation of forwarding tables in both unicast and multicast routing involves two steps:
1. A router needs to know to which destinations it is connected.
20.2
2. Each router needs to propagate information obtained in the first step to all other
routers so that each router knows to which destination each other router is
connected.
20.3

Chapter.21

21.1

21.2
20.1
MULTICASTING BASICS
Multicast Forwarding
• Forwarding in unicast and multicast
communication is different in two aspects:
20.2
1. In unicast communication, the
destination address of the packet
defines one single destination. In
20.3 multicast communication, the
destination of the packet defines one
group, but that group may have more
than one member in the internet.
Chapter.21 2. Forwarding decisions in unicast
communication depend only on the
destination address of the packet.
21.1 Forwarding decisions in multicast
communication depend on both the
destination and the source address of
the packet.
21.2
20.1
MULTICASTING BASICS
Two Approaches to Multicasting
• Two different approaches in multicast routing have been developed: routing using
source-based trees and routing using group-shared trees.
20.2
1. In the source-based tree approach to multicasting, each router needs to create a
separate tree for each source-group combination.
2. In the group-shared tree approach, we designate a router to act as the phony source
20.3 for each group. The core or rendezvouspoint router, acts as the representative for the
group.

Chapter.21

21.1

21.2
21.3 INTRADOMAIN MULTICAST PROTOCOLS
• There are three intradomain multicast routing protocols:
1. Multicast Distance Vector (DVMRP)
21.4 2. Multicast Link State (MOSPF)
3. Protocol Independent Multicast (PIM)

21.5

The End
21.3 INTRADOMAIN MULTICAST PROTOCOLS
• There are three intradomain multicast routing protocols:
1. Multicast Distance Vector (DVMRP)
21.4 2. Multicast
• The LinkVector
Distance State (MOSPF)
Multicast Routing Protocol (DVMRP) is the extension of the Routing Information
3. Protocol Independent Multicast (PIM)
Protocol (RIP).
• It uses the source-based tree approach to multicasting.
• Each router in this protocol that receives a multicast packet to be forwarded implicitly creates a source-
21.5 based multicast tree in three steps:

1. The router uses an algorithm


called reverse path forwarding
(RPF) to simulate creating part of
The End the optimal source-based tree
between the source and itself.
1. ,

2. The router uses an algorithm


called reverse path broadcasting
(RPB) to create a broadcast
(spanning) tree whose root is the
router itself and whose leaves are
all networks in the internet.
21.3 INTRADOMAIN MULTICAST PROTOCOLS
• There are three intradomain multicast routing protocols:
1. Multicast Distance Vector (DVMRP)
21.4 2. Multicast
• The LinkVector
Distance State (MOSPF)
Multicast Routing Protocol (DVMRP) is the extension of the Routing Information
3. Protocol Independent Multicast (PIM)
Protocol (RIP).
• It uses the source-based tree approach to multicasting.
• Each router in this protocol that receives a multicast packet to be forwarded implicitly creates a source-
21.5 based multicast tree in three steps:

1. ,
2. .

3. The router uses an algorithm called


The End reverse path multicasting (RPM) to
create a multicast tree by cutting some
branches of the tree that end in networks
with no member in the group.
21.3 INTRADOMAIN MULTICAST PROTOCOLS
• There are three intradomain multicast routing protocols:
1. Multicast Distance Vector (DVMRP)
21.4 2. Multicast Link State (MOSPF)
3. Protocol Independent Multicast (PIM)

• The Multicast Open Shortest Path First


(MOSPF) is the extension of the Open
21.5 Shortest Path First (OSPF) protocol. It uses
the source-based tree approach to
multicasting.
• It also uses the source-based tree
The End
approach to multicasting.
• To extend unicasting to multicasting, each
router needs to have another database, as
with the case of unicast distance-vector
routing, to show which interface has an
active member in a particular group
21.3 INTRADOMAIN MULTICAST PROTOCOLS
• There are three intradomain multicast routing protocols:
1. Multicast Distance Vector (DVMRP)
2. Multicast Link State (MOSPF)
21.4
3. Protocol Independent Multicast (PIM)

21.5 • Protocol Independent Multicast (PIM) is the name given to a common protocol that
needs a unicast routing protocol for its operation, but the unicast protocol can be either
a distance-vector protocol or a link-state protocol.
• PIM can work in two different modes: dense (PIM-DM) and sparse (PIM-SM).
The End
21.3 INTRADOMAIN MULTICAST PROTOCOLS
• There are three intradomain multicast routing protocols:
1. Multicast Distance Vector (DVMRP)
2. Multicast Link State (MOSPF)
21.4
3. Protocol Independent Multicast (PIM)

Protocol Independent Multicast-Dense


21.5
Mode (PIM-DM)
• When the number of routers with attached
members is large relative to the number of
routers in the internet, PIM works in the dense
mode and is called PIM-DM. In this mode, the
The End
protocol uses a source-based tree approach
and is similar to DVMRP.
• PIM-DM uses only two strategies described in
DVMRP: RPF and RPM. But unlike DVMRP,
forwarding of a packet is not suspended
awaiting pruning of the first subtree.
21.3 INTRADOMAIN MULTICAST PROTOCOLS
• There are three intradomain multicast routing protocols:
1. Multicast Distance Vector (DVMRP)
2. Multicast Link State (MOSPF)
21.4
3. Protocol Independent Multicast (PIM)

Protocol Independent Multicast-Sparse


21.5
Mode (PIM-SM)
• When the number of routers with
attached members is small relative to
The End the number of routers in the internet,
PIM works in the sparse mode and is
called PIM-SM.
• PIM-SM uses a group-shared tree
approach to multicasting.
21.3
INTERDOMAIN MULTICAST PROTOCOLS
• One common protocol for interdomain multicast routing is called Multicast Border
21.4 Gateway Protocol (MBOP), which is the extension of BOP.
• MBOP provides two paths between ASs: one for unicasting and one for multicasting.
Information about multicasting is exchanged between border routers in different ASs.
21.5 • MBGP is a shared-group multicast routing protocol in which one router in each AS is
chosen as the rendezvous point (RP).

The End
21.3 IGMP
• The protocol that is used for collecting information about group membership is the
Internet Group Management Protocol (IGMP).
21.4 • IGMP is a protocol defined at the network layer and IGMP messages are encapsulated
in an IP datagram.
Messages
• There are two types of messages:
21.5 o Query: A query message is periodically
sent by a router to all hosts attached to
it to ask them to report their interests
The End about membership in groups.
o Report: A report message is sent by a
host as a response to a query
message.
21.3 IGMP
Propagation of Membership Information
• After a router has collected membership information from the hosts and other routers at
its own level in the tree, it can propagate it to the router located in a higher level of the
21.4
tree.
• Finally, the router at the tree root can get the membership information to build the
multicast tree.
Encapsulation
21.5 • The IGMP message is encapsulated in an IP datagram with the value of the protocol
field set to 2 and the TTL field set to 1. The destination IP address of the datagram,
however, depends on the type of message
The End
21.3 IPv4 vs IPv6

21.4

21.5

The End
21.3

21.4
Network Layer
Chapter 18 Introduction to Network Layer
Chapter 19 Network-Layer Protocols
Chapter 20 Unicast Routing
21.5 Chapter 21 Multicast Routing

BSECE 4-1
The End Jaro, Mayven Lavern
Misola, Aira Mae
Pengson, John Cedric
Trinidad, Keithleene
21.3

21.4

21.5

The End

You might also like