Presentation is loading. Please wait.

Presentation is loading. Please wait.

5: DataLink Layer5a-1 Summary of MAC protocols r What do you do with a shared media? m Channel Partitioning, by time, frequency or code Time Division,Code.

Similar presentations

Presentation on theme: "5: DataLink Layer5a-1 Summary of MAC protocols r What do you do with a shared media? m Channel Partitioning, by time, frequency or code Time Division,Code."— Presentation transcript:


2 5: DataLink Layer5a-1 Summary of MAC protocols r What do you do with a shared media? m Channel Partitioning, by time, frequency or code Time Division,Code Division, Frequency Division m Random partitioning (dynamic), ALOHA, S-ALOHA, CSMA, CSMA/CD carrier sensing: easy in some technoligies (wire), hard in others (wireless) CSMA/CD used in Ethernet m Taking Turns polling from a central cite, token passing

3 5: DataLink Layer5a-2 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing m Ethernet m hubs, bridges, switches m 802.11 m PPP m ATM

4 5: DataLink Layer5a-3 MAC Addresses and ARP 32-bit IP address: r network-layer address r used to get datagram to destination network (recall IP network definition) LAN (or MAC or physical) address: r used to get datagram from one interface to another physically-connected interface (same network) r 48 bit MAC address (for most LANs) burned in the adapter ROM

5 5: DataLink Layer5a-4 MAC Addresses and ARP Each adapter on LAN has unique MAC address

6 5: DataLink Layer5a-5 MAC Address (more) r MAC address allocation administered by IEEE r manufacturer buys portion of MAC address space (to assure uniqueness) r Analogy: (a) MAC address: like Social Security Number (b) IP address: like postal address r MAC flat address => portability m can move LAN card from one LAN to another r IP hierarchical address NOT portable m depends on network to which one attaches

7 5: DataLink Layer5a-6 Recall earlier routing discussion A B E Starting at A, given IP datagram addressed to B: r look up net. address of B, find B on same net. as A r link layer send datagram to B inside link-layer frame B’s MAC addr A’s MAC addr A’s IP addr B’s IP addr IP payload datagram frame frame source, dest address datagram source, dest address

8 5: DataLink Layer5a-7 ARP: Address Resolution Protocol r Each IP node (Host, Router) on LAN has ARP table r ARP Table: IP/MAC address mappings for some LAN nodes m TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) Question: how to determine MAC address of B given B’s IP address?

9 5: DataLink Layer5a-8 ARP protocol r A knows B's IP address, wants to learn physical address of B r A broadcasts ARP query pkt, containing B's IP address m all machines on LAN receive ARP query r B receives ARP packet, replies to A with its (B's) physical layer address r A cache saves IP-to-physical address pairs until information becomes old (times out) m soft state: information that times out (goes away) unless refreshed

10 5: DataLink Layer5a-9 Routing to another LAN walkthrough: routing from A to B via R r In routing table at source Host, find router r In ARP table at source, find MAC address E6-E9-00-17-BB-4B, etc A R B

11 5: DataLink Layer5a-10 r A creates IP packet with source A, destination B r A uses ARP to get R’s physical layer address for r A creates Ethernet frame with R's physical address as dest, Ethernet frame contains A-to-B IP datagram r A’s data link layer sends Ethernet frame r R’s data link layer receives Ethernet frame r R removes IP datagram from Ethernet frame, sees its destined to B r R uses ARP to get B’s physical layer address r R creates frame containing A-to-B IP datagram sends to B A R B

12 5: DataLink Layer5a-11 Ethernet “dominant” LAN technology: r cheap $20 for 10/100Mbps! r first widely used LAN technology r Simpler, cheaper than token LANs and ATM r Kept up with speed race: 10, 100, 1000 Mbps Metcalfe’s Etheret sketch

13 5: DataLink Layer5a-12 Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame Preamble: r 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 r used to synchronize receiver, sender clock rates

14 5: DataLink Layer5a-13 Ethernet Frame Structure (more) r Addresses: 6 bytes, frame is received by all adapters on a LAN and dropped if address does not match r Type: indicates the higher layer protocol, mostly IP but others may be supported such as Novell IPX and AppleTalk) r CRC: checked at receiver, if error is detected, the frame is simply dropped

