[nox-dev] problem with dpctl
Hi, all Here's a problem when I used dpctl with my virtual machines (2 switches, 1 controller, all ubuntu9.04). We set controller's IP 192.168.0.100, two switches linked to the controller's IP are 192.168.0.1 and 192.168.0.2. When I boot nox on controller, and then do following on switch 192.168.0.2, sudo ./secchan/ofprotocol unix:/var/run/dp0 tcp:192.168.0.100:6633 sudo ./dpctl show tcp:192.168.0.2:6633 it returns, dpctl: talking to tcp:192.168.0.2:6633: Connection refused and I also tried following, ./dpctl show tcp:192.168.0.100:6633 it returns. dpctl: talking to tcp:192.168.0.100:6633: unexpected end of file and on the controller, it gives following message, 5|nox|WARN:Received unsupported message type during handshake (5) The main problem is how can I show the switch's flow table using dpctl, and how can I add an item to the flow table. It confuses me a lot, thanks. He Chang -- 常 贺 Tel:(+86)1381-138-9007 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] problem with dpctl
He Chang, when you run dpctl locally on a switch to display its flowtable, you should be passing the dp_id that was used when creating the openflow switch (with the adddp command) so it should look something like ./dpctl show nl:0 similarly, ./dpctl add-flow nl:0 [flow] is used to manually add a flow (as opposed to doing it programatically through nox) dpctl has not much to do with NOX. It is a separate program. It runs on the switch in order to view and manually modify its flow table. (think of it as a 'manual' controller, as in, non-programmatic). Pointing dpctl towards NOX does not make much sense. It is meant to talk to switches. man dpctl and dpctl --help provide a lot of information on the program's use. 2011/3/8 changhe188 changhe...@126.com Hi, all Here's a problem when I used dpctl with my virtual machines (2 switches, 1 controller, all ubuntu9.04). We set controller's IP 192.168.0.100, two switches linked to the controller's IP are 192.168.0.1 and 192.168.0.2. When I boot nox on controller, and then do following on switch 192.168.0.2, sudo ./secchan/ofprotocol unix:/var/run/dp0 tcp:192.168.0.100:6633 sudo ./dpctl show tcp:192.168.0.2:6633 it returns, dpctl: talking to tcp:192.168.0.2:6633: Connection refused and I also tried following, ./dpctl show tcp:192.168.0.100:6633 it returns. dpctl: talking to tcp:192.168.0.100:6633: unexpected end of file and on the controller, it gives following message, 5|nox|WARN:Received unsupported message type during handshake (5) The main problem is how can I show the switch's flow table using dpctl, and how can I add an item to the flow table. It confuses me a lot, thanks. He Chang -- 常 贺 Tel:(+86)1381-138-9007 ___ 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] Setting VLAN_ID by nox controller, but it's error
Hi, Murphy Thank you for your suggestion, I use wireshark to examine the flow mod, but I can't get any useful information. It doesn't matter, I will keep checking. Now I have two question: 1) When I execute the nox and openflow, what environment configuration do I have to set up? For example: network configuration. 2) I traceback error message about ofdatapath: lib/ofpbuf.c:168: ofpbuf_prealloc_headroom: Assertion `size = ofpbuf_headroom(b)' failed., so I edit ofpbuf_prealloc_headroom and print out the headroom value, just see below: ***lib/ofpbuf.c** void ofpbuf_prealloc_headroom(struct ofpbuf *b, size_t size) { --modificiation printf(headroom value: %d\n,ofpbuf_headroom(b)); assert(0 = ofpbuf_headroom(b)); //assert(size = ofpbuf_headroom(b)); original } * -error message--- headroom value: 130 headroom value: 130 headroom value: 0 *** glibc detected *** ofdatapath: double free or corruption (out): 0x081bca18 *** *** glibc detected *** ofdatapath: corrupted double-linked list: 0x081bc9e0 *** === Backtrace: = /lib/libc.so.6[0x42887ab6] /lib/libc.so.6[0x42889d17] /lib/libc.so.6(__libc_calloc+0xba)[0x4288bbaa] /lib/ld-linux.so.2[0x4280b5eb] /lib/ld-linux.so.2[0x42807021] /lib/ld-linux.so.2[0x42808dff] /lib/ld-linux.so.2[0x42812a0c] /lib/ld-linux.so.2[0x4280eda6] /lib/ld-linux.so.2[0x428123f2] /lib/libc.so.6[0x429282e2] /lib/ld-linux.so.2[0x4280eda6] /lib/libc.so.6(__libc_dlopen_mode+0x55)[0x42928495] /lib/libc.so.6[0x429050f9] /lib/libc.so.6(backtrace+0xf3)[0x42905293] /lib/libc.so.6[0x428812a1] /lib/libc.so.6[0x428895a5] /lib/libc.so.6(cfree+0x59)[0x428899e9] ofdatapath(ofpbuf_delete+0x16)[0x805af16] ofdatapath[0x80523ef] ofdatapath(dp_run+0x39f)[0x80531af] ofdatapath(udatapath_cmd+0x615)[0x8054a65] ofdatapath(main+0x22)[0x8054b82] /lib/libc.so.6(__libc_start_main+0xdc)[0x42835e9c] ofdatapath[0x804f8d1] === Memory map: 08048000-08079000 r-xp 08:01 1578384 /usr/local/bin/ofdatapath 08079000-0807b000 rw-p 00031000 08:01 1578384 /usr/local/bin/ofdatapath 0807b000-081c6000 rw-p 00:00 0 [heap] 42801000-4281c000 r-xp 08:01 2357240 /lib/ld-2.5.so 4281c000-4281d000 r--p 0001a000 08:01 2357240 /lib/ld-2.5.so 4281d000-4281e000 rw-p 0001b000 08:01 2357240 /lib/ld-2.5.so 4282-42973000 r-xp 08:01 2357242 /lib/libc-2.5.so 42973000-42975000 r--p 00152000 08:01 2357242 /lib/libc-2.5.so 42975000-42976000 rw-p 00154000 08:01 2357242 /lib/libc-2.5.so 42976000-42979000 rw-p 00:00 0 429a6000-429a9000 r-xp 08:01 2358413 /lib/libdl-2.5.so 429a9000-429aa000 r--p 2000 08:01 2358413 /lib/libdl-2.5.so 429aa000-429ab000 rw-p 3000 08:01 2358413 /lib/libdl-2.5.so 4390-4390b000 r-xp 08:01 2357180 /lib/libgcc_s-4.1.2-20080825.so.1 4390b000-4390c000 rw-p a000 08:01 2357180 /lib/libgcc_s-4.1.2-20080825.so.1 b760-b7621000 rw-p 00:00 0 b7621000-b770 ---p 00:00 0 b77b8000-b783b000 rw-p 00:00 0 b7845000-b7847000 rw-p 00:00 0 b7847000-b7848000 r-xp 00:00 0 [vdso] bfb38000-bfb4d000 rw-p 00:00 0 [stack] -- I find headroom values is 130, 130 and 0 , what are these value mean?why does the last value is 0? Any suggestion will be helpful, Thank you. Yi-Shou --- 11/3/7 (一),Murphy McCauley jam...@nau.edu 寫道: 寄件者: Murphy McCauley jam...@nau.edu 主旨: Re: [nox-dev] Setting VLAN_ID by nox controller, but it's error 收件者: false ladj...@yahoo.com.tw 副本: nox-dev@noxrepo.org 日期: 2011年3月7日,一,上午5:20 One last thought is that... you probably also want to have an output action as well as the VLAN action. It could be that the switch assumes there will be one. -- Murphy On Mar 6, 2011, at 9:09 AM, false wrote: Hi, I want setting VLAN_ID to OpenFlow by nox controller, so I edit pyswitch.py, see below: --- def forward_l2_packet(dpid, inport, packet, buf, bufid): dstaddr = packet.dst.tostring() print test if not ord(dstaddr[0]) 1 and inst.st[dpid].has_key(dstaddr) : prt = inst.st[dpid][dstaddr] if prt[0] == inport: log.err('**warning** learned port = inport', system=pyswitch) inst.send_openflow(dpid, bufid, buf, openflow.OFPP_FLOOD, inport) else: # We know the outport, set up a flow log.msg('installing flow for ' + str(packet), system=pyswitch) flow = extract_flow(packet)
[nox-dev] Problem in getting flows statistics
Hi, I am trying to get flows statistics in my C++ component using flow fetcher, but all fields of flows seems not instanciated. For example, I need to know flow size, number of packets, number of bytes and other information. I created a *ofp_flow_stats_request request* in my component, set it as: *request.table_id = 0xff; request.out_port = OFPP_NONE;* , in datapath_join_event and passed it to flow_fetcher as a parameter of start_fetch. But when the handler of Flow_stats_in_event is called, the size of the *vectorFlow_stats flows* still zero as all of it other fields. Is the error in my request? Am I missing something? Sorry if I didn't made myself clear. Thank you for help. Regards. -- Happy Women's Day Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Problem in getting flows statistics
Hi Ricardo I've used the nox flow fetcher component and it worked fine for me. One thing to look at is how you're specifying the ofp_match object while requesting for flows. The ofp_flow_stats_request will return counters for flow table entries that match the specified ofp_match object ? If there no matching entries in the forwarding table Flow_statsflows vector will be empty. Hope this helped Best! Malveeka - Original Message - From: Ricardo Bennesby ricardo.benne...@gmail.com To: nox-dev@noxrepo.org Sent: Tuesday, March 8, 2011 1:01:44 PM GMT -08:00 US/Canada Pacific Subject: [nox-dev] Problem in getting flows statistics Hi, I am trying to get flows statistics in my C++ component using flow fetcher, but all fields of flows seems not instanciated. For example, I need to know flow size, number of packets, number of bytes and other information. I created a ofp_flow_stats_request request in my component, set it as: request.table_id = 0xff; request.out_port = OFPP_NONE; , in datapath_join_event and passed it to flow_fetcher as a parameter of start_fetch. But when the handler of Flow_stats_in_event is called, the size of the vectorFlow_stats flows still zero as all of it other fields. Is the error in my request? Am I missing something? Sorry if I didn't made myself clear. Thank you for help. Regards. -- Happy Women's Day Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ 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] Setting VLAN_ID by nox controller, but it's error
Did you try the suggestion of setting actions to something like the following? actions = [[openflow.OFPAT_SET_VLAN_VID, 2], [openflow.OFPAT_OUTPUT, [0, prt[0 .. I do think there's a chance that the switch assumes there's an additional action. Your question #2 is really a question for the maintainers of the openflow reference implementation. A better way to contact them is the openflow-discuss mailing list: https://mailman.stanford.edu/mailman/listinfo/openflow-discuss -- Murphy On Mar 8, 2011, at 8:20 AM, false wrote: Hi, Murphy Thank you for your suggestion, I use wireshark to examine the flow mod, but I can't get any useful information. It doesn't matter, I will keep checking. Now I have two question: 1) When I execute the nox and openflow, what environment configuration do I have to set up? For example: network configuration. 2) I traceback error message about ofdatapath: lib/ofpbuf.c:168: ofpbuf_prealloc_headroom: Assertion `size = ofpbuf_headroom(b)' failed., so I edit ofpbuf_prealloc_headroom and print out the headroom value, just see below: ***lib/ofpbuf.c** void ofpbuf_prealloc_headroom(struct ofpbuf *b, size_t size) { --modificiation printf(headroom value: %d\n,ofpbuf_headroom(b)); assert(0 = ofpbuf_headroom(b)); //assert(size = ofpbuf_headroom(b)); original } * -error message--- headroom value: 130 headroom value: 130 headroom value: 0 *** glibc detected *** ofdatapath: double free or corruption (out): 0x081bca18 *** *** glibc detected *** ofdatapath: corrupted double-linked list: 0x081bc9e0 *** === Backtrace: = /lib/libc.so.6[0x42887ab6] /lib/libc.so.6[0x42889d17] /lib/libc.so.6(__libc_calloc+0xba)[0x4288bbaa] /lib/ld-linux.so.2[0x4280b5eb] /lib/ld-linux.so.2[0x42807021] /lib/ld-linux.so.2[0x42808dff] /lib/ld-linux.so.2[0x42812a0c] /lib/ld-linux.so.2[0x4280eda6] /lib/ld-linux.so.2[0x428123f2] /lib/libc.so.6[0x429282e2] /lib/ld-linux.so.2[0x4280eda6] /lib/libc.so.6(__libc_dlopen_mode+0x55)[0x42928495] /lib/libc.so.6[0x429050f9] /lib/libc.so.6(backtrace+0xf3)[0x42905293] /lib/libc.so.6[0x428812a1] /lib/libc.so.6[0x428895a5] /lib/libc.so.6(cfree+0x59)[0x428899e9] ofdatapath(ofpbuf_delete+0x16)[0x805af16] ofdatapath[0x80523ef] ofdatapath(dp_run+0x39f)[0x80531af] ofdatapath(udatapath_cmd+0x615)[0x8054a65] ofdatapath(main+0x22)[0x8054b82] /lib/libc.so.6(__libc_start_main+0xdc)[0x42835e9c] ofdatapath[0x804f8d1] === Memory map: 08048000-08079000 r-xp 08:01 1578384/usr/local/bin/ofdatapath 08079000-0807b000 rw-p 00031000 08:01 1578384/usr/local/bin/ofdatapath 0807b000-081c6000 rw-p 00:00 0 [heap] 42801000-4281c000 r-xp 08:01 2357240/lib/ld-2.5.so 4281c000-4281d000 r--p 0001a000 08:01 2357240/lib/ld-2.5.so 4281d000-4281e000 rw-p 0001b000 08:01 2357240/lib/ld-2.5.so 4282-42973000 r-xp 08:01 2357242/lib/libc-2.5.so 42973000-42975000 r--p 00152000 08:01 2357242/lib/libc-2.5.so 42975000-42976000 rw-p 00154000 08:01 2357242/lib/libc-2.5.so 42976000-42979000 rw-p 00:00 0 429a6000-429a9000 r-xp 08:01 2358413/lib/libdl-2.5.so 429a9000-429aa000 r--p 2000 08:01 2358413/lib/libdl-2.5.so 429aa000-429ab000 rw-p 3000 08:01 2358413/lib/libdl-2.5.so 4390-4390b000 r-xp 08:01 2357180 /lib/libgcc_s-4.1.2-20080825.so.1 4390b000-4390c000 rw-p a000 08:01 2357180 /lib/libgcc_s-4.1.2-20080825.so.1 b760-b7621000 rw-p 00:00 0 b7621000-b770 ---p 00:00 0 b77b8000-b783b000 rw-p 00:00 0 b7845000-b7847000 rw-p 00:00 0 b7847000-b7848000 r-xp 00:00 0 [vdso] bfb38000-bfb4d000 rw-p 00:00 0 [stack] -- I find headroom values is 130, 130 and 0 , what are these value mean?why does the last value is 0? Any suggestion will be helpful, Thank you. Yi-Shou --- 11/3/7 (一),Murphy McCauley jam...@nau.edu 寫道: 寄件者: Murphy McCauley jam...@nau.edu 主旨: Re: [nox-dev] Setting VLAN_ID by nox controller, but it's error 收件者: false ladj...@yahoo.com.tw 副本: nox-dev@noxrepo.org 日期: 2011年3月7日,一,上午5:20 One last thought is that... you probably also want to have an output action as well as the VLAN action. It could be that the switch assumes there will be one. -- Murphy On Mar 6, 2011, at 9:09 AM, false wrote: Hi, I want setting VLAN_ID to OpenFlow by nox controller, so I edit pyswitch.py, see below:
Re: [nox-dev] Problem in getting flows statistics
Hi Malveeka, thanks for quick answer. Using with Python flow fetcher worked fine too, but with C++ I am having these problems... The ofp_flow_stats_request is a struct that has the fields: * struct ofp_match match*; /* Fields to match. */ *uint8_t table_id*; /* ID of table to read (from ofp_table_stats), 0xff for all tables or 0xfe for emergency. */ *uint8_t pad*; /* Align to 32 bits. */ *uint16_t out_port*; I didn't change the way that Flow_fetcher request the flows. So, the *flows* vector is only instantiated when the *send_openflow_command(dpid, oh, false)* is sent (oh is a ofp_header type) and when there are matching entries? Thank you so much for help. 2011/3/8 malve...@cs.ucsd.edu Hi Ricardo I've used the nox flow fetcher component and it worked fine for me. One thing to look at is how you're specifying the ofp_match object while requesting for flows. The ofp_flow_stats_request will return counters for flow table entries that match the specified ofp_match object ? If there no matching entries in the forwarding table Flow_statsflows vector will be empty. Hope this helped Best! Malveeka - Original Message - From: Ricardo Bennesby ricardo.benne...@gmail.com To: nox-dev@noxrepo.org Sent: Tuesday, March 8, 2011 1:01:44 PM GMT -08:00 US/Canada Pacific Subject: [nox-dev] Problem in getting flows statistics Hi, I am trying to get flows statistics in my C++ component using flow fetcher, but all fields of flows seems not instanciated. For example, I need to know flow size, number of packets, number of bytes and other information. I created a *ofp_flow_stats_request request* in my component, set it as: *request.table_id = 0xff; request.out_port = OFPP_NONE;* , in datapath_join_event and passed it to flow_fetcher as a parameter of start_fetch. But when the handler of Flow_stats_in_event is called, the size of the *vectorFlow_stats flows* still zero as all of it other fields. Is the error in my request? Am I missing something? Sorry if I didn't made myself clear. Thank you for help. Regards. -- Happy Women's Day Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Happy Women's Day Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Problem in getting flows statistics
Yes I am using the C++ flow fetcher component. When you send a flow stats request you also specify a ofp_match field as well, Openflow internally matches the flow entries in the switch's flow table and returns counters for matching flows. Try the following ofp_flow_stats_request fsr; fsr.table_id = 0xff; fsr.match.wildcards = htonl(0x); //this would match all the flows in the forwarding table fsr.out_port = OFPP_NONE; Here I have wildcarded all matching fields, which means it will match all the flows in the switch's forwarding table. This works for me .. If this doesn't work for you then the next question then is -- are there any forwarding entries installed in the switch? Good luck, Malveeka - Original Message - From: Ricardo Bennesby ricardo.benne...@gmail.com To: malve...@cs.ucsd.edu Sent: Tuesday, March 8, 2011 1:51:47 PM GMT -08:00 US/Canada Pacific Subject: Re: [nox-dev] Problem in getting flows statistics Did you used it with C++ too? 2011/3/8 malve...@cs.ucsd.edu Hi Ricardo I've used the nox flow fetcher component and it worked fine for me. One thing to look at is how you're specifying the ofp_match object while requesting for flows. The ofp_flow_stats_request will return counters for flow table entries that match the specified ofp_match object ? If there no matching entries in the forwarding table Flow_statsflows vector will be empty. Hope this helped Best! Malveeka - Original Message - From: Ricardo Bennesby ricardo.benne...@gmail.com To: nox-dev@noxrepo.org Sent: Tuesday, March 8, 2011 1:01:44 PM GMT -08:00 US/Canada Pacific Subject: [nox-dev] Problem in getting flows statistics Hi, I am trying to get flows statistics in my C++ component using flow fetcher, but all fields of flows seems not instanciated. For example, I need to know flow size, number of packets, number of bytes and other information. I created a ofp_flow_stats_request request in my component, set it as: request.table_id = 0xff; request.out_port = OFPP_NONE; , in datapath_join_event and passed it to flow_fetcher as a parameter of start_fetch. But when the handler of Flow_stats_in_event is called, the size of the vectorFlow_stats flows still zero as all of it other fields. Is the error in my request? Am I missing something? Sorry if I didn't made myself clear. Thank you for help. Regards. -- Happy Women's Day Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] Problem in getting flows statistics
I tried it but the flows size still zero. I will do what you suggested. I will check the switch entries. When I did this I post a feedback. Thank you so much for help, Malveeka. Best regards. 2011/3/8 malve...@cs.ucsd.edu Yes I am using the C++ flow fetcher component. When you send a flow stats request you also specify a ofp_match field as well, Openflow internally matches the flow entries in the switch's flow table and returns counters for matching flows. Try the following ofp_flow_stats_request fsr; fsr.table_id = 0xff; fsr.match.wildcards = htonl(0x); //this would match all the flows in the forwarding table fsr.out_port = OFPP_NONE; Here I have wildcarded all matching fields, which means it will match all the flows in the switch's forwarding table. This works for me .. If this doesn't work for you then the next question then is -- are there any forwarding entries installed in the switch? Good luck, Malveeka - Original Message - From: Ricardo Bennesby ricardo.benne...@gmail.com To: malve...@cs.ucsd.edu Sent: Tuesday, March 8, 2011 1:51:47 PM GMT -08:00 US/Canada Pacific Subject: Re: [nox-dev] Problem in getting flows statistics Did you used it with C++ too? 2011/3/8 malve...@cs.ucsd.edu Hi Ricardo I've used the nox flow fetcher component and it worked fine for me. One thing to look at is how you're specifying the ofp_match object while requesting for flows. The ofp_flow_stats_request will return counters for flow table entries that match the specified ofp_match object ? If there no matching entries in the forwarding table Flow_statsflows vector will be empty. Hope this helped Best! Malveeka - Original Message - From: Ricardo Bennesby ricardo.benne...@gmail.com To: nox-dev@noxrepo.org Sent: Tuesday, March 8, 2011 1:01:44 PM GMT -08:00 US/Canada Pacific Subject: [nox-dev] Problem in getting flows statistics Hi, I am trying to get flows statistics in my C++ component using flow fetcher, but all fields of flows seems not instanciated. For example, I need to know flow size, number of packets, number of bytes and other information. I created a *ofp_flow_stats_request request* in my component, set it as: *request.table_id = 0xff; request.out_port = OFPP_NONE;* , in datapath_join_event and passed it to flow_fetcher as a parameter of start_fetch. But when the handler of Flow_stats_in_event is called, the size of the *vectorFlow_stats flows* still zero as all of it other fields. Is the error in my request? Am I missing something? Sorry if I didn't made myself clear. Thank you for help. Regards. -- Happy Women's Day Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica -- Ricardo Bennesby da Silva Ciência da Computação - UFAM LabCIA - Laboratório de Computação Inteligente e Autonômica ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev