Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS492b Project #3-2 KIP router KAIST Dept. of CS NC Lab.

Similar presentations


Presentation on theme: "CS492b Project #3-2 KIP router KAIST Dept. of CS NC Lab."— Presentation transcript:

1 CS492b Project #3-2 KIP router KAIST Dept. of CS NC Lab

2 Overall Architecture Client STCP KIP Server STCP KIP Actual Client Router Actual Server 5.0.0.2 5.0.0.1 194.168.1.1 194.168.1.2 UDPTunnelKIPSTCPData

3 Details Uses simulated IP address  Use the IP address in the architecture Router has the role of Server FTP client/server is actually clients of The router FTP server/client connect to the router  Execution order is important (router->server->client) To get rid of L2 layer, tunnel header has next hop address KIP has destination IP address(not changed)

4 Details- Tunnel Header KTCP/IP has not L2 Layer  For Hop-by-hop datagram forwarding, Tunnel Header is needed Tunnel Header is Like L2 Header  IP address in Tunnel header is changed on each hop

5 Modifications When sending a packet, Based on dst_ip, Do Rtable_search(next_hop, dst_ip) Then make a tunnel header with next_hop address

6 Router(1/2) Router has 2 Sockets  one from FTP Client  one from FTP Server it should be executed first Read a file for static routing table (txt. file)  Hard-coded  Has host’s IP address Generates a file including its IP address (txt. file)  has router’s IP address Client/Server first reads the file for the connection Make a log file  Record IP header & time received for each packet

7 Router(2/2) Basically, It’s the same as KIP When receiving packets, first look at the tunnel header  If destination address is Router’s address, forwards the packet Look up routing table  If not, just drop it

8 Routing Table(1/2) Uses RouteEntry  Struct RouteEntry{ ip; / ip address mask; /network mask router; /next hop if not directly connected devindex; / network interface index }

9 Tunnel Header typedef struct iptunnelheader { IPAddr dst; IPAddr src; short size; / size of data/ char* data; /actual payload/ } IPTunnelHeader

10 Schedule & Deliverables Due Date : 9 th Nov.(midnight) Commented your full source code (e-mail)  Including your Makefile Report (hard copy & thru e-mail)  Describe about your design in detail About functions you made for this project  Describe what works and what does not  Describe any peculiar strategies that you have used Demonstration (will be scheduled)

11 Tip Study UDP socket functions  If you want to connect two sockets in TCP way, Use connect() at both ends Or Use address structure Do NOT confuse virtual IP address with real IP address  Virtual IP address is the one that KIP can understand


Download ppt "CS492b Project #3-2 KIP router KAIST Dept. of CS NC Lab."

Similar presentations


Ads by Google