15 5: DataLink Layer5a-14 Ethernet: uses CSMA/CD A: sense channel, if idle then { transmit and monitor the channel; If detect another transmission then { abort and send jam signal; update # collisions; delay as required by exponential backoff algorithm; goto A } else {done with the frame; set collisions to zero} } else {wait until ongoing transmission is over and goto A}

16 5: DataLink Layer5a-15 Ethernet’s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits; Exponential Backoff: r Goal: adapt retransmission attempts to estimated current load m heavy load: random wait will be longer r first collision: choose K from {0,1}; delay is K x 512 bit transmission times r after second collision: choose K from {0,1,2,3}… r after ten or more collisions, choose K from {0,1,2,3,4,…,1023}

17 5: DataLink Layer5a-16 Ethernet Technologies: 10Base2 r 10: 10Mbps; 2: under 200 meters max cable length r thin coaxial cable in a bus topology r repeaters used to connect up to multiple segments r repeater repeats bits it hears on one interface to its other interfaces: physical layer device only!

18 5: DataLink Layer5a-17 10BaseT and 100BaseT r 10/100 Mbps rate; latter called “fast ethernet” r T stands for Twisted Pair r Hub to which nodes are connected by twisted pair, thus “star topology” r CSMA/CD implemented at hub

19 5: DataLink Layer5a-18 10BaseT and 100BaseT (more) r Max distance from node to Hub is 100 meters r Hub can disconnect “jabbering adapter r Hub can gather monitoring information, statistics for display to LAN administrators

20 5: DataLink Layer5a-19 GE (Gegabit Ethernet) r uses standard Ethernet frame format r allows for point-to-point links and shared broadcast channels r in shared mode, CSMA/CD is used; short distances between nodes to be efficient r uses hubs, called here “Buffered Distributors” r Full-Duplex at 1 Gbps for point-to-point links

21 5: DataLink Layer5a-20 Interconnecting LANs Q: Why not just one big LAN? r Limited amount of supportable traffic: on single LAN, all stations must share bandwidth r limited length: 802.3 specifies maximum cable length r large “collision domain” (can collide with many stations)

22 5: DataLink Layer5a-21 Hubs r Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on one interface to all other interfaces r Hubs can be arranged in a hierarchy (or multi-tier design), with backbone hub at its top

23 5: DataLink Layer5a-22 Hubs (more) r Each connected LAN referred to as LAN segment r Hubs do not isolate collision domains: node may collide with any node residing at any segment in LAN r Hub Advantages: m simple, inexpensive device m Multi-tier provides graceful degradation: portions of the LAN continue to operate if one hub malfunctions m extends maximum distance between node pairs (100m per Hub)

24 5: DataLink Layer5a-23 Hub limitations r single collision domain results in no increase in max throughput m multi-tier throughput same as single segment throughput r individual LAN restrictions pose limits on number of nodes in same collision domain and on total allowed geographical coverage r cannot connect different Ethernet types (e.g., 10BaseT and 100baseT)

25 5: DataLink Layer5a-24 Bridges r Link Layer devices: operate on Ethernet frames, examining frame header and selectively forwarding frame based on its destination r Bridge isolates collision domains since it buffers frames r When frame is to be forwarded on segment, bridge uses CSMA/CD to access segment and transmit

26 5: DataLink Layer5a-25 Bridges (more) r Bridge advantages: m Isolates collision domains resulting in higher total max throughput, and does not limit the number of nodes nor geographical coverage m Can connect different type Ethernet since it is a store and forward device m Transparent: no need for any change to hosts LAN adapters

27 5: DataLink Layer5a-26 Bridges: frame filtering, forwarding r bridges filter packets m same-LAN -segment frames not forwarded onto other LAN segments r forwarding: m how to know which LAN segment on which to forward frame? m looks like a routing problem (more shortly!)

28 5: DataLink Layer5a-27 Interconnection Without Backbone r Not recommended for two reasons: - single point of failure at Computer Science hub - all traffic between EE and SE must path over CS segment

29 5: DataLink Layer5a-28 Backbone Bridge

30 5: DataLink Layer5a-29 Bridge Filtering r bridges learn which hosts can be reached through which interfaces: maintain filtering tables m when frame received, bridge “learns” location of sender: incoming LAN segment m records sender location in filtering table r filtering table entry: m (Node LAN Address, Bridge Interface, Time Stamp) m stale entries in Filtering Table dropped (TTL can be 60 minutes)

31 5: DataLink Layer5a-30 Bridge Learning: example Suppose C sends frame to D and D replies back with frame to C r C sends frame, bridge has no info about D, so floods to both LANs m bridge notes that C is on port 1 m frame ignored on upper LAN m frame received by D

32 5: DataLink Layer5a-31 Bridge Learning: example r D generates reply to C, sends m bridge sees frame from D m bridge notes that D is on interface 2 m bridge knows C on interface 1, so selectively forwards frame out via interface 1

33 5: DataLink Layer5a-32 Bridges Spanning Tree r for increased reliability, desirable to have redundant, alternate paths from source to dest r with multiple simultaneous paths, cycles result - bridges may multiply and forward frame forever r solution: organize bridges in a spanning tree by disabling subset of interfaces Disabled

34 5: DataLink Layer5a-33 Bridges vs. Routers r both store-and-forward devices m routers: network layer devices (examine network layer headers) m bridges are Link Layer devices r routers maintain routing tables, implement routing algorithms r bridges maintain filtering tables, implement filtering, learning and spanning tree algorithms

35 5: DataLink Layer5a-34 Routers vs. Bridges Bridges + and - + Bridge operation is simpler requiring less processing bandwidth - Topologies are restricted with bridges: a spanning tree must be built to avoid cycles - Bridges do not offer protection from broadcast storms (endless broadcasting by a host will be forwarded by a bridge)

36 5: DataLink Layer5a-35 Routers vs. Bridges Routers + and - + arbitrary topologies can be supported, cycling is limited by TTL counters (and good routing protocols) + provide firewall protection against broadcast storms - require IP address configuration (not plug and play) - require higher processing bandwidth r bridges do well in small (few hundred hosts) while routers used in large networks (thousands of hosts)

37 5: DataLink Layer5a-36 Ethernet Switches r layer 2 (frame) forwarding, filtering using LAN addresses r Switching: A-to-B and A’-to-B’ simultaneously, no collisions r large number of interfaces r often: individual hosts, star-connected into switch m Ethernet, but no collisions!

38 5: DataLink Layer5a-37 Ethernet Switches r cut-through switching: frame forwarded from input to output port without awaiting for assembly of entire frame m slight reduction in latency r combinations of shared/dedicated, 10/100/1000 Mbps interfaces

39 5: DataLink Layer5a-38 Ethernet Switches (more) Dedicated Shared

40 5: DataLink Layer5a-39 Point to Point Data Link Control r one sender, one receiver, one link: easier than broadcast link: m no Media Access Control m no need for explicit MAC addressing m e.g., dialup link, ISDN line r popular point-to-point DLC protocols: m PPP (point-to-point protocol) m HDLC: High level data link control (Data link used to be considered “high layer” in protocol stack!

41 5: DataLink Layer5a-40 PPP Design Requirements [RFC 1557]: The Correct RFC is 1661 r packet framing: encapsulation of network- layer datagram in data link frame m carry network layer data of any network layer protocol (not just IP) at same time m ability to demultiplex upwards r bit transparency: must carry any bit pattern in the data field r error detection (no correction) r connection livenes: detect, signal link failure to network layer r network layer address negotiation: endpoint can learn/configure each other’s network address

42 5: DataLink Layer5a-41 PPP non-requirements r no error correction/recovery r no flow control r out of order delivery OK r no need to support multipoint links (e.g., polling) Error recovery, flow control, data re-ordering all relegated to higher layers!|

43 5: DataLink Layer5a-42 PPP Data Frame r Flag: delimiter (framing) r Address: does nothing (only one option) r Control: does nothing; in the future possible multiple control fields r Protocol: upper layer protocol to which frame delivered (eg, PPP-LCP, IP, IPCP, etc)

44 5: DataLink Layer5a-43 PPP Data Frame r info: upper layer data being carried r check: cyclic redundancy check for error detection

45 5: DataLink Layer5a-44 Byte Stuffing r “data transparency” requirement: data field must be allowed to include flag pattern m Q: is received data or flag? r Requirements from (RFC1661) r Sender: adds (“stuffs”) byte after each data byte r Receiver: m One flag byte followed by 01111101: discard second byte, continue data reception m single 01111110 not followed by 01111101: flag byte

46 5: DataLink Layer5a-45 Byte Stuffing flag byte pattern in data to send flag byte pattern plus stuffed byte in transmitted data

47 5: DataLink Layer5a-46 PPP Link Control Protocol Before exchanging network- layer data, data link peers must r configure PPP link (max. frame length, authentication) r learn/configure network layer information m for IP: carry IP Control Protocol (IPCP) msgs (protocol field: 8021) to configure/learn IP address

48 5: DataLink Layer5a-47 ATM: ATM cell r 5-byte ATM cell header r 48-byte payload m Why?: small payload -> short cell-creation delay for digitized voice m halfway between 32 and 64 (compromise!) Cell header Cell format

49 5: DataLink Layer5a-48 ATM cell header r VCI: virtual channel ID m will change from link to link thru net r PT: Payload type (e.g. RM cell versus data cell) r CLP: Cell Loss Priority bit m CLP = 1 implies low priority cell, can be discarded if congestion r HEC: Header Error Checksum m cyclic redundancy check

50 5: DataLink Layer5a-49 ATM Physical Layer (more) Two pieces (sublayers) of physical layer: r Transmission Convergence Sublayer (TCS): adapts ATM layer above to PMD sublayer below r Physical Medium Dependent: depends on physical medium being used r TCS Functions: m Header checksum generation: 8 bits CRC m Cell delineation m With “unstructured” PMD sublayer, transmission of idle cells when no data cells to send

51 5: DataLink Layer5a-50 ATM Physical Layer Physical Medium Dependent (PMD) sublayer r SONET/SDH: transmission frame structure (like a container carrying bits); m bit synchronization; m bandwidth partitions (TDM); m several speeds: OC1 = 51.84 Mbps; OC3 = 155.52 Mbps; OC12 = 622.08 Mbps r TI/T3: transmission frame structure (old telephone hierarchy): 1.5 Mbps/ 45 Mbps r unstructured: just cells (busy/idle)

52 5: DataLink Layer5a-51 X.25 and Frame Relay Like ATM: r wide area network technologies r virtual circuit oriented r origins in telephony world r can be used to carry IP datagrams m can thus be viewed as Link Layers by IP protocol

53 5: DataLink Layer5a-52 IP versus X.25 r X.25: reliable in-sequence end-end delivery from end-to-end m “intelligence in the network” r IP: unreliable, out-of-sequence end- end delivery m “intelligence in the endpoints” r gigabit routers: limited processing possible r 2000: IP wins

54 5: DataLink Layer5a-53 Frame Relay r Designed in late ‘80s, widely deployed in the ‘90s r Frame relay service: m no error control m end-to-end congestion control

55 5: DataLink Layer5a-54 Frame Relay (more) r Designed to interconnect corporate customer LANs m typically permanent VC’s: “pipe” carrying aggregate traffic between two routers r corporate customer leases FR service from public Frame Relay network (eg, Sprint, ATT)

56 5: DataLink Layer5a-55 Chapter 5: Summary r principles behind data link layer services: m error detection, correction m sharing a broadcast channel: multiple access m link layer addressing, ARP r various link layer technologies m Ethernet m hubs, bridges, switches m IEEE 802.11 LANs m PPP m ATM m X.25, Frame Relay r journey down the protocol stack now OVER! m Next stops: security, network management

Download ppt "5: DataLink Layer5a-1 Summary of MAC protocols r What do you do with a shared media? m Channel Partitioning, by time, frequency or code Time Division,Code."

Similar presentations

Ads by Google