Broadcasting and Multicasting - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Broadcasting and Multicasting

Description:

... from different vendors may behave differently when dealing with broadcast and multicast packets. ... May not work on WAN (some equipment along the path may ... – PowerPoint PPT presentation

Number of Views:193
Avg rating:3.0/5.0
Slides: 10
Provided by: wfa
Category:

less

Transcript and Presenter's Notes

Title: Broadcasting and Multicasting


1
  • Broadcasting and Multicasting
  • An area that is not well standardized systems
    from different vendors may behave differently
    when dealing with broadcast and multicast
    packets.
  • May not work on WAN (some equipment along the
    path may not support broadcasting/multicasting).
  • Usually work on LAN (e.g. Ethernet) no router
    in between.

2
  • Broadcasting
  • IP broadcast address
  • IP address can logically be viewed as three
    components ltnetid, subnetid, hostidgt, e.g.
  • When the hostid contains all one bits
    111111111111, it is a broadcast address, let us
    denote the all one bits as 1.
  • Four kinds of broadcast addresses
  • Subnet-directed broadcast address ltnetid,
    subnetid, -1gt
  • All-subnets-directed broadcast address ltnetid,
    -1, -1gt
  • Network-directed broadcast address ltnetid, -1gt
  • Limited broadcast address lt-1, -1, -1gt or
    255.255.255.255, broadcast to all machines in the
    local network.

3
  • Broadcasting
  • Ethernet broadcast address
  • Ffffffffffff
  • All Ethernet cards recognize this address
  • What happens when a broadcast packet is sent in a
    LAN?
  • The packet will go up all the way to the IP layer
    on ALL machines!!
  • Implication?
  • Ethernet switches must support broadcast
  • Many applications are built on top of it. ARP,
    BOOTP
  • ATM LAN must emulate this capability.

4
  • Sending a broadcast message
  • Set the SO_BROADCAST option.
  • Different system may behavior differently.
  • See example1.c
  • Receiving a broadcast message
  • Nothing extra
  • Be very careful when using broadcast, you might
    affect other people on the same network without
    knowing it.

5
  • Multicasting (send to many)
  • In between unicast (send to one) and broadcast
    (send to all).
  • IP Multicast address
  • 1110 xxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx (224.0.0.0
    to 239.255.255.255)
  • These addresses are associated with a group of
    interfaces.
  • A host must explicitly join and leave a group.
  • Ethernet multicast address
  • 1110 xxxx.x xxxxxxx.xxxxxxxx.xxxxxxxx
  • -----------------------------
    -- 23bits
  • 01. 00. 5e. 0 xxxxxxx.xxxxxxxx.xxxxxxxx
  • Imperfect filtering

6
  • Some special multicast addresses
  • 224.0.0.1 -- all hosts group
  • 224.0.0.2 all routers group
  • 224.0.0.0 224.0.0.255 are reserved.

7
  • Sending multicast messages
  • Use sendto, just treat a multicast address as a
    regular IP address.
  • Can control the number of hops for multicast
    packets by setting IP_MULTICAST_TTL
  • Can avoid loopback by turning off
    IP_MULTICAST_LOOP.
  • See example2.c

8
  • Receiving multicast message
  • After binding a socket to a port, the socket must
    join the group (setsockopt,IP_ADD_MEMBERSHIP).
  • The value is of type struct ip_mreq
    (netinet/in.h)
  • Struct ip_mreq
  • struct in_addr imr_multiaddr
  • struct in_addr imr_interface
  • See example3.c
  • To stop receiving multicast message setsockopt
    IP_DROP_MEMBERSHIP.

9
  • Multicast over the Internet
  • Not available in the general Internet the IP
    multicast feature tuned off.
  • Some experimental systems
  • Mbone
  • Internet2 -- FSU is on Internet2
Write a Comment
User Comments (0)
About PowerShow.com