630 likes | 805 Views
5. Server:. When a client requests a file from the server it has to include its upload capability (bandwidth or number of users that can download the same content from it). By this case the server will know about which clients are currently downloading the files from it.
E N D
Server: • When a client requests a file from the server it has to include its upload capability (bandwidth or number of users that can download the same content from it). • By this case the server will know about • which clients are currently downloading the files from it. • what is the percentage of the file each client has . • the upload capabilities of each client. • The server knows its maximum number of clients it can handle at the same time.
Overload : • When the server reaches a connection number threshold limit it sends a request to the dynamic routing server along with a list of candidate current clients(and their maximum capabilities )to make a redirection to the new requests. • By this way the current downloading clients will be serving as the server for new clients (obviously the current downloading client has more parts of the file so the new client can download). And the number of new clients was specified by the current downloading client when it requested the file form the server at the first time.
Overload : • The Dynamic routing server will send to the nearest routers if possible the list of current downloading clients with their capabilities in order to create a temporal redirection to those current downloading clients. • This redirection will be disabled to one client after it reaches the number of indicated by its capabilities and the next client in the list will receive the next request. • The redirection will be removed from the router after a special time out or when the request is satisfied (when the connection is terminated ).
Another choice is to make the download starts with a handshake so that each of the new client and the current downloading client will know about their actual IPs after which the redirection will be removed. Using the hand shake the redirection record on the router will have a much shorter life time which helps to remove some load off the routers which is caused by maintaining the redirection record. • This will work if the dynamic routing server knows about the locations of the clients. (either by using the Locator or by using information provided by the client himself).
Providing knowledge about the location either : • Locator if it was supported by the network. • Or location provided by the user.
Dynamic routing server Current downloading clients new clients Network A Network B Server S1 c10 c1 c5 c7 c2 c9 c6 c4 c8 c3 Request includes the capabilities
Dynamic routing server Current downloading clients new clients Network A Network B Server S1 c10 c1 c5 c7 c2 c9 c6 c4 Ask for the temporal redirection Includes clients and capabilities c3 c8
Dynamic routing server Current downloading clients new clients Network A Network B Server S1 c10 c1 c1 c5 c5 c7 c7 c2 c2 c9 c6 c4 temporal redirection Includes clients and capabilities c3 c8
Dynamic routing server Current downloading clients new clients Network A Network B Server S1 c10 c1 c1 c5 c5 c7 c7 c2 c2 c9 c6 c4 c3 c8
Dynamic routing server Current downloading clients new clients Network A Network B Server S1 c10 c1 c1 c5 c5 c7 c7 c2 c2 c9 c6 c4 C6 starts by addressing S1 but its request will be redirected to C7 c3 c8
Dynamic routing server Current downloading clients new clients Network A Network B Server S1 c10 c1 c1 c5 c5 c7 c7 Handshake to know the actual address And to remove redirection form network c2 c2 c9 c6 c4 c3 c8
Dynamic routing server Current downloading clients new clients Network A Network B Server S1 c10 c1 c1 c5 c5 c7 c7 After finishing the handshake The redirection will be removed. And communication will be done directly. c2 c2 c9 c6 c4 c3 c8
Steps: : • Steps: • File request: new client sends a request to get a file. Then a client gets the file_ID to issue a file request. • Redirection: for the file request to direct it to a client that acts as a server (candidate client). • Handshake: done by the server or the candidate client to send their actual IP and other information to the new client. • File send.
1-file request: • A modified content (file or stream) request: • First search for file using webpage. • Client Request the file using a link web page. • Server replies with the file_ID (hash function) : use 32bit for the file_ID. • Then client sends a content request that has the specified file_ID : use a modified TCP packet to request the file placing the file_ID in both the source port and the destination port in order to enable the openflow to work without a modification and the source and destination can be place in another position in the modified TCP header. • file ID can be used to redirect the file to other clients.
1-file request without redirection: Client Server ........ Request file_ID Request file(file_ID) ........
1-file request with redirection: Client Server Candidate Client2 ........ Request Destination changed to be candidate client 2 file_ID Request file(file_ID) ........ Using Redirection
2- Redirection: • The Dynamic Routing Server can work as a server for each autonomous system and works as follows: • The Dynamic Routing Server in the autonomous system acts as a router (OSPF) that it sends and receives routing packets but does not announce or broadcasts any networks. (just listening). • Stores all the announced networks in a table . • When a redirection request is received it will do the routing for the desired candidate client that will be acting as a server and then send the redirection to all of the routers on the autonomous network. • Another way to do that is to set all the routers in the autonomous system to send the first packet header that is originally sent to the server to be sent to the Dynamic Routing Server then the DRS will do the routing and send the redirection to all of the routers on the way to the candidate client.
Steps: 2- Redirection: • Use the file_ID and the server IP to decide for redirection. • On routers having redirection records they will check for destination IP to match the server IP if it matches then a another check is done to match the file_ID. • Might use the same concept but using the BGP for deciding which autonomous system the candidate client belongs to . • The redirection request sent by the server must be sent to the BGP dynamic routing server to find out in which autonomous system the client belongs to and then the BGP dynamic routing server sends that request to the responsible autonomous system redirection server.
Dynamic routing server Example OSPF Link State Database (LSDB) After a while the Dynamic Routing Server will have a copy of the Link-State database and can use it to issue redirection requests.
Handshake: Client Server Candidate Client2 ........ Destination changed to be candidate client 2 Request file_ID Redirection cancellation or reduce the future redirection After this message Request file(file_ID) response(file_ID, Candidate Clint2 IP) Accept (file_ID) Sending file) Using Redirection ........
The link-state information is maintained on each router as a link-state database (LSDB) which is a tree-image of the entire network topology. Identical copies of the LSDB are periodically updated through flooding on all OSPF routers.
Original Experiment Layout: PC 1: Name: Ubuntu eth 3 eth 2 10.10.10.4 10.10.10.2 PC 2: Name: Ubuntu_9_10 eth 1 10.10.10.3 10.10.10.1 eth 2 OpenFlow: Name: Ubuntu_9_04 eth eth
Refining the Layout: PC 1: Name: Ubuntu Down eth 3 eth 2 10.10.10.4 10.10.10.2 PC 2: Name: Ubuntu_9_10 Down eth 1 10.10.10.3 10.10.10.1 eth 2 OpenFlow: Name: Ubuntu_9_04 eth eth
Layout after refinement: PC 1: Name: Ubuntu eth 3 eth 2 10.10.10.2 PC 2: Name: Ubuntu_9_10 eth 1 10.10.10.1 eth 2 OpenFlow: Name: Ubuntu_9_04 eth eth
Layout after refinement: PC 1: Name: Ubuntu • Add 2 flow entries in the OpenFlow switch: • Forward all packets form port 1 to port 2. • Forward all packets form port 2 to port 1. • Now PC1:eth2 can ping PC2:eth1 and vice versa . 10.10.10.2 eth 2 eth 3 PC 2: Name: Ubuntu_9_10 10.10.10.1 eth 1 eth 2 OpenFlow: Name: Ubuntu_9_04 Port 1 Port 2
Layout after refinement: PC 1: Name: Ubuntu • To make PC1 respond to packets from PC2 that are sent to a different IP address than PC2’s which is 10.10.10.10 • A C program is written on PC1 to detect ARP messages and respond to it as 10.10.10.10 • A C program is written on PC2 to send UDP packet to 10.10.10.10 10.10.10.2 eth 2 eth 3 PC 2: Name: Ubuntu_9_10 10.10.10.1 eth 1 eth 2 OpenFlow: Name: Ubuntu_9_04 Port 1 Port 2
PC1’s program: start Initialize eth2 in promiscuous mode & receive raw Ethernet frames ARP is protocol? IP Is needed HW addr is for 10.10.10.10 ? Is destination is 10.10.10.10 ? Display contents Respond to ARP as you are 10.10.10.10
System Overview: Redirection Manager Redirection Manager AS 1 AS 2 AS 2 Server S1 c10 c1 c5 c7 c2 c9 c6 c4 c8 c3
Removing Redirections from router: • There must be a mechanism to remove the redirection from the routers, in order to meet the upload capabilities of the client. • In the above example: • C6 can provide service to 1 other client (C7). • If the redirection was not removed in the right time other requests will be sent to C6 but C6 can serve only 1 and so it will refuse the connection. • This implies to remove the redirection after a period of time or after they are used. The thing that might require cooperation between multiple controller if they exist Redirection Manager Redirection Manager AS 1 AS 2 Server S1 c10 c1 c5 c7 c2 c9 c6 c4 c8 c3
HOW: Removing Redirections from router: • Assuming we have a single area, and redirection is done in routers: • After matching the incoming packet against one of the redirections on the router, the router send the packet header to the controller. • The controller then sends to all the routers performing the redirection to remove this redirection from their flow table. c7 c6 c8 Controller
Places where the redirection (changing IP) might be performed 1- at the end point switches. 2- at the area interior routers. 3- at the areal border routers or at the OSPF backbone network.
1- at the end point switches. 1- at the end point switches.
1- at the end point switches. • Current OpenFlow specifies that the OpenFlow switch or router must have a connection to the controller, and must keep this connection alive through the use of “ Echo Request/Reply” messages that are periodically exchanged between the switch and the controller. Controller Controller Controller Controller Echo request Echo Request OpenFlow Switch OpenFlow Switch OpenFlow Switch OpenFlow Switch Echo Reply Echo Reply
1- at the end point switches. • Considerations regarding using the endpoint switches: • There might be a problem of ownership, since the switches might not be owned by the same organization of the redirection system. And controlling switches that belongs to other organizations might raise more difficulties. • It is expected that the number of the endpoint switches to be large . And so causing a scalability problem to the controller. • Using endpoint switches is good since switches have less work to do than routers.
1- at the end point switches. • It is expected that the number of the endpoint switches to be large . And so causing a scalability problem to the controller, and to solve the problem : • Using HyperFlow which is A Distributed Control Plane for OpenFlow. • Breaking the OpenFlow controller in the redirection manager into one more level of hierarchy . • Changing the OpenFlow protocol to support Flooding for the flow table modification message.
1- at the end point switches. • Using HyperFlow which is A Distributed Control Plane for OpenFlow. • Sounds like a good solution to have a distributed controller . • But the size of the required controller to control large number of switches, requires special attention. • Also, increasing the complexity of the system is not desired. • HyperFlow is based on NOX system.
1- at the end point switches. • Breaking the OpenFlow controller in the redirection manager into one more level of hierarchy. • increasing the complexity of the system is not desired, since there will be a need to organize the efforts of all the controllers. • Also, The problem of ownership of the switches and the controllers Controller Controller Controller Controller Controller Controller
1- at the end point switches. • Changing the OpenFlow protocol to support Flooding for the flow table modification message. • Increases the bandwidth cost for the system. • Might cause a loose coupling with the controller. • Useful if the redirections will expire based on a timer. • Not supported by OpenFlow. Controller
2- at the area interior routers. 2- at the area interior routers. Controller Controller Controller
2- at the area interior routers. • Useful if the BGP component stores the IP address of all the area controllers inside each autonomous system. And sends redirection requests to all of controllers in an autonomous system.
2- at the area interior routers. • Advantage: • Each controller will have a copy of the LSADB (Link State Advertisement Database) that belongs to the area where the controller is located. And this means the controller will know the full topology of the area where it is located. • This is useful if the system have the ability to act on redirecting packets to other server in case of detecting a link failure from the LSADB. • Disadvantage: • Coordination between the controllers is required. Or might be called as the dispatcher. • Also in case of the cooperation between the controllers.
3- at the areal border routers or at the OSPF backbone network. 3- at the areal border routers or at the OSPF backbone network. Controller
3- at the areal border routers or at the OSPF backbone network. • Advantages : • Easy to implement, only one controller is need in each autonomous system. • Disadvantages \ Consideration: • Area Border Routers actually belongs to two areas, the backbone and the area that they belong to. This means that the ABR will have two instances of the OSPF and two LSADB. Which makes them doing more work. And so adding the redirection function to them will increase their load.
OpenFlow router New Client Current Client Destination: serverIP :SYN Destination: CurrentClientIP :SYN SYN/ACK With CurrentClientIP in the body Destination: CurrentClientIP :SYN
New Client Server Destination: serverIP :SYN SYN/ACK With ServerIP in the body Destination: serverIP :SYN
Redirection Manager Anycast Manager Content Server Content Server OpenFlow Switch or Router OpenFlow Switch or Router client client client client Autonomous System Autonomous System