Link Layer and Wireless CS144 Review Session 7 May 16, 2008 Ben Nham.

Slides:



Advertisements
Similar presentations
Communication Networks Recitation 3 Bridges & Spanning trees.
Advertisements

University of Calgary – CPSC 441.  We need to break down big networks to sub-LANs  Limited amount of supportable traffic: on single LAN, all stations.
The subnet /28 has been selected to be further subnetted to support point-to-point serial links. What is the maximum number of serial links.
CS 4700 / CS 5700 Network Fundamentals Lecture 7: Bridging (From Hub to Switch by Way of Tree) Revised 1/14/13.
Physical and Link Layers CS144 Review Session 6 November 6 th, 2008 Roger Liao Based on slides by Ben Nham.
CPSC 441 TUTORIAL TA: FANG WANG HUBS, SWITCHES AND BRIDGES Parts of the slides contents are courtesy of the following people: Jim Kurose, Keith Ross:
Routing Protocol.
5/31/05CS118/Spring051 twisted pair hub 10BaseT, 100BaseT, hub r T= Twisted pair (copper wire) r Nodes connected to a hub, 100m max distance r Hub: physical.
1 Computer Networks Internetworking Devices. 2 Repeaters Hubs Bridges –Learning algorithms –Problem of closed loops Switches Routers.
CSEE W4140 Networking Laboratory Lecture 8: LAN Switching Jong Yul Kim
1 Interconnecting LAN segments Repeaters Hubs Bridges Switches.
1 LAN switching and Bridges Relates to Lab 6. Covers interconnection devices (at different layers) and the difference between LAN switching (bridging)
Introduction to Computer Networks 09/23 Presenter: Fatemah Panahi.
LAN switching and Bridges
Chapter 27 Q and A Victor Norman IS333 Spring 2015.
1 25\10\2010 Unit-V Connecting LANs Unit – 5 Connecting DevicesConnecting Devices Backbone NetworksBackbone Networks Virtual LANsVirtual LANs.
© 2006 Cisco Systems, Inc. All rights reserved. ICND v2.3—3-1 Determining IP Routes Introducing Distance Vector Routing.
1 LAN switching and Bridges Relates to Lab 6. Covers interconnection devices (at different layers) and the difference between LAN switching (bridging)
DataLink Layer1 Ethernet Technologies: 10Base2 10: 10Mbps; 2: 200 meters (actual is 185m) max distance between any two nodes without repeaters thin coaxial.
Layer 2 Switch  Layer 2 Switching is hardware based.  Uses the host's Media Access Control (MAC) address.  Uses Application Specific Integrated Circuits.
Connecting LANs, Backbone Networks, and Virtual LANs
Introduction to IT and Communications Technology Justin Champion C208 – 3292 Ethernet Switching CE
3/11/2002CSE Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor.
Bridges, Routers and Switches Part One Three things are certain: Death, taxes, and lost data. Guess which has occurred. Haiku error message.
Slide /2009COMM3380 Routing Algorithms Distance Vector Routing Each node knows the distance (=cost) to its directly connected neighbors A node sends.
1 CS 4396 Computer Networks Lab LAN Switching and Bridges.
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 27 Omar Meqdadi Department of Computer Science and Software Engineering.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
CS3502: Data and Computer Networks Local Area Networks - 4 Bridges / LAN internetworks.
1 3-Oct-15 Distance Vector Routing CCNA Exploration Semester 2 Chapter 4.
Switches 1RD-CSY  In this lecture, we will learn about  Collision Domain and Microsegmentation  Switches – a layer two device ◦ MAC address.
5: DataLink Layer5a-1 Chapter 5: The Data Link Layer Last time: r multiple access protocols and LANs r link layer addressing, ARP r specific link layer.
1 Network Layer Lecture 13 Imran Ahmed University of Management & Technology.
Review the key networking concepts –TCP/IP reference model –Ethernet –Switched Ethernet –IP, ARP –TCP –DNS.
Review: –Ethernet What is the MAC protocol in Ethernet? –CSMA/CD –Binary exponential backoff Is there any relationship between the minimum frame size and.
1 Kyung Hee University Chapter 15 Connecting LANs, Backbone Networks, and Virtual LANs.
Link Layer Review CS244A Winter 2008 March 7, 2008 Ben Nham.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Local Area Networks.
Switches 1RD-CSY  In this lecture, we will learn about  Collision Domain and Microsegmentation  Switches – a layer two device ◦ MAC address.
1 1-Dec-15 S Ward Abingdon and Witney College Distance Vector Routing CCNA Exploration Semester 2 Chapter 4.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Connecting Devices CORPORATE INSTITUTE OF SCIENCE & TECHNOLOGY, BHOPAL Department of Electronics and.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 16 Connecting LANs, Backbone Networks, and Virtual LANs.
1 Version 3.1 Module 6 Routed & Routing Protocols.
Chapter 16 Connecting LANs, Backbone Networks, and Virtual LANs
5: DataLink Layer 5a-1 Bridges and spanning tree protocol Reference: Mainly Peterson-Davie.
4: DataLink Layer1 Hubs r Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on one interface to all other interfaces.
RIP Routing Protocol. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
1 LAN switching and Bridges Relates to Lab Outline Interconnection devices Bridges/LAN switches vs. Routers Bridges Learning Bridges Transparent.
4. Interconnecting Networks: Routers. © Tallal Elshabrawy 2 Bridges Vs Routers BRIDGES DO WELL IN SMALL (FEW HUNDRED HOSTS) WHILE ROUTERS USED IN LARGE.
Instructor & Todd Lammle
CS 3700 Networks and Distributed Systems
Networking Devices.
Advanced Computer Networks
MAC Addresses and ARP 32-bit IP address:
Chapter 4 Data Link Layer Switching
CS 3700 Networks and Distributed Systems
Final Review CS144 Review Session 9 June 4, 2008 Derrick Isaacson
Intra-Domain Routing Jacob Strauss September 14, 2006.
Hubs Hubs are essentially physical-layer repeaters:
LAN switching and Bridges
Bridges and Extended LANs
Chapter 16 Connecting LANs, Backbone Networks, and Virtual LANs
Intradomain Routing Outline Introduction to Routing
LAN switching and Bridges
Communication Networks NETW 501
Chapter 15. Connecting Devices
LAN switching and Bridges
Distance Vector Routing
Presentation transcript:

Link Layer and Wireless CS144 Review Session 7 May 16, 2008 Ben Nham

Routers, Switches, and Hubs Routers are network layer devices – Modify IP datagram (decrement TTL) – Hosts and other routers must be aware of them Switches and hubs are link layer devices – Only care about frames, don’t modify IP datagram – Transparent to network

Hubs Operate as a repeater – Broadcast an incoming frame to all ports, except for the ingress port – Like having a longer Ethernet cable that all the hosts tap into – All ports are on single collision domain! Advantages: simple, restores signal, potentially fast since we don’t have to buffer or examine frame Disadvantages: poor bandwidth due to collisions

Hub Question 1 A 10-port hub is connected to 10 hosts using gigabit links. What is the maximum aggregate transfer rate of data flowing through this network? – All ports are part of the same collision domain-- only one device can send at a time – Therefore, peak bandwidth is one gigabit

Hub Question 2 Recall that 100Mbps Ethernet restricts cable lengths to 100m. Suppose we want to connect two hosts which are 1000m apart. Can we use m cables with 9 hubs in series to accomplish this? – No. Since all ports are on same collision domain, max network diameter (1km) is too large to meet the TRANSP > 2 * PROP constraint of CSMA/CD – In reality, the IEEE standard limits number of hubs in series and specifies maximum network diameter

Switches Must store and examine frame before forwarding Simple learning protocol—no configuration – Given incoming frame (MAC src, MAC dst ) on port x: – Add (MAC src, x) to switch table – Look up port for MAC dst for in switch table If entry is there, forward frame to that port Else, broadcast frame to all ports (except ingress port) – Runs spanning tree protocol to prevent loops Collision domain is a single port—switch will make sure that the frame it sends out does not collide with another frame being sent on the same link

Memory Mapped Registers Can send a command to hardware through memory-mapped registers These addresses aren’t mapped to physical memory, but rather to the HW device – Store to location writes to HW device over bus – Load from location reads from HW device over bus

Direct Memory Access With memory-mapped registers, CPU is constantly waiting on I/O operations to complete – I/O devices are usually slower than processors – Blocks processor Instead, better to have device write directly to physical memory This can be done through DMA – CPU pokes device, goes on to do something else – Device writes directly to memory – At some other time (like an interrupt), CPU goes back to fetch data that device wrote to memory

Polling vs. Interrupts Polling: CPU periodically checks for data from device – Inefficient if there’s no data for CPU to process, and higher latency – Efficient if lots of data to process (batches context switches) Interrupts: Device interrupts CPU’s current execution, making it jump to an interrupt handler – Efficient if it doesn’t happen much, and lower latency since we don’t wait for a polling timer to timeout – Can lead to livelock if too many interrupts (e.g. in network cards that process many packets)

Lab 5: Dynamic Routing Implement RIP (distance-vector) in Java You are given a router that already works, except it doesn’t process RIP packets – Write RIP packet handling code that modifies routing table – Simulates the network topology locally (doesn’t route real packets) References – Assignment webpage – Textbook: DV (4.5.2) and RIP (4.6.1) – RIP Version 2 RFC2453 (although you don’t have to implement all the features)

Distance Vector Refresher Distributed, local routing algorithm Exchange routing tables with neighbors If we find a better cost path to any destination through our neighbors, update the cost

Pseudocode Define: – D x (y) = cost from x to y (x’s routing table) – c(x,y) = link cost of edge (x,y) while True: wait until we get a routing table from neighbor v for each new routing table entry received from v that goes to dest: entry = lookupRoutingTable(dest) if c(x,v) + D v (dest) <= entry.curCost or entry.nextHop is v: entry.nextHop = v entry.cost = c(x,v) + D v (dest) send routing table to all neighbors if D x changed Also have to handle updates if a local link metric is updated or goes up/down

Basic Code Overview acceptPacket gets called with a new RIP update packet – RIPRoutingUpdate contains an ArrayList of RIPRoutingUpdate.Entry (get the ArrayList through getAllEntries() method) – Get cost to neighbor through getLocalLinkInfoForNextHop Send a packet using m_ports[PORT_UPDATE_OUT].pushOut(packet) – Packet is of type IPPacket – Build by creating a new RoutingTableUpdate, and calling addEntry to it notifyAlarm() gets called periodically, use it to do periodic tasks – Decrement TTL of routes learned from others – Send updates if necessary (if timeout interval has passed, or a route timed out) Get familiar with Java functions for manipulating IPs, applying netmasks – Netutils.applyNetMask – InetAddress class Use Clack JavaDoc from assignment webpage for reference

Additional Cases New network advertised – Add to routing table Ignore updates to one of your own prefixes if you know they’re down already – Otherwise you could end up thinking you have a route to yourself that you know is already down! Local link metric has updated or local link has gone down Split horizon with poison reverse – If I learned a route from you as next hop, I send you infinite as the route cost in the update to you