Linux Networking Overview COMS W6998-5 Spring 2010.

Slides:



Advertisements
Similar presentations
Intermediate TCP/IP TCP Operation.
Advertisements

VIA and Its Extension To TCP/IP Network Yingping Lu Based on Paper “Queue Pair IP, …” by Philip Buonadonna.
Socket Programming.
Protocols and the TCP/IP Suite
OS Spring’03 Introduction Operating Systems Spring 2003.
Computer Network Architecture and Programming
EE 4272Spring, 2003 Protocols & Architecture A Protocol Architecture is the layered structure of hardware & software that supports the exchange of data.
Networks 1 CS502 Spring 2006 Network Input & Output CS-502 Operating Systems Spring 2006.
Understanding Networks. Objectives Compare client and network operating systems Learn about local area network technologies, including Ethernet, Token.
1 Link Layer & Network Layer Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
CS-3013 & CS-502, Summer 2006 Network Input & Output1 CS-3013 & CS-502, Summer 2006.
OSI Model 7 Layers 7. Application Layer 6. Presentation Layer
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
 The Open Systems Interconnection model (OSI model) is a product of the Open Systems Interconnection effort at the International Organization for Standardization.
Gursharan Singh Tatla Transport Layer 16-May
1 Protocol Interaction (ISO’s Open Systems Interconnection (OSI model)) the 7 layers.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Introduction to Linux Network 劉德懿
Protocols and the TCP/IP Suite Chapter 4. Multilayer communication. A series of layers, each built upon the one below it. The purpose of each layer is.
Process-to-Process Delivery:
Data Communications and Networks
CP476 Internet ComputingCh.1 # 1 Lecture 2. A Brief Introduction to the Internet The objective is to understand The history of Internet What the Internet.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
Chapter 1 Overview Review Overview of demonstration network
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Protocol Layering Chapter 10. Looked at: Architectural foundations of internetworking Architectural foundations of internetworking Forwarding of datagrams.
Protocol Architectures. Simple Protocol Architecture Not an actual architecture, but a model for how they work Similar to “pseudocode,” used for teaching.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
LWIP TCP/IP Stack 김백규.
Internet Addresses. Universal Identifiers Universal Communication Service - Communication system which allows any host to communicate with any other host.
LWIP TCP/IP Stack 김백규.
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
Component 9 – Networking and Health Information Exchange Unit 1-1 ISO Open Systems Interconnection (OSI) This material was developed by Duke University,
Fall 2004FSU CIS 5930 Internet Protocols1 Architecture of Network Implementation Reading: Chapters 3 and 4.
Computer Networks. Introduction Computer Network2 A History Lesson of Networking 1969 – ARPANET, first packet switched network consist of UCLA, Stanford,
University of the Western Cape Chapter 12: The Transport Layer.
TCP/IP Transport and Application (Topic 6)
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_b Protocol Layering Instructor: Dr. Li-Chuan Chen Date: 09/15/2003 Based in part upon slides of Prof.
The Transport Layer application transport network data link physical application transport network data link physical application transport network data.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
OS Services And Networking Support Juan Wang Qi Pan Department of Computer Science Southeastern University August 1999.
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
1 Chapter Overview Network Communications The OSI Reference Model.
1 Chapter Overview Network Communications The OSI Reference Model.
CHAPTER 4 PROTOCOLS AND THE TCP/IP SUITE Acknowledgement: The Slides Were Provided By Cory Beard, William Stallings For Their Textbook “Wireless Communication.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
1 Chapter 4. Protocols and the TCP/IP Suite Wen-Shyang Hwang KUAS EE.
Protocol Layering Chapter 11.
Major OS Components CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Data Communication Network Models
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Network Communications A Brief Introduction. 2 Network Communications.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Roadmap  Introduction to Basics  Computer Network – Components | Classification  Internet  Clients and Servers  Network Models  Protocol Layers.
Module 12: I/O Systems I/O hardware Application I/O Interface
Computer Networks.
Part I. Overview of Data Communications and Networking
Protocols and the TCP/IP Suite
ECEN “Internet Protocols and Modeling”
Process-to-Process Delivery:
I/O Systems I/O Hardware Application I/O Interface
Operating System Concepts
Lecture 6: TCP/IP Networking 1nd semester By: Adal ALashban.
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Protocols and the TCP/IP Suite
OSI Reference Model Unit II
Process-to-Process Delivery: UDP, TCP
OSI Model 7 Layers 7. Application Layer 6. Presentation Layer
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

Linux Networking Overview COMS W Spring 2010

Outline Layering in Networks ISO Network Model IP Network Model Linux Kernel Outline Network Subsystem Outline

Layer-Based Communication Models Instance (N) Instance (N-1) Application Instance (N+1) Application (N+1)-Protocols (N)-protocol (N-1)-protocol Instance (N+1) Instance (N+1) Instance (N) Instance (N-1) Instance (N+1) Transmission medium Intermediate system End systems Layer (N-1) Layer (N) Layer (N+1) Application

Concepts in Layered Model Protocols Rules that two parties talk and understand each other Horizontal interface Services Functions provided by a lower layer to the neighboring upper layer Vertical interface Service interface (function calls)

ISO/OSI Reference Model ISO/OSI Reference model Application Presentation Session Transport Network Data link Physical Application: Protocols for different applications, HTTP, SMTP, FTP, etc Presentation layer: Regulating data presentation (formatting, ASN/1) Session : Handling structured message exchange, multiplexing sessions Transport: End-to-end functions between applications. Flow control, packet ordering, etc. Network: Connecting networks. Packet routing/forwarding Data link layer: Moving data between two directly connected stations. Flow control, error detection, etc. Shared medium: access control. LLC/MAC Physical: Media types, coding methods, bit sequences vs. physical signals

ISO vs. The Internet ISO/OSI reference model Internet reference model Application Presentation Application (HTTP, SMTP, SSH) Transport (TCP/UDP) Internet (IPv4/v6) Data link (802.x, PPP, SLIP) Session Transport Network Data link Physical

Design Principles Optimize for the common case E.g., TCP header prediction Never touch/copy data E.g., checksum offload Mistakes can be made at each layer Use common facilities at each layer Buffer management, hash tables, timers Use best-of-breed practices in these facilities

Kernel Structure vimapachesshd Shared C Library System Call Interface User Kernel Process Mgmt Memory Mgmt File System Device Control Network Subsys CPU Support Code Hardware MMU Support Code CPURAM Character Devices Network Devices Network device drivers Character device drivers Block device drivers Block Devices

Process management Creating, destroying, putting to sleep, waking up, and scheduling processes. Memory management Allocates memory to processes; maps virtual memory to physical memory; enforces protection File system In UNIX, almost everything is handled over the file system interface. Device drivers can be addressed as files /proc file system allows us to access data and parameters in the kernel Kernel Structure

Device drivers Abstract away the underlying hardware and allow us to access the hardware with well-defined APIs The use of kernel modules allow device drivers to be dynamically loaded/unloaded Networking Provides communication between end hosts Incoming packets are asynchronous events and have to be collected and identified, before a process can handle them. Many network operations occur asynchronously and cannot be associated to a specific process. Instead, interrupts and timers are used extensively. Kernel Structure (2)

Kernel Structure vimapachesshd Shared C Library System Call Interface User Kernel Process Mgmt Memory Mgmt File System Device Control Network Subsys CPU Support Code Hardware MMU Support Code CPURAM Block Devices Character Devices Network Devices Network device drivers Character device drivers Block device drivers COMS W6998

Network Subsystem System Call Interface User Kernel Interrupts Soft IRQs Lists UDP Wait Queues Hardware Timers Intel E1000 E1000 driver Application Intel E1000 Hash Tables Synch & Atomic Ops E1000 driver Sockets ip_proto TCPSCTP data link layer ARPIPV4IPV6bridging ICMP sk_buff net_device U/K copy DMAPCI Mem Alloc Notifiers VFS sock socket

Network-specific facilities sk_buff : Core networking data structure for managing data (i.e., packets) net_device: Core data structure that represents a network interface (e.g., an Intel E1000 Ethernet NIC). proto_ops: Data structure for different IP protocol families SOCK_STREAM, SOCK_DGRAM, SOCK_RAW Virtual functions for bind(), accept(), connect(), etc. struct sock/ struct socket : Core data structures for representing sockets

Kernel facilities (1) Timers Facility for scheduling work in the future (e.g., retransmitting a lost TCP segment) Hash tables Facility for creating associations (e.g., 4-tuple  TCP connection block), looking them up, deleting them User/kernel copying Library for safely transferring data across the user/kernel boundary Memory allocation Mechanism for the network subsystem to obtain memory (e.g., pinned pages for arriving packets to land in) Linked lists What you think

Kernel facilities (2) Atomic operations and synchronization Mechanisms for managing concurrency correctly Interrupts Hardware interface for notifying OS of an event (e.g., a packet arrival) Soft IRQs “Software interrupts” that are asynchronously executed in response to a hardware interrupt Wait Queues Mechanism for processes/threads/tasks to wait for an event, put themselves to sleep, or wake another process up Notifiers Publish/subscribe system for notifying other systems about an event (e.g., interface goes down)

That’s the big picture… Later lectures will delve into the details Not enough time to cover everything Suggestions about what to cover welcome Or how to cover it Bottom-up or top-down? Use your project to cover something interesting and/or important to you

For next week Install a distribution inside a VM Download/build/install the appropriate kernel source in the VM Enable kgdb, kprobes, oprofile, magic sysreq, debugfs If this is difficult for you, you probably are in the wrong class..