RECITATION 3 - PowerPoint PPT Presentation

laurel
recitation 3 n.
Skip this Video
Loading SlideShow in 5 Seconds..
RECITATION 3 PowerPoint Presentation
Download Presentation
RECITATION 3

play fullscreen
1 / 17
Download Presentation
192 Views
Download Presentation

RECITATION 3

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. RECITATION 3 Remind: CEREAL account!!!

  2. Project 1 • Provide TorrentFileHandle.java & … • Important info from .torren file • url of the tracker • Name of file • Length of file • Pieces <hash1,hash2,….hashn> • Piece length

  3. Tracker Web Server Web page with link to .torrent Get-announce C A Peer [Seed] Peer [Leech] Downloader “US” B Peer [Leech] Overall Architecture

  4. Tracker Web Server Web page with link to .torrent Response-peer list C A Peer [Seed] Peer [Leech] Downloader “US” B Peer [Leech] Overall Architecture

  5. Tracker Web Server Web page with link to .torrent Shake-hand C A Peer [Seed] Peer [Leech] Downloader “US” Shake-hand B Peer [Leech] Overall Architecture


  6. Overall Architecture Tracker Web Server Web page with link to .torrent request C A request Peer [Seed] Peer [Leech] Downloader “US” B Peer [Leech]

  7. Tracker Web Server Web page with link to .torrent pieces C A pieces Peer [Seed] Peer [Leech] Downloader “US” B Peer [Leech] Overall Architecture

  8. Project 1 Basics (cont'd) ● Communicate With Peer – Handshake <pstrlen><pstr><reserved><info_hash><peer_id> – General Messages <length prefix [4B dec]><message ID[1B char]><payload> – Request <0013><6><index><begin><length> – Piece: <length prefix> is 0009+X and message ID is 7. The payload is as follows: <index><begin><block> X is block size

  9. Sample Question: SWITCHING • Considering a small network of four hosts and three links as depicted in the figure below. A 1MB message is to be sent from A to D. The bandwidth of links is 0.8 Mbyte/second. Propagation delays of the links are negligible. • Host A ----- Host B------ Host C----------Host D • (A). Assume that circuit switching is used and the total circuit set-up time is 100 ms, what is the time to send the message from A to D? • (B). Assume that message switching is used and queuing delays are negligible, what is the time to send the message from A to D?

  10. Sample Question: SWITCHING+PIPELINING Considering a small network of four hosts and three links as depicted in the figure below. A 1MB message is to be sent from A to D. The bandwidth of links is 0.8 Mbyte/second. Propagation delays of the links are negligible. Host A ----- Host B------ Host C----------Host D (C). Assume that packet switching is used, packet size is 240 bytes and header size is 10 bytes, what is the time to send the message from A to D? (WITH PIPELINING)

  11. Msg Msg Msg Message Switching (cont’d) Header Transmission Delay Time Queueing Delay A B C D Routers/switches

  12. Pipelining “Parallelogram” for packet switching Host A Switch 1 Switch 2 Host B Packet 1 Packet 2 Packet 3 Time Packet 4

  13. Sample Question: Performance Analysis For parts A and B, assume host A is connected to B via a point-to-point duplex link which has a data rate of 1 Mbps and propagation delay of 10 msec. HOST A------------------------------HOST B Host A has a large amount of data that must be reliably sent to Host B. Assuming Stop-and-Wait protocol is used to assure reliable delivery, the data frame size is 1000 bytes each, and the ACK frame size is 64 bytes. (A). Assuming that Host B takes 0 time to process an incoming data and send an ACK frame back to A, what is the smallest time the retransmission timer can be set to at Host A which eliminates unnecessary retransmissions? (B). Assuming there are no transmission errors, what is the link utilization in the direction from A to B? Hint: • Link utilization = the time to send a frame without delay and ACK/ the time in A (OR the time to send a frame from A to B + the time an ACK frame back to A) • Link utilization = size of a frame/ (the time to send a frame from A to B + the time an ACK frame back to A) (C). A new, different channel has a bit rate of 4 Kbps and a propagation delay of 20 msec. For what range of frame sizes does stop-and-wait protocol give an efficiency of at least 50 percent?

  14. MAC address • Network Interface Card (NIC) • Each NIC has its own MAC address , it is stored on the chip!! • Length of MAC : 48 bites = 6 bytes • For examples: 00:C1:71:01:AB:F0 • Prefix: Company ID: 3Com, Netgear … • Postfix: Serial Number • Command to show MAC: ifconfig, ipconfig

  15. Ethernet Frame Structure • Type(2 bytes) specifies the network layer protocol: IP or Novel IPX or ARP or RARP… • CRC: check sum • Broadcast: • MAC Broadcast Address = FF:FF:FF:FF:FF:FF • Host A sends a msg to host B: • MAC dest = MAC B, MAC src = MAC A

  16. forward send send HUB vs. SWITCH Ethernet Frame SWITCH can learn the MACs of all nodes MAC A -> MAC C DATA HUB SWITCH A B C A B C B can CAPTURE the packet from A to C !!!! B CAN’T capture the packet from A to C !!!!

  17. How to build your own network! • NICs • HUB or SWITCH !!! • 2 machines can be connected by using crossover cable!!! • Assign IP address • Static • Dynamic Crossover cable