Advanced Network 2

57
Internet Multicasting Advanced Network 2 1

Transcript of Advanced Network 2

Page 1: Advanced Network 2

Internet Multicasting

Advanced Network 2

1

Page 2: Advanced Network 2

Important Contents

● Multicast Terminology

● Multicast Addresses

● Internet Group Management Protocol

● Multicast Routing Algorithms

● Internet Multicast Routing Protocols

2

Page 3: Advanced Network 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

Page 4: Advanced Network 2

Anycast

Anycast: just one sender and one receiver from a

group(1:1 out of m) .

4

Page 5: Advanced Network 2

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

Page 6: Advanced Network 2

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

Page 7: Advanced Network 2

Multicast in Application Layer

Needs high Bandwidth, high Bit Rate.

Really Unicast.

Can support only Small groups. 7

Page 8: Advanced Network 2

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

Page 9: Advanced Network 2

Needs high Bandwidth, high Bit Rate.

Really Unicast.

Can support only Small groups.

Application-Layer Multicast (ALM)

9

Page 10: Advanced Network 2

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

Page 11: Advanced Network 2

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

Page 12: Advanced Network 2

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

Page 13: Advanced Network 2

Multicast is connectionless.

IP Multicast with UDP protocol in layer 4.

13

Page 14: Advanced Network 2

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

Page 15: Advanced Network 2

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

Page 16: Advanced Network 2

IGMP Domain

IGMP is a layer 3 protocol for IP Multicast.

The Domain is : a LAN and the Local Multicast Router

16

Page 17: Advanced Network 2

IGMP Domain

IGMP is not used out of LANs. No routing.

17

Page 18: Advanced Network 2

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

Page 19: Advanced Network 2

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

Page 20: Advanced Network 2

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

Page 21: Advanced Network 2

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

Page 22: Advanced Network 2

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

Page 23: Advanced Network 2

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

Page 24: Advanced Network 2

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

Page 25: Advanced Network 2

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

Page 26: Advanced Network 2

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

Page 27: Advanced Network 2

IGMP and Security

No security.

Can lower the Sub-Net security.

Disable IGMP if not use Multicasting, Multicast

filtering in Firewalls.

27

Page 28: Advanced Network 2

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

Page 29: Advanced Network 2

IP Multicast Addresses

IP Multicast Addresses, class D addresses:

224.0.0.0 to 239.255.255.255; 224 = 11100000, 239 = 11101111

29

Page 30: Advanced Network 2

IP Multicast Addresses

IP Multicast Addresses, in IPv6:

8 ones followed by two 4-bit followed by 112-bit

addresses.

30

Page 31: Advanced Network 2

IP Multicast Addresses

Reserved addresses by IANA for special purposes:

31

Page 32: Advanced Network 2

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

Page 33: Advanced Network 2

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

Page 34: Advanced Network 2

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

Page 35: Advanced Network 2

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

Page 36: Advanced Network 2

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

Page 37: Advanced Network 2

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

Page 38: Advanced Network 2

Multicast Routing

Multicast routing: a networking method for efficient

distribution of one-to-many traffic.

38

Page 39: Advanced Network 2

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

Page 40: Advanced Network 2

Multicast routing; Graph Theory

Nodes are routers. Bolds are Multicast routers. Pales

are intermediate (not multicast) routers. S is sender.

40

Page 41: Advanced Network 2

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

Page 42: Advanced Network 2

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

Page 43: Advanced Network 2

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

Page 44: Advanced Network 2

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

Page 45: Advanced Network 2

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

Page 46: Advanced Network 2

Multicast routing, Routing Table

1. Source Based Tree: (Source, Group) or (S, G) 2. Core based Tree: (*, G)

46

Page 47: Advanced Network 2

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

Page 48: Advanced Network 2

Multicast Routing Protocols in the Internet

Out of Sub-Nets.

48

Page 49: Advanced Network 2

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

Page 50: Advanced Network 2

PIM, Dense Mode

Flooding-and-prune strategy, similar to DVMRP.

Creates (S,G) in every router, (creates shortest path

tree). 50

Page 51: Advanced Network 2

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

Page 52: Advanced Network 2

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

Page 53: Advanced Network 2

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

Page 54: Advanced Network 2

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

Page 55: Advanced Network 2

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

Page 56: Advanced Network 2

Flood and Prune in PIM:

6-Pruning: the optimum tree remains.

56

Page 57: Advanced Network 2

Flood and Prune in PIM:

The final tree is the shortest path tree. As receivers join or leave,

the tree become new. 57