Advanced Network 2
Transcript of Advanced Network 2
Internet Multicasting
Advanced Network 2
1
Important Contents
● Multicast Terminology
● Multicast Addresses
● Internet Group Management Protocol
● Multicast Routing Algorithms
● Internet Multicast Routing Protocols
2
Terminology
Unicast: just one sender and one receiver (1:1)
Multicast: just one sender and multiple receivers (1:n)
Broadcast: just one sender and All receivers in a
subnet(1:n)
Anycast: just one sender and one receiver from a
group(1:1 out of m)
IPv6 supports all types in layer 3, IPv4 supports all
types except for Anycast. 3
Anycast
Anycast: just one sender and one receiver from a
group(1:1 out of m) .
4
Multicast Applications
Mostly used for Application which can tolerate
some packet loss:
News/sports/stock/weather updates
Distance learning
Configuration, routing updates, service location
Teleconferencing (audio, video, shared
whiteboard, text editor)
Distributed interactive gaming or simulations
Email distribution lists
Content distribution; Software distribution
Web-cache updates
Database replication 5
Multicast in Application Layer
Multicast via unicast.
Source sends N unicast datagrams, one address for
each receiver.
Connection less in layer 4, such as UDP/IP 6
Multicast in Application Layer
Needs high Bandwidth, high Bit Rate.
Really Unicast.
Can support only Small groups. 7
Application-Layer Multicast (ALM)
End systems involved in multicast copy and forward
unicast datagrams among themselves.
Sender sends to one host of the group. 8
Needs high Bandwidth, high Bit Rate.
Really Unicast.
Can support only Small groups.
Application-Layer Multicast (ALM)
9
IP Multicast, or Network Multicast
Most important and practical Multicast.
Routers actively participate in multicast, making
copies of packets as needed and forwarding towards
multicast receivers.
10
IP Multicast, or Network Multicast
Routers actively participate in multicast, making
copies of packets as needed and forwarding towards
multicast receivers.
Layer 3 Multicast.
Less BW and larger groups.
11
12
• Application level one to many communication
• multiple unicasts
• IP multicast
S S
R
R
R
R
R
R
IP Multicast vs Application Layer Multicast
Multicast is connectionless.
IP Multicast with UDP protocol in layer 4.
13
Multicast Group
A collection of hosts for receiving Multicast
packets.
A Multicast group is defined by a Multicast IP
address and a port number.
A host joins the group by requesting. It sends a
join message, using the Internet Group
Management Protocol (IGMP), to its first-hop
router, in its LAN.
14
Internet Group Management Protocol (IGMP):
Host to/from router.
Is a simple communications protocol used by hosts in
LANs and adjacent routers (Local Multicast Router)
on IPv4 networks to establish multicast group
memberships.
IGMP is an integral part of IP multicast.
Allows the network to direct multicast transmissions
only to hosts that have requested them.
LAN switches must support IGMP.
15
IGMP Domain
IGMP is a layer 3 protocol for IP Multicast.
The Domain is : a LAN and the Local Multicast Router
16
IGMP Domain
IGMP is not used out of LANs. No routing.
17
Joining Multicast group Host (#1) informs Local Multicast Router of desire to join group (G1):
IGMP (Internet Group Management Protocol). The host request is sent to
the multicast group address that the host wants to join.
The TTL (Time To Live) of the frame (request) set to 1 ensures that the
request does not go beyond the sub-network, otherwise all IGMP routers
(Not related to the LAN) receive the “Join Request”.
18
Joining Multicast group This request opens the sub-network to the requested
source flow (main data) through the marked port of
the Forwarder router, R1.
19
IGMP: Membership Query and Report
The IGMP Querier router sends regularly General and /or
Specific queries. The IGMP Querier is the router that has the
lowest IP address.
20
IGMP Operation
A host belongs to a multicast group for a limited time. Needs
renewing.
R1 sends General query to all systems on this SUB-NET(LAN).
R1 sends General query to IP address 224.0.0.1 for all hosts.
R1 sends this every 60s (tunable)
21
IGMP Operation
H1 and H2 sets random timer before they reply. H2's timer sets
of first. H1 sees H2's report and cancels its timer. R1 now knows
that there is at least one member of G on the network.
22
IGMP Operation H1 leaves group G, Sends a leave message to all
routers on this network.
Leave message is sent to IP address 224.0.0.2 for all
routers.
23
IGMP Operation
R1 knows that one member has left, but needs to know
if there are any others, so sends a specific group query
to group.
24
IGMP Operation
If H2 remains in G, it sends a membership report. If
not, R1 sends query again, and then notes that there
are no members of G on this network.
25
Querier and Forwarder
More than one Multicast router.
Querier: the smallest IP address router.
Forwarder: Usually the biggest IP address router. It is data
Multicast router. 26
IGMP and Security
No security.
Can lower the Sub-Net security.
Disable IGMP if not use Multicasting, Multicast
filtering in Firewalls.
27
Multicast management in Sub-Nets and Internet Versions
IGMP is used on IPv4.
Multicast management on IPv6 networks is
handled by Multicast Listener Discovery
(MLD) protocol which is a part of ICMPv6R1
MLDv1 is similar to IGMPv2 and MLDv2
similar to IGMPv3.
28
IP Multicast Addresses
IP Multicast Addresses, class D addresses:
224.0.0.0 to 239.255.255.255; 224 = 11100000, 239 = 11101111
29
IP Multicast Addresses
IP Multicast Addresses, in IPv6:
8 ones followed by two 4-bit followed by 112-bit
addresses.
30
IP Multicast Addresses
Reserved addresses by IANA for special purposes:
31
32
Challenges in the multicast
• How can a sender restrict who can receive?
– need authentication, authorization
– encryption of data
– key distribution
– still an active area of research
IP Multicast Addresses How can a user select a multicast address?
Register with IANA for static multicast address (global), or use
GLOP reserved Address (static, regional).
Using GLOP reserved Address (static, regional), you can map
directly between AS (Autonomous System) and Multicast
addresses with prefix 233/8.
Provides each AS with /24 addresses to use (Every AS can use
just 256 Multicast addresses).
E.G.: AS 5662 (hex: 0x16.1e ; or: 22.30) can use multicast
addresses 233.22.30.0/24- 233.22.30.255/24
33
Multicast Addressing in Layer 2.
NIC accepts 2 types frames.
Unicast frames with its own MAC address.
Multicast or Broadcast frames with its own
MAC address.
34
Converting Layer 2 to Layer 3 Multicast Add.
5 bits, xxxxx, are omitted, 32 addresses overlap.
32-to-1, 32 IP multicast address to 1 multicast MAC
address, ambiguity (25 = 32)
Modern Ethernet switches keep tracks and solve it. 35
IGMP Snooping
IGMP is a L3 protocol, Switches are L2.
A Multicast frame received by switches, without Snooping, will
be Broadcasted to all ports, waste of Bandwidth.
36
IGMP Snooping
An added feature under IGMP , in Layer 2, to increase
efficiency.
IGMP Snooping: switches may listen to IGMP
messages, and find Multicast groups members and
manage the Multicast traffic based on the messages.
Switches listen to queries, joins, and leaves, and finds
ports related to Multicast groups.
Modern switches have this capability.
37
Multicast Routing
Multicast routing: a networking method for efficient
distribution of one-to-many traffic.
38
Multicast Routing
The goal of multicast routing is to find an efficient tree of links,
before Multicast data forwarding, that connects all of the
routers that have attached hosts belonging to the multicast
group.
The tree may contain routers that do not have attached hosts
belonging to the multicast group. 39
Multicast routing; Graph Theory
Nodes are routers. Bolds are Multicast routers. Pales
are intermediate (not multicast) routers. S is sender.
40
Shortest Path Tree or Source-Based Tree
Minimum path cost trees.
One tree for every sender and group, (S,G).
Privileges: if one Multicast router leaves the tree (Group), there
is no further cost to construct a new tree. Also is modular.
Drawback: one tree for every (S,G), non-scalable. 41
Minimum-Cost Tree
Minimum path cost tree.
Just one tree for all senders and groups, (Ss,Gs).
Drawback: high cost, not practical for more than 30 nodes,
non-scalable, non-modular. 42
Source Base Trees, Practical
The same as Shortest Path Tree.
The tree may contain routers, which have no attached
hosts belonging to the multicast group.
One tree for every sender and group, (S,G).
The tree is constructed with Reverse Shortest Path
(Reverse Path Forwarding) method.
43
Core Base Tree, Practical
Just one tree for all senders and groups, (Ss,Gs).
Without using complex method Minimum Cost Tree,
for the whole Tree.
Suboptimal, but feasible and practical.
44
Core Base Tree, Practical
One router as core or Rendezvous Point, divides
problem to smaller ones.
The smaller trees are constructed with Reverse
Shortest Path (Reverse Path Forwarding) method.
45
Multicast routing, Routing Table
1. Source Based Tree: (Source, Group) or (S, G) 2. Core based Tree: (*, G)
46
Reverse Path Forwarding (RPF)
Basic routers’ multicast routing table constructing.
The source (of tree) address is known.
Starts from Multicast routers (end routers, leaves).
Uses Unicast routing table to determine upstream
router (reverse path).
Fill out multicast routing table.
Unicast routing is efficient, thus the tree is efficient.
Two types: Source Based Tree and Core Based Tree
47
Multicast Routing Protocols in the Internet
Out of Sub-Nets.
48
Multicast Routing Protocols in the Internet
Five types are used more.
Distance Vector Multicast Routing Protocol
(DVMRP): uses flood and prune.
Multicast Open Shortest Path First (MOSPF):
extension from Open Shortest Path First (OSPF), not
used much.
Border Gateway Multicast Protocol (BGMP): a
two-way tree. Usually between ISPs.
Core Based Tree (CBT) : As before.
Protocol Independent Multicast (PIM), a Layer 3
protocol : (Most used) has two modes; PIM Dense
Mode (PIM-DM) and PIM Sparse Mode. 49
PIM, Dense Mode
Flooding-and-prune strategy, similar to DVMRP.
Creates (S,G) in every router, (creates shortest path
tree). 50
PIM, Dense Mode
Flooding-and-prune strategy, similar to DVMRP.
Creates (S,G) in every router.
Uses unicast routing tables for RPF. No separate
multicast routing protocol.
Builds only source-based trees.
PIM Hello messages : to detect neighbor PIM routers.
51
PIM, Sparse Mode
Start with a shared tree.
When receivers join (via IGMP), PIM-Joins travel up
to rendezvous point (core) to join a shared tree.
When sources start sending traffic, the sources are
registered with the core.
Uses source-based trees, and core based tree. In light
traffic source-based trees are used, traffic more than a
threshold uses core based tree.
52
Flood and Prune in PIM:
1-Flooding: sender(source) sends multicast packets to all
routers.
2-Flooding: all routers get packets, maybe from several ports. 53
Flood and Prune in PIM:
3-Rejecting: rejects any packet/port that received on any port
other than the one it would use to send a unicast packet back to
the source. x packets in the figure.
Note: unicast routing is efficient. 54
Flood and Prune in PIM:
4- Reverse Forwarding: all the routers which
have non-optimum (non-accepted) ports, send
back the accepted packets through
non- accepted ports to the source (core).
5- Routers which receive these reverse packets,
learn that the related port must be deleted from
the optimum tree for that multicast group, it is
pruning the tree or deleting that ports from
their Multicast routing tables.
55
Flood and Prune in PIM:
6-Pruning: the optimum tree remains.
56
Flood and Prune in PIM:
The final tree is the shortest path tree. As receivers join or leave,
the tree become new. 57