How to update this version? I got it with mininet.

On Mon, Dec 15, 2014 at 1:39 PM, Murphy McCauley <murphy.mccau...@gmail.com>
wrote:
>
> You're using an outdated version of POX (betta).  You should probably
> upgrade to dart or eel.
>
> -- Murphy
>
>
> On Dec 15, 2014, at 12:06 AM, chaitanya tanwar <chaitanya.tan...@gmail.com>
> wrote:
>
> mininet@mininet-vm:~$ cd pox
> mininet@mininet-vm:~/pox$ pox.py log.level --DEBUG forwarding.l2_learning
> diversion &
> [1] 4321
> mininet@mininet-vm:~/pox$ POX 0.1.0 (betta) / Copyright 2011-2013 James
> McCauley, et al.
> DEBUG:diversion:Enabling Diversion Module
> DEBUG:core:POX 0.1.0 (betta) going up...
> DEBUG:core:Running on CPython (2.7.4/Apr 19 2013 18:28:01)
> DEBUG:core:Platform is
> Linux-3.8.0-19-generic-x86_64-with-Ubuntu-13.04-raring
> INFO:core:POX 0.1.0 (betta) is up.
> DEBUG:openflow.of_01:Listening on 0.0.0.0:6633
> INFO:openflow.of_01:[00-00-00-00-00-02 1] connected
> DEBUG:forwarding.l2_learning:Connection [00-00-00-00-00-02 1]
> DEBUG:diversion: rules installed on 00-00-00-00-00-02
> INFO:openflow.of_01:[00-00-00-00-00-03 3] connected
> DEBUG:forwarding.l2_learning:Connection [00-00-00-00-00-03 3]
> DEBUG:diversion: rules installed on 00-00-00-00-00-03
> INFO:openflow.of_01:[00-00-00-00-00-01 2] connected
> DEBUG:forwarding.l2_learning:Connection [00-00-00-00-00-01 2]
>
> This the log i am getting. Can you identify something from them?
> "diversion" is my 2nd code which we are talking about. about attaching it.
>
> Thanks.
>
>
> On Mon, Dec 15, 2014 at 12:31 PM, Murphy McCauley <
> murphy.mccau...@gmail.com> wrote:
>>
>> I'm not actually sure how the controller works at all in your example.
>>
>> This section of the Mininet documentation discusses using external
>> OpenFlow controllers:
>>
>> https://github.com/mininet/mininet/wiki/Introduction-to-Mininet#external-openflow-controllers
>>
>> Basically you can give it an external IP and port, and it'll set the
>> switches up to try to connect to a controller there.  The default (
>> 127.0.0.1:6633) is fine if you want to run the controller on the same
>> machine as Mininet.
>>
>> Then just run POX from the commandline as described in the POX manual.
>> If you want, turn up the logging level to DEBUG using the log.level module
>> as described in the POX manual.
>>
>> -- Murphy
>>
>> On Dec 14, 2014, at 10:54 PM, chaitanya tanwar <
>> chaitanya.tan...@gmail.com> wrote:
>>
>> Can you suggest some points.
>> Where should i run my POX controller?
>> Where you generally run your POX controller when using mininet?
>>
>> On Mon, Dec 15, 2014 at 12:14 PM, Murphy McCauley <
>> murphy.mccau...@gmail.com> wrote:
>>>
>>> Yup.  I'm sure there's something wrong with it.
>>>
>>> But trying to program POX without being able to read the log is like
>>> trying to do a puzzle in the dark.
>>>
>>> Figure out how to read the log.
>>>
>>> -- Murphy
>>>
>>> On Dec 14, 2014, at 10:36 PM, chaitanya tanwar <
>>> chaitanya.tan...@gmail.com> wrote:
>>>
>>> But there is some problem due to my 2nd code becuase when I ran the pox
>>> without my 2nd code. All host were able to ping each other.
>>> Its when i installed a rule to the switch they stop pinging.
>>>
>>> On Mon, Dec 15, 2014 at 12:00 PM, Murphy McCauley <
>>> murphy.mccau...@gmail.com> wrote:
>>>>
>>>> I don't know that.  Seems like a Mininet question.
>>>>
>>>> I always set up Mininet to use a remote controller and then just run
>>>> POX myself.  By default, POX displays its log on standard output.
>>>>
>>>> -- Murphy
>>>>
>>>> On Dec 14, 2014, at 10:27 PM, chaitanya tanwar <
>>>> chaitanya.tan...@gmail.com> wrote:
>>>>
>>>> I am new to SDN. How can i check to POX logs?
>>>> In mininet its just showing that POX is up and POX controller is
>>>> connected to all the switches.
>>>>
>>>> Thanks.
>>>>
>>>> On Mon, Dec 15, 2014 at 11:53 AM, Murphy McCauley <
>>>> murphy.mccau...@gmail.com> wrote:
>>>>>
>>>>> Does your POX log have any warnings or errors in it?  Those can be
>>>>> really informative.
>>>>>
>>>>> -- Murphy
>>>>>
>>>>> On Dec 14, 2014, at 9:56 PM, chaitanya tanwar <
>>>>> chaitanya.tan...@gmail.com> wrote:
>>>>>
>>>>> *I have created a network using the following code, and pox as remote
>>>>> controller with l2.learning module.*
>>>>>
>>>>>
>>>>> #!/usr/bin/python
>>>>> from mininet.net import Mininet
>>>>> from mininet.node import Controller, RemoteController, OVSController
>>>>> from mininet.node import CPULimitedHost, Host, Node
>>>>> from mininet.node import OVSKernelSwitch, UserSwitch
>>>>> from mininet.node import IVSSwitch
>>>>> from mininet.cli import CLI
>>>>> from mininet.log import setLogLevel, info
>>>>> from mininet.link import TCLink, Intf
>>>>>
>>>>> def myNetwork():
>>>>>
>>>>>     net = Mininet( topo=None,
>>>>>                    build=False,
>>>>>                    ipBase='10.0.0.0/8')
>>>>>
>>>>>     #info( '*** Adding controller\n' )
>>>>>     #c0=net.addController(name='c0',
>>>>>      #                 controller=None)
>>>>>     info( '*** Add switches\n')
>>>>>     s1 = net.addSwitch('s1', cls=OVSKernelSwitch)
>>>>>     s2 = net.addSwitch('s2', cls=OVSKernelSwitch)
>>>>>     s3 = net.addSwitch('s3', cls=OVSKernelSwitch)
>>>>>     info( '*** Add hosts\n')
>>>>>
>>>>>     h1 = net.addHost('h1', cls=Host, mac='00:00:00:00:00:01', ip='
>>>>> 10.0.0.2/24', defaultRoute='h1-eth0')
>>>>>     h2 = net.addHost('h2', cls=Host, mac='00:00:00:00:00:02', ip='
>>>>> 10.0.0.3/24', defaultRoute='h2-eth0')
>>>>>     h4 = net.addHost('h4', cls=Host, mac='00:00:00:00:00:04', ip='
>>>>> 20.0.0.3/24', defaultRoute='h4-eth0')
>>>>>     h3 = net.addHost('h3', cls=Host, mac='00:00:00:00:00:03', ip='
>>>>> 30.0.0.2/24', defaultRoute='h3-eth0')
>>>>>     h5 = net.addHost('h5', cls=Host, mac='00:00:00:00:00:05', ip='
>>>>> 20.0.0.3/24', defaultRoute='h5-eth0')
>>>>>
>>>>>     info( '*** Add links\n')
>>>>>     linkBW = {'bw':100}
>>>>>     net.addLink(h1, s1, cls=TCLink , **linkBW)
>>>>>     net.addLink(h2, s1, cls=TCLink , **linkBW)
>>>>>     net.addLink(h3, s2, cls=TCLink , **linkBW)
>>>>>     net.addLink(h4, s3, cls=TCLink , **linkBW)
>>>>>     net.addLink(h5, s3, cls=TCLink , **linkBW)
>>>>>     net.addLink(s1, s2, cls=TCLink , **linkBW)
>>>>>     net.addLink(s3, s2, cls=TCLink , **linkBW)
>>>>>     info( '*** Starting network\n')
>>>>>     net.build()
>>>>>     #info( '*** Starting controllers\n')
>>>>>     #for controller in net.controllers:
>>>>>      #   controller.start()
>>>>>     info( '*** Starting switches\n')
>>>>>     net.get('s1')#.start([c0])
>>>>>     net.get('s2')#.start([c0])
>>>>>     net.get('s3')#.start([c0])
>>>>>     info( '*** Configuring switches\n')
>>>>>
>>>>>     CLI(net)
>>>>>     net.stop()
>>>>>
>>>>> if __name__ == '__main__':
>>>>>     setLogLevel( 'info' )
>>>>>     myNetwork()
>>>>>
>>>>>
>>>>> *I am able to ping to each other.*
>>>>> *But now I want add an entry to all switch. If h2 sends packet to h3
>>>>> then divert it to h5 on the basis of IP addresses by the following code.*
>>>>>
>>>>>
>>>>> from pox.core import core
>>>>> import pox.openflow.libopenflow_01 as of
>>>>> from pox.lib.revent import *
>>>>> from pox.lib.util import dpidToStr
>>>>> from pox.lib.addresses import EthAddr
>>>>> from collections import namedtuple
>>>>> import os
>>>>>
>>>>> log = core.getLogger()
>>>>>
>>>>> class Diversion(EventMixin):
>>>>>     def __init__ (self) :
>>>>>         self.listenTo(core.openflow)
>>>>>         log.debug("Enabling Diversion Module")
>>>>>
>>>>>     def _handle_ConnectionUp (self, event):
>>>>>         msg = of.ofp_flow_mod()
>>>>>         msg.match = of.ofp_match(nw_src = IPAddr("10.0.0.3"),nw_dst =
>>>>> IPAddr("10.0.0.3"))
>>>>>
>>>>> msg.actions.append(ofp_action_nw_addr.set_dst(IPAddr("192.168.1.14")))
>>>>>         self.connection.send(msg)
>>>>>         log.debug(" rules installed on %s", dpidToStr(event.dpid))
>>>>>
>>>>> def launch():
>>>>>     core.registerNew(Diversion)
>>>>>
>>>>>
>>>>> *But now i am not able to ping any of the host..*
>>>>>
>>>>> *Please direct me to the error.*
>>>>>
>>>>>
>>>>> Thanks and Regards.
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Reply via email to