any PC networksyour router http server 1 http server 2 eth0: eth2: eth1:
Lab 2: simple router Your task Getting started Implementation details
Lab 2: simple router Your task –writing a simple router with a static routing table. –passed raw Ethernet frames and send a raw Ethernet frame. –Handle Ethernet, IP, ICMP and ARP correctly
Lab 2: simple router Getting started –download untar and make the assignment code –Copy auth_key and rtable to your working directory –./sr -s vns-2.stanford.edu -t -u –Start another terminal or machine to ping any interface of the topology.
Lab 2: simple router Implementation details –Study the protocols first: ethernet, IP, ICMP and ARP. –Read through the code. You need to fully understand the structure before coding. –Fully utilize the sr_utils.[h|c]. –You don’t need to do multithreading programming. The stub code does it for you. –Use htonl/htons, ntohl/htohs correctly.
Lab 2: simple router Implementation details –Create your own src file: sr_ip.[h|c], sr_icmp.[h|c]… Also need to modify Makefile. –Much harder than lab 1, start early!