Commit 79e239d7 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

update topo make all controllers type is remote.

parent cd5db479
......@@ -27,7 +27,18 @@
{
"opts": {
"controllerProtocol": "tcp",
"controllerType": "ref",
"controllerType": "remote",
"hostname": "c1",
"remoteIP": "127.0.0.1",
"remotePort": 6634
},
"x": "359.0",
"y": "144.0"
},
{
"opts": {
"controllerProtocol": "tcp",
"controllerType": "remote",
"hostname": "c2",
"remoteIP": "127.0.0.1",
"remotePort": 6635
......@@ -45,67 +56,56 @@
},
"x": "914.0",
"y": "142.0"
},
{
"opts": {
"controllerProtocol": "tcp",
"controllerType": "ref",
"hostname": "c1",
"remoteIP": "127.0.0.1",
"remotePort": 6634
},
"x": "359.0",
"y": "144.0"
}
],
"hosts": [
{
"number": "11",
"number": "10",
"opts": {
"defaultRoute": "172.16.0.248",
"hostname": "h11",
"ip": "172.16.0.11",
"nodeNum": 11,
"defaultRoute": "172.16.0.249",
"hostname": "h10",
"ip": "172.16.0.10",
"nodeNum": 10,
"sched": "host"
},
"x": "1711.0",
"y": "682.0"
"x": "1359.0",
"y": "497.0"
},
{
"number": "7",
"number": "6",
"opts": {
"defaultRoute": "172.16.0.250",
"hostname": "h7",
"ip": "172.16.0.7",
"nodeNum": 7,
"defaultRoute": "172.16.0.251",
"hostname": "h6",
"ip": "172.16.0.6",
"nodeNum": 6,
"sched": "host"
},
"x": "1129.0",
"y": "703.0"
"x": "803.0",
"y": "496.0"
},
{
"number": "3",
"number": "12",
"opts": {
"defaultRoute": "172.16.0.252",
"hostname": "h3",
"ip": "172.16.0.3",
"nodeNum": 3,
"defaultRoute": "172.16.0.248",
"hostname": "h12",
"ip": "172.16.0.12",
"nodeNum": 12,
"sched": "host"
},
"x": "399.0",
"y": "710.0"
"x": "1375.0",
"y": "877.0"
},
{
"number": "6",
"number": "1",
"opts": {
"defaultRoute": "172.16.0.251",
"hostname": "h6",
"ip": "172.16.0.6",
"nodeNum": 6,
"defaultRoute": "172.16.0.254",
"hostname": "h1",
"ip": "172.16.0.1",
"nodeNum": 1,
"sched": "host"
},
"x": "803.0",
"y": "496.0"
"x": "356.0",
"y": "536.0"
},
{
"number": "4",
......@@ -119,6 +119,30 @@
"x": "444.0",
"y": "897.0"
},
{
"number": "11",
"opts": {
"defaultRoute": "172.16.0.248",
"hostname": "h11",
"ip": "172.16.0.11",
"nodeNum": 11,
"sched": "host"
},
"x": "1711.0",
"y": "682.0"
},
{
"number": "13",
"opts": {
"defaultRoute": "172.16.0.248",
"hostname": "h13",
"ip": "172.16.0.13",
"nodeNum": 13,
"sched": "host"
},
"x": "1563.0",
"y": "876.0"
},
{
"number": "5",
"opts": {
......@@ -132,64 +156,52 @@
"y": "901.0"
},
{
"number": "8",
"number": "7",
"opts": {
"defaultRoute": "172.16.0.250",
"hostname": "h8",
"ip": "172.16.0.8",
"nodeNum": 8,
"sched": "host"
},
"x": "843.0",
"y": "870.0"
},
{
"number": "10",
"opts": {
"defaultRoute": "172.16.0.249",
"hostname": "h10",
"ip": "172.16.0.10",
"nodeNum": 10,
"hostname": "h7",
"ip": "172.16.0.7",
"nodeNum": 7,
"sched": "host"
},
"x": "1359.0",
"y": "497.0"
"x": "1129.0",
"y": "703.0"
},
{
"number": "1",
"number": "9",
"opts": {
"defaultRoute": "172.16.0.254",
"hostname": "h1",
"ip": "172.16.0.1",
"nodeNum": 1,
"defaultRoute": "172.16.0.253",
"hostname": "h2",
"ip": "172.16.0.2",
"nodeNum": 9,
"sched": "host"
},
"x": "356.0",
"y": "536.0"
"x": "135.0",
"y": "731.0"
},
{
"number": "13",
"number": "8",
"opts": {
"defaultRoute": "172.16.0.248",
"hostname": "h13",
"ip": "172.16.0.13",
"nodeNum": 13,
"defaultRoute": "172.16.0.250",
"hostname": "h8",
"ip": "172.16.0.8",
"nodeNum": 8,
"sched": "host"
},
"x": "1563.0",
"y": "876.0"
"x": "843.0",
"y": "870.0"
},
{
"number": "9",
"number": "3",
"opts": {
"defaultRoute": "172.16.0.253",
"hostname": "h2",
"ip": "172.16.0.2",
"nodeNum": 9,
"defaultRoute": "172.16.0.252",
"hostname": "h3",
"ip": "172.16.0.3",
"nodeNum": 3,
"sched": "host"
},
"x": "135.0",
"y": "731.0"
"x": "399.0",
"y": "710.0"
},
{
"number": "9",
......@@ -202,18 +214,6 @@
},
"x": "1030.0",
"y": "857.0"
},
{
"number": "12",
"opts": {
"defaultRoute": "172.16.0.248",
"hostname": "h12",
"ip": "172.16.0.12",
"nodeNum": 12,
"sched": "host"
},
"x": "1375.0",
"y": "877.0"
}
],
"links": [
......@@ -330,21 +330,15 @@
],
"switches": [
{
"number": "3",
"number": "10",
"opts": {
"controllers": [
"c2"
],
"dpid": "3",
"hostname": "s3",
"netflow": "0",
"nodeNum": 3,
"sflow": "0",
"switchIP": "172.16.0.249",
"switchType": "default"
"controllers": [],
"hostname": "s10",
"nodeNum": 10,
"switchType": "legacySwitch"
},
"x": "1458.0",
"y": "416.0"
"x": "952.0",
"y": "750.0"
},
{
"number": "11",
......@@ -358,49 +352,55 @@
"y": "741.0"
},
{
"number": "5",
"number": "4",
"opts": {
"controllers": [
"c1"
],
"dpid": "5",
"hostname": "s5",
"dpid": "4",
"hostname": "s4",
"netflow": "0",
"nodeNum": 5,
"nodeNum": 4,
"sflow": "0",
"switchIP": "172.16.0.252",
"switchIP": "172.16.0.253",
"switchType": "default"
},
"x": "489.0",
"y": "615.0"
"x": "224.0",
"y": "608.0"
},
{
"number": "2",
"number": "3",
"opts": {
"controllers": [
"c0"
"c2"
],
"dpid": "2",
"hostname": "s2",
"dpid": "3",
"hostname": "s3",
"netflow": "0",
"nodeNum": 2,
"nodeNum": 3,
"sflow": "0",
"switchIP": "172.16.0.251",
"switchIP": "172.16.0.249",
"switchType": "default"
},
"x": "908.0",
"y": "424.0"
"x": "1458.0",
"y": "416.0"
},
{
"number": "9",
"number": "7",
"opts": {
"controllers": [],
"hostname": "s9",
"nodeNum": 9,
"switchType": "legacySwitch"
"controllers": [
"c0"
],
"dpid": "7",
"hostname": "s7",
"netflow": "0",
"nodeNum": 7,
"sflow": "0",
"switchIP": "172.16.0.250",
"switchType": "default"
},
"x": "585.0",
"y": "792.0"
"x": "1039.0",
"y": "610.0"
},
{
"number": "8",
......@@ -420,66 +420,66 @@
"y": "588.0"
},
{
"number": "10",
"opts": {
"controllers": [],
"hostname": "s10",
"nodeNum": 10,
"switchType": "legacySwitch"
},
"x": "952.0",
"y": "750.0"
},
{
"number": "4",
"number": "1",
"opts": {
"controllers": [
"c1"
],
"dpid": "4",
"hostname": "s4",
"dpid": "1",
"hostname": "s1",
"netflow": "0",
"nodeNum": 4,
"nodeNum": 1,
"sflow": "0",
"switchIP": "172.16.0.253",
"switchIP": "172.16.0.254",
"switchType": "default"
},
"x": "224.0",
"y": "608.0"
"x": "361.0",
"y": "407.0"
},
{
"number": "7",
"number": "9",
"opts": {
"controllers": [],
"hostname": "s9",
"nodeNum": 9,
"switchType": "legacySwitch"
},
"x": "585.0",
"y": "792.0"
},
{
"number": "2",
"opts": {
"controllers": [
"c0"
],
"dpid": "7",
"hostname": "s7",
"dpid": "2",
"hostname": "s2",
"netflow": "0",
"nodeNum": 7,
"nodeNum": 2,
"sflow": "0",
"switchIP": "172.16.0.250",
"switchIP": "172.16.0.251",
"switchType": "default"
},
"x": "1039.0",
"y": "610.0"
"x": "908.0",
"y": "424.0"
},
{
"number": "1",
"number": "5",
"opts": {
"controllers": [
"c1"
],
"dpid": "1",
"hostname": "s1",
"dpid": "5",
"hostname": "s5",
"netflow": "0",
"nodeNum": 1,
"nodeNum": 5,
"sflow": "0",
"switchIP": "172.16.0.254",
"switchIP": "172.16.0.252",
"switchType": "default"
},
"x": "361.0",
"y": "407.0"
"x": "489.0",
"y": "615.0"
}
],
"version": "2"
......
......@@ -19,48 +19,50 @@ def myNetwork():
ipBase='172.16.0.0/16')
info( '*** Adding controller\n' )
c0=net.addController(name='c0',
controller=RemoteController,
ip='127.0.0.1',
protocol='tcp',
port=6633)
c1=net.addController(name='c1',
controller=Controller,
controller=RemoteController,
ip='127.0.0.1',
protocol='tcp',
port=6634)
c2=net.addController(name='c2',
controller=Controller,
protocol='tcp',
port=6635)
c0=net.addController(name='c0',
controller=RemoteController,
ip='127.0.0.1',
protocol='tcp',
port=6633)
port=6635)
info( '*** Add switches\n')
s10 = net.addSwitch('s10', cls=OVSKernelSwitch, failMode='standalone')
s9 = net.addSwitch('s9', cls=OVSKernelSwitch, failMode='standalone')
s11 = net.addSwitch('s11', cls=OVSKernelSwitch, failMode='standalone')
s4 = net.addSwitch('s4', cls=OVSKernelSwitch, dpid='4')
s3 = net.addSwitch('s3', cls=OVSKernelSwitch, dpid='3')
s7 = net.addSwitch('s7', cls=OVSKernelSwitch, dpid='7')
s8 = net.addSwitch('s8', cls=OVSKernelSwitch, dpid='8')
s1 = net.addSwitch('s1', cls=OVSKernelSwitch, dpid='1')
s10 = net.addSwitch('s10', cls=OVSKernelSwitch, failMode='standalone')
s2 = net.addSwitch('s2', cls=OVSKernelSwitch, dpid='2')
s9 = net.addSwitch('s9', cls=OVSKernelSwitch, failMode='standalone')
s8 = net.addSwitch('s8', cls=OVSKernelSwitch, dpid='8')
s3 = net.addSwitch('s3', cls=OVSKernelSwitch, dpid='3')
s5 = net.addSwitch('s5', cls=OVSKernelSwitch, dpid='5')
s11 = net.addSwitch('s11', cls=OVSKernelSwitch, failMode='standalone')
s7 = net.addSwitch('s7', cls=OVSKernelSwitch, dpid='7')
info( '*** Add hosts\n')
h10 = net.addHost('h10', cls=Host, ip='172.16.0.10', defaultRoute='via 172.16.0.249')
h6 = net.addHost('h6', cls=Host, ip='172.16.0.6', defaultRoute='via 172.16.0.251')
h12 = net.addHost('h12', cls=Host, ip='172.16.0.12', defaultRoute='via 172.16.0.248')
h1 = net.addHost('h1', cls=Host, ip='172.16.0.1', defaultRoute='via 172.16.0.254')
h11 = net.addHost('h11', cls=Host, ip='172.16.0.11', defaultRoute='via 172.16.0.248')
h13 = net.addHost('h13', cls=Host, ip='172.16.0.13', defaultRoute='via 172.16.0.248')
a1 = net.addHost('a1', cls=Host, ip='172.16.0.5', defaultRoute='via 172.16.0.252')
h1 = net.addHost('h1', cls=Host, ip='172.16.0.1', defaultRoute='via 172.16.0.254')
a2 = net.addHost('a2', cls=Host, ip='172.16.0.9', defaultRoute='via 172.16.0.250')
h7 = net.addHost('h7', cls=Host, ip='172.16.0.7', defaultRoute='via 172.16.0.250')
h4 = net.addHost('h4', cls=Host, ip='172.16.0.4', defaultRoute='via 172.16.0.252')
h10 = net.addHost('h10', cls=Host, ip='172.16.0.10', defaultRoute='via 172.16.0.249')
h2 = net.addHost('h2', cls=Host, ip='172.16.0.2', defaultRoute='via 172.16.0.253')
h11 = net.addHost('h11', cls=Host, ip='172.16.0.11', defaultRoute='via 172.16.0.248')
h6 = net.addHost('h6', cls=Host, ip='172.16.0.6', defaultRoute='via 172.16.0.251')
h8 = net.addHost('h8', cls=Host, ip='172.16.0.8', defaultRoute='via 172.16.0.250')
h13 = net.addHost('h13', cls=Host, ip='172.16.0.13', defaultRoute='via 172.16.0.248')
h12 = net.addHost('h12', cls=Host, ip='172.16.0.12', defaultRoute='via 172.16.0.248')
h3 = net.addHost('h3', cls=Host, ip='172.16.0.3', defaultRoute='via 172.16.0.252')
h4 = net.addHost('h4', cls=Host, ip='172.16.0.4', defaultRoute='via 172.16.0.252')
a2 = net.addHost('a2', cls=Host, ip='172.16.0.9', defaultRoute='via 172.16.0.250')
info( '*** Add links\n')
net.addLink(h2, s4)
......@@ -93,25 +95,25 @@ def myNetwork():
controller.start()
info( '*** Starting switches\n')
net.get('s10').start([])
net.get('s9').start([])
net.get('s11').start([])
net.get('s4').start([c1])
net.get('s3').start([c2])
net.get('s7').start([c0])
net.get('s8').start([c2])
net.get('s1').start([c1])
net.get('s10').start([])
net.get('s2').start([c0])
net.get('s9').start([])
net.get('s8').start([c2])
net.get('s3').start([c2])
net.get('s5').start([c1])
net.get('s11').start([])
net.get('s7').start([c0])
info( '*** Post configure switches and hosts\n')
s4.cmd('ifconfig s4 172.16.0.253')
s3.cmd('ifconfig s3 172.16.0.249')
s7.cmd('ifconfig s7 172.16.0.250')
s8.cmd('ifconfig s8 172.16.0.248')
s1.cmd('ifconfig s1 172.16.0.254')
s2.cmd('ifconfig s2 172.16.0.251')
s8.cmd('ifconfig s8 172.16.0.248')
s3.cmd('ifconfig s3 172.16.0.249')
s5.cmd('ifconfig s5 172.16.0.252')
s7.cmd('ifconfig s7 172.16.0.250')
CLI(net)
net.stop()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment