example: Add simple router example (#12)
This commit is contained in:
parent
07821494dd
commit
5049e0643a
17 changed files with 621 additions and 0 deletions
20
examples/simple_router/config/config.exs
Normal file
20
examples/simple_router/config/config.exs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# This file is responsible for configuring your application
|
||||
# and its dependencies with the aid of the Mix.Config module.
|
||||
use Mix.Config
|
||||
|
||||
config :tres,
|
||||
protocol: :tcp,
|
||||
port: 6653,
|
||||
max_connections: 10,
|
||||
num_acceptors: 10,
|
||||
callback_module: SimpleRouter.Openflow.Controller,
|
||||
callback_args: []
|
||||
|
||||
config :simple_router,
|
||||
interfaces: %{
|
||||
"veth1" => %{mac_address: "02:00:00:01:00:01", ip_address: "192.168.1.1/24"},
|
||||
"veth3" => %{mac_address: "02:00:00:01:00:02", ip_address: "192.168.2.1/24"},
|
||||
},
|
||||
routes: %{
|
||||
"0.0.0.0/0" => "192.168.1.2"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue