KIP document#2

Download Report

Transcript KIP document#2

CS492b Project #3-2
KIP router
KAIST
Dept. of CS
NC Lab
Overall Architecture
Actual Client
Actual Client
Actual Server
Client
STCP
Router
KIP
Server
STCP
KIP
5.0.0.1
194.168.1.1
194.168.1.2
5.0.0.2
UDP Tunnel KIP STCP Data
Details

Uses simulated IP address




Router has the role of Server
FTP client/server is actually clients of The router
FTP server/client connect to the router



Use the IP address in the architecture
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)
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
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
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
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
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
}
Tunnel Header

typedef struct iptunnelheader
{
IPAddr dst;
IPAddr src;
short size; / size of data/
char* data; /actual payload/
} IPTunnelHeader
Schedule & Deliverables


Due Date : 9th 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)
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