Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Communication Networks – 67594

Similar presentations


Presentation on theme: "Introduction to Communication Networks – 67594"— Presentation transcript:

1 Introduction to Communication Networks – 67594
Dr. Michael Schapira Rothberg A413

2 Chapter 3 Transport Layer
A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.

3 Pipelined protocols Pipelining: sender allows multiple, “in-flight”, yet-to-be-acknowledged pkts range of sequence numbers must be increased buffering at sender and/or receiver Two generic forms of pipelined protocols: go-Back-N, selective repeat

4 Pipelining: increased utilization
sender receiver first packet bit transmitted, t = 0 last bit transmitted, t = L / R first packet bit arrives RTT last packet bit arrives, send ACK last bit of 2nd packet arrives, send ACK last bit of 3rd packet arrives, send ACK ACK arrives, send next packet, t = RTT + L / R Increase throughput by a factor of 3!

5 Pipelining Protocols Go-back-N: overview
sender: up to N unACKed pkts in pipeline receiver: only sends cumulative ACKs doesn’t ACK pkt if there’s a gap sender: has timer for oldest unACKed pkt if timer expires: retransmit all unACKed packets Selective Repeat: overview sender: up to N unACKed packets in pipeline receiver: ACKs individual pkts sender: maintains timer for each unACKed pkt if timer expires: retransmit only unACKed packet GBN: many timers, one value in the ack SR: N timers and window of acks in the senders, reassembly buffer in the receivers.

6 Selective repeat receiver sender data from above :
if next available seq # in window, send pkt timeout(n): resend pkt n, restart timer ACK(n) in [sendbase,sendbase+N]: mark pkt n as received if n smallest unACKed pkt, advance window base to next unACKed seq # pkt n in [rcvbase, rcvbase+N-1] send ACK(n) out-of-order: buffer in-order: deliver (also deliver buffered, in-order pkts), advance window to next not-yet-received pkt pkt n in [rcvbase-N,rcvbase-1] ACK(n) otherwise: ignore

7 Selective repeat in action
Transport Layer

8 Selective repeat: dilemma
Example: seq #’s: 0, 1, 2, 3 window size=3 receiver sees no difference in two scenarios! incorrectly passes duplicate data as new in (a) Q: what relationship between seq # size and window size?

9 Receive Window for Selective Repeat
A: The window size (=the number of pkts being handled ) should be at most half the seq # size

10 Summary of rdt mechanisms
Detection code (CRC, Checksum, etc.) Can also be error correction codes Timer Need to deal with premature timeouts Sequence number To detect duplicates Acknowledgment (ACK) With/without seq. number; individual/cumulative Negative Acknowledgment (NAK) (Sliding) window, pipelining

11 Chapter 5 Link Layer and LANs
A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009. 5: DataLink Layer

12 Link Layer 5.1 Introduction and services
5.2 Error detection and correction 5.3 Multiple access protocols -- Reliable Protocols 5.4 Link-Layer Addressing 5.5 Ethernet 5.6 Link-layer switches 5.7 PPP

13 Adaptors Communicating
datagram datagram controller controller sending host receiving host datagram frame sending side: encapsulates datagram in frame adds error checking bits, rdt, flow control, etc. receiving side looks for errors, flow control, etc. extracts datagram, passes to upper layer at receiving side 5: DataLink Layer

14 Star topology bus topology popular through mid 90s
all nodes in same collision domain (can collide with each other) today: star topology prevails active switch in center each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other) We will talk about switches later… switch bus: coaxial cable star

15 MAC Addresses MAC (or LAN or physical or Ethernet) address:
function: get frame from one interface to another physically-connected interface (same network) 48 bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable In Ethernet frame (reminder):

16 Each adapter on LAN has unique LAN address
LAN Addresses Each adapter on LAN has unique LAN address 1A-2F-BB AD Broadcast address = FF-FF-FF-FF-FF-FF LAN (wired or wireless) = adapter 71-65-F7-2B-08-53 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 5: DataLink Layer

17 LAN Address (more) MAC address allocation administered by IEEE
manufacturer buys portion of MAC address space (to assure uniqueness) Analogy: MAC address: like מספר תעודת זהות MAC flat address ➜ portability can move LAN card from one LAN to another We will see later other addressing structures that are hierarchical (IP address) and therefore NOT portable 5: DataLink Layer

18 Other Types of Addresses
MAC address usually is not enough. Hosts usually have only another type of address - the IP address  translation is needed We will learn about IP address when we discuss global networks We will learn how source learn about IP addresses when we discuss application protocols (DNS) 5: DataLink Layer

19 ARP: Address Resolution Protocol
Question: how to determine MAC address of B knowing B’s IP address? Each node (host, router) on LAN has ARP table ARP table: IP/MAC address mappings for some LAN nodes < IP address; MAC address; TTL> TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) 1A-2F-BB AD LAN 71-65-F7-2B-08-53 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 5: DataLink Layer

20 5: DataLink Layer

21 ARP protocol: Same LAN (network)
A wants to send datagram to B, and B’s MAC address not in A’s ARP table. A broadcasts ARP query packet, containing B's IP address dest MAC address = FF-FF-FF-FF-FF-FF all machines on LAN receive ARP query B receives ARP packet, replies to A with its (B's) MAC address frame sent to A’s MAC address (unicast) A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) soft state: information that times out (goes away) unless refreshed ARP is “plug-and-play”: nodes create their ARP tables without intervention from net administrator 5: DataLink Layer

22 Addressing: routing to another LAN
walkthrough: send datagram from A to B via R assume A knows B’s IP address two ARP tables in router R, one for each IP network (LAN) R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D A C-E8-FF-55 88-B2-2F-54-1A-0F B 49-BD-D2-C7-56-2A 5: DataLink Layer

23 This is a really important
A creates IP datagram with source A, destination B A uses ARP to get R’s MAC address for A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagram A’s NIC sends frame R’s NIC receives frame R removes IP datagram from Ethernet frame, sees its destined to B R uses ARP to get B’s MAC address R creates frame containing A-to-B IP datagram sends to B This is a really important example – make sure you understand! R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D A C-E8-FF-55 88-B2-2F-54-1A-0F B 49-BD-D2-C7-56-2A 5: DataLink Layer

24 Link Layer 5.1 Introduction and services
5.2 Error detection and correction 5.3 Multiple access protocols -- Reliable Protocols 5.4 Link-Layer Addressing 5.5 Ethernet 5.6 Link-layer switches 5.7 PPP

25 Hubs … physical-layer (“dumb”) repeaters:
bits coming in one link go out all other links at same rate all nodes connected to hub can collide with one another no frame buffering no CSMA/CD at hub: host NICs detect collisions twisted pair hub 5: DataLink Layer

26 Switch link-layer device: smarter than hubs, take active role
store, forward Ethernet frames examine incoming frame’s MAC address, selectively forward frame to one-or-more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment transparent hosts are unaware of presence of switches plug-and-play, self-learning switches do not need to be configured 5: DataLink Layer

27 Switch: allows multiple simultaneous transmissions
hosts have dedicated, direct connection to switch switches buffer packets Ethernet protocol used on each incoming link, but no collisions; full duplex each link is its own collision domain switching: A-to-A’ and B-to-B’ simultaneously, without collisions not possible with dumb hub C’ B 1 2 6 3 4 5 C B’ A’ switch with six interfaces (1,2,3,4,5,6) 5: DataLink Layer

28 switch with six interfaces
Switch Table A Q: how does switch know that A’ reachable via interface 4, B’ reachable via interface 5? A: each switch has a switch table, each entry: (MAC address of host, interface to reach host, time stamp) Q: how are entries created, maintained in switch table? C’ B 1 2 6 3 4 5 C B’ A’ switch with six interfaces (1,2,3,4,5,6) 5: DataLink Layer

29 Switch: self-learning
Source: A Dest: A’ A A A’ switch learns which hosts can be reached through which interfaces when frame received, switch “learns” location of sender: incoming LAN segment records sender/location pair in switch table C’ B 1 2 6 3 4 5 C B’ A’ MAC addr interface TTL A 1 60 Switch table (initially empty) 5: DataLink Layer

30 Switch: frame filtering/forwarding
When frame received: 1. record link associated with sending host 2. index switch table using MAC dest address 3. if entry found for destination then { if dest on segment from which frame arrived then drop the frame else forward the frame on interface indicated } else flood forward on all but the interface on which the frame arrived 5: DataLink Layer

31 Self-learning, forwarding: example
Source: A Dest: A’ Self-learning, forwarding: example A A A’ C’ B frame destination unknown: 1 2 flood 6 3 A A’ A A’ A A’ A A’ A A’ 4 5 destination A location known: C A’ A selective send B’ A’ MAC addr interface TTL A 1 60 Switch table (initially empty) A’ 4 60 5: DataLink Layer

32 Interconnecting switches
switches can be connected D E F S2 S4 S3 H I G S1 A B C Q: sending from A to G - how does S1 know to forward frame destined to F via S4 and S3? A: self learning! (works exactly the same as in single-switch case!) 5: DataLink Layer

33 Self-learning multi-switch example
Suppose C sends frame to I, I responds to C S4 1 S1 2 S3 S2 A F D I B C G H E S4 contains ABCDEFGHI Mac Q: show switch tables and packet forwarding in S1, S2, S3, S4 5: DataLink Layer

34 Institutional network
mail server to external network web server router IP subnet Heterogeneous links 5: DataLink Layer

35 Interconnection Without Backbone
Hub Hub A F D I B C G H E Not recommended for two reasons: - single point of failure at middle hub - all traffic between left segment and right segment must path over the middle segment

36 What will happen with loops? Incorrect learning
B 1 2 A , 1 2 2

37 What will happen with loops? Frame looping
C 2 2 C,?? C,?? 1 1 A

38 What will happen with loops? Frame looping
B 2 2 B,2 B,1 1 1 A

39 A message from A will mark A’s location
Loop-free: tree C B A message from A will mark A’s location A

40 A message from A will mark A’s location
Loop-free: tree C B A:  A message from A will mark A’s location A

41 A message from A will mark A’s location
Loop-free: tree A:  C B A:  A message from A will mark A’s location A

42 A message from A will mark A’s location
Loop-free: tree A:  A:  A:  C B A:  A:  A message from A will mark A’s location A

43 A message from A will mark A’s location
Loop-free: tree A:  A:  A:  C B A:  A:  A message from A will mark A’s location A

44 Loop-free: tree A:  A:  A:  C B A:  A: 
So a message to A will go by marks… A message from A will mark A’s location A

45 Spanning Tree for increased reliability, desirable to have redundant, alternative paths from source to dest with multiple paths, cycles result – switches may multiply and forward frame forever solution: organize switches in a spanning tree by disabling subset of interfaces Hub Hub A F D I B C G H E


Download ppt "Introduction to Communication Networks – 67594"

Similar presentations


Ads by Google