On Protocol Design. T Computer Networks Miika Komu Data Communications Software Group CSE / Aalto University

Similar documents
On Host Identity Protocol

Host Identity Protocol. Miika Komu Helsinki Institute for Information Technology

Network Security: Broadcast and Multicast. Tuomas Aura T Network security Aalto University, Nov-Dec 2010

Distributed Systems. 21. Content Delivery Networks (CDN) Paul Krzyzanowski. Rutgers University. Fall 2018

CS November 2018

CS November 2017

Int ernet w orking. Internet Security. Literature: Forouzan: TCP/IP Protocol Suite : Ch 28

CompTIA Network+ Study Guide Table of Contents

VXLAN Overview: Cisco Nexus 9000 Series Switches

Why IPv6? Roque Gagliano LACNIC

Network Security: Broadcast and Multicast. Tuomas Aura T Network security Aalto University, Nov-Dec 2011

T Computer Networks II. Mobility Issues Contents. Mobility. Mobility. Classifying Mobility Protocols. Routing vs.

ETSF05/ETSF10 Internet Protocols Network Layer Protocols

An Industry view of IPv6 Advantages

Goals and topics. Verkkomedian perusteet Fundamentals of Network Media T Circuit switching networks. Topics. Packet-switching networks

IPv6: An Introduction

Chapter 5.6 Network and Multiplayer

precise rules that govern communication between two parties TCP/IP: the basic Internet protocols IP: Internet protocol (bottom level)

Networking for Data Acquisition Systems. Fabrice Le Goff - 14/02/ ISOTDAQ

This course prepares candidates for the CompTIA Network+ examination (2018 Objectives) N

ICS 451: Today's plan

CS 470 Spring Distributed Web and File Systems. Mike Lam, Professor. Content taken from the following:

Planning for Information Network

Networking interview questions

Fundamental Questions to Answer About Computer Networking, Jan 2009 Prof. Ying-Dar Lin,

CS 470 Spring Distributed Web and File Systems. Mike Lam, Professor. Content taken from the following:

Distributed Systems Question Bank UNIT 1 Chapter 1 1. Define distributed systems. What are the significant issues of the distributed systems?

WiNG 5.x How-To Guide

CS-435 spring semester Network Technology & Programming Laboratory. Stefanos Papadakis & Manolis Spanakis

Unit 5 - IPv4/ IPv6 Transition Mechanism(8hr) BCT IV/ II Elective - Networking with IPv6

IPv6: Are we really ready to turn off IPv4? Geoff Huston APNIC

Foreword xxiii Preface xxvii IPv6 Rationale and Features

Chapter 2 Advanced TCP/IP

Data Communications and Networks Spring Syllabus and Reading Assignments

Table of Contents. Computer Networks and the Internet

Chapter 1. Uses of Computer Networks Network Hardware Network Software Reference Models Example Networks Network Standardization. Revised: August 2011

On the Internet, nobody knows you re a dog.

IPv6 Security (Theory vs Practice) APRICOT 14 Manila, Philippines. Merike Kaeo

Radware ADC. IPV6 RFCs and Compliance

Assignment - 1 Chap. 1 Wired LAN s

Different Layers Lecture 20

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

ECE 435 Network Engineering Lecture 14

HIP Host Identity Protocol. October 2007 Patrik Salmela Ericsson

TCP/IP Protocol Suite

Internet of Things (IOT) Things that you do not know about IOT

CSCI-1680 Network Layer:

T Network Application Frameworks and XML Routing and mobility Tancred Lindholm. Based on slides by Sasu Tarkoma and Pekka Nikander

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4

Operating Systems. Week 13 Recitation: Exam 3 Preview Review of Exam 3, Spring Paul Krzyzanowski. Rutgers University.

CS 416: Operating Systems Design April 22, 2015

IPv6 Stack. 6LoWPAN makes this possible. IPv6 over Low-Power wireless Area Networks (IEEE )

Networked Multimedia and Internet Video. Colin Perkins

IPv6. Internet Technologies and Applications

A Practical (and Personal) Perspective on IPv6 for Servers. Geoff Huston June 2011

CS162 Operating Systems and Systems Programming Lecture 21. Networking. Page 1

