CSC458/2209 PA1 Simple Router Based on slides by: Antonin Seyed Amir Hejazi 19/09/2014 CSC458/2209 - Computer Networks, University of Toronto.

Slides:



Advertisements
Similar presentations
CSC458 Programming Assignment II: NAT Nov 7, 2014.
Advertisements

Router Implementation Project-2
Computer Networks21-1 Chapter 21. Network Layer: Address Mapping, Error Reporting, and Multicasting 21.1 Address Mapping 21.2 ICMP 21.3 IGMP 21.4 ICMPv6.
Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
Precept 3 Host Configuration 1 Peng Sun. What TCP conn. running? Commands netstat [-n] [-p] [-c] (Linux) lsof -i -P (Mac) ss (newer version of netstat)
8-1 Last time □ Network layer ♦ Introduction forwarding vs. routing ♦ Virtual circuit vs. datagram details connection setup, teardown VC# switching forwarding.
CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
Helper Protocols Protocols that either make it easier for IP to do its job, or extend the capabilities of the network layer.
Lab 4: Simple Router CS144 Lab 4 Screencast May 2, 2008 Ben Nham Based on slides by Clay Collier and Martin Casado.
Internet Control Message Protocol (ICMP)
1 CCNA 2 v3.1 Module 8. 2 TCP/IP Suite Error and Control Messages CCNA 2 Module 8.
IP Routing: an Introduction. Quiz
Chapter 23: ARP, ICMP, DHCP IS333 Spring 2015.
Precept 5 Router & Assignment 2 1 Peng Sun. How VNS works Just informational You don’t have to know it to finish assignment 2.
1 Internet Control Message Protocol (ICMP) RIZWAN REHMAN CCS, DU.
IST 228\Ch3\IP Addressing1 TCP/IP and DoD Model (TCP/IP Model)
Connecting Networks © 2004 Cisco Systems, Inc. All rights reserved. Defining the IP Packet Delivery Process INTRO v2.0—4-1.
21.1 Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
CN2668 Routers and Switches Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
TELE202 Lecture 10 Internet Protocols (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Internet Protocols (1) »Source: chapter 15 ¥This Lecture »Internet.
CS 6401 Internet Protocol Outline Introduction to Internet Protocol Header and address formats ICMP Tools.
Petrozavodsk State University, Alex Moschevikin, 2003NET TECHNOLOGIES Internet Control Message Protocol ICMP author -- J. Postel, September The purpose.
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
Aug 20 th, 2002 Sigcomm Education Workshop 1 Teaching tools for a network infrastructure teaching lab The Virtual Router and NetFPGA Sigcomm Education.
ARP Scenarios CIS 81 and CST 311 Rick Graziani Fall 2005.
1 Computer Communication & Networks Lecture 20 Network Layer: IP and Address Mapping (contd.) Waleed.
Page 19/13/2015 Chapter 8 Some conditions that must be met for host to host communication over an internetwork: a default gateway must be properly configured.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
21.1 Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Internet Control Message Protocol (ICMP). Objective l IP and ICMP l Why need ICMP? l ICMP Message Format l ICMP fields l Examples: »Ping »Traceroute.
PA3: Router Junxian (Jim) Huang EECS 489 W11 /
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
IP Forwarding.
Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 4 Internet Control Message Protocol (ICMP)
1 Debugging Path MTU Discovery Failures - Techniques and Results Internet2 Member Meeting September 21, 2005 Matthew Luckie, Kenjiro Cho, Bill Owens.
TCP/IP Honolulu Community College Cisco Academy Training Center Semester 2 Version 2.1.
Internet Protocols. Address Resolution IP Addresses are not recognized by hardware. If we know the IP address of a host, how do we find out the hardware.
Basic IP Protocol Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
4: Network Layer4a-1 13: Intro to IP and ICMP Last Modified: 11/9/2015 7:16:06 PM.
1 An Error Reporting Mechanism (ICMP). 2 IP Semantics IP is best-effort Datagrams can be –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
1 Requirements for Internet Routers (Gateways) and Hosts Relates to Lab 3. (Supplement) Covers the compliance requirements of Internet routers and hosts.
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
ICMPv6 Error Message Types Informational Message Types.
Any PC networksyour router http server 1 http server 2 eth0: eth2: eth1:
Understanding IPv6 Slide: 1 Lesson 5 ICMPv6. Understanding IPv6 Slide: 2 Lesson Objectives Purpose of ICMPv6 and the structure of all ICMPv6 messages.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
Module 8 JEOPARDY CCNA2 v3 Module 8 RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands.
Cisco Routers Routers collectively provide the main feature of the network layer—the capability to forward packets end-to-end through a network. routers.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
Internet Control Message Protocol (ICMP)
CSC458 Programming Assignment II: NAT
Internet Control Message Protocol (ICMP)
Scaling the Network Chapters 3-4 Part 2
Programming Assignment
Building an Internet Router
Internet Control Message Protocol (ICMP)
CCNA 2 v3 JEOPARDY Module 8 CCNA2 v3 Module 8 K. Martin.
ICMP ICMP – Internet Control Message Protocol
COMPUTER NETWORKS CS610 Lecture-33 Hammad Khalid Khan.
Error and Control Messages in the Internet Protocol
8 Network Layer Part V Computer Networks Tutun Juhana
Troubleshooting IP Communications
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Advanced Computer Networks
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol Version 4 (ICMPv4)
Presentation transcript:

CSC458/2209 PA1 Simple Router Based on slides by: Antonin Seyed Amir Hejazi 19/09/2014 CSC458/ Computer Networks, University of Toronto

Overview Your are going to write a “simplified” router  Give a static network topology  Given a static routing table  You are responsible for writing the logic to handle incoming Ethernet frames: Forward it Generate ICMP messages Drop it And more... 19/09/2014 CSC458/ Computer Networks, University of Toronto

But how to do it??? Where will my routing logic run? Where will the traffic come from? How will I test my code? 19/09/2014 CSC458/ Computer Networks, University of Toronto

No hardware router Network topology emulated with Mininet: your router connects 2 servers to the internet Your router will handle real traffic The topology is emulated on CDF machines! 19/09/2014 CSC458/ Computer Networks, University of Toronto

Emulated Topology 19/09/2014 CSC458/ Computer Networks, University of Toronto

Emulated Topology 19/09/2014 CSC458/ Computer Networks, University of Toronto

Emulated Topology 19/09/2014 CSC458/ Computer Networks, University of Toronto

What your routing logic needs to do? Route Ethernet frames between the Internet (the myth cluster) and the HTTP servers Handle ARP request and replies Handle traceroutes  Generate TTL Exceeds Message Handle TCP/UDP packets sent to one of the routers’ interfaces  Generate ICMP Port Unreachable Respond to ICMP echo requests Maintain an ARP cache See course webpage for full requirements 19/09/2014 CSC458/ Computer Networks, University of Toronto

A rough flow chart 19/09/2014 CSC458/ Computer Networks, University of Toronto

A rough flow chart 19/09/2014 CSC458/ Computer Networks, University of Toronto

A rough flow chart Many things missing from this chart  Checksums, TTLs Read the instructions carefully 500+ lines of code, so start early Final submission: Oct. 17 th at 5pm 19/09/2014 CSC458/ Computer Networks, University of Toronto

How to test your code Test connectivity with ping from any machine on the Internet Traceroute will not work well outside of Mininet:  Use Mininet CLI  mininet> server1 traceroute –n server2 HTTP requests with wget, curl Don’t forget to test “error” cases! 19/09/2014 CSC458/ Computer Networks, University of Toronto

Some advice Be through in your testing Do not hesitate to change the routing table (what about an incorrect routing table?) Be careful when implementing Longest Prefix Match Don’t get mixed up with endinanness: Linux is little endian, network big endian  Try to put the calls to hton, ntoh in a single place Write good quality code  Do not hardcode constants, avoid code duplication... 19/09/2014 CSC458/ Computer Networks, University of Toronto

Things that may be useful Mininet console, which supports tcpdump, ping, traceroute (apt-get install traceroute on instance) Debug functions in sr_utils.c  print_hdrs, print_addr_ip_int GDB/Valgrind 19/09/2014 CSC458/ Computer Networks, University of Toronto

Start reading! es/csc458/assignments/simple-router/ 19/09/2014 CSC458/ Computer Networks, University of Toronto