Lecture 3 Responsivness vs. stability Brief refresh on router architectures Protocol implementation Quagga.

Slides:



Advertisements
Similar presentations
Processes Management.
Advertisements

Layer 3 Switching. Routers vs Layer 3 Switches Both forward on the basis of IP addresses But Layer 3 switches are faster and cheaper However, Layer 3.
Cisco S3 C5 Routing Protocols. Network Design Characteristics Reliable – provides mechanisms for error detection and correction Connectivity – incorporate.
TELE202 Lecture 8 Congestion control 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »X.25 »Source: chapter 10 ¥This Lecture »Congestion control »Source:
Chapter 7 Protocol Software On A Conventional Processor.
Network Operating Systems Users are aware of multiplicity of machines. Access to resources of various machines is done explicitly by: –Logging into the.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
Processes CSCI 444/544 Operating Systems Fall 2008.
Precept 3 COS 461. Concurrency is Useful Multi Processor/Core Multiple Inputs Don’t wait on slow devices.
MPLS H/W update Brief description of the lab What it is? Why do we need it? Mechanisms and Protocols.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
Link-State Routing Reading: Sections 4.2 and COS 461: Computer Networks Spring 2011 Mike Freedman
Link-State Routing Reading: Sections 4.2 and COS 461: Computer Networks Spring 2010 (MW 3:00-4:20 in COS 105) Michael Freedman
Multithreading in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Jennifer Rexford Princeton University MW 11:00am-12:20pm Wide-Area Traffic Management COS 597E: Software Defined Networking.
Router Architectures An overview of router architectures.
Router Architectures An overview of router architectures.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Operating Systems CSE 411 CPU Management Sept Lecture 11 Instructor: Bhuvan Urgaonkar.
Distance Vector Routing Protocols W.lilakiatsakun.
M. Menelaou CCNA2 DYNAMIC ROUTING. M. Menelaou DYNAMIC ROUTING Dynamic routing protocols can help simplify the life of a network administrator Routing.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
LAN Switching and WAN Networks Topic 6 - OSPF. What we have done so far! 18/09/2015Richard Hancock2  Looked at the basic switching concepts and configuration.
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
1 3-Oct-15 Distance Vector Routing CCNA Exploration Semester 2 Chapter 4.
Overview of implementations openBGP (and openOSPF) –Active development Zebra –Commercialized Quagga –Active development XORP –Hot Gated –Dead/commercialized.
Protocol implementation Next-hop resolution Reliability and graceful restart.
Operating Systems Lecture 2 Processes and Threads Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of.
Delivery, Forwarding, and Routing of IP Packets
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 3 v3.0 Module 2 Single-Area OSPF.
CCNA 3 Week 2 Link State Protocols OSPF. Copyright © 2005 University of Bolton Distance Vector vs Link State Distance Vector –Copies Routing Table to.
Simulation of the OLSRv2 Protocol First Report Presentation.
CS 4396 Computer Networks Lab IP Multicast - Fundamentals.
Scheduling Lecture 6. What is Scheduling? An O/S often has many pending tasks. –Threads, async callbacks, device input. The order may matter. –Policy,
CS333 Intro to Operating Systems Jonathan Walpole.
Lecture 2 Agenda –Finish with OSPF, Areas, DR/BDR –Convergence, Cost –Fast Convergence –Tools to troubleshoot –Tools to measure convergence –Intro to implementation:
RSVP and implementation Details for the lab. RSVP messages PATH, RESV –To setup the LSP PATHtear, RESVtear –To tear down an LSP PATHerr, RESVerr –For.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 7 Distance Vector Routing Protocols.
CPS110: Implementing threads Landon Cox. Recap and looking ahead Hardware OS Applications Where we’ve been Where we’re going.
Saeed Darvish Pazoki – MCSE, CCNA Abstracted From: Cisco Press – ICND 2 – 10 EIGRP 1.
1 1-Dec-15 S Ward Abingdon and Witney College Distance Vector Routing CCNA Exploration Semester 2 Chapter 4.
Routing and Routing Protocols
Precomputation- based Prefetching By James Schatz and Bashar Gharaibeh.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
Operating Systems CSE 411 CPU Management Sept Lecture 10 Instructor: Bhuvan Urgaonkar.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
TCP OVER ADHOC NETWORK. TCP Basics TCP (Transmission Control Protocol) was designed to provide reliable end-to-end delivery of data over unreliable networks.
Lecture 12 Page 1 CS 111 Online Using Devices and Their Drivers Practical use issues Achieving good performance in driver use.
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Single Area OSPF Module 2, Review How routing information is maintained Link-state routers apply the Dijkstra shortest path first algorithm against.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
Lecture 4 Page 1 CS 111 Summer 2013 Scheduling CS 111 Operating Systems Peter Reiher.
Threads prepared and instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University 1July 2016Processes.

Kapitel 19: Routing. Kapitel 21: Routing Protocols
Processes and threads.
Process Management Process Concept Why only the global variables?
CCNA 2 v3.1 Module 7 Distance Vector Routing Protocols
CS 31006: Computer Networks – The Routers
CS703 - Advanced Operating Systems
Dynamic Routing and OSPF
Lecture Topics: 11/1 General Operating System Concepts Processes
CS510 Operating System Foundations
More on RSVP implementation
Distance Vector Routing
Control-Data Plane Separation
Presentation transcript:

Lecture 3 Responsivness vs. stability Brief refresh on router architectures Protocol implementation Quagga

To read To present –Threads vs. events (belegrakis) –U-Loop prevention –Sub-millisecond convergence (lekakis) REFS –Netlink –Quagga manual –Router architectures

How to be faster Faster SPF –Better algorithms –Incremental SPF Faster detection –Faster HELLOs –BFD!!! In the line card instead of the control plane many protocols can share Faster FIB download –Download “important” prefixes first Do things faster –Trigger SPF immediately –Trigger LSA origination immediately

How to be stable SPF may be expensive –Can not do SPF all the time something minor changes, may be better to do one SPF for all changes Avoid extra FIB downloads Do not overload the CPU Do not want to sent too many updates at once –Receiver may get overloaded Do not want to trigger updates too quickly –Link may be flapping When CPU/links are loaded ensure that I do not miss important things –Do not miss HELLOs, will make things worse

Configuration: Timers Hello timer, dead timer LSA update delay LSA pacing LSA retransmission pacing SPF delay –Wait for this time before you do SPF SPF hold-time –Do not do another SPF before this time passes Can have dynamic timers –Be fast when CPU is idle –Be slow when CPU is loaded

It is difficult Speed and stability are conflicting goals Alternatively: Disconnect convergence from data plane –Avoid u-loops See overview –Have alternate next-hops pre-computed and switch to them in case of failures We will see this later

Anatomy of a protocol (routing or not) Inputs –Static configuration –Other protocol instances in the network –Other components in my platform –Dynamic events on my platform; link states etc… State –Transient (packets, queues) –Protocol Computation –Triggered (process incoming packet) –Periodic (timers) (refresh state, LSA) Outputs –To other protocol instances on the network –To other components in the platform –To FIB

Examples of protocol tasks Receive, send protocol packet(s) Schedule/process timers Perform computations (I.e SPF) Communicate with other components Download Routes to FIB Process changes in the environment –Link state changes –Adjacency changes Process configuration and configuration changes

Tasks Can be complex and long running –Download 1,000 routes to FIB –Originate 500 LSAs –Perform an SPF in a large network Usually protocol runs on one CPU –Have to multiplex tasks

Scheduling Scheduling of tasks is what makes or breaks an implementation Liveness –even when I download 100,000 routes to the FIB, I can receive and process LSAs Stability –Prioritize tasks Send the hellos first even under load Never skip important tasks when overloaded –Shed excess load so that I do not collapse Queue incoming packets and start dropping if queue becomes too long Slow down the SPFs…

