Re: [nox-dev] command to drop the packet
Hi Murphy, If i do not send any reply to openflow switch then what would happen to the packet which is waiting in openflow switch buffer id () for controller response. I guess that the packets which are not completely send to controller, just wait for controller reply. May be after some timeout, openflow switch may drop the packet (from buffer) by default but this may give chance to buffer becoming full. Is this true in this context? thanks, --- On Thu, 22/9/11, Murphy McCauley wrote: From: Murphy McCauley Subject: Re: [nox-dev] command to drop the packet To: "sachin sharma" Cc: nox-dev@noxrepo.org Date: Thursday, 22 September, 2011, 3:18 PM OpenFlow switches do not forward by default, so to drop a packet, you simply don't forward it -- don't call send_openflow_packet() at all. Of course, this assumes you don't have a flow table entry that says to forward it already installed. If you do have such a rule, there's nothing you can do to stop an individual packet from being forwarded -- you'd have to uninstall the entry. -- Murphy On Sep 22, 2011, at 1:47 AM, sachin sharma wrote: Hi, I am interested to drop the packet from a particular buffer id. I found calling of following function from nox could help me in sending a command to openflow switch. send_openflow_packet(pi.datapath_id, buffer_id, action, pi.in_port, true); I do not know what to write in place of action, I know in case of flooding i should write "action = OFPP_FLOOD". Can anyone please suggest me in this regards? Thanks & Regards, Sachin Sharma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] command to drop the packet
Hi, I am interested to drop the packet from a particular buffer id. I found calling of following function from nox could help me in sending a command to openflow switch. send_openflow_packet(pi.datapath_id, buffer_id, action, pi.in_port, true); I do not know what to write in place of action, I know in case of flooding i should write "action = OFPP_FLOOD". Can anyone please suggest me in this regards? Thanks & Regards, Sachin Sharma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Which NOX module should be used for wireless networks testing
Hi,I had tried integrate this STP implementation in NOX version 0.9 (Zaku) which is compatible with openflow 1.0. But could not because the structure of xml file etc are different, which i could not understand that how to integrate it. But I was successful in integrating that in 0.5 version. I did not test this STP with routing module but i have gone through the code and read this release. and found that this STP release creates the spanning tree for OFP_FLOOD packets. As i understood from the routing module code, it does not send this packet for searching the unknown destintation. It searches by explicitly sending the packet to each and every output port except incoming port.However if this spanning tree implementation takes care above to create loop free environment, than may be this implementation is also able to recover from loops. (but i m not sure about that) Thanks,Sachin--- On Thu, 14/4/11, Kyriakos Zarifis wrote: From: Kyriakos Zarifis Subject: Re: [nox-dev] Which NOX module should be used for wireless networks testing To: "sachin sharma" Cc: "James Murphy McCauley" , nox-dev@noxrepo.org Date: Thursday, 14 April, 2011, 1:38 AM Hey Sachin do you know why this STP module would not work with zaku? I'm asking because I have actually used it (not too thoroughly to be honest) and didn't immediately see any issues. Is it the fact that routing does not use OFP_FLOOD, so it wouldn't work with routing, or is it an issue with the STP module itself? On Wed, Apr 13, 2011 at 1:00 PM, sachin sharma wrote: Hi Murphy, I know this basic spanning tree implementation but this is only compatible with NOX version 0.5. I am using openflow version 1.0 in openwrt linux which does not support 0.5 version. So. do u have a spanning tree implementation which is compatible with the NOX supporting openflow version 1.0 I have one doubt that whether routing loops (Routing Module at NOX) can be prevented by this implementation. Because routing module does not flood the packets by (OFP_FLOOD) but it transmits the packet to each and every port except incoming port explicitly when it does not know the destination. thanks,Sachin --- On Thu, 14/4/11, James "Murphy" McCauley wrote: From: James "Murphy" McCauley Subject: Re: [nox-dev] Which NOX module should be used for wireless networks testing To: "sachin sharma" Cc: nox-dev@noxrepo.org Date: Thursday, 14 April, 2011, 1:07 AM You might want to take a look at the spanning_tree component: http://www.openflow.org/wk/index.php/Basic_Spanning_Tree -- Murphy On Thu, 2011-04-14 at 01:01 +0530, sachin sharma wrote: > > > Hi, > > > I am interested to test openflow in wireless networks where loops are > present in topology. I have tested openflow in wired network where i > found that loops in topology prevent openflow to work properly. > However, this problem can be solved if switch itself has STP > implemented. > > > > > But now I am interested to measure OpenFlow performance in wireless > network such that loop problem should not occur. I am actually > interested in OLSR/DSDV like protocol. > > > I think, I can not use routing (implemented in NOX) as when topology > module does not know about the destination. packet is transmitted to > each and every port except incoming port. This give rise to problem of > looping. > > > I cannot use MAC learning also because it does flooding where there is > also a chances of looping. > > > So, what to use? > > > Can you please suggest me that which NOX module I should use for this > testing. > > > > > Thanks in replying, > Sachin > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Which NOX module should be used for wireless networks testing
Hi Murphy,I know this basic spanning tree implementation but this is only compatible with NOX version 0.5. I am using openflow version 1.0 in openwrt linux which does not support 0.5 version. So. do u have a spanning tree implementation which is compatible with the NOX supporting openflow version 1.0 I have one doubt that whether routing loops (Routing Module at NOX) can be prevented by this implementation. Because routing module does not flood the packets by (OFP_FLOOD) but it transmits the packet to each and every port except incoming port explicitly when it does not know the destination. thanks,Sachin --- On Thu, 14/4/11, James "Murphy" McCauley wrote: From: James "Murphy" McCauley Subject: Re: [nox-dev] Which NOX module should be used for wireless networks testing To: "sachin sharma" Cc: nox-dev@noxrepo.org Date: Thursday, 14 April, 2011, 1:07 AM You might want to take a look at the spanning_tree component: http://www.openflow.org/wk/index.php/Basic_Spanning_Tree -- Murphy On Thu, 2011-04-14 at 01:01 +0530, sachin sharma wrote: > > > Hi, > > > I am interested to test openflow in wireless networks where loops are > present in topology. I have tested openflow in wired network where i > found that loops in topology prevent openflow to work properly. > However, this problem can be solved if switch itself has STP > implemented. > > > > > But now I am interested to measure OpenFlow performance in wireless > network such that loop problem should not occur. I am actually > interested in OLSR/DSDV like protocol. > > > I think, I can not use routing (implemented in NOX) as when topology > module does not know about the destination. packet is transmitted to > each and every port except incoming port. This give rise to problem of > looping. > > > I cannot use MAC learning also because it does flooding where there is > also a chances of looping. > > > So, what to use? > > > Can you please suggest me that which NOX module I should use for this > testing. > > > > > Thanks in replying, > Sachin > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] Which NOX module should be used for wireless networks testing
Hi, I am interested to test openflow in wireless networks where loops are present in topology. I have tested openflow in wired network where i found that loops in topology prevent openflow to work properly. However, this problem can be solved if switch itself has STP implemented. But now I am interested to measure OpenFlow performance in wireless network such that loop problem should not occur. I am actually interested in OLSR/DSDV like protocol. I think, I can not use routing (implemented in NOX) as when topology module does not know about the destination. packet is transmitted to each and every port except incoming port. This give rise to problem of looping. I cannot use MAC learning also because it does flooding where there is also a chances of looping. So, what to use? Can you please suggest me that which NOX module I should use for this testing. Thanks in replying,Sachin___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] Behaviour of Routing AI
Hi, I am examining routing AI of nox. My topology is A-B---C---D | | -E B, C and E are connected in a triangle fashion. Open flow software is installed in B, C and E. Every interface of B, C and E (triangle fasion interfaces) are added as a datapath interface of opoenflow. B, C and E are connected with one NOX. open flow software is not installed in A and D. A and D are client and server. Routing entry is added in A and D to reach each other. I am sending ping message from A to D. I also examine the flow entries added by nox. So, first, it searches the path to D by flooding the ARP messages. then accurate flow entries comes in each switch. Let the path taken by by the packet is ABCD then if I break the link between B and C. then path should switch to ABECD after hard timeout expires. But in this case, it is not switching after hard timeout. But it waits for end node A to restart ARP request when its base reachable time expires. So it again search the path by flooding the packet. I was thinking that path is available in topology database. and should switch to other path on link failure condition. But this is not happening. So, lots of packets drops in this link failure condition. And also i observe many prints in nox when i do link down and link up. for example received Openflow error packet from dpid=0023208006bd: type=1, code=7, 24 bytes of data Does routing AI just depends on end nodes to restart the recovery on link failure condition. Thanks, Sachin ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] working of switch api on link failure
Hi Srini, Thank you very much for the patch. Switch.cc implements L2 learning. But in this patch, action are taken on link failure. This does not match with MAC learning. The code of switch.cc works fine. But only the issue is that it does not implement aging timer. Aging timer is explained below: http://noxrepo.org/pipermail/nox-dev_noxrepo.org/2010-December/001845.html I think if we implement this then MAC learning code would work well for protection scenarios as well. So from my point of view, we should not take the action on link status change. The patch would work fine. But this could be a enhancement over MAC learning. Best Regards, Sachin Sharma From: Srini Seetharaman To: kk yap Cc: sachin sharma ; nox-dev@noxrepo.org Sent: Mon, 6 December, 2010 9:43:43 PM Subject: Re: [nox-dev] working of switch api on link failure > Pardon my laziness in not reading the patches. I am confused here. Two >points: > 1) Switch does not depend on topology or discovery, so how do you get > link failure? Oh, with switch, I use the port_status_change event and clear flow rules (and the archived Mac_source for the port). > 2) There is no spanning tree implementation in NOX (distributed by > default), i.e., you cannot have a redundant network with NOX. So, how > can you possibly hope to find the host on a different route when a > link failure occurs? On that note, why does handling link failure > even matters? If a silent host (connected to port X) had moved to port Y, then your table will still think the host is located on port X. Even if there existed a chance of reaching host thro' port Y, the controller won't really try that. ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] Aging Timer of MAC learning at NOX
Hi KK, Please correct me if I am wrong. The field you are talking about is idle_timeout. MAC logic implemented at switch.cc adds idle_timeout for each flow which is to be added through packet_out message sent to openflow switch. idle_timeout for a flow entry means that if openflow switch does not hear from that source about that flow before idle_timeout expires, openflow switch would remove the entry from the table. But I am talking about entries deletion from the Source_Table (sources) used by class Switch.cc. Entries from this datastructure never gets deleted. Entries are just modified if it receives the packet from different port. MAC Table in switch.cc is maintained by this (Source_Table). Thanks & Regards, Sachin Sharma From: kk yap To: sachin sharma Cc: nox-dev@noxrepo.org Sent: Sat, 4 December, 2010 7:25:04 PM Subject: Re: [nox-dev] Aging Timer of MAC learning at NOX Hi Sachin, Each flow in the OpenFlow table has an idle expiration time. So, the controller is exploiting that to implement the aging logic. Regards KK On 4 December 2010 07:21, sachin sharma wrote: > > Hi All, > > Aging timer Explanation: > When a bridge learns a source address, it time stamps the entry. Every time > the bridge sees a frame from that source, the bridge updates the timestamp. > If the bridge does not hear from that source before an aging time expires, > the bridge removes the entry from the table. > > I have gone through the MAC learning code of NOX at file > nox/build/src/nox/coreapps/switch/switch.cc. But coding of above > explanation is missing. Is there any other MAC learning api present at nox > which includes the aging timer expiration coding? > > Thanks & Regards, > Sachin Sharma > > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] Aging Timer of MAC learning at NOX
Hi All, Aging timer Explanation: When a bridge learns a source address, it time stamps the entry. Every time the bridge sees a frame from that source, the bridge updates the timestamp. If the bridge does not hear from that source before an aging time expires, the bridge removes the entry from the table. I have gone through the MAC learning code of NOX at file nox/build/src/nox/coreapps/switch/switch.cc. But coding of above explanation is missing. Is there any other MAC learning api present at nox which includes the aging timer expiration coding? Thanks & Regards, Sachin Sharma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] working of switch api on link failure
Hi, I have gone through the switch api of code at nox (/home/user/newnox/src/nox/coreapps/switch/switch.cc) but i do not find any action of switch on link failure. when i run nox with this switch api then flow entries are getting added in openvswitch. But when I make one of outgoing link down. then after some time, older flow entry gets vanishes and new flow entry is getting added in my flow table with available port. But new entry addition time is greater than flow expired time ( in my case it is 50 seconds). But I am not able to find the code in nox which does this action on link failure. Can anyone explain me that which part of code at nox is called when nox detects link failure on any datapath port. Thank You! Sachin Sharma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] State variable of ofp_phy_port on port status change
Hi Murphy, You were right!! I registered the port_status_event function in my coreapi and now all the values are printed correctly. Thank You! regards, Sachin Sharma From: Murphy McCauley To: sachin sharma Cc: nox-dev@noxrepo.org Sent: Thu, 25 November, 2010 8:32:56 AM Subject: Re: [nox-dev] State variable of ofp_phy_port on port status change handle_port_status in openflow-event.cc is an internal function, not a user-facing function. It is called with the data as it is read off the wire. On x86, this means that byte orders are wrong. The port number is a 16 bit value, so an 8 bit shift is exactly what you'd expect to see here, and the state field is a 32 bit value, so a 24 bit shift is exactly what you'd expect to see there. But you shouldn't really care what's going on in this internal function. If you register an event handler for port status events, the handler is called with a Port_status_event object as the parameter, and this object will contain a Port object, and the values in this should all be properly byteswapped. Print THOSE out, and you should get the values you're expecting. -- Murphy On Nov 24, 2010, at 5:44 AM, sachin sharma wrote: > Hi McCauley, > > First thanks for your concern. > > But this may not be byte order problem. Because other variables are not > shifted >by same patterns as the state variable. I found that state variable is left >shifted by 24 bit and port number is left shifted by 8 bit. For example if >port >number is 1 then nox will show it as 0x100 and if port number is 2 then nox >will >show it as 0x200 and so on. > > > I have printed these value at c++ code of nox. > > When there is change in port status then handle_port_status function is > called >from file nox/src/lib/openflow-event.cc. ofp_port_status *ops is present >there >as a function parameter. I have printed values of variables present in this >structure by using printf function available in stdio.h. > > Regards, > Sachin > > > > > From: Murphy McCauley > To: sachin sharma > Cc: nox-dev@noxrepo.org > Sent: Wed, 24 November, 2010 2:36:12 AM > Subject: Re: [nox-dev] State variable of ofp_phy_port on port status change > > This actually seems like it might be a byte order problem, though it's sort > of >hard to believe it would have slipped by until now, so I'm sort of surprised. > > Are you seeing this in C++ or in Python? On x86? Can you send some sample >code which shows the issue? > > -- Murphy > > On Nov 23, 2010, at 1:56 AM, sachin sharma wrote: > > > Hi All, > > > > I am using openvswitch-1.1.0pre2.tar.gz and nox version 0.6. I found that >when there is change in port status then openvswitch sends port status change >to >nox. I have printed the state and config variable of ofp_phy_port. and found >that when link is down then openvswitch sends "state =0x1" and when link is up >then it sends "state=0x0". I have read the openflow specification and found >that these values are correct according to link change. > > > > But when I printed these value at nox, I found different values of state >variable. When link is down then nox receives an event with "state=0x100" >and when link is up, nox receives "state=0x0". I suppose that someone is doing >left shift of this state variable. Am I right? If this is so, then why this >is >done? > > > > Thank You for reply, > > > > Regards, > > Sachin > > > > ___ > > nox-dev mailing list > > nox-dev@noxrepo.org > > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org > > > ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
Re: [nox-dev] State variable of ofp_phy_port on port status change
Hi McCauley, First thanks for your concern. But this may not be byte order problem. Because other variables are not shifted by same patterns as the state variable. I found that state variable is left shifted by 24 bit and port number is left shifted by 8 bit. For example if port number is 1 then nox will show it as 0x100 and if port number is 2 then nox will show it as 0x200 and so on. I have printed these value at c++ code of nox. When there is change in port status then handle_port_status function is called from file nox/src/lib/openflow-event.cc. ofp_port_status *ops is present there as a function parameter. I have printed values of variables present in this structure by using printf function available in stdio.h. Regards, Sachin From: Murphy McCauley To: sachin sharma Cc: nox-dev@noxrepo.org Sent: Wed, 24 November, 2010 2:36:12 AM Subject: Re: [nox-dev] State variable of ofp_phy_port on port status change This actually seems like it might be a byte order problem, though it's sort of hard to believe it would have slipped by until now, so I'm sort of surprised. Are you seeing this in C++ or in Python? On x86? Can you send some sample code which shows the issue? -- Murphy On Nov 23, 2010, at 1:56 AM, sachin sharma wrote: > Hi All, > > I am using openvswitch-1.1.0pre2.tar.gz and nox version 0.6. I found that >when there is change in port status then openvswitch sends port status change >to nox. I have printed the state and config variable of ofp_phy_port. and >found >that when link is down then openvswitch sends "state =0x1" and when link is up >then it sends "state=0x0". I have read the openflow specification and found >that these values are correct according to link change. > > But when I printed these value at nox, I found different values of state >variable. When link is down then nox receives an event with "state=0x100" >and when link is up, nox receives "state=0x0". I suppose that someone is doing >left shift of this state variable. Am I right? If this is so, then why this >is >done? > > Thank You for reply, > > Regards, > Sachin > > ___ > nox-dev mailing list > nox-dev@noxrepo.org > http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] State variable of ofp_phy_port on port status change
Hi All, I am using openvswitch-1.1.0pre2.tar.gz and nox version 0.6. I found that when there is change in port status then openvswitch sends port status change to nox. I have printed the state and config variable of ofp_phy_port. and found that when link is down then openvswitch sends "state =0x1" and when link is up then it sends "state=0x0". I have read the openflow specification and found that these values are correct according to link change. But when I printed these value at nox, I found different values of state variable. When link is down then nox receives an event with "state=0x100" and when link is up, nox receives "state=0x0". I suppose that someone is doing left shift of this state variable. Am I right? If this is so, then why this is done? Thank You for reply, Regards, Sachin ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] How does switch api at nox works
Dear All, I am able to create my set up with NOX and openVswitch. My set up is working fine. Nox is able to add flow entries in switches i connected with it. I have used following command at nox to connect it with openVswitch. ./nox_core -i ptcp:2525 switch. I know with this command src/nox/apps/switch/switch.cc file is called. so I have grepped this code and understood the way nox adds entries in openflow switches I have checked in openVswitch as well that flows are automatically added in these when i run ping command. But this it is not understood to me that how nox (switch.cc) calculates the flow for a particular source and destination, I checked the packets through tcpdump and found some arp requests and reply. So does it mean that this finds the path to a particular switch through these requests? How does it discover the topology like ospf? Can you please also let me know that which part of the code i should look for this. Many thanks in advance to clear my doubt. Regards, Sachin ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org
[nox-dev] Adding flow entry
Dear All, I have connected one nox (version number 0.6) to two openVswitch ( Version 1.0). I am interested to create centralized nox where it can add or delete flow entries to both the switches. Now for this initial phase, I am interested to write entries related to each switch manually without any control plane algorithm. So, how can I do this? Is there a specific command to do that or I would have to write a code in nox related to each switch? Many thanks in advance for the answer! Best Regards, Sachin Sharma ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org