Re: [pox-dev] POX on planetlab
I guess the problem is caused by fail_mode of Open vSwitch configuration. Have you ever checked the fail_mode configuration? Was it secure or standalone? On Thu, May 2, 2013 at 4:18 PM, Kouvakas Alexandros questa...@gmail.comwrote: The problem in my case is that even 1-2 minutes after having stopped the POX controller, I still have pings. Despite the fact that there are no flows in the flow table, I still have pings. In order to stop having pings I need to delete the bridge from the switch and recreate it again. 2013/5/1 Sayed Qaiser Ali Shah Shah 11msitqs...@seecs.edu.pk Well i am not sure what is the problem but I tried it as below and it worked fine for me start controller: cd pox sudo ./pox.py forwarding.l2_learning it started controller. After that I created topology in another terminal using command sudo mn --topo single,4 --mac --controller remote This command created topology with one switch and 4 hosts. Then by command xterm s1 I open switch s1 in xterm. I checked entries via command ovs-ofctl dump-flows s1 There were no flows in switch. Then I ping host h2 from h1 in terminal of Mininet h1 ping -c10 h2 The ping was successful and when I checked switch there were flow entries. When I shutdown controller and ping hosts, switch still was having flow entries for about 10 to 15 seconds. The ping worked for that time but after that time ping stopped because flow entries were deleted automatically. If you want to confirm that you need to check flow entries within 10-15 seconds when you stop controller, you will get flow entries but after about 15 seconds ping will stop and there will be no flow entries in switch. On Tue, Apr 30, 2013 at 1:44 PM, Kouvakas Alexandros questa...@gmail.com wrote: The weird thing is that: Before starting POX, I delete the flows from the switch with ovs-ofctl del-flows. After that, I cannot have pings. I start POX with l2_learning, and everything it's ok, I have pings. The flows are deleted after the timeout. I close POX. I can still have pings until I shutdown the ovs servers etc. When I type ovs-ofctl dump-flows, there are no flows on the switch but I can have pings.. I cannot understand why that happens. 2013/4/29 Sayed Qaiser Ali Shah Shah 11msitqs...@seecs.edu.pk You can check flow in OVS by the following command in xterm of OVS ovs-ofctl dump-flows. It will show you all the flows in switch which were added. Date: Mon, 29 Apr 2013 01:07:46 -0700 From: Murphy McCauley murphy.mccau...@gmail.com To: Kouvakas Alexandros questa...@gmail.com Cc: pox-dev@lists.noxrepo.org Subject: Re: [pox-dev] POX on planetlab Message-ID: c3dda222-c02a-4009-8bfa-e9624ea35...@gmail.com Content-Type: text/plain; charset=iso-8859-1 (Inline) On Apr 29, 2013, at 12:56 AM, Kouvakas Alexandros wrote: Sorry for asking again.Does anybody knows the answer on the above question? Sorry; I've been busy. Hopefully this brief reply will be helpful. 2013/4/23 Kouvakas Alexandros questa...@gmail.com Hello, I managed to create my network as I would like it to be. So, I have one OVS and two hosts connected to it through tunnels. Before running the POX controller I delete the flows of the OVS with ovs-ofctl del-flows.So, after that I cannot have pings between the machines. As a note, POX clears the tables as soon as switches connect by default. After that I run the pox controller with the module of l2_learning, so I have new flows and I have pings. How can I check the flows that are now added in the flow table? If you want to do it from within POX, send a flow stats request. There's some info on the POX manual wiki: https://openflow.stanford.edu/display/ONL/POX+Wiki#POXWiki-Example-WebFlowStatistics That example filters them to only show ones on port 80, but obviously you don't have to do that. There's also a further example in the third party section. And POXDesk does this and displays them. If you want to do it from the commandline, look into ovs-ofctl. (Something like ovs-ofctl show switch-name.) I stop the POX controller and I still have pings,which means that the flows are somewhere saved. I need to check this flows and furthermore to modify them. Sure. By default, nothing in POX uninstalls them when it shuts down (though you could make this happen). If I recall correctly, all the ones from l2_learning have timeouts, so they'll expire eventually, but they'll stick around until then. As mentioned above, look into ovs-ofctl. And also ovs-dpctl. Or write a POX component to modify them how you want! -- Murphy 2013/4/16 Kouvakas Alexandros questa...@gmail.com Hi, it's a bit irrelevant with pox mailing list but do you know how can I create an overlay network with one node running OVS and some hosts that are connected to the OVS through a subnet (let's say 192.168.3.1/24) without running OVS on them. I mean, can I substitute the tunnel from the host to the OVS
[pox-dev] Delete flows from queue when its full
Hello Everybody, I am working on queues in OVS and using POX controller. I have created queues in OVS and am assigning flows to Queues via POX controller. I can delete flows from OVS manually but I want to do is dynamically delete flows from queue, so that controller tells OVS to delete specific flow from queue when its full and how can we check that whether queue is full or not? Is there any technique to do this? As far as I searched, I didn't find any such thing on Internet. -- *Regards Sayed Qaiser Ali Shah MSIT-12 NUST (SEECS)*
[pox-dev] setting link options
Hi all! I would like to set a link some options (bandwidth), on one of my topos. I tried it the way is shown in the corresponding mininet API example: https://github.com/mininet/mininet/blob/master/examples/simpleperf.py#L30 I am making a simple custom topology, not using the API. But it won't work for me. The error message i got: unexpected keyword argument 'bw' The implementation of addLink() (in mininet.topo.Topo.addLink) says: def addLink(self, node1, node2, port1=None, port2=None, **opts) Although, I am not sure, I fully understand how this **arg function parameter works in Python. thanks for your time, Balázs
Re: [pox-dev] setting link options
Where is your code? But let me guess you want to pass the arguments straight to addLink?Did you try handling the arguments before handing them over to addLink? Sent on the move.From: Balázs NémethSent: Friday, May 3, 2013 6:11 AMTo: pox-dev@QSubject: [pox-dev] setting link optionsHi all!I would like to set a link some options (bandwidth), on one of my topos.I tried it the way is shown in the corresponding mininet API example: https://github.com/mininet/mininet/blob/master/examples/simpleperf.py#L30I am making a simple custom topology, not using the API. But it won't work for me. The error message i got: unexpected keyword argument 'bw'The implementation of addLink() (in mininet.topo.Topo.addLink) says:def addLink(self, node1, node2, port1=None, port2=None, **opts) Although, I am not sure, I fully understand how this "**arg" function parameter works in Python.thanks for your time,Balázs
[pox-dev] query from sqlalchemy returns AttributeError: 'NoneType' object
Hi I have a funciton act_like_switch defined below. def act_like_switch (self, packet, packet_in): Implement switch-like behavior. # Learn the port for the source MAC #print RECIEVED FROM PORT ,packet_in.in_port , SOURCE ,packet.src # create a Session #Session = sessionmaker(bind=engine) #session = Session() self.mac_to_port[packet.src]=packet_in.in_port #if self.mac_to_port.get(packet.dst)!=None: #print count for dst,session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).count(),str(packet.dst) #if session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).count(): if session.query(exists().where(SourcetoPort.src_address == str(packet.dst))).scalar() is not None: #send this packet print got info from the database q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).first() self.send_packet(packet_in.buffer_id, packet_in.data,q_res.port_no, packet_in.in_port) #create a flow modification message msg = of.ofp_flow_mod() #set the fields to match from the incoming packet msg.match = of.ofp_match.from_packet(packet) #send the rule to the switch so that it does not query the controller again. msg.actions.append(of.ofp_action_output(port=q_res.port_no)) #push the rule self.connection.send(msg) else: #flood this packet out as we don't know about this node. print flooding the first packet self.send_packet(packet_in.buffer_id, packet_in.data, of.OFPP_FLOOD, packet_in.in_port) #self.matrix[(packet.src,packet.dst)]+=1 entry = SourcetoPort(src_address=str(packet.src) , port_no=packet_in.in_port) #add the record to the session object session.add(entry) #add the record to the session object session.commit() I am first checking if the specified mac address exists in the database if session.query(exists().where(SourcetoPort.src_address == str(packet.dst))).scalar() is not None: If it does I am doing a query to retrieve the information as below. q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).first() self.send_packet(packet_in.buffer_id, packet_in.data,q_res.port_no, packet_in.in_port) for some reason query is returning a none object.I don't know why after the if condition above succeeds.Any help is appreciated. Regards, Karthik.
Re: [pox-dev] Delete flows from queue when its full
It sounds like you're talking about monitoring and manipulating the contents of queues, which is a very fine-grained operation that must operate at very small timescales. This isn't addressed by OpenFlow and probably isn't suitable for a remote controller. OpenFlow allows for assigning packets from a flow to a specific queue -- once they're past that point, they're out of OpenFlow's hands. I don't think OVS provides anything beyond that. You may be able to achieve what you want by assigning flows to queues intelligently (e.g., put the things you may want to drop into a lower priority queue). If not, what you want to do is modify the queuing code (e.g., either in the Linux kernel or by using something like Click). -- Murphy On May 2, 2013, at 11:12 AM, Sayed Qaiser Ali Shah Shah wrote: Hello Everybody, I am working on queues in OVS and using POX controller. I have created queues in OVS and am assigning flows to Queues via POX controller. I can delete flows from OVS manually but I want to do is dynamically delete flows from queue, so that controller tells OVS to delete specific flow from queue when its full and how can we check that whether queue is full or not? Is there any technique to do this? As far as I searched, I didn't find any such thing on Internet. -- Regards Sayed Qaiser Ali Shah MSIT-12 NUST (SEECS)
Re: [pox-dev] setting link options
Just as a quick sanity check -- are you sure you're running the right version of Mininet (or at least the latest one)? You may also find more help on the Mininet mailing list. There's obviously crossover in users between the two, but this question isn't actually about POX and is about Mininet. -- Murphy On May 2, 2013, at 3:11 PM, Balázs Németh wrote: Hi all! I would like to set a link some options (bandwidth), on one of my topos. I tried it the way is shown in the corresponding mininet API example: https://github.com/mininet/mininet/blob/master/examples/simpleperf.py#L30 I am making a simple custom topology, not using the API. But it won't work for me. The error message i got: unexpected keyword argument 'bw' The implementation of addLink() (in mininet.topo.Topo.addLink) says: def addLink(self, node1, node2, port1=None, port2=None, **opts) Although, I am not sure, I fully understand how this **arg function parameter works in Python. thanks for your time, Balázs
Re: [pox-dev] Delete flows from queue when its full
Thanks for your reply. So, is it possible to delete flow entries from OVS flow table when it reached some limit by sending some sort of command from POX controller? On Fri, May 3, 2013 at 3:32 AM, Murphy McCauley murphy.mccau...@gmail.comwrote: It sounds like you're talking about monitoring and manipulating the contents of queues, which is a very fine-grained operation that must operate at very small timescales. This isn't addressed by OpenFlow and probably isn't suitable for a remote controller. OpenFlow allows for assigning packets from a flow to a specific queue -- once they're past that point, they're out of OpenFlow's hands. I don't think OVS provides anything beyond that. You may be able to achieve what you want by assigning flows to queues intelligently (e.g., put the things you may want to drop into a lower priority queue). If not, what you want to do is modify the queuing code (e.g., either in the Linux kernel or by using something like Click). -- Murphy On May 2, 2013, at 11:12 AM, Sayed Qaiser Ali Shah Shah wrote: Hello Everybody, I am working on queues in OVS and using POX controller. I have created queues in OVS and am assigning flows to Queues via POX controller. I can delete flows from OVS manually but I want to do is dynamically delete flows from queue, so that controller tells OVS to delete specific flow from queue when its full and how can we check that whether queue is full or not? Is there any technique to do this? As far as I searched, I didn't find any such thing on Internet. -- *Regards Sayed Qaiser Ali Shah MSIT-12 NUST (SEECS)* -- *Regards Sayed Qaiser Ali Shah MSIT-12 NUST (SEECS)*
Re: [pox-dev] query from sqlalchemy returns AttributeError: 'NoneType' object
You do... session.query(exists().where(SourcetoPort.src_address == str(packet.dst))).scalar() Do exists() queries always return true or false? In that case, your if statement would ALWAYS be true. On the other hand, if dropping the exists... session.query(where(SourcetoPort.src_address == str(packet.dst))).scalar() .. would return None if there were no matches, then it seems like this would work. More generally, it seems like your two queries are almost equivalent. Why do both? Why not just something like... q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).first() if q_res is not None: self.send_packet(packet_in.buffer_id, packet_in.data,q_res.port_no, packet_in.in_port) ... ? For that matter, why not try printing out the results of both queries before the if statement and see if they're the same or not? Good luck. -- Murphy On May 2, 2013, at 3:27 PM, Karthik Sharma wrote: Hi I have a funciton act_like_switch defined below. def act_like_switch (self, packet, packet_in): Implement switch-like behavior. # Learn the port for the source MAC #print RECIEVED FROM PORT ,packet_in.in_port , SOURCE ,packet.src # create a Session #Session = sessionmaker(bind=engine) #session = Session() self.mac_to_port[packet.src]=packet_in.in_port #if self.mac_to_port.get(packet.dst)!=None: #print count for dst,session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).count(),str(packet.dst) #if session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).count(): if session.query(exists().where(SourcetoPort.src_address == str(packet.dst))).scalar() is not None: #send this packet print got info from the database q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).first() self.send_packet(packet_in.buffer_id, packet_in.data,q_res.port_no, packet_in.in_port) #create a flow modification message msg = of.ofp_flow_mod() #set the fields to match from the incoming packet msg.match = of.ofp_match.from_packet(packet) #send the rule to the switch so that it does not query the controller again. msg.actions.append(of.ofp_action_output(port=q_res.port_no)) #push the rule self.connection.send(msg) else: #flood this packet out as we don't know about this node. print flooding the first packet self.send_packet(packet_in.buffer_id, packet_in.data, of.OFPP_FLOOD, packet_in.in_port) #self.matrix[(packet.src,packet.dst)]+=1 entry = SourcetoPort(src_address=str(packet.src) , port_no=packet_in.in_port) #add the record to the session object session.add(entry) #add the record to the session object session.commit() I am first checking if the specified mac address exists in the database if session.query(exists().where(SourcetoPort.src_address == str(packet.dst))).scalar() is not None: If it does I am doing a query to retrieve the information as below. q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).first() self.send_packet(packet_in.buffer_id, packet_in.data,q_res.port_no, packet_in.in_port) for some reason query is returning a none object.I don't know why after the if condition above succeeds.Any help is appreciated. Regards, Karthik.
Re: [pox-dev] Delete flows from queue when its full
On May 2, 2013, at 3:52 PM, Sayed Qaiser Ali Shah Shah wrote: Thanks for your reply. So, is it possible to delete flow entries from OVS flow table when it reached some limit by sending some sort of command from POX controller? When what reaches a limit? The flow table size? Or are you still talking about queues? If you mean queues, the answer is no. OVS and OpenFlow are not meant for queue manipulation. -- Murphy On Fri, May 3, 2013 at 3:32 AM, Murphy McCauley murphy.mccau...@gmail.com wrote: It sounds like you're talking about monitoring and manipulating the contents of queues, which is a very fine-grained operation that must operate at very small timescales. This isn't addressed by OpenFlow and probably isn't suitable for a remote controller. OpenFlow allows for assigning packets from a flow to a specific queue -- once they're past that point, they're out of OpenFlow's hands. I don't think OVS provides anything beyond that. You may be able to achieve what you want by assigning flows to queues intelligently (e.g., put the things you may want to drop into a lower priority queue). If not, what you want to do is modify the queuing code (e.g., either in the Linux kernel or by using something like Click). -- Murphy On May 2, 2013, at 11:12 AM, Sayed Qaiser Ali Shah Shah wrote: Hello Everybody, I am working on queues in OVS and using POX controller. I have created queues in OVS and am assigning flows to Queues via POX controller. I can delete flows from OVS manually but I want to do is dynamically delete flows from queue, so that controller tells OVS to delete specific flow from queue when its full and how can we check that whether queue is full or not? Is there any technique to do this? As far as I searched, I didn't find any such thing on Internet. -- Regards Sayed Qaiser Ali Shah MSIT-12 NUST (SEECS) -- Regards Sayed Qaiser Ali Shah MSIT-12 NUST (SEECS)
Re: [pox-dev] POX TCPTransport
In a couple weeks if y'all want to ping me on this issue, maybe I can put together a helpful example. -- Murphy On May 1, 2013, at 11:43 AM, kk yap wrote: Hi Igor, (cc-ing pox-dev) I did not have much luck reusing the select loop in POX. I ended up (in my mind) with the worst option possible. I essentially run my own select loop and raises events using POX. Unfortunately, I don't have the time to dig deeper into this to make it cleaner. FYI. Regards KK On 1 May 2013 10:44, Igor Ryzhov idryz...@gmail.com wrote: Hello! I was searching anything about POX Messenger in pox-dev mailing list archive and I found your conversation with Murphy. I want to do the same thing as you - sending binary messages. Did you try to use suggested solutions? And do you have any success? Best regards, Igor Ryzhov
Re: [pox-dev] Delete flows from queue when its full
No no, I got you point regarding queues. I am talking about flow entries in flow table e.g lets say that flow entries reach 40 then is there anyway to delete entries from flow table by sending some sort of command from remote controller. and how that command should be initiated? On Fri, May 3, 2013 at 3:58 AM, Murphy McCauley murphy.mccau...@gmail.comwrote: On May 2, 2013, at 3:52 PM, Sayed Qaiser Ali Shah Shah wrote: Thanks for your reply. So, is it possible to delete flow entries from OVS flow table when it reached some limit by sending some sort of command from POX controller? When what reaches a limit? The flow table size? Or are you still talking about queues? If you mean queues, the answer is no. OVS and OpenFlow are not meant for queue manipulation. -- Murphy On Fri, May 3, 2013 at 3:32 AM, Murphy McCauley murphy.mccau...@gmail.com wrote: It sounds like you're talking about monitoring and manipulating the contents of queues, which is a very fine-grained operation that must operate at very small timescales. This isn't addressed by OpenFlow and probably isn't suitable for a remote controller. OpenFlow allows for assigning packets from a flow to a specific queue -- once they're past that point, they're out of OpenFlow's hands. I don't think OVS provides anything beyond that. You may be able to achieve what you want by assigning flows to queues intelligently (e.g., put the things you may want to drop into a lower priority queue). If not, what you want to do is modify the queuing code (e.g., either in the Linux kernel or by using something like Click). -- Murphy On May 2, 2013, at 11:12 AM, Sayed Qaiser Ali Shah Shah wrote: Hello Everybody, I am working on queues in OVS and using POX controller. I have created queues in OVS and am assigning flows to Queues via POX controller. I can delete flows from OVS manually but I want to do is dynamically delete flows from queue, so that controller tells OVS to delete specific flow from queue when its full and how can we check that whether queue is full or not? Is there any technique to do this? As far as I searched, I didn't find any such thing on Internet. -- *Regards Sayed Qaiser Ali Shah MSIT-12 NUST (SEECS)* -- *Regards Sayed Qaiser Ali Shah MSIT-12 NUST (SEECS)* -- *Regards Sayed Qaiser Ali Shah MSIT-12 NUST (SEECS)*
[pox-dev] Configuration and communication problems
Hi all, The last weeks I been having this problem and I don't know how to fix it. I been trying to emulate an openflow switch in a PC with Ubuntu 12.04, this pc has three NIC with this configuration: eth0 Link encap:Ethernet direcciónHW 00:14:22:4b:5e:60 Direc. inet:192.168.0.1 Difus.:192.168.0.255 Másc:255.255.255.0 ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST MTU:1500 Métrica:1 Paquetes RX:0 errores:0 perdidos:0 overruns:0 frame:0 Paquetes TX:11 errores:0 perdidos:0 overruns:0 carrier:0 colisiones:0 long.colaTX:1000 Bytes RX:0 (0.0 B) TX bytes:812 (812.0 B) Interrupción:16 eth1 Link encap:Ethernet direcciónHW 00:50:8b:5a:89:83 Direc. inet:10.0.0.1 Difus.:10.0.0.255 Másc:255.255.255.0 ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST MTU:1500 Métrica:1 Paquetes RX:0 errores:0 perdidos:0 overruns:0 frame:0 Paquetes TX:11 errores:0 perdidos:0 overruns:0 carrier:0 colisiones:0 long.colaTX:1000 Bytes RX:0 (0.0 B) TX bytes:758 (758.0 B) eth2 Link encap:Ethernet direcciónHW 00:50:04:9d:16:db Direc. inet:10.0.1.1 Difus.:10.0.1.255 Másc:255.255.255.0 ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST MTU:1500 Métrica:1 Paquetes RX:0 errores:0 perdidos:0 overruns:0 frame:0 Paquetes TX:11 errores:0 perdidos:0 overruns:0 carrier:0 colisiones:0 long.colaTX:1000 Bytes RX:0 (0.0 B) TX bytes:768 (768.0 B) Interrupción:18 Dirección base: 0x4f80 First I did this: ./utilities/ovs-vsctl add-br br0./utilities/ovs-vsctl add-port br0 eth1 -- set interface eth1 type=system./utilities/ovs-vsctl add-port br0 eth2 -- set interface eth2 type=system./utilities/ovs-vsctl set-controller br0 tcp:192.168.0.100:6633 ovs-vsctl show d9a1d7af-d62a-4a9a-a56b-3739dacea4f9 Bridge br0 Controller tcp:192.168.0.100:6633 Port eth2 Interface eth2 type: system Port br0 Interface br0 type: internal Port eth1 Interface eth1 type: system And on the pox controller I got this response when I ping between hosts: ./pox.py log.level --DEBUG forwarding.l2_learning POX 0.1.0 (betta) / Copyright 2011-2013 James McCauley, et al. DEBUG:forwarding.l2_learning:Starts l2 learning DEBUG:core:POX 0.1.0 (betta) going up... DEBUG:core:Running on CPython (2.7.3/Aug 1 2012 05:16:07) DEBUG:core:Platform is Linux-3.2.0-39-generic-pae-i686-with-Ubuntu-12.04-precise 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-50-04-9d-16-db 1] connected DEBUG:forwarding.l2_learning:Connection [00-50-04-9d-16-db 1] DEBUG:forwarding.l2_learning:Initializing LearningSwitch, transparent=False DEBUG:forwarding.l2_learning:343674787547: flood 00:14:22:46:af:30 - ff:ff:ff:ff:ff:ff DEBUG:forwarding.l2_learning:343674787547: flood 00:14:22:46:af:30 - ff:ff:ff:ff:ff:ff DEBUG:forwarding.l2_learning:343674787547: flood 00:14:22:46:af:30 - ff:ff:ff:ff:ff:ff Non connection between the hosts (each host is connected to the switch by a NIC):host 1 --- eth1host 2 --- eth2 Then I made some changes: ./utilities/ovs-vsctl add-br br0./utilities/ovs-vsctl add-port br0 eth0./utilities/ovs-vsctl add-port br0 eth1 -- set interface eth1 type=system./utilities/ovs-vsctl add-port br0 eth2 -- set interface eth2 type=system./utilities/ovs-vsctl set-controller br0 tcp:192.168.0.100:6633 ovs-vsctl show d9a1d7af-d62a-4a9a-a56b-3739dacea4f9 Bridge br0 Controller tcp:192.168.0.100:6633 Port br0 Interface br0 type: internal Port eth1 Interface eth1 type: system Port eth0 Interface eth0 Port eth2 Interface eth2 type: system And change the ip between the br0 and the eth0 (which is the one connected to the controller):ifconfig eth0 0; ifconfig br0 192.168.0.1 netmask 255.255.255.0 And got this on the controller: ./pox.py log.level --DEBUG forwarding.l2_learning POX 0.1.0 (betta) / Copyright 2011-2013 James McCauley, et al. DEBUG:forwarding.l2_learning:Starts l2 learning DEBUG:core:POX 0.1.0 (betta) going up... DEBUG:core:Running on CPython (2.7.3/Aug 1 2012 05:16:07) DEBUG:core:Platform is Linux-3.2.0-39-generic-pae-i686-with-Ubuntu-12.04-precise 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-14-22-4b-5e-60 1] connected DEBUG:forwarding.l2_learning:Connection [00-14-22-4b-5e-60 1] DEBUG:forwarding.l2_learning:Initializing LearningSwitch, transparent=False WARNING:forwarding.l2_learning:Same port for packet from 00:0c:ce:1f:10:1d - 00:0c:ce:1f:10:1d on 00-14-22-4b-5e-60.2. Drop. DEBUG:forwarding.l2_learning:86474710624: flood 00:0c:ce:1f:10:1d -
Re: [pox-dev] [ovs-discuss] Configuration and communication problems
On Thu, May 02, 2013 at 08:14:27PM -0300, Mayumi Park Campos wrote: I alreday debug and the problem is in the ovs, I know is the configuration but I don't know what I could do to make it right? You asked essentially the same question a few days ago. I gave you some advice but I don't see any evidence that you followed it.
Re: [pox-dev] h1 ping h3 from mininet via POX controller not working as expected.
Ping sends packets from A to B, and B sends them back to A. Ping does this continually until you stop it unless you specify a limit on the commandline. Since you're installing flows, you'd actually expect them to start hitting the flow table and stop hitting the switch, but the fewest you could probably expect to see at the controller in that case is still three. -- Murphy On May 2, 2013, at 9:48 PM, Karthik Sharma wrote: I have mininet configured with a remote POX controller running.The configuration of mininet network is as shown below h1 (eth0) --- s2(eth1) s2(eth2) -- h3(eth0) where h1: eth0 is ca:bc:2e:0c:5a:52 h2: eth0 is 0a:79:40:89:44:cf The packet handling function in the POX network controller that gets called whenever a packet is forwarded to the controller is given below.The basic idea is that I use a database backed controller.If the packet destination address is not present in the database,I flood the packet.else I forward the packet to the appropriate port. def act_like_switch (self, packet, packet_in): Implement switch-like behavior. # Learn the port for the source MAC print RECIEVED FROM PORT ,packet_in.in_port , SOURCE ,packet.src ,DEST , packet.dst self.mac_to_port[packet.src]=packet_in.in_port q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).first() if q_res is not None: self.send_packet(packet_in.buffer_id, packet_in.data,q_res.port_no, packet_in.in_port) #create a flow modification message msg = of.ofp_flow_mod() #set the fields to match from the incoming packet msg.match = of.ofp_match.from_packet(packet) #send the rule to the switch so that it does not query the controller again. msg.actions.append(of.ofp_action_output(port=q_res.port_no)) #push the rule self.connection.send(msg) else: #flood this packet out as we don't know about this node. self.send_packet(packet_in.buffer_id, packet_in.data,of.OFPP_FLOOD, packet_in.in_port) q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.src)).first() if q_res is None: entry = SourcetoPort(src_address=str(packet.src) , port_no=packet_in.in_port) #add the record to the session object session.add(entry) #add the record to the session object session.commit() As mentioned above this function is running on a remote POX controller connected to the described mininet network.Now I do mininet h1 ping h3 The output that I get is as follows.I have put print statements in the beginning of act_like_switch() function. RECIEVED FROM PORT 1 SOURCE ca:bc:2e:0c:5a:52 DEST 0a:79:40:89:44:cf RECIEVED FROM PORT 2 SOURCE 0a:79:40:89:44:cf DEST ca:bc:2e:0c:5a:52 RECIEVED FROM PORT 1 SOURCE ca:bc:2e:0c:5a:52 DEST 0a:79:40:89:44:cf RECIEVED FROM PORT 2 SOURCE 0a:79:40:89:44:cf DEST ca:bc:2e:0c:5a:52 It seems that there are two ICMP messages from h1 to h2 and two ICMP messages from h2 to h1. I would expect only 1 ICMP message from host h1 to h2.Why are there so many messages.I did think of broadcast but why is the destination address not ff:ff:ff:ff:ff:ff ? The source and destination addresses seems to be swapped? Can anyone explain why this is happening? I am fairly new to POX and mininet Regards, Karthik
Re: [pox-dev] h1 ping h3 from mininet via POX controller not working as expected.
sorry I had added a -c1 at the end of the command. mininet h1 ping h3 On 3 May 2013 17:16, Murphy McCauley murphy.mccau...@gmail.com wrote: Ping sends packets from A to B, and B sends them back to A. Ping does this continually until you stop it unless you specify a limit on the commandline. Since you're installing flows, you'd actually expect them to start hitting the flow table and stop hitting the switch, but the fewest you could probably expect to see at the controller in that case is still three. -- Murphy On May 2, 2013, at 9:48 PM, Karthik Sharma wrote: I have mininet configured with a remote POX controller running.The configuration of mininet network is as shown below h1 (eth0) --- s2(eth1) s2(eth2) -- h3(eth0) where h1: eth0 is ca:bc:2e:0c:5a:52 h2: eth0 is 0a:79:40:89:44:cf The packet handling function in the POX network controller that gets called whenever a packet is forwarded to the controller is given below.The basic idea is that I use a database backed controller.If the packet destination address is not present in the database,I flood the packet.else I forward the packet to the appropriate port. def act_like_switch (self, packet, packet_in): Implement switch-like behavior. # Learn the port for the source MAC print RECIEVED FROM PORT ,packet_in.in_port , SOURCE ,packet.src ,DEST , packet.dst self.mac_to_port[packet.src]=packet_in.in_port q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).first() if q_res is not None: self.send_packet(packet_in.buffer_id, packet_in.data,q_res.port_no, packet_in.in_port) #create a flow modification message msg = of.ofp_flow_mod() #set the fields to match from the incoming packet msg.match = of.ofp_match.from_packet(packet) #send the rule to the switch so that it does not query the controller again. msg.actions.append(of.ofp_action_output(port=q_res.port_no)) #push the rule self.connection.send(msg) else: #flood this packet out as we don't know about this node. self.send_packet(packet_in.buffer_id, packet_in.data,of.OFPP_FLOOD, packet_in.in_port) q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.src)).first() if q_res is None: entry = SourcetoPort(src_address=str(packet.src) , port_no=packet_in.in_port) #add the record to the session object session.add(entry) #add the record to the session object session.commit() As mentioned above this function is running on a remote POX controller connected to the described mininet network.Now I do mininet h1 ping h3 The output that I get is as follows.I have put print statements in the beginning of act_like_switch() function. RECIEVED FROM PORT 1 SOURCE ca:bc:2e:0c:5a:52 DEST 0a:79:40:89:44:cf RECIEVED FROM PORT 2 SOURCE 0a:79:40:89:44:cf DEST ca:bc:2e:0c:5a:52 RECIEVED FROM PORT 1 SOURCE ca:bc:2e:0c:5a:52 DEST 0a:79:40:89:44:cf RECIEVED FROM PORT 2 SOURCE 0a:79:40:89:44:cf DEST ca:bc:2e:0c:5a:52 It seems that there are two ICMP messages from h1 to h2 and two ICMP messages from h2 to h1. I would expect only 1 ICMP message from host h1 to h2.Why are there so many messages.I did think of broadcast but why is the destination address not ff:ff:ff:ff:ff:ff ? The source and destination addresses seems to be swapped? Can anyone explain why this is happening? I am fairly new to POX and mininet Regards, Karthik
Re: [pox-dev] h1 ping h3 from mininet via POX controller not working as expected.
I'd suggest you look at the packets. There's a packet dump app in POX, or you could use wireshark on the control channel (and/or on one of the host interfaces). Though you should still see at least two (the ping and the pong). -- Murphy On May 2, 2013, at 10:23 PM, Karthik Sharma wrote: sorry I had added a -c1 at the end of the command. mininet h1 ping h3 On 3 May 2013 17:16, Murphy McCauley murphy.mccau...@gmail.com wrote: Ping sends packets from A to B, and B sends them back to A. Ping does this continually until you stop it unless you specify a limit on the commandline. Since you're installing flows, you'd actually expect them to start hitting the flow table and stop hitting the switch, but the fewest you could probably expect to see at the controller in that case is still three. -- Murphy On May 2, 2013, at 9:48 PM, Karthik Sharma wrote: I have mininet configured with a remote POX controller running.The configuration of mininet network is as shown below h1 (eth0) --- s2(eth1) s2(eth2) -- h3(eth0) where h1: eth0 is ca:bc:2e:0c:5a:52 h2: eth0 is 0a:79:40:89:44:cf The packet handling function in the POX network controller that gets called whenever a packet is forwarded to the controller is given below.The basic idea is that I use a database backed controller.If the packet destination address is not present in the database,I flood the packet.else I forward the packet to the appropriate port. def act_like_switch (self, packet, packet_in): Implement switch-like behavior. # Learn the port for the source MAC print RECIEVED FROM PORT ,packet_in.in_port , SOURCE ,packet.src ,DEST , packet.dst self.mac_to_port[packet.src]=packet_in.in_port q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.dst)).first() if q_res is not None: self.send_packet(packet_in.buffer_id, packet_in.data,q_res.port_no, packet_in.in_port) #create a flow modification message msg = of.ofp_flow_mod() #set the fields to match from the incoming packet msg.match = of.ofp_match.from_packet(packet) #send the rule to the switch so that it does not query the controller again. msg.actions.append(of.ofp_action_output(port=q_res.port_no)) #push the rule self.connection.send(msg) else: #flood this packet out as we don't know about this node. self.send_packet(packet_in.buffer_id, packet_in.data,of.OFPP_FLOOD, packet_in.in_port) q_res = session.query(SourcetoPort).filter_by(src_address=str(packet.src)).first() if q_res is None: entry = SourcetoPort(src_address=str(packet.src) , port_no=packet_in.in_port) #add the record to the session object session.add(entry) #add the record to the session object session.commit() As mentioned above this function is running on a remote POX controller connected to the described mininet network.Now I do mininet h1 ping h3 The output that I get is as follows.I have put print statements in the beginning of act_like_switch() function. RECIEVED FROM PORT 1 SOURCE ca:bc:2e:0c:5a:52 DEST 0a:79:40:89:44:cf RECIEVED FROM PORT 2 SOURCE 0a:79:40:89:44:cf DEST ca:bc:2e:0c:5a:52 RECIEVED FROM PORT 1 SOURCE ca:bc:2e:0c:5a:52 DEST 0a:79:40:89:44:cf RECIEVED FROM PORT 2 SOURCE 0a:79:40:89:44:cf DEST ca:bc:2e:0c:5a:52 It seems that there are two ICMP messages from h1 to h2 and two ICMP messages from h2 to h1. I would expect only 1 ICMP message from host h1 to h2.Why are there so many messages.I did think of broadcast but why is the destination address not ff:ff:ff:ff:ff:ff ? The source and destination addresses seems to be swapped? Can anyone explain why this is happening? I am fairly new to POX and mininet Regards, Karthik