Download presentation
Presentation is loading. Please wait.
Published byJayson Gibbs Modified over 9 years ago
1
1 Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Direct Link Networks Lecture 5: Direct Link Networks
2
Univ. of TehranIntroduction to computer Network2 Outline Issues ALOHA Network Ethernet Token Ring Wireless
3
Univ. of TehranIntroduction to computer Network3 Main Issues Local Area Network (LAN) : Three or more machines are physically connected and communicating. Problems: How to connect them? Topology Sharing links How to address each machine? Addressing How to regulate accessing to the media? MAC (Media Access method or protocol) Different technology address each problem in different way. Problems are not independent
4
Univ. of TehranIntroduction to computer Network4 LAN Technologies. Application Physical Link Network Transport Session Presentation LAN-LINK IP TCP UDP The 7-layer OSI Model The 4-layer Internet Model Telnet FTP SMTP HTTP NNTP TFTP Link layer can have two types of technologies; Point to point link like PPP where there are only 2 nodes. Broadcast link like Ethernet when there are more than 2 nodes.
5
Univ. of TehranIntroduction to computer Network5 Data link sublayers The link is shared among different sender and receivers. Since every frame is simultaneously accessed by different nodes; They are called multiaccess links. They are called broadcast links. (important) LAN because of limited area. We need some type of medium access rules to avoid collision. Multicast capability of LANs. Multiplexing Media Access (MAC) Error Detection Framing Our focus will be on MAC sublayer. MAC = “Medium Access Control”
6
Univ. of TehranIntroduction to computer Network6 Examples of MAC Protocols Packet-Switched Radio Network Aloha Carrier Sense Multiple Access/Collision Detection Ethernet (IEEE 802.3) Token Passing Token Ring (IEEE 802.5) Fiber Distributed Data Interface (FDDI) Simple Random Complex Deterministic Wireless
7
Univ. of TehranIntroduction to computer Network7 Goals of MAC Protocols MAC Protocols arbitrate access to a common shared channel among a population of nodes Goals: 1. Fair among users 2. High efficiency 3. Low delay 4. Fault tolerant
8
Univ. of TehranIntroduction to computer Network8 If more than one node transmit at the same time Aloha Protocol Central Node All nodes transmit on one freq. Central node relays packets on the other frequency If there is a collision, both nodes re-transmit packets Collision! f0f1
9
Univ. of TehranIntroduction to computer Network9 CSMA/CD Protocol All nodes transmit & receive on one channel Packets are of variable size. 1. Carrier Sense: Check if the line is idle before transmitting. 2. Collision Detection: If more than one node transmit. Collision! All nodes detect collision, wait for random delay. Goto 1. binary exponential backoff
10
Univ. of TehranIntroduction to computer Network10 CSMA/CD Network Size Restriction i.e. Packet Transmission Time > Round trip propagation time i.e. TRANSP > 2.PROP Node must be able to hear that there is a collision before its packet is transmitted completely.
11
Univ. of TehranIntroduction to computer Network11 Performance of CSMA/CD 1. Find : Probability that exactly one node transmits in a given slot, where: p = Prob{a node tries to transmit a packet in a time slot}, N = number of nodes Assume time-slotted channel
12
Univ. of TehranIntroduction to computer Network12 Ethernet Overview History developed by Xerox PARC in mid-1970s roots in Aloha packet-radio network standardized by Xerox, DEC, and Intel in 1978 similar to IEEE 802.3 standard Uses CSMA/CD technique for Media access. Uses 10Mbps physical link originally and now extended to 100Mbps, Fast Ethernet, and recently to 1000Mbps, Gigabit Ethernet. Uses variable frame length, 64-1500 bytes.
13
Univ. of TehranIntroduction to computer Network13 The Original Ethernet Thick copper coaxial cable 10Mb/s In practice, minimum packet size = 512 bits. allows for extra time to detect collisions. allows for “repeaters” that can boost signal. Repeaters every 500m
14
Univ. of TehranIntroduction to computer Network14 The Original Ethernet Original picture drawn by Bob Metcalfe, inventor of Ethernet (1972 – Xerox PARC) The Ethernet protocol is implemented in Contoroler (Adaptor)
15
Univ. of TehranIntroduction to computer Network15 Ethernet Frame Format Preamble SFD DA SA Type Data Pad CRC 716620-15000-464 1.Preamble: trains clock-recovery circuits 2.Start of Frame Delimiter: indicates start of frame 3.Destination Address: 48-bit globally unique address assigned by manufacturer. 1b: unicast/multicast 1b: local/global address 4.Type: Indicates protocol of encapsulated data (e.g. IP = 0x0800) 5.Pad: Zeroes used to ensure minimum frame length 6.Cyclic Redundancy Check: check sequence to detect bit errors. Bytes:
16
Univ. of TehranIntroduction to computer Network16 Ethernet Addresses Unique, 6 bytes or 48-bit address assigned to each adapter by manufacturer. It is read in : notation, for example: 8:0:e4:b1:2 An address with all 1s is a broadcast address. multicast: first bit is 1 In order to make the address unique, first 24 bits are assigned to manufacturers and the last 24 bits are assigned locally. Each adaptor accept the packet if the destination address is its own address, broadcast address or multicast to which this adaptor belongs.
17
Univ. of TehranIntroduction to computer Network17 The 10Mb/s Ethernet Standard IEEE 802.3 Ethernet MAC Protocol 10Base-510Base-210Base-T10Base-F Different physical layer options 10Base-5: Original Ethernet: large thick coaxial cable. 10Base-2: Thin coaxial cable version. 10Base-T: Voice-grade unshielded twisted-pair Category-3 telephone cable. 10Base-F: Two optical fibers in a single cable. 10: 10Mbs Base: baseband 5: 500 Meter
18
Univ. of TehranIntroduction to computer Network18 10Base-T “Twisted pair Ethernet” Designed to run over existing voice-grade “Category- 3” twisted pair telephone wire. Centralized management (“managed hubs”) lead to more reliability. Created a huge increase in Ethernet usage. 100m max cable length Repeater “Hub” Router
19
Univ. of TehranIntroduction to computer Network19 Transmit Algorithm If line is idle… send immediately upper bound message size of 1500 bytes must wait 9.6us between back-to-back frames If line is busy… wait until idle and transmit immediately called 1-persistent (special case of p-persistent) (sending with probability of p)
20
Univ. of TehranIntroduction to computer Network20 Algorithm (cont) If collision… jam for 32 bits, then stop transmitting frame (minimum frame is 64 bytes (header + 46 bytes of data)) delay and try again 1st time: 0 or 51.2us 2nd time: 0, 51.2, or 102.4us 3rd time51.2, 102.4, or 153.6us nth time: k x 51.2us, for randomly selected k=0..2 n - 1 give up after several tries (usually 16) exponential backoff
21
Univ. of TehranIntroduction to computer Network21 Increasing the data rate Increasing the data rate create the following Problem: E.g. CSMA/CD at 100Mb/s over 1500m of cable: To overcome this two techniques used: Cable length limited to 100m: Use “Ethernet Switching” to prevent collisions.
22
Univ. of TehranIntroduction to computer Network22 Ethernet Switching An Ethernet switch is the same as an Ethernet Bridge. A Bridge: Examines the header of each arriving frame. If the DA is in its table, it forwards the frame to the correct output port. If the DA is not in its table, it broadcasts the frame to all ports (except the one through which it arrived). The table is learned by examining the SA of arriving packets.
23
Univ. of TehranIntroduction to computer Network23 Ethernet Switch Ethernet Switch/Bridge Router If only one computer per port, no collisions can take place (each cable is now a self-contained point-to-point Ethernet link). Capacity is increased: the switch can forward multiple frames to different computers at the same time. An Ethernet switch must contain buffers to hold frames during times of congestion.
24
Univ. of TehranIntroduction to computer Network24 Ethernet Switch Ethernet Switch/Bridge Router If only one computer per port, no collisions can take place (each cable is now a self-contained point-to-point Ethernet link). Capacity is increased: the switch can forward multiple frames to different computers at the same time. An Ethernet switch must contain buffers to hold frames during times of congestion. Ethernet Hub
25
Univ. of TehranIntroduction to computer Network25 Token Ring Data Token/Data l1l1 l3l3 l2l2 l4l4 TRT=Token Rotation Time Listen: Talk:
26
Univ. of TehranIntroduction to computer Network26 Token Ring (cont) It is like people talking in a ring in the round robin manner. Common features. Frames flow in one direction: upstream to downstream special bit pattern (token) rotates around ring must capture token before transmitting release token after done transmitting immediate release delayed release remove your frame when it comes back around stations get round-robin service
27
Univ. of TehranIntroduction to computer Network27 Timed Token Algorithm Token Holding Time (THT) upper limit on how long a station can hold the token Token Rotation Time (TRT) how long it takes the token to traverse the ring. ActiveNodes x THT + RingLatency TRT Target Token Rotation Time (TTRT) (FDDI) agreed-upon upper bound on TRT Each node measures TRT between successive tokens if measured-TRT > TTRT: token is late so don’t send if measured-TRT < TTRT: token is early so OK to send
28
Univ. of TehranIntroduction to computer Network28 Token Maintenance Lost Token no token when initializing ring bit error corrupts token pattern node holding token crashes Solution- have a monitor Monitor role in the link Generating Tokens Announces its presence periodically Check for the corrupt or orphaned frames and remove them from the ring. Orphaned frame are those whose sending station have died. Sets the monitor bit to 0 in sending and to 1 when pass the monitor.
29
Univ. of TehranIntroduction to computer Network29 Token Maintenance (cont) How about when the monitor dies? Or the network just powered up? Any station tries to become monitor send a claim frame that includes the node’s TTRT bid if your claim frame makes it all the way around the ring: Everyone has accepted you as the monitor everyone knows TTRT you insert new token How about receiving another monitor claim at the same time? Break the tie with The lowest TTRT bid wins. The highest address wins. Etc.
30
Univ. of TehranIntroduction to computer Network30 Maintenance (cont) Monitoring for a Valid Token should periodically see valid transmission (frame or token) maximum gap = ring latency + max frame < = 2.5ms set timer at 2.5ms and send claim frame if it fires
31
Univ. of TehranIntroduction to computer Network31 Release After Reception (RAR) Computer captures token, transmits data, waits for data to successfully travel around ring, then releases token again. Allows computer to detect errored frames and retransmit them. Data time TRANSP Token PROP Token arrives at host 1 Token departs from host 1 Token arrives at host 2 l 1 /c l 2 /cl N /cl 1 /c TRANST Data TRANSP Token arrives at host 3 l 3 /c Token l 2 /c TRANST Example time evolution in which host 1 and host 3 have packets to transmit:
32
Univ. of TehranIntroduction to computer Network32 Release After Transmission (RAT) Computer captures token, transmits data, then releases token again. FDDI uses this technique. Data time TRANSP Token Token arrives at host 1 Token departs from host 1 Token arrives at host 2 l 1 /c TRANST Data TRANSP Token arrives at host 3 Token l 2 /c TRANST Example time evolution in which host 1 and host 3 have packets to transmit: Token
33
Univ. of TehranIntroduction to computer Network33 Frame format Access control is for priority. Frame control is a Demux key for the higher layer protocol. Addresses are like Ethernet. They can also be 16 bit. Frame Status include two A and C bits. A, Active bit, is set by the receiver indicating the station is alive and has seen the frame. C, Copy bit, is also set by the receiver indicating the frame has been copied. Start Delimt. Access control Frame control Dest. Addr Src. Addr BodyChecks um End Delimt. Frame status 1 1 1 6 6 Variable 4 1 1 Bytes
34
Univ. of TehranIntroduction to computer Network34 FDDI: Fiber Distributed It is a Dual counter-rotating ring for fault tolerance. It can be also Single Attachment (SAS- Single Attachment Station). 100 Mbps on optical fibers Up to 500 nodes Total length less than or equal to 200 km Uses 4B/5B encoding. Modulation: non-return to zero with inversion (NRZI)
35
Univ. of TehranIntroduction to computer Network35 FDDI Timed Token Rotation Protocol 1.All hosts agree on a common Target Token Rotation Time (TTRT). They will aim to make the token rotate around the network at least once per TTRT. Hence, they can each expect to see the token once TTRT. 2.Each host on the network maintains a timed token Rotation (TRT) timer, that indicates when the token is next expected to arrive. 3.If the token arrives before TRT expires, we say it is “Early”. If the token arrives after TRT expires, we say it is “Late”. 4.A host can only transmit if it receives the token, AND the token is Early.
36
Univ. of TehranIntroduction to computer Network36 Wireless LANs It is shared media like Ethernet The standard is IEEE 802.11 Bandwidth: 1 or 2 Mbps Physical Media spread spectrum radio (Up to 2.4GHz)- spread signal over a wider frequency band diffused infrared (10m), sender and receiver do not have to aimed at each (up to 10m, bluetooth tech).
37
Univ. of TehranIntroduction to computer Network37 Spread Spectrum Idea is to spread signal over wider frequency band than required Frequency Hopping transmit over random sequence of frequencies sender and receiver share… pseudorandom number generator seed 802.11 uses 79 x 1MHz-wide frequency bands
38
Univ. of TehranIntroduction to computer Network38 Spread Spectrum (cont) Direct Sequence for each bit, send XOR of that bit and n random bits random sequence known to both sender and receiver The sent code is called n-bit chipping code 802.11 defines an 11-bit chipping code Random sequence: 0100101101011001 Data stream: 1010 XOR of the two: 1011101110101001 0 0 0 1 1 1
39
Univ. of TehranIntroduction to computer Network39 Collisions Avoidance It is similar to Ethernet, but there is mobility problem here and also Problem: hidden and exposed nodes B can exchange data with A and C, but not D., How A and C send to B, they are not aware, this is the hidden node problem. If B send to A, C can send to D, exposed problem.
40
Univ. of TehranIntroduction to computer Network40 MACA MACA- Multiple Access with Collision Avoidance The idea is the sender and receiver to exchange control information.
41
Univ. of TehranIntroduction to computer Network41 MACA (cont) Sender transmits RequestToSend (RTS) frame Receiver replies with ClearToSend (CTS) frame Neighbors… see CTS: keep quiet see RTS but not CTS: OK to transmit Receiver sends ACK when has the frame neighbors silent until see this ACK Collisions if two sender transmit RTS at the same time. no collisions detection known when don’t receive CTS exponential backoff
42
Univ. of TehranIntroduction to computer Network42 Supporting Mobility Case 1: ad hoc networking when node may or may not be able to communicate. Case 2: access points (AP) connected node to wire each mobile node associates with an AP
43
Univ. of TehranIntroduction to computer Network43 Mobility (cont) Scanning (selecting an AP) node sends Probe frame all AP’s w/in reach reply with ProbeResponse frame node selects one AP; sends it AssociateRequest frame AP replies with AssociationResponse frame new AP informs old AP via network When active: when join or move passive: AP periodically sends Beacon frame
44
Univ. of TehranIntroduction to computer Network44 Network Adaptors All functionalities are implemented in Adaptors or network cards. Each vender has it own adaptor. Adaptor Bus interface Link Interface Host I/o bus Network
45
Univ. of TehranIntroduction to computer Network45 Network Adaptors (cont) Adaptor, like other devices, are programmed by CPU. Adaptor has a Control Status Register (CSR), usaully located in the memory. CPU communicate with Adaptor through CSR. Two methods for Communication, polling and interrupt.
46
Univ. of TehranIntroduction to computer Network46 Network Adaptors (cont) How to transfer data? Direct memory access (DMA) and programmed I/O (PIO) Device drivers are routines to connect OS with the network hardware. Memory is bottleneck. Each frame might be written/read several times from the memory. It has limited Bandwidth, usually 32 bit x 100 MHz, (around 3.2 Gbps), however, each packet goes at least two time and there are overheads.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.