Examination 2D1392 Protocols and Principles of the Internet 2G1305 Internetworking 2G1507 Kommunikationssystem, fk SOLUTIONS

Chapter 16 Networking

IPV6 SIMPLE SECURITY CAPABILITIES.

CS 356 Internet Security Protocols. Fall 2013

The Design Space of Network Mobility

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

Computer Networks SYLLABUS CHAPTER - 2 : NETWORK LAYER CHAPTER - 3 : INTERNETWORKING

Next Steps Spring 2011 Lecture #18. Multi-hop Networks. Network Reliability. Have: digital point-to-point. Want: many interconnected points

TCP/IP Networking. Training Details. About Training. About Training. What You'll Learn. Training Time : 9 Hours. Capacity : 12

IP Mobility vs. Session Mobility

LOGICAL ADDRESSING. Faisal Karim Shaikh.

Using the Cisco ACE Application Control Engine Application Switches with the Cisco ACE XML Gateway

Chapter 8 roadmap. Network Security

Transport Layer Security

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August

Lecture 33. Firewalls. Firewall Locations in the Network. Castle and Moat Analogy. Firewall Types. Firewall: Illustration. Security April 15, 2005

WWW, REST, and Web Services

IT114 NETWORK+ Learning Unit 1 Objectives: 1, 2 Time In-Class Time Out-Of-Class Hours 2-3. Lectures: Course Introduction and Overview

IPv6- IPv4 Threat Comparison v1.0. Darrin Miller Sean Convery

NCP Secure Client Juniper Edition Release Notes

Cisco CCNA (ICND1, ICND2) Bootcamp

Insights on IPv6 Security

OSI Layer OSI Name Units Implementation Description 7 Application Data PCs Network services such as file, print,

Part II. Raj Jain. Washington University in St. Louis

CIS 5373 Systems Security

Host Identity Protocol (HIP):

Lecture 3: Packet Forwarding

OpenADN: A Case for Open Application Delivery Networking

Advanced Computer Networking. CYBR 230 Jeff Shafer University of the Pacific QUIC

Network Security: Threats and goals. Tuomas Aura T Network security Aalto University, Nov-Dec 2011

Advanced Computer Networks Exercise Session 7. Qin Yin Spring Semester 2013

Remember Extension Headers?

Why do we really want an ID/locator split anyway?

Network Address Translators (NATs) and NAT Traversal

Named Data Networking (NDN) CLASS WEB SITE: NDN. Introduction to NDN. Updated with Lecture Notes. Data-centric addressing

Transitioning to IPv6

A New Internet? Introduction to HTTP/2, QUIC and DOH

ENEE 457: Computer Systems Security 11/07/16. Lecture 18 Computer Networking Basics

ICS 351: Networking Protocols

Implementing Cisco Network Security (IINS) 3.0

Communications Software. CSE 123b. CSE 123b. Spring Lecture 10: Mobile Networking. Stefan Savage

Quick announcement. CSE 123b Communications Software. Last class. Today s issues. The Mobility Problem. Problems. Spring 2003

CS 356: Computer Network Architectures. Lecture 15: DHCP, NAT, and IPv6. [PD] chapter 3.2.7, 3.2.9, 4.1.3, 4.3.3

Internet of Things: An Introduction

Transcription:

On Protocol Design T-110.4100 Computer Networks 16.4.2013 Miika Komu <miika@iki.fi> Data Communications Software Group CSE / Aalto University

Scope of the Lecture General overview of protocol design Characteristics of successful protocols Different protocol design models Security Standardization What this lecture is not about Programming of protocols Web-protocol development

Related Courses at Aalto S-38.3159 Protocol Design T-106.4300 Web Software Development T-75.1110 XML-kuvauskielten perusteet T-109.4300 Network Services Business Models T-109.5410 Technology Management in the Telecommunications Industry T-110.5241 Network Security T-110.5110 Verkot II (addressing lecture)

Introduction to Protocol Design Need to exchange information between two or more entities (devices or software) Need a common language (protocol) Protocol specifications define on-wire formats Sometimes include implementor hints Can't have the cake and eat it all Reliable vs. fast Extensible vs. simple Trade-offs often necessary Non-technical constraints Money, time and human resources

Design and Specification Three technical aspects: Host processing: protocol states, transitions, retransmissions, ordering of packets What goes on wire: serialization, formatting, framing and fragmentation, messages, round trips Deployment: wireless networks, mobile devices, sensors, firewalls, NATs, etc Remember: Design it as simple as you can, but not simpler.. Reuse/extend existing design or protocol if possible Separate policy from mechanism

Initial Success Factors Early adopters get the benefits (RFC5218) No extra infrastructure needed Changes required only at the client side Meets a real (business) need Incrementally deployable No flag day! Open code, specs, maintenance and patent free, good technical design Surprisingly, only secondary value...

Wild Success Factors Wild success means that protocol is deployed beyond original plans Factors for success Extensibility Scalability Security threats sufficiently migrated See RFC5218 (What Makes for a Successful Protocol)

Technical Design Criteria Extensibility Reliability Scalability Stateless servers Ordered delivery Congestion control Error correction Error recovery Zero configuration Incr. deployable Rest vs. RPC Energy efficiency Security Privacy Availability Anonymity

Scalability Is the protocol designed to endure a drastic increase in the number of users? Bottlenecks: infrastructure and servers Computational overhead and complexity Small devices with limited CPU and batteries Wireless networking consumes energy! Decentralization (distributable protocols) Load balancing (server redundancy) Caching for optimized performance

