Thanks Carlos. I was using the source code version. I downloaded the source in 
an Ubuntu laptop and installed after compiling the source.

I faced an issue with the MN with IP routing. Unable to configure the IP of the 
individual hosts and IP connectivity was not exisiting. Pings were failing.

That is why I was checking. May be I am missing some steps in installation.

But I will give it a shot with a VM using Virtual BOX on my desktop.

James Henrydoss


From: Carlos Ferreira [mailto:carlosmf...@gmail.com]
Sent: Thursday, December 22, 2016 4:26 PM
To: HENRYDOSS, JAMES <jd5...@att.com>
Cc: openflow-discuss@lists.stanford.edu <openflow-disc...@mailman.stanford.edu>
Subject: Re: [openflow-discuss] mininet not obeying to mac specification, when 
creating a host.

PS: I meant "Hello James", not Henry. I read your name too quickly. I'm sorry 
for that. My mistake.

On 22 December 2016 at 21:20, Carlos Ferreira 
<carlosmf...@gmail.com<mailto:carlosmf...@gmail.com>> wrote:
Hello Henry.

I was using the VM provided at the website for VirtualBox.
Anyway, my issue was resolved. Nicholas hit right on spot with is comment.
I failed to see that the Mac addresses I was specifying, were in fact broadcast 
addresses.

On 22 December 2016 at 19:23, HENRYDOSS, JAMES 
<jd5...@att.com<mailto:jd5...@att.com>> wrote:
Hi Carlos,

Can you please let me know what test environment you used for this testing.  
Are you using VM or installed the mininet software source version.

James Henrydoss


-----Original Message-----
From: openflow-discuss 
[mailto:openflow-discuss-boun...@mailman.stanford.edu<mailto:openflow-discuss-boun...@mailman.stanford.edu>]
 On Behalf Of Carlos Ferreira
Sent: Thursday, December 22, 2016 6:47 AM
To: 
openflow-discuss@lists.stanford.edu<mailto:openflow-discuss@lists.stanford.edu> 
<openflow-disc...@mailman.stanford.edu<mailto:openflow-disc...@mailman.stanford.edu>>
Subject: [openflow-discuss] mininet not obeying to mac specification, when 
creating a host.

Hello to all!
To start, I know that there is a mininet mailing list. I have already sent an 
e-mail to there, but until now, I had no response.

This is my issue.
I have created a python program to create a testing topology.
For some reason, when I use the "addHost" method and use the argument "mac" to 
specify the mac address for the host interface, mininet ignores the provided 
mac address an seems to create and specify the hosts with random mac addresses.
I do not know why this is happening... Can anyone help me?

This is my Python program
#### Starts here

#!/usr/bin/python2

"""
    Custom Network Topology

     2 different zones each controlled by a different Controller
     Each controller manages 3 OpenFlow switches
     Each OF Switch has 3 hosts connected
     Each zone has a triangle shaped topology, where all switches are conected 
to the controller

     2 Switches from each zone, interconnect the two zones
      - Switch 2 from Zone 1 connects to the Switch 1 from Zone 2
      - Switch 3 from Zone 1 connects to the Switch 2 from Zone 2

     The two controllers are remote controllers, residing outside from the 
mininet environment.

"""
from struct import pack
from mininet.net<http://mininet.net> import Mininet
from mininet.node import RemoteController from mininet.log import setLogLevel 
from mininet.cli import CLI


def byteStr2HexStr(byteStr):
    return ''.join([str.format("{:02X}", ord(x)) for x in byteStr]).strip()

setLogLevel('info')


net = Mininet(build=False)

c1 = net.addController("c1", controller=RemoteController, ip='192.168.1.254', 
port=6631)
c2 = net.addController("c2", controller=RemoteController, ip='192.168.1.254', 
port=6632)

c1_s1 = net.addSwitch("c1_s1", protocols='OpenFlow13', 
dpid=byteStr2HexStr(pack("!Q", 1)), mac='01:00:00:01:01:00')
c1_s2 = net.addSwitch("c1_s2", protocols='OpenFlow13', 
dpid=byteStr2HexStr(pack("!Q", 2)), mac='01:00:00:01:02:00')
c1_s3 = net.addSwitch("c1_s3", protocols='OpenFlow13', 
dpid=byteStr2HexStr(pack("!Q", 3)), mac='01:00:00:01:03:00')
c2_s1 = net.addSwitch("c2_s1", protocols='OpenFlow13', 
dpid=byteStr2HexStr(pack("!Q", 4)), mac='01:00:00:02:01:00')
c2_s2 = net.addSwitch("c2_s2", protocols='OpenFlow13', 
dpid=byteStr2HexStr(pack("!Q", 5)), mac='01:00:00:02:02:00')
c2_s3 = net.addSwitch("c2_s3", protocols='OpenFlow13', 
dpid=byteStr2HexStr(pack("!Q", 6)), mac='01:00:00:02:03:00')
switches_c1 = [c1_s1, c1_s2, c1_s3]
switches_c2 = [c2_s1, c2_s2, c2_s3]


c1_s1_h1 = net.addHost("c1_s1_h1",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c1_s1_h1")],
ip='0.0.0.0',  mac='01:00:00:01:01:01')
c1_s1_h2 = net.addHost("c1_s1_h2",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c1_s1_h2")],
ip='0.0.0.0',  mac='01:00:00:01:01:02')
c1_s1_h3 = net.addHost("c1_s1_h3",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c1_s1_h3")],
ip='0.0.0.0',  mac='01:00:00:01:01:03')
c1_s2_h1 = net.addHost("c1_s2_h1",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c1_s2_h1")],
ip='0.0.0.0',  mac='01:00:00:01:02:01')
c1_s2_h2 = net.addHost("c1_s2_h2",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c1_s2_h2")],
ip='0.0.0.0',  mac='01:00:00:01:02:02')
c1_s2_h3 = net.addHost("c1_s2_h3",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c1_s2_h3")],
ip='0.0.0.0',  mac='01:00:00:01:02:03')
c1_s3_h1 = net.addHost("c1_s3_h1",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c1_s3_h1")],
ip='0.0.0.0',  mac='01:00:00:01:03:01')
c1_s3_h2 = net.addHost("c1_s3_h2",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c1_s3_h2")],
ip='0.0.0.0',  mac='01:00:00:01:03:02')
c1_s3_h3 = net.addHost("c1_s3_h3",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c1_s3_h3")],
ip='0.0.0.0',  mac='01:00:00:01:03:03')

c2_s1_h1 = net.addHost("c1_s1_h1",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c2_s1_h1")],
ip='0.0.0.0',  mac='01:00:00:02:01:01')
c2_s1_h2 = net.addHost("c1_s1_h2",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c2_s1_h2")],
ip='0.0.0.0',  mac='01:00:00:02:01:02')
c2_s1_h3 = net.addHost("c1_s1_h3",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c2_s1_h3")],
ip='0.0.0.0',  mac='01:00:00:02:01:03')
c2_s2_h1 = net.addHost("c1_s2_h1",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c2_s2_h1")],
ip='0.0.0.0',  mac='01:00:00:02:02:01')
c2_s2_h2 = net.addHost("c1_s2_h2",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c2_s2_h2")],
ip='0.0.0.0',  mac='01:00:00:02:02:02')
c2_s2_h3 = net.addHost("c1_s2_h3",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c2_s2_h3")],
ip='0.0.0.0',  mac='01:00:00:02:02:03')
c2_s3_h1 = net.addHost("c1_s3_h1",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c2_s3_h1")],
ip='0.0.0.0',  mac='01:00:00:02:03:01')
c2_s3_h2 = net.addHost("c1_s3_h2",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c2_s3_h2")],
ip='0.0.0.0',  mac='01:00:00:02:03:02')
c2_s3_h3 = net.addHost("c1_s3_h3",
privateDirs=['/home/mininet/Scenarios/Hosts/{}'.format("c2_s3_h3")],
ip='0.0.0.0',  mac='01:00:00:02:03:03')
hosts = [c1_s1_h1, c1_s1_h2, c1_s1_h3, c1_s2_h1, c1_s2_h2, c1_s2_h3, c1_s3_h1, 
c1_s3_h2, c1_s3_h3, c2_s1_h1, c2_s1_h2, c2_s1_h3, c2_s2_h1, c2_s2_h2, c2_s2_h3, 
c2_s3_h1, c2_s3_h2, c2_s3_h3]


net.addLink(c1_s1_h1, c1_s1)
net.addLink(c1_s1_h2, c1_s1)
net.addLink(c1_s1_h3, c1_s1)
net.addLink(c1_s2_h1, c1_s2)
net.addLink(c1_s2_h2, c1_s2)
net.addLink(c1_s2_h3, c1_s2)
net.addLink(c1_s3_h1, c1_s3)
net.addLink(c1_s3_h2, c1_s3)
net.addLink(c1_s3_h3, c1_s3)

net.addLink(c2_s1_h1, c2_s1)
net.addLink(c2_s1_h2, c2_s1)
net.addLink(c2_s1_h3, c2_s1)
net.addLink(c2_s2_h1, c2_s2)
net.addLink(c2_s2_h2, c2_s2)
net.addLink(c2_s2_h3, c2_s2)
net.addLink(c2_s3_h1, c2_s3)
net.addLink(c2_s3_h2, c2_s3)
net.addLink(c2_s3_h3, c2_s3)

net.addLink(c1_s2, c2_s1)
net.addLink(c1_s3, c2_s2)

net.build()

for switch in switches_c1:
    switch.start([c1])

for switch in switches_c2:
    switch.start([c2])

for host in hosts:
    host.cmdPrint("dhclient {} &".format(host.defaultIntf().name))

CLI(net)
net.stop()
### Ends Here.


I start this program, named "testing_scenario.py", inside the Ubuntu VM 
provided in the mininet website, by using the following console
command:
sudo ./testing_scenario.py

--

Carlos Miguel Ferreira
Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - 
c...@av.it.pt<mailto:c...@av.it.pt> Skype & GTalk -> 
carlosmf...@gmail.com<mailto:carlosmf...@gmail.com> LinkedIn -> 
http://www.linkedin.com/in/carlosmferreira
_______________________________________________
openflow-discuss mailing list
openflow-discuss@lists.stanford.edu<mailto:openflow-discuss@lists.stanford.edu>
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss



--

Carlos Miguel Ferreira
Researcher at Telecommunications Institute
Aveiro - Portugal
Work E-mail - c...@av.it.pt<mailto:c...@av.it.pt>
Skype & GTalk -> carlosmf.pt<http://carlosmf.pt>@gmail.com<http://gmail.com>
LinkedIn -> http://www.linkedin.com/in/carlosmferreira



--

Carlos Miguel Ferreira
Researcher at Telecommunications Institute
Aveiro - Portugal
Work E-mail - c...@av.it.pt<mailto:c...@av.it.pt>
Skype & GTalk -> carlosmf.pt<http://carlosmf.pt>@gmail.com<http://gmail.com>
LinkedIn -> http://www.linkedin.com/in/carlosmferreira
_______________________________________________
openflow-discuss mailing list
openflow-discuss@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Reply via email to