The big question How to implement/handle parallelism Events vs. threads Events –trigger event handlers that are essentially function calls –Run to completion, I.e. until the function returns Threads –flows of execution with their own local state/stack –Can be suspended and resumed –With pre-emptive threads system may switch to another thread along the way –With non-preemptive threads I have to yield

How does my protocol look with events Assign events and event handlers –Packet receive, packet send, spf etc… Event loop (A.K.A the big select() loop) –Loop waiting for events Incoming packet, timer, signal other event –Pick the next event to handle According to my own scheduling –Call its event handler When I want to initiate an action I post an event –Put the packet in a queue –Schedule a Packet_send event

How does my protocol look with threads FIG! Assign tasks to threads –Packet_rx thread, packet_tx thread, FIB_download thread Thread blocks when there is no work to do –Packet_rx on the socket, FIB_download on a cond variable –It is unblocked when there is work System handles the scheduling of the threads –May not have control in it

Events vs. threads Events –Manage my own state –Manage my own scheduling –I explicitly handle parallelism by controlling when a event handler terminates –If I want to suspend an event handler must take care of its state Threads –Can arbitrarily suspend/resume a thread –State is automatically managed in the thread stack –The thread scheduler has control –With pre-emptive threads system handles parallelism –But I have to LOCK

Events Pros –I have total control of everything and I can do what is best –Handle parallelism explicitly no need for locking, etc –May be more efficient No context switches and state saving there Cons –I have total responsibility of everything, system does not help me –If I want to yield to another handler need to take care of the state myself, I.e. stop a long SPF in the middle

Threads Pros –Parallelism is handled in a more clean and natural way –System helps a lot in scheduling, state copying Cons –Real parallel programming is hard Locking etc –State copying can be expensive –Thread scheduler may be making the wrong scheduling decisions Not application specific

An example: Quagga First some router architecture –Forwarding and control plane Forwarding plane has to be fast –NPs, FPGAs, ASICs, little bit inflexible Control plane is usually implemented in a commodity processor –Commodity OS, environment and tools

Big and Small Routers How does a large router look? –EXAMPLE control vs. forwarding plane –line-cards, switch, FIB per-line-card, control processor How does a PC router look? –EXAMPLE –Kernel for the forwarding –Use space for the control plane

Distributed control planes I want resiliency and minimal fate sharing Break the control plane into components that are independent –Processes –One process per-protocol It was a novelty 6 years ago, now everybody has it May need to share some state –Need to prioritize between multiple routes –Redistribution: later

Quagga: a distributed control plane for a PC router Multiple processes –One per-protocol –Zebra manage all the routes from all protocols send routes to the FIB (kernel) Centralize the management of local interfaces etc…

Communication EXAMPLE of system Zebra – protocols talk to each other through a private control protocol –Over a TCP socket Protocols send their packets directly to the interfaces But send their routes to zebra –Over a TCP socket Zebra talks to the kernel through netlink

Paths Interface down –Kernel to zebra through netlink –Zebra to protocols through private proto Route download –Protocol to zebra through private proto –Zebra to kernel through netlink OSPF Hellos –Directly from OSPF to interfaces and back Data packets –Never leave the kernel

Zebra protocol Interface –Add, delete, addr-add, addr-delete, up, down Route –Ipv4-add, ipv4-del, ipv6-add, ipv6-del Redistribute –Add, del

Netlink Uses a special socket Very powerful –Read and change interface state –Read and change interface configuration –Read and change routing tables –And MPLS, scheduling…. And efficient –Multicast some notifications

Configuration and management Prompt based configuration and management –telnet localhost 2601 for zebra –telnet localhost 2604 for ospf

Implementation Directories –Zebra, ospf, lib for common functions Event based (but confusingly called threads) –Main loop in lib/thread.c thread_fetch() Considers: sockets, timers, signals –Timers are used as a general event mechanism If I want to do something now, I schedule a timer with 0 expiration Netlink interface in zebra/rt_netlink.c