[nox-dev] routing.cc
Hello all: Recently i look through the routing.cc and come across a problem . Anyone who knows something , please tell me, thank you very much. In my opinion, the routing.cc should offer the function like this: Given the Routeid 'id' which defined in routing.hh, and calculates the path between source datapath and destination datapath which defined in struct 'Routeid', then accroding to this calculated path, encapsulate to openflow message(conbtroller/switch message) for each datapath on the path , send to openflow switchs and write into flow table entry. But i am not sure which function(s) offer(s) the function of calculating path.Maybe it is get_route() function defined in routing.cc, here is the codes: bool Routing_module::get_route(const RouteId id, RoutePtr route) const { RouteMap::const_iterator rte = shortest.find(id); // return a const element reference to this key 'id' in hash_map // if (rte == shortest.end()) { if (id.src == id.dst) { route.reset(new Route()); route-id = id; return true; } return false; } route = rte-second; return true; } Does the element refer to the key id in hash_map contain the path, which i accroding to this line 'route = rte-second'. Is it right? If you know, please help me, thank you very much again~ Best Wishes Wang Jian Wednesday, Junuary 4, 2012 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] Must each switch connect to nox controller?
Hi, I have read some papers about OpenFlow and NOX like 'NOX:Towards an Operationg System for Networks'. As the papers presented that each switch is connected to NOX.I wonder what if NOX only has a few network interface but there are many OpenFlow switches? How can it connect to all the switches?Or that the controller like NOX only connects to a few switches directly and the other swiches are connected to them? And I also want to know how many switched that NOX can support? Chenyang___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Must each switch connect to nox controller?
The machine running NOX does not need to be *directly* connected to the switches; it just needs to be able to reach them. So you could build a separate control network out of standard L2 switches or routers or whatever which allows all OpenFlow switches to be accessed from a single port. Alternately, you can do what you suggest where NOX directly connects to one or more OpenFlow switches and then communicates with other OpenFlow switches through those (in-band control). As for how many switches NOX can support... I don't think there's an easy answer here. I think this will vary hugely depending on exactly what your control program and network are doing. -- Murphy On Jan 4, 2012, at 4:41 AM, 陈阳 wrote: Hi, I have read some papers about OpenFlow and NOX like 'NOX:Towards an Operationg System for Networks'. As the papers presented that each switch is connected to NOX.I wonder what if NOX only has a few network interface but there are many OpenFlow switches? How can it connect to all the switches?Or that the controller like NOX only connects to a few switches directly and the other swiches are connected to them? And I also want to know how many switched that NOX can support? Chenyang ___ 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] something about the working mechanism of NOX
#1: When a switch gets a packet that doesn't correspond to an entry in the flow tables, it will generally buffer it and associate this buffer with an opaque buffer identifier. It will then send a packet_in message to the controller that includes the buffer ID and *part* of the packet data itself (usually not all of it). However, if the switch runs out of buffer space, it is supposed to send a buffer ID of all-bits-on (UNIT32_MAX) along with *all* of the packet data. The code you posted checks to see which of these cases is being handled. If buffer_id == UINT32_MAX, then the controller didn't buffer the packet. So it should have sent the entire payload. The second if statement checks to make sure this is actually the case. If you remove this code, it will continue to operate the same unless the switch decides not to buffer packets (because it ran out of buffers or for some other reason). #2: send_openflow_command() sends any OpenFlow command (anything that starts with an OpenFlow header). send_openflow_packet(), on the other hand, is a shortcut specifically for sending ofp_packet_out messages. #3: You are mistaken about OFPT_PACKET_OUT -- it does not modify the flow table. OFPT_FLOW_MOD does. OFPT_PACKET_OUT is used to immediately send some piece of data (that has either already been buffered in the switch or that the controller provides). Hope that clears things up. -- Murphy On Dec 30, 2011, at 8:10 PM, 王健 wrote: Hi all: I'm a new comer of NOX, and want to know the mechanism of NOX, so i see the codes of hub.cc at the beginning. There are some questions that perplex me for a long time which i list as follows. 1) if (buffer_id == UINT32_MAX) { size_t data_len = pi.get_buffer()-size(); size_t total_len = pi.total_len; if (total_len == data_len) { send_openflow_packe t(pi.datapath_id, *pi.get_buffer(), OFPP_FLOOD, pi.in_port, true); } else { /* Control path didn't buffer the packet and didn't send us * the whole thing--what gives? */ lg.dbg(total_len=%zu data_len=%zu\n, total_len, data_len); }tion There codes are in src/nox/coreapps/hub/hub.cc file. what is the function of them?do they effect the function of hub.cc if remove ? 2) what is the differe nce between int send_openflow_command() and int send_openflow_packet() which defined in src/nox/component.hh. I know both are used for interacting with OF switch. 3)The type of controller/switch message contains OFPT_PACKET_OUT and OFPT_FLOW_MOD. I think both of them are used to add/delete/modify flow table entry in OF switch, am i right? I don't know what is the difference even if refer to openflow-spec-1.0.0 would you like to tell me? Thank you very much, look forward to hear from you~ Best Wishes nbs p; Wang Jian nbsp; Saturday, December 31, 2011 ___ 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] nox-gui flowtracer problem
Dear all, I build a testbed as follows: NOX / \ of1of2 /\ ab Firstly, I set a and b to ping each other. Secondly, I input ./nox_core -v -v -i ptcp:9550 routing lavi monitoring trackhost_pktin to run the NOX. and then start nox-gui. Thirdly, I click FlowTracer botton and then double click of1 node on nox-gui to show its flow entries. Finally, I highlight one entry and click Trace! botton. However,I cannot find any flows on nox-gui and I find one error message. this error message is as follows: File ~/nox/src/gui/views/flowtracer.py, line 95, in trace_flow value = int(value,16) ValueError: invalid literal for int() with base 16: '0xe4115b1251b4L' How could I fix it? -- === 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.tw === ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] nox-gui flowtracer problem
This seems to be a bug where the component was expecting a hex string, but the L in the end of the long int messes things. Thanks for reporting. What kind of switch are you using? For a temporary fix in your case, try replacing line 95 with: value = int(value[:-1],16) On Wed, Jan 4, 2012 at 11:07 PM, wunyuan wuny...@nchc.narl.org.tw wrote: Dear all, I build a testbed as follows: NOX / \ of1of2 /\ ab Firstly, I set a and b to ping each other. Secondly, I input ./nox_core -v -v -i ptcp:9550 routing lavi monitoring trackhost_pktin to run the NOX. and then start nox-gui. Thirdly, I click FlowTracer botton and then double click of1 node on nox-gui to show its flow entries. Finally, I highlight one entry and click Trace! botton. However,I cannot find any flows on nox-gui and I find one error message. this error message is as follows: File ~/nox/src/gui/views/**flowtracer.py, line 95, in trace_flow value = int(value,16) ValueError: invalid literal for int() with base 16: '0xe4115b1251b4L' How could I fix it? -- ==**==**=== 系統與網路技術組-黃文源(Wun-Yuan Huang) 財團法人國家實驗研究院 國家高速網路與計算中心南部事業群 National Center for High-Performance Computing South Region Office 台南縣台南科學園區南科三路28號 No.28, Nan-Ke 3rd. Rd., Science-based Industrial Park, Tainan 744, Taiwan, R.O.C. TEL:06-5050940 ext.751 FAX:06-5050945 E-Mail:wuny...@nchc.narl.org.**tw wuny...@nchc.narl.org.tw ==**==**=== __**_ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/**listinfo/nox-devhttp://noxrepo.org/mailman/listinfo/nox-dev ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev