Naoki Shiota | 2322a2f | 2014-05-21 19:47:40 -0700 | [diff] [blame] | 1 | """ |
| 2 | This is sample config file for start_topo.py. |
| 3 | Please rename to topo.`hostname`.py before use. |
| 4 | """ |
| 5 | def createTopo(): |
| 6 | return { |
| 7 | "controllers": { |
| 8 | "onosdev1" : "192.168.56.11:6633", |
| 9 | "onosdev2" : "192.168.56.12:6633" |
| 10 | }, |
| 11 | "switches": { |
Naoki Shiota | 801875c | 2014-05-29 17:06:06 -0700 | [diff] [blame] | 12 | # Note that dpid is optional. |
| 13 | # If omitted, sequential number will be assigned. |
Naoki Shiota | 2322a2f | 2014-05-21 19:47:40 -0700 | [diff] [blame] | 14 | "sw01": { "dpid": "0000000000000101", "controllers": [ "onosdev1" ] }, |
| 15 | "sw02": { "dpid": "0000000000000102", "controllers": [ "onosdev1" ] }, |
| 16 | "sw03": { "dpid": "0000000000000103", "controllers": [ "onosdev1" ] }, |
| 17 | "sw04": { "dpid": "0000000000000104", "controllers": [ "onosdev2" ] }, |
| 18 | "sw05": { "dpid": "0000000000000105", "controllers": [ "onosdev2", "onosdev1" ] } |
| 19 | }, |
| 20 | "hosts": { |
Naoki Shiota | 801875c | 2014-05-29 17:06:06 -0700 | [diff] [blame] | 21 | # Only default interface is configurable for now. |
| 22 | # mac and ip are optional and automatically assigned if omitted. |
| 23 | # To avoid collision of address, do not mix specified hosts and omitted hosts. |
| 24 | "h01": { "mac": "00:00:00:00:01:01", "ip": "10.0.0.1" }, |
| 25 | "h02": { "mac": "00:00:00:00:02:02", "ip": "10.0.0.2" }, |
| 26 | "h03": { "mac": "00:00:00:00:03:03", "ip": "10.0.0.3" }, |
| 27 | "h04": { "mac": "00:00:00:00:04:04", "ip": "10.0.0.4" }, |
| 28 | "h05": { "mac": "00:00:00:00:05:05", "ip": "10.0.0.5" } |
| 29 | # "h01": {}, |
| 30 | # "h02": {}, |
| 31 | # "h03": {}, |
| 32 | # "h04": {}, |
| 33 | # "h05": {} |
Naoki Shiota | 2322a2f | 2014-05-21 19:47:40 -0700 | [diff] [blame] | 34 | }, |
| 35 | "links": [ |
Naoki Shiota | 801875c | 2014-05-29 17:06:06 -0700 | [diff] [blame] | 36 | # Note that multiple links between nodes are unsupported (if declared, single link will be created). |
Naoki Shiota | 2322a2f | 2014-05-21 19:47:40 -0700 | [diff] [blame] | 37 | { |
| 38 | "node1": "sw01", |
| 39 | "node2": "sw02" |
| 40 | },{ |
| 41 | "node1": "sw02", |
| 42 | "node2": "sw03" |
| 43 | },{ |
| 44 | "node1": "sw03", |
| 45 | "node2": "sw04" |
| 46 | },{ |
| 47 | "node1": "sw04", |
| 48 | "node2": "sw05" |
| 49 | },{ |
| 50 | "node1": "sw05", |
| 51 | "node2": "sw01" |
| 52 | },{ |
| 53 | "node1": "h01", |
| 54 | "node2": "sw01" |
| 55 | },{ |
| 56 | "node1": "h02", |
| 57 | "node2": "sw02" |
| 58 | },{ |
| 59 | "node1": "h03", |
| 60 | "node2": "sw03" |
| 61 | },{ |
| 62 | "node1": "h04", |
| 63 | "node2": "sw04" |
| 64 | },{ |
| 65 | "node1": "h05", |
| 66 | "node2": "sw05" |
| 67 | } |
| 68 | ] |
| 69 | } |