1 / 6

Broadcasting

Broadcasting. Chap 20. Introduction. Use of broadcasting to know server address on the local subnet: resource discovery to minimize network traffic on a LAN Internet applications ARP(Address Resolution Protocol) BOOTP(Bootstrap Protocol) NTP(Network Time Protocol)

lev
Télécharger la présentation

Broadcasting

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. Broadcasting Chap 20

  2. Introduction • Use of broadcasting • to know server address on the local subnet: resource discovery • to minimize network traffic on a LAN • Internet applications • ARP(Address Resolution Protocol) • BOOTP(Bootstrap Protocol) • NTP(Network Time Protocol) • Routing daemons: broadcast routing table

  3. Broadcast Addresses • Subnet-directed: [subnetid, -1] • Normally routers do not forward these broadcasts • most commonly used today • e.g.) ping 203.253.70.255 • Limited broadcast: 255.255.255.255 • must not forwarded by a router • Some systems do not understand a subnet-directed broadcast address and only interpret 255.255.255.255 as a broadcast • TFTP and BOOTP use this address to know IP address of its diskless workstation on bootstrapping procedure

  4. Unicast versus Broadcast

  5. Before broadcasting, set SO_BROADCAST socket option 문제점 만일 timeout이 짧다면 ?? SIGALRM signal이 blocked system call (recvfrom) 이외에서 deliver되면 loop을 빠져 나오지 못함 해결방안 1: recvfrom 외에는 ALRM signal이 뜨지 않게 만들자. 즉, signal을 block시킴. (Fig. 20.6, bcast/dgclibcast3.c) 그래도 race condition이 발생할 수 있음 Race Condition: shared data를 여러 process들이 동시에 access할 때 time-dependent error 발생 Case 1: shared data (global variable) among threads Case 2: dealing with signals  signal handler도 일종의 thread로 봐야 dg_cli Function thatbroadcasts bcast/dgclibcast1.c

  6. Correct Solutions for Avoiding Race Condition bcast/dgclibcast5.c

More Related