1 / 12

Multicasting

Multicasting. Chap 21. Multicast Address. IPv4 Class D Addresses 224.0.0.0 - 239.255.255.255(first 4bit: 1110) Special IPv4 multicast addresses 224.0.0.1 all-hosts group (on a subnet, i.e. link-local) 224.0.0.2 all-routers group (on a subnet, i.e. link-local) IPv6 Multicast Addresses

odeda
Download Presentation

Multicasting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Multicasting Chap 21

  2. Multicast Address • IPv4 Class D Addresses • 224.0.0.0 - 239.255.255.255(first 4bit: 1110) • Special IPv4 multicast addresses • 224.0.0.1 all-hosts group (on a subnet, i.e. link-local) • 224.0.0.2 all-routers group (on a subnet, i.e. link-local) • IPv6 Multicast Addresses • ff01::1, ff02::1 all-nodes group (interface-local, link-local) • ff01::2, ff02::2, ff05::2 all-routers group(…, site-local) Scope of multicast addresses

  3. IP address to Ethernet Address

  4. Multicast Session • A multicast session • = (IP multicast addr, UDP port) • Always use different ports • Sometimes use different groups • Audio/video conference may require two multicast sessions • A session for audio • A session for video

  5. Multicast versus Broadcast

  6. Group membership protocol Join/leave a group Application은 setsockopt()으로 호출 E.g) IGMP: Internet Group Membership Protocol Multicast Routing Protocol Find multicast tree LAN 내부에서의 multicast에는 필요 없음 E.g) PIM, M-OSPF Any-source Multicast (ASM) (*, G) Source-Specific Multicast (SSM) Similar to TV channels Member may join a channel (S, G) Multicast Protocols

  7. Multicast Socket Options

  8. Sending Multicast Datagrams • Specify interface, TTL, and enable/disable loop back • Default, • Interface for outgoing datagram will be chosen by kernel • TTL or hop limit == 1 • Enable loop back: sender도 보낸 패킷을 받음 • E.g. • setsockopt(sockfd, IPPROTO_IP, IP_MULTICAST_LOOP, &flag, sizeof(flag)); • Then, send datagram to group address and receiver’s port

  9. Receiving Multicast Datagrams • Join the multicast group struct ip_mreq mreq; struct in_addr group_addr; memcpy(&mreq.imr_multiaddr, group_addr, sizeof(group_addr)); setsockopt(sockfd, IPPROTO_IP, IP_ADDMEMBERSHIP, &mreq, sizeof(mreq)); • Bind a port • Receive datagrams

  10. UNP Library For Supporting Protocol-independent Multicast Application

  11. Joining Multicast Group lib/mcast_join.c

  12. Sending and Receiving Multicast Packets mcast/main.c mcast/send.c mcast/recv.c

More Related