Skip to content

Commit b92c267

Browse files
Explain Switcher and Router funtionality
1 parent 685baad commit b92c267

1 file changed

Lines changed: 29 additions & 8 deletions

File tree

Server/README.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Switcher and Router
2-
This folder is the source code for the Switcher and Routers.
2+
This folder is the source code for the Switcher and Routers on the OpenFlow Protocol Network.
33

44
## Installation
55
```
@@ -11,6 +11,33 @@ npm run switcher
1111
# Start a Router (can start as many as you want)
1212
npm run router
1313
```
14+
15+
## Switcher
16+
`Switcher.ts`
17+
18+
The Switcher is a NodeJS application that listens on port 51510 for OpenFlow messages. The Switcher is responsible for managing the Routers and Clients.
19+
20+
The Switcher contains a FlowTable that is used to control the flow of traffic between Clients and Routers.
21+
| Router | In | Out |
22+
|--------|----|-----|
23+
| R1 | E1 | R2 |
24+
| R2 | R1 | R2 |
25+
| R3 | R2 | E2 |
26+
27+
28+
## Router
29+
`Router.ts`
30+
31+
The Router is a NodeJS application that can be started as many different processes to create multiple OpenFlow layers that connect together.
32+
33+
When a new Router process is created, it will send a message to the Switcher to connect and if successful, it will be added to the FlowTable.
34+
35+
If the Router is #1 on the network, its details will be stored and forwarded to the Client once they join the network.
36+
37+
When the network is filled out with 2 other Routers and a receiving Client, the initial Client can send a message to the receiving Client and the message will be forwarded the #1 Router.
38+
39+
Router #1 will then forward the message to Router #2 and Router #2 will forward the message to Router #3 and Router #3 will forward the message to the receiving Client.
40+
1441
## Dockerising the Switcher
1542
![Dockerfile](../Assets/Dockerfile.png)
1643

@@ -20,10 +47,4 @@ docker build -t dermot/openflow:1.0 .
2047
2148
# Run the Docker image inside a container
2249
docker run -it --rm --name openflow -p 51510:51510 dermot/openflow:1.0
23-
```
24-
25-
## Switcher
26-
The Switcher is a NodeJS application that listens on port 51510 for OpenFlow messages.
27-
28-
## Router
29-
The Router is a NodeJS application that can be started as many different processes to create multiple OpenFlow layers that connect together.
50+
```

0 commit comments

Comments
 (0)