Giter Site home page Giter Site logo

fall21-project3's Introduction

Project 3 (Ridikkulus Router)

(For build dependencies, please refer to router_base/Vagrantfile.)

The starter code includes only the framework to receive raw Ethernet frames and to send Ethernet frames to the desired interfaces. Your job is to implement the routers logic.

Note for Gradescope Submission

This project can only be submitted to Gradescope via connection to GitHub (no raw file upload).

Academic Integrity Note

You are encouraged to host your code in private repositories on GitHub. At the same time, you are PROHIBITED to make your code for the class project public during the class or any time after the class. If you do so, you will be violating academic honestly policy that you have signed, as well as the student code of conduct and be subject to serious sanctions.

Known Limitations

When POX controller is restrated, the simpler router needs to be manually stopped and started again.

Acknowledgement

This implementation is roughly based on the original code for Stanford CS144 lab3 (https://bitbucket.org/cs144-1617/lab3).

TODO

###########################################################
##                                                       ##
## REPLACE CONTENT OF THIS FILE WITH YOUR PROJECT REPORT ##
##                                                       ##
###########################################################

fall21-project3's People

Contributors

cawka avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

fall21-project3's Issues

The diagram violates RFCs and has typos

The diagram in https://users.cs.fiu.edu/~afanasyev/classes/fall22/CNT-4713/project-3.html

ARP

According to RFC826

?Do I have the hardware type in ar$hrd?
Yes: (almost definitely)
  [optionally check the hardware length ar$hln]
  ?Do I speak the protocol in ar$pro?
  Yes:
    [optionally check the protocol length ar$pln]
    Merge_flag := false
    If the pair <protocol type, sender protocol address> is
        already in my translation table, update the sender
        hardware address field of the entry with the new
        information in the packet and set Merge_flag to true.
    ?Am I the target protocol address?
    Yes:
      If Merge_flag is false, add the triplet <protocol type,
          sender protocol address, sender hardware address> to
          the translation table.
      ?Is the opcode ares_op$REQUEST?  (NOW look at the opcode!!)
      Yes:
        Swap hardware and protocol fields, putting the local
            hardware and protocol addresses in the sender fields.
        Set the ar$op field to ares_op$REPLY
        Send the packet to the (new) target hardware address on
            the same hardware on which the request was received.

Notice that the <protocol type, sender protocol address, sender
hardware address> triplet is merged into the table before the
opcode is looked at. This is on the assumption that communcation
is bidirectional; if A has some reason to talk to B, then B will
probably have some reason to talk to A. Notice also that if an
entry already exists for the <protocol type, sender protocol
address> pair, then the new hardware address supersedes the old
one. Related Issues gives some motivation for this.

All types of ARP packet should update ARP cache, instead of only REPLY.

TTL

According to RFC1812 4.2.2.9:

Note in particular that a router MUST NOT check the TTL of a packet
except when forwarding it.

A router MUST NOT originate or forward a datagram with a Time-to-Live
(TTL) value of zero.

A router MUST NOT discard a datagram just because it was received
with TTL equal to zero or one; if it is to the router and otherwise
valid, the router MUST attempt to receive it.

And RFC1812 5.3.1:

If the TTL is reduced to zero (or less), the packet MUST be
discarded, and if the destination is not a multicast address the
router MUST send an ICMP Time Exceeded message, Code 0 (TTL Exceeded
in Transit) message to the source

The correct order should be
"Judge destination" =(elsewhere)=> "Decrease TTL" => "Check TTL"
instead of current "Check TTL" =(>0)=> "Decrease TTL" => "Judge destination"

Typo

"Next-hop ip in routing table?" should be "Next-hop ip in ARP Cache?"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.