{ } Embedded Montreal Meetup. Char *lecture = Lecture 2 Deep Packet Inspection in Userspace ;

Size: px
Start display at page:

Download "{ } Embedded Montreal Meetup. Char *lecture = Lecture 2 Deep Packet Inspection in Userspace ;"

Transcription

1 { } Embedded Montreal Meetup October 17 th, 2014 Ron Brash Embedded Developer Ron.brash@gmail.com Char *lecture = Lecture 2 Deep Packet Inspection in Userspace ;

2 Objectives Quick introduction Refresher on bytes and sign (order) Brief overview on protocol layers Reasons for DPI and firewall differences Reading packet headers Packet processing methods Example DPI application and methodology Tools and performance

3 Who Am I? I am an embedded developer that : Develops on OpenWRT and non-x86 architectures Writes DPI applications on embedded platforms I have a Bachelors in tech and currently working towards a MsCompSci My ron.brash@gmail.com

4 The Basics

5 A Quick Refresher What is a byte? Is 8 bits Represented as a decimal value OR hexadecimal Can be signed or unsigned Both negative and positive, or only positive Int vs u_int Can big or little Endian Byte order is a u_int8 with a value can be: 0x10 or 0x01

6 Network Protocols In the non-osi network model there are 4 layers Application Transport Internet Network Access

7 Network Access Layer (1) Also known as the Ethernet layer Foundation for most protocols Contains: MAC addressing information VLAN information Information identifying the following protocol

8 Internet Layer (2) Builds upon the network layer Determines the method of addressing Contains IP addressing information Following protocol information Enables routing and more Called the IP layer IPv4 or IPv6

9 Transport Layer (3) Builds upon the Internet layer Consists of protocols such as ICMP, TCP, UDP May have port information or useful fields: ACK, sequence numbers (useful for tracking connections and data)

10 Application Layer (4) The most important layer This is where you would do DPI Example applications layer protocols: HTTP, DNS, FTP Most firewalls don t inspect these layers If they do, they are usually Enterprise and used for: Anti-virus inspection, spam filtering, policy enforcement

11 Firewalls Typically all modern firewalls are state tracking (even consumer) Only inspect the first three layers Called Layer 3 Firewalls Doesn t inspect application layer traffic

12 What Is DPI and Why Is It Needed? Deep packet inspection (DPI) Allows a firewall to inspect actual application protocols and data Better granularity for policy enforcement Restrict data access and specification checking

13 Extending Firewalls Through DPI Two methods for development DPI user space applications Kernel modules Requires extensive knowledge of the protocol Performance and latency are now important Inspection requires better hardware Adds latency due to processing You could use Snort in IPS mode or a web-proxy. But that s not why we are here!

14 Reading Packet Headers

15 What Is A Frame? A frame is "the unit of transmission in a link layer protocol, and consists of a link-layer header followed by a packet." In other words, a frame's contents look like: 1. Ethernet Header (is 14 bytes in size) 2. IP Header (usually and is 20 bytes in size) 3. Protocol Header (usually ICMP,UDP or TCP) 4. Payload(optional)

16 The Ethernet header Is the first header of the potential three There are other types of headers or protocols If we ignore the 8 bits that are in the preamble then there are just 14 bytes in the header. 6 bytes for the destination MAC address 6 bytes for the source MAC address 4 bytes for the Type. If this is an IP packet, the type will be 0x0800

17 Ethernet Header Diagram

18 IP Header Diagram The second header in the frame

19 UDP Header The UDP header is the second header of the potential three in the frame

20 TCP Header The TCP header is another potential header of the three in the frame.

21 ICMP Header The ICMP header is another potential header of the three in the frame

22 Reviewing A Packet s Hex Values Each of those double groupings of letters/numbers equal 1 byte. If you look at the highlighted part of the image then 00 is 1 BYTE! And now you remember that 1 Byte is 8 bits and that each of these header specifications is 32 bits across.

23 Reviewing A Packet s Hex Values Here is the same marked packet dump 0x06 is TCP The start of the source IP address - is at bytes 13-16: C0 A and the destination IP address is at bytes 17-20: C7 3B 96 2A. To convert these bytes into an IP address, you must convert each of the 4 bytes to decimal C0 =192, A8 = 168, 02 = 2 and 65 = 101. As a result the source IP address is

24 Reviewing Continued Without any padding or extra data, the TCP header is 20 bytes long. You could guesstimate by the number of bytes and guess the potential packet header specification The first 4 bytes is the Source Port, the next 4 bytes is the Destination Port To get these values just convert the hexadecimal to decimal. The TCP flags requires a bit more work From the start of the TCP header, count 13 bytes and the 14th bytes is the flags field! And the flags in hex are 0x50 11 Next convert the hexadecimal to binary to find which bits have been set - each flag is one bit. 0x5011 is equal to We aren't concerned with the first byte or 8 bits, so looking at the last byte, we can see that the 4th and 8th bit are set which alternatively is ACK and FIN.

25 DPI In Userspace

26 Why Userspace Vs. Kernel? Advantages of Kernel DPI: Better performance Disadvantages: Errors can cause system crashes (OOPS) GPL infections Advantages of Userspace: Easier to develop/debug Can be non-gpl (LGPL or proprietary) Disadvantages: Less performance Added latency (kernel to user and back)

27 Userspace Options C libraries libnetfilter-queue (GPL) Libmnl (LGPL) Python and perl nfqueue bindings Netmap Packets are sent from iptables/ip6tables using the NFQUEUE target Ebtables requires patching for kernel and userspace Ethernet header is not passed without patching

28 Packet Flow From Xtables Packet is matched in xtables Sent to userspace using Netfilter sockets Application processes packet Returns verdict to kernel Packet is dropped or allowed

