* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Ethernet Switches
Network tap wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Wireless USB wikipedia , lookup
Power over Ethernet wikipedia , lookup
Policies promoting wireless broadband in the United States wikipedia , lookup
Airborne Networking wikipedia , lookup
Point-to-Point Protocol over Ethernet wikipedia , lookup
Computer network wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Wireless security wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Spanning Tree Protocol wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Wake-on-LAN wikipedia , lookup
UniPro protocol stack wikipedia , lookup
Ethernet Dominant LAN technology: cheap $$ for 100Mbs or even 1Gbps! first widely used LAN technology Simpler, cheaper than token LANs and ATM Kept up with speed race: 10, 100, 1000 Mbps Metcalfe's Ethernet sketch Bus: Thin coaxial cable 5: LANs, ARP,Hubs etc, Today, Ethernet installations use a Star topology with a hub or switch at the center 1 Star topology Bus topology popular through mid 90s Now star topology prevails Connection choices: hub or switch (more later) hub or switch 5: LANs, ARP,Hubs etc, 2 Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame If there’s a match, pass frame’s data field to Network Layer; otherwise, discard [46, 1500 bytes] If over, fragment; else if less than 46, have it stuffed Preamble: 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 used to synchronize receiver, sender clock rates 5: LANs, ARP,Hubs etc, 3 Ethernet Frame Structure (more) Addresses: 6 bytes, frame is received by all adapters on a LAN and dropped if address does not match Type: indicates the higher layer protocol, mostly IP but others may be supported such as Novell IPX and AppleTalk) CRC: checked at receiver, if error is detected, the frame is simply dropped 5: LANs, ARP,Hubs etc, 4 Unreliable, connectionless service Connectionless: No handshaking between sending and receiving adapter. Unreliable: receiving adapter doesn’t send acks or nacks to sending adapter stream of datagrams passed to network layer can have gaps gaps will be filled if app is using TCP otherwise, app will see the gaps 5: LANs, ARP,Hubs etc, 5 Ethernet uses CSMA/CD • No slots • adapter doesn’t transmit if it senses that some other adapter is transmitting, that is, carrier sense • transmitting adapter aborts when it senses that another adapter is transmitting, that is, collision detection • Before attempting a retransmission, adapter waits a random time, that is, random access 5: LANs, ARP,Hubs etc, 6 Ethernet CSMA/CD algorithm =min(10, num of collisions) 1. Adaptor receives datagram 4. If adapter detects another from net layer & creates frame transmission while transmitting, aborts and sends 2. If adapter senses channel idle, jam signal it starts to transmit frame. If it senses channel busy, waits 5. After aborting, adapter enters until channel idle and then exponential backoff: after the transmits mth collision, adapter chooses a K at random from 3. If adapter transmits entire m {0,1,2,…,2 -1}. Adapter frame without detecting waits K·512 bit times and another transmission, the returns to Step 2 adapter is done with frame ! No signal energy in channel for 96 bit times 5: LANs, ARP,Hubs etc, 7 Ethernet’s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits Bit time: .1 microsec for 10 Mbps Ethernet ; for K=1023, wait time is about 50 msec Exponential Backoff: • Goal: adapt retransmission attempts to estimated current load – heavy load: random wait will be longer • first collision: choose K from {0,1}; delay is K· 512 bit transmission times • after second collision: choose K from {0,1,2,3}… • after ten collisions, choose K from {0,1,2,3,4,…,1023} 5: LANs, ARP,Hubs etc, 8 CSMA/CD efficiency Long-run fraction of time during which frames are being transmitted on the channel without collisions when there is a large number of active nodes, with each node having a large number of frames to send. Tprop = max prop between 2 nodes in LAN ttrans = time to transmit max-size frame efficiency 1 1 5t prop / ttrans Efficiency goes to 1 as tprop goes to 0 Goes to 1 as ttrans goes to infinity Much better than ALOHA, but still decentralized, simple, and cheap 5: LANs, ARP,Hubs etc, 9 Ethernet Technologies: 10Base2 (1990s) 10: 10Mbps; 2: under 200 meters max cable length Max distance bet. 2 nodes without a repeater in between thin coaxial cable in a bus topology (broadcast technology) repeaters used to connect up to multiple segments repeater repeats bits it hears on one interface to its other interfaces: physical layer device only! 5: LANs, ARP,Hubs etc, 13 10BaseT and 100BaseT (802.3 LAN) Standardized by IEEE 802.3 10/100 Mbps rate; latter called ''fast ethernet'' T stands for Twisted Pair There is a Hub (broadcast technology) to which nodes are connected by 2 pairs of twisted pair (Category 5 with RJ-45 connector), thus Transmit, receive ''star topology'' CSMA/CD not implemented at hub; adapter sense the channel and detect collision during transmission 5: LANs, ARP,Hubs etc, Adapter has a point-to-point connection to the hub 14 10BaseT and 100BaseT (more) Max distance from node to Hub is 100 meters Management Features Hub can internally disconnect jabbering adapter Hub can gather monitoring information, statistics for display to LAN administrators Bandwidth usage, collision rates, average frame sizes, etc. – for network debugging, correction, future planning 5: LANs, ARP,Hubs etc, 15 Gbit Ethernet (IEEE 802.3z) use standard Ethernet frame format allows for point-to-point links and shared broadcast channels in shared mode, CSMA/CD is used; short distances between nodes to be efficient uses Star topology with hub, called here ''Buffered Distributor'‘ or switch at center Full-Duplex at 1 Gbps for point-to-point links Serves as a backbone for interconnecting multiple 10Mbps, 100 Mbps Ethernet LANs 10Gbit (802.3ae) extends Ethernet technology to point-to-point WAN 16 5: LANs, ARP,Hubs etc, links Interconnecting LANs Q: Why not just one big LAN? Limited amount of supportable traffic: on single LAN, all stations must share bandwidth limited length: 802.3 specifies maximum cable length Large ''collision domain'' (can collide with many stations) limited number of stations: 802.5 have token passing delays at each station 5: LANs, ARP,Hubs etc, 17 Definition of Terms Hubs Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on one interface to all other interfaces Hubs can be arranged in a hierarchy (or multi-tier design), with backbone hub at its top 5: LANs, ARP,Hubs etc, 18 Hubs (more) Each connected LAN referred to as LAN segment Hubs do not isolate collision domains: node may collide with any node residing at any segment in LAN Hub Advantages: simple, inexpensive device Allows Inter-LAN segment communication As a multi-tier, it provides graceful degradation: portions of the LAN continue to operate if one hub malfunctions extends maximum distance between node pairs (100m per Hub) 5: LANs, ARP,Hubs etc, 19 Hub limitations single collision domain results in no increase in max throughput multi-tier throughput same as single segment throughput individual LAN restrictions pose limits on number of nodes in same collision domain and on total allowed geographical coverage cannot connect different Ethernet types (e.g., 10BaseT and 100baseT) Constraints: • Total number of hosts in a multi-tier LAN • Geographical reach of multi-tier LAN 5: LANs, ARP,Hubs etc, 20 END OF SESSION 5: LANs, ARP,Hubs etc, 21 Bridges Link Layer devices: operate on Ethernet frames, examining frame header and selectively forwarding frame based on its destination Bridge isolates collision domains since it buffers frames and uses LAN destination addresses When a frame is to be forwarded on a LAN segment, a bridge uses CSMA/CD to access segment and transmit 5: LANs, ARP,Hubs etc, 22 Bridges (more) Bridge advantages: Isolates collision domains resulting in higher total max throughput, and does not limit the number of nodes nor geographical coverage Can connect different type Ethernet since it is a store and forward device Transparent: no need for any change to host’s LAN adapter configuration when connecting to a bridge 5: LANs, ARP,Hubs etc, 23 Bridges: frame filtering, forwarding bridges filter packets same-LAN -segment frames are not forwarded onto other LAN segments forwarding: how to know which LAN segment on which to forward frame? looks like a routing problem (more shortly!) 5: LANs, ARP,Hubs etc, 24 Backbone Bridge 5: LANs, ARP,Hubs etc, 25 Interconnection Without Backbone Not recommended for two reasons: - single point of failure at Computer Science hub - all traffic between EE and SE must path over CS segment 5: LANs, ARP,Hubs etc, 26 Bridge Filtering bridges learn which hosts can be reached through which interfaces by maintaining a filtering table when a frame received, the bridge ''learns'' the location of the sender: incoming LAN segment records sender location in filtering table filtering table entry: (Node LAN Address, Bridge Interface, Time Stamp) stale entries in the Filtering Table are dropped (TTL can be 60 minutes) 5: LANs, ARP,Hubs etc, 27 Bridge Filtering filtering procedure: if destination is on LAN on which frame was received then drop the frame else { lookup filtering table if entry found for destination then forward the frame on interface indicated; else flood; /* forward on all but the interface on which the frame arrived*/ } 5: LANs, ARP,Hubs etc, 28 Bridge Learning: example Suppose C sends a frame to D and D replies back with a frame to C C sends the frame to the bridge, but the bridge has no info. about D, so it floods both LANs bridge notes that C is on port 1 frame ignored on upper LAN frame received by D 5: LANs, ARP,Hubs etc, 29 Bridge Learning: example D generates a reply to C, sends bridge sees frame from D bridge notes that D is on interface 2 bridge knows C on interface 1, so it selectively forwards the frame out via interface 1 5: LANs, ARP,Hubs etc, 30 Bridges Spanning Tree for increased reliability, it is desirable to have redundant, alternate paths from source to dest with multiple simultaneous paths, cycles result bridges may multiply and forward frame forever solution: organize bridges in a spanning tree by disabling subset of interfaces Disabled 5: LANs, ARP,Hubs etc, 31 Bridges vs. Routers both store-and-forward devices routers: network layer devices (examine network layer headers) bridges are Link Layer devices routers maintain routing tables, implement routing algorithms bridges maintain filtering tables, implement filtering, learning and spanning tree algorithms 5: LANs, ARP,Hubs etc, 32 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) 5: LANs, ARP,Hubs etc, 33 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 bridges do well in small (few hundred hosts) while routers used in large networks (thousands of hosts) 5: LANs, ARP,Hubs etc, 34 Interconnection Devices COMPARISON OF FEATURES HUBS BRIDGES ROUTERS ETHERNET SWITCHES Traffic Isolation No Yes Yes Yes Plug-andPlay Yes Yes No Yes Optimal Routing No No Yes No Yes No No Yes Cut-through 5: LANs, ARP,Hubs etc, 35 Ethernet Switches Full-fledged packet switch layer 2 (frame) forwarding, filtering using LAN addresses Each LAN segment – in an isolated collision domain Switching: A-to-B and A'to-B' simultaneously, no collisions large number of interfaces often: individual hosts, star-connected into switch Ethernet, but no Provides direct upstream & collisions! downstream connections; collision detection & carrier 5: LANs, ARP,Hubs etc, sensing are not needed 36 Ethernet Switches Operate in full-duplex cut-through switching: frame forwarded from input to output port without awaiting for assembly of entire frame slight reduction in latency combinations of shared/dedicated, 10/100/1000 Mbps interfaces For as long as the packet’s destination is known, switch transmits packet (with carrier sensing) 5: LANs, ARP,Hubs etc, 37 Ethernet Switches (more) Institutional Network using a combination of hubs, Ethernet switches, router Dedicated Shared 5: LANs, ARP,Hubs etc, 38 END OF SESSION 5: LANs, ARP,Hubs etc, 39 Extra Topics Wireless Networking is not going to be included in the Finals. 5: LANs, ARP,Hubs etc, 40 IEEE 802.11 Wireless LAN wireless LANs: untethered (often mobile) networking IEEE 802.11 standard: MAC protocol unlicensed frequency spectrum: 900Mhz, 2.4Ghz Basic Service Set (BSS) (a.k.a. cell) contains: wireless hosts access point (AP): base station BSSs combine to form distribution system (DS) 5: LANs, ARP,Hubs etc, 41 Elements of a Wireless Network Wireless host Network Infrastructure Wireless Access Point Coverage area 5: LANs, ARP,Hubs etc, 42 Elements of a Wireless Network Wireless Hosts • end-system devices that run applications • e.g. laptop, palmtop, PDA, phone, desktop computer Wireless Links • connects hosts to base station or another wireless host • e.g. 802.11a, 802.11g, 802.11b, UMTS/WCDMA, GSM, etc. Base Station • sends/receives packets to and from a wireless host associated with base station; coordinates multiple transmissions of hosts • e.g. cell towers (cellular networks), Access Points (802.11 wireless LANs) Network Infrastructure Network Infrastructure 5: LANs, ARP,Hubs etc, • larger network with which a wireless host connects to 43 From wired to wireless Replacing a simple wired home network with a wireless 802.11 net • Wireless NIC replaces wired Ethernet card at Hosts • Access Point replaces Ethernet switch • Virtually no changes needed at the network layer or above • Main focus of system changes: link-layer 5: LANs, ARP,Hubs etc, 44 Wireless Design Considerations Problem: Decreasing signal strength • radio signal passing through wall • signal in free space - disperses Results in decreased Signal strength (or even path loss) • electromagnetic radiation attenuates as it passes through matter 5: LANs, ARP,Hubs etc, 45 Wireless Design Considerations Problem: Interference from other sources • 2.4 GHz wireless phones • 802.11b wireless LAN • microwave • nearby motor Same frequency! Electromagnetic noise • radio sources transmitting in the same frequency band interferes with each other 5: LANs, ARP,Hubs etc, 46 Wireless Design Considerations Problem: Multipath Propagation •Portions of electromagnetic wave reflect off objects and the ground – results in blurring of received signal at receiver 5: LANs, ARP,Hubs etc, 47 Wireless Design Considerations Problem: Multipath Propagation It is also sometimes possible to mount the antenna so that the mounting structure screens it from the reflections but not from the wanted signal. Changing the antenna height can effectively reduce or eliminate the multipath signals by dispersing the signals away from the receiving antenna 48 5: LANs, ARP,Hubs etc, Wireless Links • High and time-varying bit error rates will be more common • 802.11 employs CRC error detection codes • 802.11 uses link-level ARQ protocols that retransmit corrupted frames • Broadcasting problem: Undetectable collisions • hidden terminal problem – occurs when physical obstructions in the environment prevent hosts from detecting each other. hidden terminals: A, C cannot hear each other • obstacles • signal attenuation • collisions at B 5: LANs, ARP,Hubs etc, 49 Broadcasting problem: Undetectable collisions • Fading of a signal’s strength causes undetectable collisions •A and C are placed such that their signals are not strong enough to detect each other’s transmissions, yet strong enough to interfere with each other at Host B. • goal: avoid collisions at B • CSMA/CA: CSMA with Collision Avoidance 5: LANs, ARP,Hubs etc, 50 IEEE 802.11 Standards SUMMARY Standard Frequency Range Data Rate 802.11b 2.4-2.485 GHz Up to 11 Mbps 802.11a 5.1-5.8 GHz Up to 54 Mbps 802.11g 2.4-2.485 GHz Up to 54 Mbps Operating at higher frequency results in shorter transmission distance for a given power level and suffer more from multipath propagation ISM bands in the United States. 5: LANs, ARP,Hubs etc, 51 IEEE 802.11 Architecture Ad hoc Network • network with no central control and with no connections to the outside world • formed “on the fly” – mobile devices in proximity communicates with each other in the absence of a centralized AP 5: LANs, ARP,Hubs etc, 52 IEEE 802.11 Architecture Infrastructure Wireless LAN Wireless host Network Infrastructure Wireless Access Point Basic Service Set (BSS) 5: LANs, ARP,Hubs etc, 53 IEEE 802.11 Architecture INTRODUCTION BSS contains: • 1 or more wireless stations – has an 802.11 NIC – contains MAC address • central base station (AP) • has a unique MAC address (in it’s firmware) • assigned with one or two-word Service Set Identifier (SSID) • assigned also with channel number 5: LANs, ARP,Hubs etc, 54 IEEE 802.11 Architecture Within the 85 MHz band (2.4-2.485 GHz), there are 11 overlapping channels • channels 1, 6, 11 are usually assigned to the APs, and • each AP may be interconnected with a switch 5: LANs, ARP,Hubs etc, 55 Wi-Fi jungle Any physical location where a wireless station receives a strong signal from 2 or more APs How does an incoming station connect to an AP? SSID Service Set Identifier (SSID) is the name of the wireless LAN network. It is also called the ESS-ID or, simply, the network name. A device cannot connect to the network if the SSID on the device does not match the SSID of the network. Once AP is selected, host dialogues with AP using 802.11 association Station sends message into subnet to get its IP protocol; joinsDHCP subnetdiscovery if successful Station scans 11 channels for beacon frames from any AP out there address 56 5: LANs, ARP,Hubs etc, • beacon frame – AP’s SSID & MAC address Wi-Fi jungle AUTHENTICATION To create association with AP, station may be required to authenticate itself to the AP. Access may be permitted based on station’s MAC address Or, User name and password may be required from the station • AP typically communicates with an authentication server using a protocol named RADIUS. 5: LANs, ARP,Hubs etc, 57 802.11 MAC Protocol CSMA/CA Why not detect collision? Hidden terminal problem Signal attenuation – received signal is typically very small compared to the strength of transmitted signal How frames are transmitted? In its entirety; once a station begins to transmit, there’s no turning back 5: LANs, ARP,Hubs etc, 58 802.11 MAC Protocol LINK-LAYER ACKNOWLEDGEMENT SCHEME DEST: After frame passes a CRC check, it waits for SIFS time, then sends an ACK frame SOURCE: If sender does not receive an ACK with a given amount of time, it retransmits frame (using CSMA/CA to access channel) and counts number of retransmissions (if this exceeds max. value, it discards frame) Short Inter-frame Spacing (SIFS) Distributed Inter-frame Spacing (DIFS) 5: LANs, ARP,Hubs etc, 59 802.11 MAC Protocol LINK-LAYER TRANSMISSION SCHEME 1 If channel is idle, wait for DIFS time, then transmit Else choose random back-off value and count down this value when channel is sensed idle. If channel is sensed busy, retain value. 2 When counter = 0 (channel is idle), station transmits entire frame and waits for an ACK. 3 If ACK is received and there are other Short Inter-frame Spacing (SIFS) Distributed Inter-frame Spacing (DIFS) frames to send, station begins CSMA/CA in step 1 Else reenter back-off phase in step 1 using random value chosen for larger 60 5: LANs, ARP,Hubs etc, interval 802.11 MAC Protocol RESERVATION SCHEME for COLLISION AVOIDANCE H1 AP H2 When sender wants to send a data frame, RTS is sent to AP • includes total time required to send data frame and an ACK frame AP responds by broadcasting a CTS frame • permission to send • tells other stations to wait for reserved duration HIDDEN TERMINALS: H1 is hidden from H2, and vice versa For channel reservation: RTS, CTS frames 5: LANs, ARP,Hubs etc, 61 802.11 MAC Protocol RESERVATION SCHEME for COLLISION AVOIDANCE 1 H1 broadcasts RTS frame and is heard by AP 2 AP responds with a CTS frame, and is heard by H1 & H2 • After hearing CTS, H2 refrains from transmitting for the time specified in the CTS frame RTS/CTS introduces delay and consumes channel resources – used only for transmitting long data frames 5: LANs, ARP,Hubs etc, Used only when frame > RTS threshold (usually set > max frame length) 62 Collision Avoidance: RTS-CTS exchange RTS and CTS short: collisions less likely, of shorter duration end result similar to collision detection IEEE 802.11 allows: CSMA CSMA/CA: reservations polling from AP 5: LANs, ARP,Hubs etc, 63 802.11 MAC Operation Data Frames and their ACK DIFS Data Src SIFS Ack Dest DIFS Contention Window Next MPDU Other Defer Access Backoff after Defer Acknowledgment should arrive within SIFS Senders wait for DIFS no-carrier time, then exponential backoff delay [slot=Tprop] 5: LANs, ARP,Hubs etc, 64 Problems with 802.11 MAC as above Technical problems: `code` not precise, esp. re backoff, count-down Missing elements… Spec also allows PCF (Point Coordination Function): polling to coordinate senders to ensure QoS SIFS < PIFS < DIFS (priorities!) Can’t detect collision while sending… Wasteful – esp. for long packets Idea for long packets: reserve channel to avoid collisions – RTS/CTS [optional] mechanism… 5: LANs, ARP,Hubs etc, 65 RTS/CTS [optional in 802.11 MAC] Sender sends small request-to-send (RTS) to AP RTSs may collide with each other (but are short) Include indication of length of packet transmission Receiver broadcasts clear-to-send CTS in response to RTS CTS heard by all nodes sender transmits data frame other stations defer transmissions for time specified in CTS Avoid data frame collisions completely using small reservation packets! 5: LANs, ARP,Hubs etc, 66 Collision Avoidance: RTS-CTS exchange A B AP reservation collision DATA (A) defer time 5: LANs, ARP,Hubs etc, 67 Chapter 5: Summary principles behind data link layer services: error detection, correction sharing a broadcast channel: multiple access link layer addressing, ARP various link layer technologies Ethernet hubs, bridges, switches IEEE 802.11 LANs journey down the protocol stack now OVER! Next chapter: security 5: LANs, ARP,Hubs etc, 68