Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[mininet-discuss] Unexpected host in In-band controller

Tuba Uzakgider tubauzakgider at gmail.com
Thu Apr 17 13:07:49 PDT 2014


if you mention about content, you can look at the down.

*TopoInband.py*


#!/usr/bin/python

"""
This example shows how to create an empty Mininet object
(without a topology object) and add nodes to it manually.
"""

import os
from mininet.net import Mininet
#from mininet.node import Controller
from mininet.cli import CLI
from mininet.log import setLogLevel, info, output
from mininet.node import RemoteController
from mininet.node import CPULimitedHost
from mininet.link import TCLink
import time


class InbandController( RemoteController ):


    def checkListening( self ):
         "Overridden to do nothing."
        return

def emptyNet():

    "Create an empty network and add nodes to it."

    #net = Mininet(controller=Controller )
    net = Mininet(controller=RemoteController, link=TCLink)
    net.addController( 'c0',controller=InbandController,ip='10.0.0.102')
    cont = net.addHost( 'cont', mac='00:00:00:00:00:66', ip='10.0.0.102')
    h1 = net.addHost( 'h1', mac='00:00:00:00:00:01', ip='10.0.0.1' )
    h2 = net.addHost( 'h2', mac='00:00:00:00:00:02', ip='10.0.0.2' )
    h3 = net.addHost( 'h3', mac='00:00:00:00:00:03', ip='10.0.0.3' )
    server = net.addHost( 'server', mac='00:00:00:00:00:64',
ip='10.0.0.100' )
    appserver = net.addHost( 'appserver', mac='00:00:00:00:00:65',
ip='10.0.0.101')

    s1 = net.addSwitch( 's1')
    s2 = net.addSwitch( 's2')
    s3 = net.addSwitch( 's3')
    s4 = net.addSwitch( 's4')

    net.addLink(s1,s2,bw=700,delay='0ms',loss=0,use_htb=True)
    net.addLink(s1,s3,bw=700,delay='0ms',loss=0,use_htb=True)
    net.addLink(s1,s4,bw=700,delay='0ms',loss=0,use_htb=True)
    net.addLink(s2,s3,bw=700,delay='0ms',loss=0,use_htb=True)
    net.addLink(s2,s4,bw=700,delay='0ms',loss=0,use_htb=True)
    net.addLink(s3,s4,bw=700,delay='0ms',loss=0,use_htb=True)

    net.addLink(s1,cont,bw=700,delay='0ms',loss=0,use_htb=True)
    net.addLink(s1,h1,bw=700,delay='0ms',loss=0,use_htb=True)
    net.addLink(s2,h2,bw=700,delay='0ms',loss=0,use_htb=True)
    net.addLink(s3,h3,bw=700,delay='0ms',loss=0,use_htb=True)
    net.addLink(s4,server,bw=700,delay='0ms',loss=0,use_htb=True)
    net.addLink(s4,appserver,bw=700,delay='0ms',loss=0,use_htb=True)

    net.start()
    h1.cmd('arp -s 10.0.0.2  00:00:00:00:00:02')
    h1.cmd('arp -s 10.0.0.3  00:00:00:00:00:03')
    h1.cmd('arp -s 10.0.0.100  00:00:00:00:00:64')
    h1.cmd('arp -s 10.0.0.101  00:00:00:00:00:65')
    h1.cmd('arp -s 10.0.0.102  00:00:00:00:00:66')

    h2.cmd('arp -s 10.0.0.1  00:00:00:00:00:01')
    h2.cmd('arp -s 10.0.0.3  00:00:00:00:00:03')
    h2.cmd('arp -s 10.0.0.100  00:00:00:00:00:64')
    h2.cmd('arp -s 10.0.0.101  00:00:00:00:00:65')
    h2.cmd('arp -s 10.0.0.102  00:00:00:00:00:66')

    h3.cmd('arp -s 10.0.0.1  00:00:00:00:00:01')
    h3.cmd('arp -s 10.0.0.2  00:00:00:00:00:02')
    h3.cmd('arp -s 10.0.0.100  00:00:00:00:00:64')
    h3.cmd('arp -s 10.0.0.101  00:00:00:00:00:65')
    h3.cmd('arp -s 10.0.0.102  00:00:00:00:00:66')

    server.cmd('arp -s 10.0.0.1  00:00:00:00:00:01')
    server.cmd('arp -s 10.0.0.2  00:00:00:00:00:02')
    server.cmd('arp -s 10.0.0.3  00:00:00:00:00:03')
    server.cmd('arp -s 10.0.0.101 00:00:00:00:00:65')
    server.cmd('arp -s 10.0.0.102 00:00:00:00:00:66')

    appserver.cmd('arp -s 10.0.0.1 00:00:00:00:00:01')
    appserver.cmd('arp -s 10.0.0.2 00:00:00:00:00:02')
    appserver.cmd('arp -s 10.0.0.3 00:00:00:00:00:03')
    appserver.cmd('arp -s 10.0.0.100 00:00:00:00:00:64')
    appserver.cmd('arp -s 10.0.0.102 00:00:00:00:00:66')

    cont.cmd('arp -s 10.0.0.1 00:00:00:00:00:01')
    cont.cmd('arp -s 10.0.0.2 00:00:00:00:00:02')
    cont.cmd('arp -s 10.0.0.3 00:00:00:00:00:03')
    cont.cmd('arp -s 10.0.0.100 00:00:00:00:00:64')
    cont.cmd('arp -s 10.0.0.101 00:00:00:00:00:65')

    s1.cmd('ifconfig s1 inet 10.0.0.5')
    s2.cmd('ifconfig s2 inet 10.0.0.6')
    s3.cmd('ifconfig s3 inet 10.0.0.7')
    s4.cmd('ifconfig s4 inet 10.0.0.8')

    """switches = net.switches
    for s in switches:
        print s.name,s.IP(),s.MAC()

    hosts = net.hosts
    for h in hosts:
        print h.name,h.IP(),h.MAC()

    c = net.get('c0')
    c.cmd('ifconfig > asd.txt')"""
    CLI(net)

    net.stop()


if __name__ == '__main__':
    #setLogLevel( 'info' )
    emptyNet()


2014-04-17 21:50 GMT+03:00 Gregory Gee <gee.developer at gmail.com>:

> We would need to see it's content.
>
>
>
>
> On Thu, Apr 17, 2014 at 2:47 PM, Tuba Uzakgider <tubauzakgider at gmail.com>wrote:
>
>> I'm using "sudo python TopoInnand.py" script to start the topology.
>>
>>
>> 2014-04-17 21:37 GMT+03:00 Gregory Gee <gee.developer at gmail.com>:
>>
>> Can we see the script you tried to use to start the topology?  Hard to
>>> know if it was a syntax or logic issue without seeing it.
>>>
>>> Greg
>>>
>>>
>>>
>>> On Thu, Apr 17, 2014 at 12:26 PM, Tuba Uzakgider <
>>> tubauzakgider at gmail.com> wrote:
>>>
>>>> Does anyone have any suggestions?
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I have a topology with 4 switches and 5 hosts (as cont, h1, h2, h3,
>>>> h4). cont host is in-band controller. I'm using Floodlight Controller in
>>>> cont host. When i was started mininet, unexpected host  ( has unknown MAC )
>>>> was added switch 1 to -2 port.
>>>> I want to ask that what's this unexpected host? Can you explain it ?
>>>>
>>>> Thank you in advance.
>>>>
>>>> My Topology;
>>>>
>>>>                   h2
>>>>                    |
>>>>                   s2
>>>>                 /   |  \
>>>>     h1 --- s1  --|-- s3 ---h3
>>>>            /    \   |   /
>>>>           /      \  |  /
>>>>       cont      s4
>>>>                     |
>>>>                    h4
>>>>
>>>>
>>>> 2014-04-16 21:14 GMT+03:00 Tuba Uzakgider <tubauzakgider at gmail.com>:
>>>>
>>>> Hi,
>>>>>
>>>>> I have a topology with 4 switches and 5 hosts (as cont, h1, h2, h3,
>>>>> h4). cont host is in-band controller. I'm using Floodlight Controller in
>>>>> cont host. When i was started mininet, unexpected host  ( has unknown MAC )
>>>>> was added switch 1 to -2 port.
>>>>> I want to ask that what's this unexpected host? Can you explain it ?
>>>>>
>>>>> Thank you in advance.
>>>>>
>>>>> My Topology;
>>>>>
>>>>>                   h2
>>>>>                    |
>>>>>                   s2
>>>>>                 /   |  \
>>>>>     h1 --- s1  --|-- s3 ---h3
>>>>>            /    \   |   /
>>>>>           /      \  |  /
>>>>>       cont      s4
>>>>>                     |
>>>>>                    h4
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> mininet-discuss mailing list
>>>> mininet-discuss at lists.stanford.edu
>>>> https://mailman.stanford.edu/mailman/listinfo/mininet-discuss
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/mininet-discuss/attachments/20140417/21ee1b78/attachment.html>


More information about the mininet-discuss mailing list