29 Honorable Mentions Other methods to receive packets in user space: Proxies using raw sockets Adds latency Allows you to track/store a whole stream Logging and then forwarding using crafted packets Slow Libpcap to monitor applications Read only and crafting would still be required Slow and not in-line!

30 Development Process

31 System/Dev Requirements One or more NICs Good test network/setup For example, real world systems vs. Pcaps Wireshark/tcpdump Compilers and dev libraries Queuing libraries Libraries such as glib for data structures Xtables extensions and support NFQUEUE in kernel and userspace

32 The Development Process 1. System setup 2. Setup test network 3. Review network traffic with Wireshark Write a filter if needed 4. Review RFCs and protocol specifications Data flow diagrams and planning 5. Write application and test

33 Application Design Decisions Scenarios that should be accounted for: Application layer fragmentation Sanity checking fields Real-world edge-cases Processing latency Legacy protocol versions Startup conditions and port hopping

34 Choosing Data Structures Real-world vs. theoretical performance may differ for data structures Bench mark and experiment Simple is usually better than complex Different arches may alter performance Compilers, libraries and flags may affect results!

35 Sample Application Using FTP

36 Application For FTP FTP in a nutshell A simplistic, but relatively non-trival application Requires two ports One for the Control Channel One for the Data Channel Two modes, active and passive Clear text (ASCII) No encryption or security Other than plain text password authentication

37 Before Coding & Development Research potential issues Review RFCs, wikipedia, and wireshark captures Create application requirements Determine and write configuration schema XML for example Determine options for sanity checking Specification verification and validation Application specific actions Drop and generate alert for example

38 RFC Research Example After reviewing the FTP RFC: Different login/connection use case Request/response format With a special case of a response to a response Two different methods of network communication Active vs. Passive Allow anonymous logins

39 RFC Commands Notice that Connection Estab does NOT have a command! Everything else has a command and a response Logout has a third case Command->response-> response

40 RFC Communication Modes

41 Example 10k Requirements 1. Requests shall only be allowed from a connected session 2. Allowed responses shall only be allowed following a request 3. Connections must be tracked and stored in a ring-buffer 4. Shall allow possibility and tracking of a third succeeding message Request -> response -> succeeding response

42 Example Configuration XML Schema <ftpsettings name="ftpsettings"> <allowanonymousconns>true</allowanonymousconns> <allowpassiveconns>true</allowpassiveconns> <allowactiveconns>true</allowactiveconns> </ftpsettings> <connectionestablishment name="connectionestablishment"> <replycodes> <replycode>220</replycode> <replycode>421</replycode> <replycode>120</replycode> <succeedingcodes> <replycode>220</replycode> <succeedingcodes> <replycode>220</replycode> <replycode>421</replycode> </replycodes> </connectionestablishment> <ftpprotocol name="ftpprotocol"> <commandcodes> <commandcode>user</commandcode> <replycodes> <replycode>230</replycode>

43 Wireshark Passive Port hop information Active

44 Setting Up Libmnl and Example App Install libmnl Clone GIT repository./configure; make; sudo make install Install IPtables NFQUEUE Install xxxx iptables-dev & libnfnetlink-queue Verify by running: iptables A FORWARD p all j NFQUEUE queue-num 21 Lsmod grep ip

45 The Basic Application There is a bare-bones example in libmnl/examples/netfilter

46 Retrieving Packet Data and Length If your callback has been called (queue_cb()) mnl_attr_parse(nlh, sizeof(struct nfgenmsg), parse_attr_cb, tb); if (tb[nfqa_packet_hdr]) { ph = mnl_attr_get_payload(tb[nfqa_packet_hdr]); id = ntohl(ph->packet_id); } /** Retrieve payload size */ pkt_size = mnl_attr_get_payload_len(tb[nfqa_payload]); /** If there is a payload (tb[nfqa_payload]), lets setup the pointers!*/ if (tb[nfqa_payload]) { unsigned char *pkt = mnl_attr_get_payload(tb[nfqa_payload]);

47 Get Em Protocol Structures!!! Always ask yourself when using pointers: Are you bounds checking? Is it NULL? There is no Ethernet header in NFQUEUE (by default) */ ip_ptr = (struct iphdr *)((u_int8_t *) pkt); u_int8_t ip_len = (ip_ptr->ihl * 4); tcp_ptr = (struct tcphdr *)((u_int8_t *) ip_ptr + ip_len); /** If we have data, set the pointers */ if (tcp_ptr->doff!= 0) { payload_ptr = (u_int8_t *) tcp_ptr + (tcp_ptr->doff * sizeof(u_int32_t)); payload_len = pkt_size - (ip_len + tcp_ptr->doff * 4); }

48 Process Packet

49 Multi-parts Without Spec There is more than a simple request and response system: Multi-part responses (without lengths) Solution: Evaluate for special cases and if request/response is true; insert and track subsequent connections.

50 Determining Requests/Responses A request is <=4 alphabetical chars May not be in all of the same case Usually followed by a space (0x20) A response is a numeric 3 digit value May be followed by a space or CRLF (0x0d0a)

51 Sanity Checking Data Should be: User-configurable Realistic (some things vs everything) Sometimes flexible Verify protocol specification adherence

52 Application Actions Ultimately, your application will need to: Drop or allow packets Generate human readable events (messages) * May send responses to close a connection or prevent retransmits * Potentially custom exception messages TCP or stream Resets ;)

53 Application Code Please see companion ftp-application code Iptable functionality is missing IE. Port hopping and rules for the data channel Checking for response from correct side of connection not implemented IE. A server s response is actually from a response

54 Tools and Performance

55 Where is App Performance Lost? In your application: Intensive sanity checking (strings/regexs) Data structures tracking connections Or requests/responses Extraneous memsets and memcpys Byte misalignment Generating alerts and crafting packets Stitching frames together Storing streams for store and forward

56 Where is App Performance Lost? In the Linux Kernel: Data copy from kernel to user space Receiving the verdict from the kernel NF Bridge code Xtables code (iptables etc ) Ebtables (ewwww) Skbuff Driver code

57 Enhancing Performance Improving performance options: Custom kernels & profiling MMAP netlink I/O (3.10+) Reducing messages from kernel Better quality NICs and drivers CPU fanout and pinning Writing DPI in a logical manner Parameter tunning (kernel, network stack)

58 Enhancing Performance Continued May also be architecture specific Specialized microcode/assembly Rewriting functionality to gain that last 10% Understanding the compiler to write efficient code Ex. PPC vs. ARM vs. X86 Parallel programming Synchronizing data and conntracking will be hard Response before Request for example!

59 Useful Tools Not just limited to performance: Cachegrind & valgrind suites Address Sanitizer Gprof/oprofile Tcpreplay/tcpdump Wireshark Bit twist Scapy Reverse engineering may help you optimize your code EX. Sometimes GCC likes to do memcpys when all it has to do is move a pointer

60 If (!not_enough_perf) If all else fails: Move DPI into kernel and be infected And or improve xtables/queueing in kernel Faster and better hardware Reduce functionality FPGAs and TCAMs Expensive and have their own challenges

61 Summary Research your protocol and edge-cases Successful app requires knowledge! Expect odd non-conforming behaviors Set realistic performance expectations Performance is mediocre without kernel improvement Write your application for others and future Modular design for edge cases Catch errors before they happen! Profile your code! Open source vs. proprietary Be aware of your industry

62 Resources Reading Hex Dumps Without Wireshark NFQUEUE example

63 QUESTIONS?

Some of the slides borrowed from the book Computer Security: A Hands on Approach by Wenliang Du. Firewalls. Chester Rebeiro IIT Madras

Some of the slides borrowed from the book Computer Security: A Hands on Approach by Wenliang Du. Firewalls. Chester Rebeiro IIT Madras Some of the slides borrowed from the book Computer Security: A Hands on Approach by Wenliang Du Firewalls Chester Rebeiro IIT Madras Firewall Block unauthorized traffic flowing from one network to another

More information

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

Fundamental Questions to Answer About Computer Networking, Jan 2009 Prof. Ying-Dar Lin, Fundamental Questions to Answer About Computer Networking, Jan 2009 Prof. Ying-Dar Lin, ydlin@cs.nctu.edu.tw Chapter 1: Introduction 1. How does Internet scale to billions of hosts? (Describe what structure

More information

CSCI-GA Operating Systems. Networking. Hubertus Franke

CSCI-GA Operating Systems. Networking. Hubertus Franke CSCI-GA.2250-001 Operating Systems Networking Hubertus Franke frankeh@cs.nyu.edu Source: Ganesh Sittampalam NYU TCP/IP protocol family IP : Internet Protocol UDP : User Datagram Protocol RTP, traceroute

More information

User Datagram Protocol

User Datagram Protocol Topics Transport Layer TCP s three-way handshake TCP s connection termination sequence TCP s TIME_WAIT state TCP and UDP buffering by the socket layer 2 Introduction UDP is a simple, unreliable datagram

More information

COMP2330 Data Communications and Networking

COMP2330 Data Communications and Networking COMP2330 Data Communications and Networking Dr. Chu Xiaowen (Second semester, 2009-2010 academic year) Laboratory 3 Last update: Feb-3-2009 Use Wireshark to Analyze IP Packet Objectives: (1) Use Wireshark

More information

Protocol Layers & Wireshark TDTS11:COMPUTER NETWORKS AND INTERNET PROTOCOLS

Protocol Layers & Wireshark TDTS11:COMPUTER NETWORKS AND INTERNET PROTOCOLS Protocol Layers & Wireshark TDTS11:COMPUTER NETWORKS AND INTERNET PROTOCOLS Mail seban649@student.liu.se Protocol Hi Hi Got the time? 2:00 time TCP connection request TCP connection response Whats

More information

Packet Sniffing and Spoofing

Packet Sniffing and Spoofing Some of the slides borrowed from the book Computer Security: A Hands on Approach by Wenliang Du Packet Sniffing and Spoofing Chester Rebeiro IIT Madras Shared Networks Every network packet reaches every

More information

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data ELEX 4550 : Wide Area Networks 2015 Winter Session UDP and TCP is lecture describes the two most common transport-layer protocols used by IP networks: the User Datagram Protocol (UDP) and the Transmission

More information

K2289: Using advanced tcpdump filters

K2289: Using advanced tcpdump filters K2289: Using advanced tcpdump filters Non-Diagnostic Original Publication Date: May 17, 2007 Update Date: Sep 21, 2017 Topic Introduction Filtering for packets using specific TCP flags headers Filtering

More information

Operating Systems. 18. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Spring /20/ Paul Krzyzanowski

Operating Systems. 18. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Spring /20/ Paul Krzyzanowski Operating Systems 18. Remote Procedure Calls Paul Krzyzanowski Rutgers University Spring 2015 4/20/2015 2014-2015 Paul Krzyzanowski 1 Remote Procedure Calls 2 Problems with the sockets API The sockets

More information

A Client-Server Exchange

A Client-Server Exchange Socket programming A Client-Server Exchange A server process and one or more client processes Server manages some resource. Server provides service by manipulating resource for clients. 1. Client sends

More information

Final Step #7. Memory mapping For Sunday 15/05 23h59

Final Step #7. Memory mapping For Sunday 15/05 23h59 Final Step #7 Memory mapping For Sunday 15/05 23h59 Remove the packet content print in the rx_handler rx_handler shall not print the first X bytes of the packet anymore nor any per-packet message This

More information

QUIZ: Longest Matching Prefix

QUIZ: Longest Matching Prefix QUIZ: Longest Matching Prefix A router has the following routing table: 10.50.42.0 /24 Send out on interface Z 10.50.20.0 /24 Send out on interface A 10.50.24.0 /22 Send out on interface B 10.50.20.0 /22

More information

IPtables and Netfilter

IPtables and Netfilter in tables rely on IPtables and Netfilter Comp Sci 3600 Security Outline in tables rely on 1 2 in tables rely on 3 Linux firewall: IPtables in tables rely on Iptables is the userspace module, the bit that

More information

ECE4110 Internetwork Programming. Introduction and Overview

ECE4110 Internetwork Programming. Introduction and Overview ECE4110 Internetwork Programming Introduction and Overview 1 EXAMPLE GENERAL NETWORK ALGORITHM Listen to wire Are signals detected Detect a preamble Yes Read Destination Address No data carrying or noise?

More information

Introduction to TCP/IP networking

Introduction to TCP/IP networking Introduction to TCP/IP networking TCP/IP protocol family IP : Internet Protocol UDP : User Datagram Protocol RTP, traceroute TCP : Transmission Control Protocol HTTP, FTP, ssh What is an internet? A set

More information

BSc Year 2 Data Communications Lab - Using Wireshark to View Network Traffic. Topology. Objectives. Background / Scenario

BSc Year 2 Data Communications Lab - Using Wireshark to View Network Traffic. Topology. Objectives. Background / Scenario BSc Year 2 Data Communications Lab - Using Wireshark to View Network Traffic Topology Objectives Part 1: (Optional) Download and Install Wireshark Part 2: Capture and Analyze Local ICMP Data in Wireshark

More information

ECE 435 Network Engineering Lecture 15

ECE 435 Network Engineering Lecture 15 ECE 435 Network Engineering Lecture 15 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 26 October 2016 Announcements HW#5 due HW#6 posted Broadcasts on the MBONE 1 The Transport

More information

CS 43: Computer Networks. 15: Transport Layer & UDP October 5, 2018

CS 43: Computer Networks. 15: Transport Layer & UDP October 5, 2018 CS 43: Computer Networks 15: Layer & UDP October 5, 2018 Reading Quiz Lecture 15 - Slide 2 Layer Moving down a layer. Current perspective: lication is the boss Usually executing within the OS kernel. The

More information

ELEC5616 COMPUTER & NETWORK SECURITY

ELEC5616 COMPUTER & NETWORK SECURITY ELEC5616 COMPUTER & NETWORK SECURITY Lecture 17: Network Protocols I IP The Internet Protocol (IP) is a stateless protocol that is used to send packets from one machine to another using 32- bit addresses

More information

Business Data Networks and Security 10th Edition by Panko Test Bank

Business Data Networks and Security 10th Edition by Panko Test Bank Business Data Networks and Security 10th Edition by Panko Test Bank Chapter 2 Network Standards 1) Internet standards are published as. A) RFCs B) IETFs C) TCP/IPs D) Internet Protocols Question: 1a Objective:

More information

EE 610 Part 2: Encapsulation and network utilities

EE 610 Part 2: Encapsulation and network utilities EE 610 Part 2: Encapsulation and network utilities Objective: After this experiment, the students should be able to: i. Understand the format of standard frames and packet headers. Overview: The Open Systems

More information

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

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet Chapter 2 - Part 1 The TCP/IP Protocol: The Language of the Internet Protocols A protocol is a language or set of rules that two or more computers use to communicate 2 Protocol Analogy: Phone Call Parties

More information

CSCD 433/533 Advanced Networks

CSCD 433/533 Advanced Networks CSCD 433/533 Advanced Networks Lecture 2 Network Review Winter 2017 Reading: Chapter 1 1 Topics Network Topics Some Review from CSCD330 Applications Common Services Architecture OSI Model AS and Routing

More information

SC/CSE 3213 Winter Sebastian Magierowski York University CSE 3213, W13 L8: TCP/IP. Outline. Forwarding over network and data link layers

SC/CSE 3213 Winter Sebastian Magierowski York University CSE 3213, W13 L8: TCP/IP. Outline. Forwarding over network and data link layers SC/CSE 3213 Winter 2013 L8: TCP/IP Overview Sebastian Magierowski York University 1 Outline TCP/IP Reference Model A set of protocols for internetworking The basis of the modern IP Datagram Exchange Examples

More information

Applied Networks & Security

Applied Networks & Security Applied Networks & Security TCP/IP Networks with Critical Analysis http://condor.depaul.edu/~jkristof/it263/ John Kristoff jtk@depaul.edu IT 263 Spring 2006/2007 John Kristoff - DePaul University 1 Critical

More information

Chapter 7. Local Area Network Communications Protocols

Chapter 7. Local Area Network Communications Protocols Chapter 7 Local Area Network Communications Protocols The Network Layer The third layer of the OSI Model is the network layer. The network layer is concerned with providing a means for hosts to communicate

More information

Networking interview questions

Networking interview questions Networking interview questions What is LAN? LAN is a computer network that spans a relatively small area. Most LANs are confined to a single building or group of buildings. However, one LAN can be connected

More information

TCP/IP Transport Layer Protocols, TCP and UDP

TCP/IP Transport Layer Protocols, TCP and UDP TCP/IP Transport Layer Protocols, TCP and UDP Learning Objectives Identify TCP header fields and operation using a Wireshark FTP session capture. Identify UDP header fields and operation using a Wireshark

More information

Networking and Internetworking 1

Networking and Internetworking 1 Networking and Internetworking 1 Today l Networks and distributed systems l Internet architecture xkcd Networking issues for distributed systems Early networks were designed to meet relatively simple requirements

More information

Lab Using Wireshark to Examine Ethernet Frames

Lab Using Wireshark to Examine Ethernet Frames Topology Objectives Part 1: Examine the Header Fields in an Ethernet II Frame Part 2: Use Wireshark to Capture and Analyze Ethernet Frames Background / Scenario When upper layer protocols communicate with

More information

Lab 4: Network Packet Capture and Analysis using Wireshark

Lab 4: Network Packet Capture and Analysis using Wireshark Lab 4: Network Packet Capture and Analysis using Wireshark 4.1 Details Aim: To provide a foundation in network packet capture and analysis. You may be faced with network traffic analysis, from traffic

More information

Distributed Systems 8. Remote Procedure Calls

Distributed Systems 8. Remote Procedure Calls Distributed Systems 8. Remote Procedure Calls Paul Krzyzanowski pxk@cs.rutgers.edu 10/1/2012 1 Problems with the sockets API The sockets interface forces a read/write mechanism Programming is often easier

More information

Need For Protocol Architecture

Need For Protocol Architecture Chapter 2 CS420/520 Axel Krings Page 1 Need For Protocol Architecture E.g. File transfer Source must activate communications path or inform network of destination Source must check destination is prepared

More information

COMS3200/7201 Computer Networks 1 (Version 1.0)

COMS3200/7201 Computer Networks 1 (Version 1.0) COMS3200/7201 Computer Networks 1 (Version 1.0) Assignment 3 Due 8pm Monday 29 th May 2017. V1 draft (hopefully final) Note that the assignment has three parts Part A, B & C, each worth 50 marks. Total

More information

Protocol Analysis: Capturing Packets

Protocol Analysis: Capturing Packets Protocol Analysis: Capturing Packets This project is intended to be done on the EiLab Network, but if you want to try to VPN into the EiLab Network on your own PC from your home or workplace, follow these

More information

Need For Protocol Architecture

Need For Protocol Architecture Chapter 2 CS420/520 Axel Krings Page 1 Need For Protocol Architecture E.g. File transfer Source must activate communications path or inform network of destination Source must check destination is prepared

More information

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link.

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link. Internet Layers Application Application Transport Transport Network Network Network Network Link Link Link Link Ethernet Fiber Optics Physical Layer Wi-Fi ARP requests and responses IP: 192.168.1.1 MAC:

More information

CCNA 1 Chapter 7 v5.0 Exam Answers 2013

CCNA 1 Chapter 7 v5.0 Exam Answers 2013 CCNA 1 Chapter 7 v5.0 Exam Answers 2013 1 A PC is downloading a large file from a server. The TCP window is 1000 bytes. The server is sending the file using 100-byte segments. How many segments will the

More information

Lab Using Wireshark to Examine Ethernet Frames

Lab Using Wireshark to Examine Ethernet Frames Topology Objectives Part 1: Examine the Header Fields in an Ethernet II Frame Part 2: Use Wireshark to Capture and Analyze Ethernet Frames Background / Scenario When upper layer protocols communicate with

More information

ICS 351: Networking Protocols

ICS 351: Networking Protocols ICS 351: Networking Protocols IP packet forwarding application layer: DNS, HTTP transport layer: TCP and UDP network layer: IP, ICMP, ARP data-link layer: Ethernet, WiFi 1 Networking concepts each protocol

More information

libnetfilter_log Reference Manual

libnetfilter_log Reference Manual libnetfilter_log Reference Manual x.y Generated by Doxygen 1.4.6 Tue Mar 21 13:47:12 2006 CONTENTS 1 Contents 1 libnetfilter_log File Index 1 2 libnetfilter_log File Documentation 1 1 libnetfilter_log

More information

TSIN02 - Internetworking

TSIN02 - Internetworking Lecture 4: Transport Layer Literature: Forouzan: ch 11-12 2004 Image Coding Group, Linköpings Universitet Lecture 4: Outline Transport layer responsibilities UDP TCP 2 Transport layer in OSI model Figure

More information

TCP /IP Fundamentals Mr. Cantu

TCP /IP Fundamentals Mr. Cantu TCP /IP Fundamentals Mr. Cantu OSI Model and TCP/IP Model Comparison TCP / IP Protocols (Application Layer) The TCP/IP subprotocols listed in this layer are services that support a number of network functions:

More information

Networking Background

Networking Background Networking Background CMSC 414 October 30, 2017 General Overview We are going to take a quick look at What a network protocol is The abstract design of the network The 7-Layer network stack Protocols We

More information

TSIN02 - Internetworking

TSIN02 - Internetworking TSIN02 - Internetworking Literature: Lecture 4: Transport Layer Forouzan: ch 11-12 Transport layer responsibilities UDP TCP 2004 Image Coding Group, Linköpings Universitet 2 Transport layer in OSI model

More information

UDP, TCP, IP multicast

UDP, TCP, IP multicast UDP, TCP, IP multicast Dan Williams In this lecture UDP (user datagram protocol) Unreliable, packet-based TCP (transmission control protocol) Reliable, connection oriented, stream-based IP multicast Process-to-Process

More information

Computer Networks Security: intro. CS Computer Systems Security

Computer Networks Security: intro. CS Computer Systems Security Computer Networks Security: intro CS 166 - Computer Systems Security A very easy network 3/14/16 Computer Networks: Intro 2 Two philosophers example Translator Language Translator Engineer Communication

More information

Computer Networks A Simple Network Analyzer PART A undergraduates and graduates PART B graduate students only

Computer Networks A Simple Network Analyzer PART A undergraduates and graduates PART B graduate students only Computer Networks A Simple Network Analyzer PART A undergraduates and graduates PART B graduate students only Objectives The main objective of this assignment is to gain an understanding of network activities

More information

Suricata IDPS and Linux kernel

Suricata IDPS and Linux kernel Suricata IDPS and Linux kernel É. Leblond, G. Longo Stamus Networks February 10, 2016 É. Leblond, G. Longo (Stamus Networks) Suricata IDPS and Linux kernel February 10, 2016 1 / 28 1 Suricata Introduction

More information

CS61C Machine Structures Lecture 37 Networks. No Machine is an Island!

CS61C Machine Structures Lecture 37 Networks. No Machine is an Island! CS61C Machine Structures Lecture 37 Networks April 24, 2006 John Wawrzynek Page 1 No Machine is an Island! Computer Processor (active) Control ( brain ) Datapath ( brawn ) Memory (passive) (where programs,

More information

Network Layer (1) Networked Systems 3 Lecture 8

Network Layer (1) Networked Systems 3 Lecture 8 Network Layer (1) Networked Systems 3 Lecture 8 Role of the Network Layer Application Application The network layer is the first end-to-end layer in the OSI reference model Presentation Session Transport

More information

NT1210 Introduction to Networking. Unit 10

NT1210 Introduction to Networking. Unit 10 NT1210 Introduction to Networking Unit 10 Chapter 10, TCP/IP Transport Objectives Identify the major needs and stakeholders for computer networks and network applications. Compare and contrast the OSI

More information

NETWORK PACKET ANALYSIS PROGRAM

NETWORK PACKET ANALYSIS PROGRAM NETWORK PACKET ANALYSIS PROGRAM Duration: 3 days (21 hours) Mode: 1. Instructor Led Class room Training and Labs 2. Online In this hands-on course, you will receive in-depth training on Protocol analysis

More information

Hands-On Ethical Hacking and Network Defense

Hands-On Ethical Hacking and Network Defense Hands-On Ethical Hacking and Network Defense Chapter 2 TCP/IP Concepts Review Last modified 1-11-17 Objectives Describe the TCP/IP protocol stack Explain the basic concepts of IP addressing Explain the

More information

Packet Header Formats

Packet Header Formats A P P E N D I X C Packet Header Formats S nort rules use the protocol type field to distinguish among different protocols. Different header parts in packets are used to determine the type of protocol used

More information

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst EITF25 Internet Techniques and Applications L7: Internet Stefan Höst What is Internet? Internet consists of a number of networks that exchange data according to traffic agreements. All networks in Internet

More information

Lab - Using Wireshark to Examine TCP and UDP Captures

Lab - Using Wireshark to Examine TCP and UDP Captures Topology Part 1 (FTP) Part 1 will highlight a TCP capture of an FTP session. This topology consists of a PC with Internet access. Topology Part 2 (TFTP) Part 2 will highlight a UDP capture of a TFTP session.

More information

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space that is provided.

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space that is provided. 223 Chapter 19 Inter mediate TCP The Transmission Control Protocol/Internet Protocol (TCP/IP) suite of protocols was developed as part of the research that the Defense Advanced Research Projects Agency

More information

CSC 474/574 Information Systems Security

CSC 474/574 Information Systems Security CSC 474/574 Information Systems Security Topic 7.4 Firewalls CSC 474/574 Dr. Peng Ning 1 Outline What are firewalls? Types Filtering Packet filtering Session filtering Proxy Circuit Level Application Level

More information

ECE 358 Project 3 Encapsulation and Network Utilities

ECE 358 Project 3 Encapsulation and Network Utilities ECE 358 Project 3 Encapsulation and Network Utilities Objective: After this project, students are expected to: i. Understand the format of standard frames and packet headers. ii. Use basic network utilities

More information

Configuring IPv6 ACLs

Configuring IPv6 ACLs CHAPTER 37 When the Cisco ME 3400 Ethernet Access switch is running the metro IP access image, you can filter IP Version 6 (IPv6) traffic by creating IPv6 access control lists (ACLs) and applying them

More information

IP Network Troubleshooting Part 3. Wayne M. Pecena, CPBE, CBNE Texas A&M University Educational Broadcast Services - KAMU

IP Network Troubleshooting Part 3. Wayne M. Pecena, CPBE, CBNE Texas A&M University Educational Broadcast Services - KAMU IP Network Troubleshooting Part 3 Wayne M. Pecena, CPBE, CBNE Texas A&M University Educational Broadcast Services - KAMU February 2016 Today s Outline: Focused Upon Protocol Analysis with Wireshark Review

More information

Transport Layer Review

Transport Layer Review Transport Layer Review Mahalingam Mississippi State University, MS October 1, 2014 Transport Layer Functions Distinguish between different application instances through port numbers Make it easy for applications

More information

UNIT 5 MANAGING COMPUTER NETWORKS LEVEL 3 NETWORK PROTOCOLS

UNIT 5 MANAGING COMPUTER NETWORKS LEVEL 3 NETWORK PROTOCOLS UNIT 5 MANAGING COMPUTER NETWORKS LEVEL 3 NETWORK PROTOCOLS NETWORK PROTOCOLS A network manager needs to be aware of a number of different protocols, especially those that exist in the Application Layer

More information

CHAPTER-2 IP CONCEPTS

CHAPTER-2 IP CONCEPTS CHAPTER-2 IP CONCEPTS Page: 1 IP Concepts IP is a very important protocol in modern internetworking; you can't really comprehend modern networking without a good understanding of IP. Unfortunately, IP

More information

Defining Networks with the OSI Model. Module 2

Defining Networks with the OSI Model. Module 2 Defining Networks with the OSI Model Module 2 Objectives Skills Concepts Objective Domain Description Objective Domain Number Understanding OSI Basics Defining the Communications Subnetwork Defining the

More information

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1 6. Transport Layer 6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1 6.1 Internet Transport Layer Architecture The

More information

High Speed Packet Filtering on Linux

High Speed Packet Filtering on Linux past, present & future of High Speed Packet Filtering on Linux Gilberto Bertin $ whoami System engineer at Cloudflare DDoS mitigation team Enjoy messing with networking and low level things Cloudflare

More information

LOGICAL ADDRESSING. Faisal Karim Shaikh.

LOGICAL ADDRESSING. Faisal Karim Shaikh. LOGICAL ADDRESSING Faisal Karim Shaikh faisal.shaikh@faculty.muet.edu.pk DEWSNet Group Dependable Embedded Wired/Wireless Networks www.fkshaikh.com/dewsnet IPv4 ADDRESSES An IPv4 address is a 32-bit address

More information

ECE 650 Systems Programming & Engineering. Spring 2018

ECE 650 Systems Programming & Engineering. Spring 2018 ECE 650 Systems Programming & Engineering Spring 2018 Networking Transport Layer Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) TCP/IP Model 2 Transport Layer Problem solved:

More information

Our Narrow Focus Computer Networking Security Vulnerabilities. Outline Part II

Our Narrow Focus Computer Networking Security Vulnerabilities. Outline Part II Our Narrow Focus 15-441 15-441 Computer Networking 15-641 Lecture 22 Security: DOS Peter Steenkiste Fall 2016 www.cs.cmu.edu/~prs/15-441-f16 Yes: Creating a secure channel for communication (Part I) Protecting

More information

Link download full: Test Bank for Business Data Networks and Security 9th Edition by Panko https://digitalcontentmarket.org/download/business-data-networks-and-security-9thedition-by-panko/ Business Data

More information

STEVEN R. BAGLEY PACKETS

STEVEN R. BAGLEY PACKETS STEVEN R. BAGLEY PACKETS INTRODUCTION Talked about how data is split into packets Allows it to be multiplexed onto the network with data from other machines But exactly how is it split into packets and

More information

Networking Fundamentals

Networking Fundamentals Networking Fundamentals Network Startup Resource Center www.nsrc.org These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International license (http://creativecommons.org/licenses/by-nc/4.0/)

More information

Foreword by Katie Moussouris... Acknowledgments... xvii. Introduction...xix. Chapter 1: The Basics of Networking... 1

Foreword by Katie Moussouris... Acknowledgments... xvii. Introduction...xix. Chapter 1: The Basics of Networking... 1 Brief Contents Foreword by Katie Moussouris.... xv Acknowledgments... xvii Introduction...xix Chapter 1: The Basics of Networking... 1 Chapter 2: Capturing Application Traffic... 11 Chapter 3: Network

More information

C18: Network Fundamentals and Reliable Sockets

C18: Network Fundamentals and Reliable Sockets CISC 3120 C18: Network Fundamentals and Reliable Sockets Hui Chen Department of Computer & Information Science CUNY Brooklyn College 4/16/2018 CUNY Brooklyn College 1 Outline Networking fundamentals Network

More information

ECE 435 Network Engineering Lecture 14

ECE 435 Network Engineering Lecture 14 ECE 435 Network Engineering Lecture 14 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 25 October 2018 Announcements HW#6 was due HW#7 will be posted 1 IPv4 Catastrophe 2 Out of

More information

sottotitolo A.A. 2016/17 Federico Reghenzani, Alessandro Barenghi

sottotitolo A.A. 2016/17 Federico Reghenzani, Alessandro Barenghi Titolo presentazione Piattaforme Software per la Rete sottotitolo Firewall and NAT Milano, XX mese 20XX A.A. 2016/17, Alessandro Barenghi Outline 1) Packet Filtering 2) Firewall management 3) NAT review

More information

Computer Communication Networks Midterm Review

Computer Communication Networks Midterm Review Computer Communication Networks Midterm Review ICEN/ICSI 416 Fall 2018 Prof. Aveek Dutta 1 Instructions The exam is closed book, notes, computers, phones. You can use calculator, but not one from your

More information

TSIN02 - Internetworking

TSIN02 - Internetworking Lecture 4: Outline Literature: Lecture 4: Transport Layer Forouzan: ch 11-12 RFC? Transport layer introduction UDP TCP 2004 Image Coding Group, Linköpings Universitet 2 The Transport Layer Transport layer

More information

OSI Transport Layer. objectives

OSI Transport Layer. objectives LECTURE 5 OSI Transport Layer objectives 1. Roles of the Transport Layer 1. segmentation of data 2. error detection 3. Multiplexing of upper layer application using port numbers 2. The TCP protocol Communicating

More information

Tutorial 2. Linux networking, sk_buff and stateless packet filtering. Roei Ben-Harush Check Point Software Technologies Ltd.

Tutorial 2. Linux networking, sk_buff and stateless packet filtering. Roei Ben-Harush Check Point Software Technologies Ltd. Tutorial 2 Linux networking, sk_buff and stateless packet filtering Agenda 1 Linux file system - networking 2 3 4 sk_buff Stateless packet filtering About next assignment 2 Agenda 1 Linux file system -

More information

Introduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

Introduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. Introduction to Networking Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. Distributed File Systems Operating Systems In Depth XXVII 2 Copyright 2017 Thomas W.

More information

CSE/EE 461 The Network Layer. Application Presentation Session Transport Network Data Link Physical

CSE/EE 461 The Network Layer. Application Presentation Session Transport Network Data Link Physical CSE/EE 461 The Network Layer Application Presentation Session Transport Network Data Link Physical This Lecture Focus: What to do when one wire isn t big enough? Point to point link Broadcast link (Ethernet

More information

CSMC 412. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 2. September 15 CMSC417 Set 2 1

CSMC 412. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 2. September 15 CMSC417 Set 2 1 CSMC 412 Computer Networks Prof. Ashok K Agrawala 2015 Ashok Agrawala Set 2 September 15 CMSC417 Set 2 1 Contents Client-server paradigm End systems Clients and servers Sockets Socket abstraction Socket

More information

Layer 4: UDP, TCP, and others. based on Chapter 9 of CompTIA Network+ Exam Guide, 4th ed., Mike Meyers

Layer 4: UDP, TCP, and others. based on Chapter 9 of CompTIA Network+ Exam Guide, 4th ed., Mike Meyers Layer 4: UDP, TCP, and others based on Chapter 9 of CompTIA Network+ Exam Guide, 4th ed., Mike Meyers Concepts application set transport set High-level, "Application Set" protocols deal only with how handled

More information

Chapter 5.6 Network and Multiplayer

Chapter 5.6 Network and Multiplayer Chapter 5.6 Network and Multiplayer Multiplayer Modes: Event Timing Turn-Based Easy to implement Any connection type Real-Time Difficult to implement Latency sensitive 2 Multiplayer Modes: Shared I/O Input

More information

IT 352 : Lecture 1. Network Basics Review. Najwa AlGhamdi, MSc 2012 /1433

IT 352 : Lecture 1. Network Basics Review. Najwa AlGhamdi, MSc 2012 /1433 IT 352 : Lecture 1 Network Basics Review Najwa AlGhamdi, MSc 2012 /1433 Outline 1. OSI Reference Model. 2. IP, UDP, TCP. 3. Directory Service. 4. Replicated Service. 5. Packet Switches. 6. Destination

More information

CSC Network Security

CSC Network Security CSC 474 -- Security Topic 9. Firewalls CSC 474 Dr. Peng Ning 1 Outline Overview of Firewalls Filtering Firewalls Proxy Servers CSC 474 Dr. Peng Ning 2 Overview of Firewalls CSC 474 Dr. Peng Ning 3 1 Internet

More information

TSIN02 - Internetworking

TSIN02 - Internetworking Lecture 4: Transport Layer Literature: Forouzan: ch 11-12 2004 Image Coding Group, Linköpings Universitet Lecture 4: Outline Transport layer responsibilities UDP TCP 2 Transport layer in OSI model Figure

More information

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9. Lecture 17 Overview Last Lecture Wide Area Networking (2) This Lecture Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.2 Next Lecture Internet Protocol (2) Source: chapters 19.1, 19.2, 22,1

More information

Network and Security: Introduction

Network and Security: Introduction Network and Security: Introduction Seungwon Shin KAIST Some slides are from Dr. Srinivasan Seshan Some slides are from Dr. Nick Mckeown Network Overview Computer Network Definition A computer network or

More information

This tutorial will help you in understanding IPv4 and its associated terminologies along with appropriate references and examples.

This tutorial will help you in understanding IPv4 and its associated terminologies along with appropriate references and examples. About the Tutorial Internet Protocol version 4 (IPv4) is the fourth version in the development of the Internet Protocol (IP) and the first version of the protocol to be widely deployed. IPv4 is described

More information

Introduction to Computer Networks. CS 166: Introduction to Computer Systems Security

Introduction to Computer Networks. CS 166: Introduction to Computer Systems Security Introduction to Computer Networks CS 166: Introduction to Computer Systems Security Network Communication Communication in modern networks is characterized by the following fundamental principles Packet

More information

Flowreplay Design Notes

Flowreplay Design Notes Flowreplay Design Notes Aaron Turner http://synfin.net/ Last Edited: October 23, 2003 1 1 Overview Tcpreplay 1 was designed to replay traffic previously captured in the pcap format back onto the wire for

More information

Introduction to OSI model and Network Analyzer :- Introduction to Wireshark

Introduction to OSI model and Network Analyzer :- Introduction to Wireshark Sungkyunkwan University Introduction to OSI model and Network Analyzer :- Introduction to Wireshark Syed Muhammad Raza s.moh.raza@gmail.com Copyright 2000-2015 Networking Laboratory 1/56 An Overview of

More information

CCNA R&S: Introduction to Networks. Chapter 7: The Transport Layer

CCNA R&S: Introduction to Networks. Chapter 7: The Transport Layer CCNA R&S: Introduction to Networks Chapter 7: The Transport Layer Frank Schneemann 7.0.1.1 Introduction 7.0.1.2 Class Activity - We Need to Talk Game 7.1.1.1 Role of the Transport Layer The primary responsibilities

More information

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Transport Layer. Gursharan Singh Tatla.   Upendra Sharma. 1 Transport Layer Gursharan Singh Tatla mailme@gursharansingh.in Upendra Sharma 1 Introduction The transport layer is the fourth layer from the bottom in the OSI reference model. It is responsible for message

More information

Overview of TCP/IP Overview of TCP/IP protocol: TCP/IP architectural models TCP protocol layers.

Overview of TCP/IP Overview of TCP/IP protocol: TCP/IP architectural models TCP protocol layers. Overview of TCP/IP 3 Overview of TCP/IP protocol: TCP/IP architectural models TCP protocol layers. 4 2 5 6 3 7 8 4 9 10 5 11 12 6 13 14 7 15 16 8 17 18 9 19 20 10 21 Why TCP/IP? Packet based Provides decentralized

More information