[nox-dev] Basic Network Monitor : LAVI and ENVI
Hi all I am a master student in South Korea. I want to visualize an OpenFlow network with information provided by the Nox-based lavi backend. I use below nox git and envi source. nox : git clone git://noxrepo.org/nox envi : git clone git://github.com/dound/envi.git Nox is started by this command. ./nox_core -i ptcp:6633 jsonmessenger=tcpport=11222,sslport=0 lavi_switches lavi_swlinks switch (link : http://www.openflow.org/wk/index.php/LAVI:Miscellaneous) And run ant in the envi gui directory, then ant run. (link : http://www.openflow.org/wp/gui/) Envi's input that ask the IP or hostname of the backend is 127.0.0.1:11222. Because Nox run TCP server on port 11222. But nox has a problem like this. json syntax error at: json syntax error at: json syntax error at: json syntax error at: In mailing-list ( http://noxrepo.org/pipermail/nox-dev/2011-September/008033.html) KK's reply LAVI in the zaku branch uses a new JSON format and a different port. nox-gui.py in the destiny branch is another example. More is said here: * http://www.openflow.org/wk/index.php/LAVI*; So, I use nox-console.py example. python nox-console.py -v -p 11222 -n 127.0.0.1 getlinks python nox-console.py -v -p 11222 -n 127.0.0.1 getnodes Above command work well. How can I solve the nox problem related envi monitoring tool? Could you help me? Thank you. Regards Hyogi ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] How can I update the IP checksum?
Hi, I want to change the destination address. So I use these actions. And add output action. OFPAT_SET_DL_DST, /* Ethernet destination address. */ OFPAT_SET_NW_DST, /* IP destination address. */ Finally destination node could receive the changed packet. But there is a problem. I snoop the packets using wireshark. After 3-handshaking (SYN, SYN+ACK), the sender node send RST packet. I think it is occured by reason of I didn't update the IP checksum. Openflow-spec describe below. Action : Set IPv4 destination address Description : Replace the existing IP destination address with and update the IP checksum (and TCP/UDP/SCTP checksum if applicable). This action is only applied to IPv4 packets. But How can I update the IP checksum? I use C/C++ languge. I try to find updating IP checksum problem in nox-mailing list. But I couldn't find it. Is it a possible using send_openflow_command() fuction or send_openflow_packet() fuction? send_openflow_command() function = change original packet in switch using flow action. however, send_openflow_packet() = send new packet instructed by controller. Could you give some advice or reference source? Thank you. - Hyogi ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] How can I update the IP checksum?
Thank you for favor. I solve the problem from your advice. you'll also need to rewrite the SRC when sending from B back to A And OFPAT_SET_NW_DST update*automatically *the IP checksum. I didn't notice it. Thanks a lot! - Hyogi 2012/1/9 Murphy McCauley jam...@nau.edu OFPAT_SET_NW_DST should update the IP checksum. Are you sure that a bad checksum is the problem? Remember that if you rewrite the DST when sending from A to B, you'll also need to rewrite the SRC when sending from B back to A. Host A doesn't know that you've rewritten the address and will have no idea that a message from some arbitrary address is supposed to be from B! As a sidenote, you seem to be reading from the OpenFlow 1.1 spec, but NOX currently only supports OpenFlow 1.0. -- Murphy On Jan 9, 2012, at 4:08 AM, Hyogi Jung wrote: Hi, I want to change the destination address. So I use these actions. And add output action. OFPAT_SET_DL_DST, /* Ethernet destination address. */ OFPAT_SET_NW_DST, /* IP destination address. */ Finally destination node could receive the changed packet. But there is a problem. I snoop the packets using wireshark. After 3-handshaking (SYN, SYN+ACK), the sender node send RST packet. I think it is occured by reason of I didn't update the IP checksum. Openflow-spec describe below. Action : Set IPv4 destination address Description : Replace the existing IP destination address with and update the IP checksum (and TCP/UDP/SCTP checksum if applicable). This action is only applied to IPv4 packets. But How can I update the IP checksum? I use C/C++ languge. I try to find updating IP checksum problem in nox-mailing list. But I couldn't find it. Is it a possible using send_openflow_command() fuction or send_openflow_packet() fuction? send_openflow_command() function = change original packet in switch using flow action. however, send_openflow_packet() = send new packet instructed by controller. Could you give some advice or reference source? Thank you. - Hyogi ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev -- Hyogi Jung, MS Student Multimedia Mobile Communications Lab School of Computer Science and Engineering Seoul National University, Korea Tel: +82-2-880-9147 ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] Change destination IP
Hi All. I'm working in Openflow using mininet that is virtual emulation. I want to modify packet's destination IP address. For example, If packet's destination is 10.0.0.2, then Switch modify destination to 10.0.0.3. So I modify some nox source code such as switch.cc. And add some actions to switch such as OFPAT_SET_NW_DST. Below sentence show switch's flows. *Red text* is action. But It didn't work. Why? Do mininet support this action? Could you give some advice? Best Regards - Hyogi mininet dpctl dump-flows *** s4 stats_reply (xid=0x52625b89): flags=none type=1(flow) cookie=0, duration_sec=33s, duration_nsec=70400s, table_id=1, priority=32768, n_packets=71, n_bytes=2718, idle_timeout=60,hard_timeout=0,* actions=mod_nw_dst:10.0.0.3* cookie=8661653833487901345, duration_sec=33s, duration_nsec=71900s, table_id=1, priority=65535, n_packets=0, n_bytes=0, idle_timeout=60,hard_timeout=0,arp,in_port=2,dl_vlan=0x,dl_vlan_pcp=0x00,dl_src=6a:e0:e2:84:06:d6,dl_dst=ff:ff:ff:ff:ff:ff,nw_src=0.0.0.0,nw_dst=0.0.0.0,nw_tos=0x00,nw_proto=0,tp_src=0,tp_dst=0,actions=FLOOD cookie=6090790159401796605, duration_sec=33s, duration_nsec=75300s, table_id=1, priority=65535, n_packets=0, n_bytes=0, idle_timeout=60,hard_timeout=0,arp,in_port=1,dl_vlan=0x,dl_vlan_pcp=0x00,dl_src=aa:7a:42:10:45:dc,dl_dst=ff:ff:ff:ff:ff:ff,nw_src=0.0.0.0,nw_dst=0.0.0.0,nw_tos=0x00,nw_proto=0,tp_src=0,tp_dst=0,actions=FLOOD *This is my source.* // ofp_flow_mod* ofm; size_t size = sizeof *ofm + sizeof(ofp_action_nw_addr); boost::shared_arraychar raw_of(new char[size]); ofm = (ofp_flow_mod*) raw_of.get(); ofm-header.version = OFP_VERSION; ofm-header.type = OFPT_FLOW_MOD; ofm-header.length = htons(size); ofm-match.wildcards =htonl(OFPFW_ALL (~OFPFW_NW_DST_ALL)); ofm-match.in_port = htons(flow.in_port); ofm-match.dl_vlan = flow.dl_vlan; ofm-match.dl_vlan_pcp = flow.dl_vlan_pcp; memcpy(ofm-match.dl_src, flow.dl_src.octet, sizeof ofm-match.dl_src); memcpy(ofm-match.dl_dst, flow.dl_dst.octet, sizeof ofm-match.dl_dst); ofm-match.dl_type = flow.dl_type; ofm-match.nw_src = flow.nw_src; ofm-match.nw_dst = 33554442; // IP address : 10.0.0.2 ofm-match.nw_proto = flow.nw_proto; ofm-match.nw_tos = flow.nw_tos; ofm-match.tp_src = flow.tp_src; ofm-match.tp_dst = flow.tp_dst; ofm-cookie = htonl(0); ofm-command = htons(OFPFC_ADD); ofm-buffer_id = htonl(buffer_id); ofm-idle_timeout = htons(60); ofm-hard_timeout = htons(OFP_FLOW_PERMANENT); ofm-priority = htons(OFP_DEFAULT_PRIORITY); ofm-flags = htons(ofd_flow_mod_flags()); // OFPAT_SET_NW_DST ofp_action_nw_addr dlset = *((ofp_action_nw_addr*)ofm-actions); memset(dlset, 0, sizeof(ofp_action_nw_addr)); dlset.type = htons(OFPAT_SET_NW_DST); dlset.len = htons(sizeof(ofp_action_nw_addr)); dlset.nw_addr = 50331658; // 50331658 IP address : 10.0.0.3 send_openflow_command(pi.datapath_id, ofm-header, true); // Not all OpenFlow actions are supported. The following are not currently supported on any Indigo platform: OFPAT_SET_NW_SRC (Set L3 IP source address) OFPAT_SET_NW_DST (Set L3 IP destination address) OFPAT_SET_TP_SRC (Set L4 source port) OFPAT_SET_TP_DST (Set L4 destination port) The following are only supported on the Pronto 3290 and the Triumph 2 reference: OFPAT_SET_DL_SRC (Set L2 MAC source address) OFPAT_SET_DL_DST (Set L2 MAC destination address) OFPAT_STRIP_VLAN (Strip VLAN tag) is supported (but with only limited validation) on the 3290 and 3240 platforms. On other platforms, the function can be implemented by setting to the system's untagged VLAN (untested). ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
[nox-dev] Watch inside the IP Option field with Openflow
Hi all. I am trying to do some experiments with Openflow. And I would like to know if it is possible to watch inside the IP Header Option field? There is ip header length. So I can find that there is header option. But How do I watch inside the IP Header Option? If I read the IP option something like 'x.x.x.x', then I will modify destination's address. Can I do this in nox controller? Thank you! Hope you could help me - Hyogi ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev