Download Sep 27, 2007

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Multiprotocol Label Switching wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Lag wikipedia , lookup

CAN bus wikipedia , lookup

AppleTalk wikipedia , lookup

RapidIO wikipedia , lookup

Deep packet inspection wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Packet switching wikipedia , lookup

IEEE 1355 wikipedia , lookup

Real-Time Messaging Protocol wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
RECITATION 3
Remind: CEREAL account!!!
1
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
2
Overall Architecture
Tracker
Web Server
C
A
Peer
Peer
[Leech]
B
Downloader
Peer
“US”
[Leech]
[Seed]
Overall Architecture
Tracker
Web Server
C
A
Peer
Peer
[Leech]
B
Downloader
Peer
“US”
[Leech]
[Seed]
Overall Architecture
Tracker
Web Server
C
A
Peer
Peer
[Leech]
B
Downloader
Peer
“US”
[Leech]
[Seed]
Overall Architecture
Tracker
Web Server
C
A
Peer
Peer
[Leech]
B
Downloader
Peer
“US”
[Leech]
[Seed]
Overall Architecture
Tracker
Web Server
C
A
Peer
Peer
[Leech]
B
Downloader
Peer
“US”
[Leech]
[Seed]
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
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?
9
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)
10
Message Switching (cont’d)
Header
Time
Msg
Transmission
Delay
Msg
Queueing
Delay
Msg
A
B
C
D
Routers/switches
11
Pipelining “Parallelogram”
for packet switching
Host A
Switch 1 Switch 2 Host B
Packet 1
Packet 2
Time
Packet 3
Packet 4
12
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 Stopand-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:
1.
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)
2.
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?
13
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
14
Ethernet Frame Structure
MAC Dest.
address
MAC Source
address
Type
DATA ….
CRC
 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
15
HUB vs. SWITCH
Ethernet Frame
MAC A -> MAC C
SWITCH can learn the MACs of
all nodes
DATA
HUB
SWITCH
forward
send
A
send
B
C
B can CAPTURE the packet
from A to C !!!!
A
B
C
B CAN’T capture the packet
from A to C !!!!
16
How to build your own network!
 NICs
 HUB or SWITCH !!!
 2 machines can be connected by using crossover
cable!!!
 Assign IP address
Crossover cable
 Static
 Dynamic
17