forked from intrig-unicamp/mininet-wifi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Brandon Heller
committed
Jan 12, 2010
1 parent
1b6a9c3
commit 3031d31
Showing
3 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
This directory should hold configuration files for custom mininets. | ||
|
||
See custom_example.py, which loads the default minimal topology. The advantage of defining a mininet in a separate file is that you then use the --custom option in mn_run.py to run the CLI or specific tests with it. | ||
|
||
Each custom file must define a Mininet object for an 'mn' variable. | ||
|
||
To start up a mininet with this custom topology, do: | ||
sudo mn_run.py --custom custom_example.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'''Example of custom topo | ||
@author Brandon Heller ([email protected]) | ||
''' | ||
|
||
from mininet.topo import SingleSwitchTopo | ||
from mininet.net import Mininet | ||
from mininet.node import KernelSwitch, Host, Controller, ControllerParams | ||
|
||
topo = SingleSwitchTopo(k = 2) # build topology object | ||
switch = KernelSwitch | ||
host = Host | ||
controller = Controller | ||
controller_params = ControllerParams(0x0a000000, 8) # 10.0.0.0/8 | ||
in_namespace = False | ||
xterms = False | ||
mac = True | ||
arp = True | ||
|
||
mn = Mininet(topo, switch, host, controller, controller_params, | ||
in_namespace = in_namespace, | ||
xterms = xterms, auto_set_macs = mac, | ||
auto_static_arp = arp) | ||
|