PPTX

maidtweetNetworking and Communications

Oct 29, 2013 (3 years and 7 months ago)

65 views

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.

Current

downloading

clients

new clients

Dynamic routing
server

Server

S1

c3

Network B

c8

c9

c10

Network A

Max

6

threshold

4

current

0

server

redirection

Max

clients

c5

c4

c2

c1

c7

c6

server

redirection

Max

clients

Request
includes the
capabilities

Client

% complete

UL
BW

Current

downloading

clients

new clients

Dynamic routing
server

c1

Server

S1

c2

c5

Network B

c7

c8

c9

c10

Network A

Client

% complete

UL
BW

C1

30

100

C2

20

200

...

...

...

C7

10

50

Max

6

threshold

4

current

5

server

redirection

Max

clients

c4

c6

server

redirection

Max

clients

c3

Ask for the
temporal
redirection

Includes clients
and capabilities

Current

downloading

clients

new clients

Dynamic routing
server

Server

S1

Network B

c8

c9

c10

Network A

server

redirection

Max

clients

S1

C1

1

S1

C2

2

...

...

...

S1

C7

1

c5

c4

c2

c1

c7

c6

Client

% complete

UL
BW

C1

50

100

C2

40

200

...

...

...

C7

20

50

Max

6

threshold

4

current

5

temporal
redirection

Includes clients
and capabilities

server

redirection

Max

clients

c1

c2

c5

c7

c3

Current

downloading

clients

new clients

Dynamic routing
server

Server

S1

Network B

c8

c9

c10

Network A

server

redirection

Max

clients

c5

c4

c2

c1

c7

c6

Client

% complete

UL
BW

C1

50

100

C2

40

200

...

...

...

C7

20

50

Max

6

threshold

4

current

5

server

redirection

Max

clients

S1

C1

1

S1

C2

2

...

...

...

S1

C7

1

c1

c2

c5

c7

c3

Current

downloading

clients

new clients

Dynamic routing
server

Server

S1

Network B

c8

c9

c10

Network A

server

redirection

Max

clients

c5

c4

c2

c1

c7

c6

Client

% complete

UL
BW

C1

50

100

C2

40

200

...

...

...

C7

20

50

Max

6

threshold

4

current

5

C6 starts by
addressing S1
but its request
will be
redirected to C7

server

redirection

Max

clients

S1

C1

1

S1

C2

2

...

...

...

S1

C7

1

c1

c2

c5

c7

c3

Current

downloading

clients

new clients

Dynamic routing
server

Server

S1

Network B

c8

c9

c10

Network A

server

redirection

Max

clients

c5

c4

c2

c1

c7

c6

Client

% complete

UL
BW

C1

50

100

C2

40

200

...

...

...

C7

20

50

Max

6

threshold

4

current

5

Handshake to
know the actual
address

And to remove
redirection form
network

server

redirection

Max

clients

S1

C1

1

S1

C2

2

...

...

...

S1

C7

1

c1

c2

c5

c7

c3

Current

downloading

clients

new clients

Dynamic routing
server

Server

S1

Network B

c8

c9

c10

Network A

server

redirection

Max

clients

c5

c4

c2

c1

c7

c6

Client

% complete

UL
BW

C1

50

100

C2

40

200

...

...

...

C7

20

50

Max

6

threshold

4

current

5

After finishing the
handshake

The redirection
will be removed.

And
communication
will be done
directly.

server

redirection

Max

clients

S1

C1

1

S1

C2

2

...

...

...

c1

c2

c5

c7

c3

Steps: :


Steps:


1.
File request:
new client sends a request to get a file. Then a
client gets the file_ID to issue a file request.

2.
Redirection:

for the file request to direct it to a client that
acts as a server (candidate client).

3.
Handshake:

done by the server or the candidate client to
send their actual IP and other information to the new
client.


4.
File send.

1
-
file request:


A modified content (file or stream) request:


First search for file using webpage.


1.
Client Request the file using a link web page.

2.
Server replies with the file_ID (hash function) : use 32bit for
the file_ID.

3.
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

........

Request

file_ID

Request file(file_ID)

........

Candidate
Client2

Destination
changed to be
candidate client 2

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.

To Router /
Network

From Router

From Network

RA

RB

RC

RD

N1

N2

N3

N4

RA









0

0





RB





[





0

0



RC



[







0

0



RD













0

0

N1

[















N2

[

[

[











N3



[

[

[









N4







[









Example OSPF Link State Database (LSDB)

Dynamic routing
server

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

........

Using
Redirection

file_ID

Request file(file_ID)

........

Candidate
Client2

Destination
changed to be
candidate client 2

response(file_ID, Candidate Clint2 IP)

Accept (file_ID)

Redirection
cancellation
or reduce the
future
redirection
After this
message

Sending file)

Request


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

PC 2:

Name: Ubuntu_9_10

OpenFlow:

Name: Ubuntu_9_04

eth 3

eth 2

eth 1

eth 2

eth

eth

10.10.10.4

10.10.10.2

10.10.10.3

10.10.10.1

Refining the Layout:

PC 1:

Name: Ubuntu

PC 2:

Name: Ubuntu_9_10

OpenFlow:

Name: Ubuntu_9_04

eth 3

eth 2

eth 1

eth 2

eth

eth

10.10.10.4

10.10.10.2

10.10.10.3

10.10.10.1

Down

Down

Layout after refinement:

PC 1:

Name: Ubuntu

PC 2:

Name: Ubuntu_9_10

OpenFlow:

Name: Ubuntu_9_04

eth 3

eth 2

eth 1

eth 2

eth

eth

10.10.10.2

10.10.10.1

Layout after refinement:

PC 1:

Name: Ubuntu

PC 2:

Name: Ubuntu_9_10

OpenFlow:

Name: Ubuntu_9_04

eth 3

eth 2

eth 1

eth 2

Port 2

Port 1

10.10.10.2

10.10.10.1


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 .

Layout after refinement:

PC 1:

Name: Ubuntu

PC 2:

Name: Ubuntu_9_10

OpenFlow:

Name: Ubuntu_9_04

eth 3

eth 2

eth 1

eth 2

Port 2

Port 1

10.10.10.2

10.10.10.1


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

PC1’s program:

start

Initialize eth2 in promiscuous
mode & receive raw Ethernet
frames

is
protocol
?

Is needed
HW addr is
for 10.10.10.10
?

Is
destination is
10.10.10.10 ?

Respond to ARP as
you are 10.10.10.10

Display contents

IP

ARP


System Overview:

Redirection

Manager

Server

S1

c3

AS 1

c8

c9

c10

AS 2

c5

c4

c2

c1

c7

c6

Redirection

Manager

AS 2

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

Server

S1

c3

AS 1

c8

c9

c10

AS 2

c5

c4

c2

c1

c7

c6

Redirection

Manager

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.



Controller

c8

c7

c6

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.


step

Echo Request by switch

Echo Request by controller

1

2

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.

OpenFlow

Switch

Controller

Echo
Reply


OpenFlow

Switch

Controller

Echo
Reply

OpenFlow

Switch

Controller

Echo
Request


OpenFlow

Switch

Controller

Echo
request

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.

1.
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.

2.
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.

3.
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.


New Client

OpenFlow

router

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

Backup:


Cooperation:

Content
Server

client

Redirection
Manager

client

Autonomous System

OpenFlow

Switch or

Router

Content
Server

client

Anycast
Manager

client

Autonomous System

OpenFlow

Switch or

Router

Content
Server

Client A

Redirection
Manager

Client B

1

2

3

10.10.10.1

192.168.10.1

192.168.20.1


if

Destination IP: 10.10.10.1


& Content id: 12345

Change :
Destination IP: 192.168.10.1

Content
Server

Client A

Anycast
Manager

Client B

1

2

3

10.10.10.1

192.168.10.1

192.168.20.1


if

Destination IP: 10.10.10.1


& Content id: 12345

Change :
Destination IP: 192.168.10.1

Content
Server

Client A

Redirection
Manager

Client B

1

2

10.10.10.1

192.168.20.1

192.168.10.1

Content id: 12345

Content
Server

Client A

Anycast
Manager

Client B

1

2

10.10.10.1

192.168.20.1

192.168.10.1

Content id: 12345

Content
Server

Client A

Redirection
Manager

Client B

1

2

3

Destination IP: 192.168.10.1

Content id: 12345

10.10.10.1

192.168.10.1

192.168.20.1

Destination IP: 10.10.10.1

Content id: 12345

Content
Server

Client A

Anycast
Manager

Client B

1

2

3

Destination IP: 192.168.10.1

Content id: 12345

10.10.10.1

192.168.10.1

192.168.20.1

Destination IP: 10.10.10.1

Content id: 12345

Header Fields

Counters

Actions

Content
Server

client

client

Redirection
Manager

Redirection
Manager

Autonomous System 1

Autonomous System 2

Header Fields

Counters

Actions

Content
Server

client

client

Anycast
Manager

Anycast
Manager

Autonomous System 1

Autonomous System 2

Redirection Manager


Redirection
Controller

IP prefix locator

IP prefix


AS number
DB

Partial BGP
implement
-
ation

Redirection
analyzer

Anycast Manager


Redirection
Controller

IP prefix locator

IP prefix


AS number
DB

Partial BGP
implement
-
ation

Redirection
analyzer

Receive redirection
request

Lookup AS numbers for
each current user client’s
IP address in the
redirection request

Generate copies of the
redirection request each
designated for one AS

Is the
copy for
this AS

Process it by the
Redirection
controller

Send it to the
redirection manager of
the AS to which this
copy is designated to

No

Yes