Protocol Evolution Mandatory vs. optional protocol parameters Optional for backwards compatibility Extension compatibility Do all of the N extensions work together? Backwards incompatible extensions introduced Bump protocol version from v1 to v2 Versioning should be included from day one! Be conservative in sending and liberal in receiving (robustness principle / Postel's law)

Interoperability Interoperability tests verify compatibility of two different implementations Protocol specifications Multiple implementations from different vendors or organizations Are the implementations compatible? Is the specification strict enough?

Network Environments Single-hop vs. multi-hop Access Media (wired vs. wireless) LAN, WAN Trusted vs. untrusted networks NATted/IPv4 vs. IPv6 networks Infrastructure: name servers, middleboxes Device mobility, network mobility Multihoming, multiaccess, multipath Delay tolerant networking (e.g. email) Constrained networks (127 B MTU for 802.15.4)

Design Models Architectural models Centralized vs. distributed service Client-server vs. peer-to-peer Cloud computing REST vs. RPC Communication models Unicast, anycast, broadcast, multicast Point-to-point vs. end-to-end End-to-end vs. end-to-middle Internet routing vs. overlay routing Asynchronous vs. synchronous Byte transfer vs. messaging oriented

Representational State Transfer REST Constraints Separation of concerns (client-server) Stateless server Cacheability Support for intermediaries (proxies) Uniform interface Benefits Scalability Simple interfaces

REST vs. RPC Remote Procedure Call (RPC) Non-uniform APIs Complex operations RESTful web is usually a better choice than SOAP Easier to develop and to scale up Web is resource oriented by its nature See RESTful Web Services (Richardson)

Layering Abstract and isolate different protocol functionality on different layers of the stack A layer should be replaceable with another Application layer: more intelligent decisions, easier to implement, easier to deploy Application frameworks and middleware Lower layers: generic purpose service to application layer => software reuse Strict vs. loose layering (cross-layer interaction)

Addressing and Naming Human-readable names Hostnames, FQDN, URIs Subject to internationalization issues Machine-readable names ISP or device manufacturer assigned (IP address, MAC addresses) Self-assigned addresses (ad-hoc), IPv6 ULA Cryptographic names (PGP, SSH, CGA, HIP) Do not embed IP addresses in application-layer protocols (see RFC5887)! Translation of names (DNS, directories, etc)

States and Transitions State machine models different phases of communication Example: handshake, communications, connection maintenance and tear down Stateless operation: operates based on packet contents Stateful operation: packet contents + history State transitions Symmetric (mirrored) state machine Asymmetric state machine Hard state: state transitions explicitly confirmed and state does not expire Soft state: needs to refreshed, otherwise expires

Example State Machine Receive msg A START State 1 Send msg D Send msg B State 3 Recv msg C State 2

Packet Flow Diagrams Illustrate the protocol to the reader of the protocol specification Use case, not a full specification Two or more communicating entities Illustrates also the flow of time IETF uses simple format (see next slide) UML format is also possible

Example Flow Diagram 1. GET / 2. GET / 3. <RESPONSE> 4. <RESPONSE> Client Proxy Server

Protocol Encoding 1/2 Serialization (marshalling) to wire format Related terms: PDU, datagram, framing, fragmentation, MTU Text encoding (app-layer protocols) XML, HTML, SIP Easier to debug for humans Lines usually separated by newlines Character set (internationalization) issues Bandwidth inefficient (compression could be used)

Protocol Encoding 2/2 Binary formats Integers in big-endian format Padding for alignment Bandwidth efficient Example protocols: IPv4, IPv6, TCP, UDP Example formats: XDR, ASN.1, BER, TLV Typically binary formats are visualized in box notation for engineers in protocol specifications

Box Notation Example (RFC793)

Security 1/4 Internal vs. external threat Attacker within company or outside Local software (e.g. trojan) vs. remote attack Active (modify packets) and passive (read packets) attacks Man-in-the-middle attack Blind attack Reflection, amplification, flooding DoS vs. DDos attack

Security 2/4 Security countermeasures: Access control lists, passwords, hashes, nonces Public-key signatures and certificates Shared keys Open design vs. security by obscurity Don't forget about user education! Countermeasures against attacks for availability (resource depletion, exhaustion, DoS/DDoS): Rate limitation Intermediaries (firewalls, network intrusion detection) Capthas, computational puzzles Replicated resources (e.g. cloud networking)

Security 3/4 Opportunistic security vs. infrastructure Opportunistic security is used e.g. in SSH Leap of faith/time or huge deployment cost? Reuse existing mechanisms: SSL vs. IPsec IPsec does not require changes in the application How does the user know that the connection is secured? Find the balance between usability and security Security increases complexity Avoid manual configuration and prompting

Security 4/4 Do not hard-code cryptographic algorithms into the protocol! Algorithms are safe only until a flaw is found For example, MD5 is deprecated Also key lengths deprecate due to Moore's laws Better to embed in the design from day one Security difficult to add after deployment Privacy even more difficult to add afterwards Beware of downgrade attacks (see RFC5201-bis) The overall strength of the system is as strong as its weakest link Reuse existing protocols (e.g. TLS), do not invent new!

Protocol Correctness Verify that the protocol works Peer review Implement your own specification Implementation insight Performance analysis Mathematical (crypto) analysis Scalability analysis with simulators Ready for deployment? More difficult to fix already deployed software Future compatibility

Deployment Obstacles Firewalls Firewalls drop packets with IPv4 options TCP options are much better End-host firewalls (virus scanners, Selinux) Network Address Translators (NATs) Engineering of end-to-end (or P2P) protocols difficult By default, NATs block new incoming connections Overlapping namespaces (error prone) Easier naming with split-horizon DNS Unreliable penetration with upnp, ICE or Teredo NATs support only TCP and UDP (and maybe IPsec) Old NAT devices have different NAT algorithms See also RFC4787, 2775 and 6250

Standardization Why? Even wizards make errors. The more reviewers, the less errors Customer wants to avoid vendor lock-in? Security Drawback: standardization takes time Few standards organizations W3C: Web standardization IETF: Applications, routing, transport, IPv4/IPv6, security IEEE: Data-link layer (ethernet, wlan), POSIX,.. ITU-T, ETSI, 3GPP: Cellular technology

Related Literature 1/2 Theory Principles of Protocol Design, Sharp, 1995 Reasoning about Knowledge, Fagin et al, 1995 Protocol Engineering RFC3117: On the Design of Application Protocols, Rose, 2001 RFC6250: Evolution of the IP Model, Thaler, 2011 RESTful Web Services, Richardson et al, 2007, O'Reilly

Related Literature 2/2 Service Adoption and Deployment Network Services: Investment Guide, Gaynor, 2003 RFC5218: What Makes for a Successful Protocol, Thaler et al, 2008 Security: RFC3631: Security Mechanisms for the Internet, Bellovin et al, 2003