Project-2 Overview

advertisement
Router Implementation
Project-2
DISCUSSION NOVEMBER 17, 2014
CSE 123-FALL 2014
Topology
• The skeleton and dependencies
of the project have been
setup in a VM for your
convenience.
• VM has the network
topology and the allows
your router implementation
to talk with the network topology.
Overview
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
Respond to ICMP echo requests
Maintain an ARP cache
See webpage for full requirements
Getting Started
Load the virtual machine disk image into your favourite VMM. Eg: VMWare Player, VirtualBox, VMWare fusion
etc.
Username/Password is mininet/mininet.
Start Mininet and POX. Two steps to get the infrastructure up and running
◦ ./cse123-p2/run_mininet.sh
○ ./cse123-p2/run_pox.sh
Build and execute router
◦ make clean
○ make
○ ./sr
Check packet flow with wireshark
Expected output
ARP Flow Chart
Receive
ReceiveRaw
RawEthernet
EthernetFrame
Frame
It's
It'san
anIP
IPpacket
packet
It's
It'san
anARP
ARPpacket
packet
Reply to me
Cache
Cacheit,it,go
go
through
throughmy
my
request
requestqueue
queue
and
andsend
send
outstanding
outstanding
packets
packets
Request to me
Construct
Constructan
anARP
ARP
reply
and
send
reply and senditit
back
back
IP Flow Chart
Coding Advice
sr_protocol.h
ip header def
sr_ethernet_hdr def
hdr_icmp_t def
arp header def
Protocol Resolution definitions
Sr_if.c
sr_get_interfaces
sr_add_interface
sr_set_ether_addr (set to the last interface in the interface list)
sr_set_ether_ip
Print funcs for debugging
Questions?
Download