Hi Aaron & Dan, I have attempted to reply to your questions in the inline comments below. Thanks..
---- Aaron's email ----- ----- Original Message ----- From: "Aaron Rosen" <aro...@clemson.edu> To: "Ali Sydney" <asyd...@k-state.edu> Cc: openflow-discuss@lists.stanford.edu Sent: Wednesday, May 16, 2012 2:05:23 PM Subject: Re: [openflow-discuss] Issue Rewriting Source Mac address of Pronto 3290s Hi Ali, Aaron: It would probably be more helpful if you would provide the output of dpctl rather than the nox code. Ali: ok.. I have provided more details below.. Aaron: So you're saying a packet a packet enters dpid1 you install the flow_mod shown changing the mac address and output it. Then, you continue to receive packet_in's for this flow? Ali: Yes AAron: If this is UDP traffic this tends to happen, though the flow_mod should eventually start handling the traffic. Ali: I'm simply sending pings.. icmp Below is what works (i.e. the packet is successfully transmitted from dpid1 to dpid2). *** NOX ***: actions = [[openflow.OFPAT_SET_DL_DST,"00:25:64:a4:5c:f5"],[openflow.OFPAT_OUTPUT, [0, prt[0]]]] *** Print out of the flow is ***: {'dl_type': 2048, 'nw_dst': 3232235792L, 'dl_vlan_pcp': 0, 'dl_src': array('B', [184, 172, 111, 42, 106, 234]), 'nw_proto': 1, 'tp_dst': 0, 'tp_src': 8, 'dl_dst': array('B', [0, 37, 100, 164, 92, 245]), 'dl_vlan': 65535, 'nw_src': 3232235791L, 'in_port': 1} *** Printout of the actions are ***: [[5, '00:25:64:a4:5c:f5'], [0, [0, 2]]] *** Printout of the packet is ***: [b8:ac:6f:2a:6a:ea>00:25:64:a4:5c:f5:IP]([v:4hl:5l:84t:64]ICMP cs:b739[192.168.1.15>192.168.1.16]){t:8 c:0 csum: 0x4a64}{id:122seq:1} *** DPCTL *** # dpctl dump-flows tcp:127.0.0.1 stats_reply (xid=0x67d8bfc1): flags=none type=1(flow) cookie=0, duration_sec=2s, duration_nsec=663000000s, table_id=0, priority=32768, n_packets=0, n_bytes=0, idle_timeout=5,hard_timeout=0,arp,in_port=2,dl_vlan=0xffff,dl_vlan_pcp=0x00,dl_src=00:25:64:a4:5c:f5,dl_dst=b8:ac:6f:2a:6a:ea,nw_src=192.168.1.16,nw_dst=192.168.1.15,nw_proto=0,tp_src=0,tp_dst=0,actions=output:1 cookie=0, duration_sec=2s, duration_nsec=660000000s, table_id=2, priority=32768, n_packets=1, n_bytes=98, idle_timeout=5,hard_timeout=0,icmp,in_port=1,dl_vlan=0xffff,dl_vlan_pcp=0x00,dl_src=b8:ac:6f:2a:6a:ea,dl_dst=00:25:64:a4:5c:f5,nw_src=192.168.1.15,nw_dst=192.168.1.16,icmp_type=8,icmp_code=0,actions=mod_dl_dst:00:25:64:a4:5c:f5,output:2 PS. As you can see, the action was installed and I am rewriting the mac address of dstHost. What does not work (i.e. the pkt is not transmitted from dpid1 to dpid2 even though the mac address was rewritten). *** NOX ***: actions = [[openflow.OFPAT_SET_DL_DST,macTag],[openflow.OFPAT_OUTPUT, [0, prt[0]]]] *** Print out of the flow is ***: {'dl_type': 2048, 'nw_dst': 3232235792L, 'dl_vlan_pcp': 0, 'dl_src': array('B', [184, 172, 111, 42, 106, 234]), 'nw_proto': 1, 'tp_dst': 0, 'tp_src': 8, 'dl_dst': array('B', [0, 37, 100, 164, 92, 245]), 'dl_vlan': 65535, 'nw_src': 3232235791L, 'in_port': 1} *** Printout of the actions are ***: [[5, '00:00:00:00:00:fc'], [0, [0, 2]]] *** Printout of the packet is ***: [b8:ac:6f:2a:6a:ea>00:25:64:a4:5c:f5:IP]([v:4hl:5l:84t:64]ICMP cs:b739 [192.168.1.15>192.168.1.16]){t:8 c:0 csum: 0x4838}{id:63865seq:1} *** DPCTL *** # dpctl dump-flows tcp:127.0.0.1 stats_reply (xid=0x8b233175): flags=none type=1(flow) cookie=0, duration_sec=2s, duration_nsec=965000000s, table_id=0, priority=32768, n_packets=0, n_bytes=0, idle_timeout=5,hard_timeout=0,arp,in_port=2,dl_vlan=0xffff,dl_vlan_pcp=0x00,dl_src=00:25:64:a4:5c:f5,dl _dst=b8:ac:6f:2a:6a:ea,nw_src=192.168.1.16,nw_dst=192.168.1.15,nw_proto=0,tp_src=0,tp_dst=0,actions=out put:1 cookie=0, duration_sec=2s, duration_nsec=962000000s, table_id=2, priority=32768, n_packets=1, n_bytes=98,idle_timeout=5,hard_timeout=0,icmp,in_port=1,dl_vlan=0xffff,dl_vlan_pcp=0x00,dl_src=b8:ac:6f:2a:6a:ea,dl_dst=00:25:64:a4:5c:f5,nw_src=192.168.1.15,nw_dst=192.168.1.16,icmp_type=8,icmp_code=0,actions=mod_dl_dst:00:00:00:00:00:fc,output:2 PS. As you can see, the "fake" mac address is installed, but I am not able to tx the pkt from dpid1 to dpid2. Aaron ----- Dan's Email ------ Hi Ali-- Dan: What controller are you using here? Ali: NOX Dan: The testing of mac rewrite on the Pronto switches has been passing, although the setup is very simple. Dan: I'm not sure what you mean by 'the next packet arrives at "dpid1" '. Can you clarify? Ali: Let me see if I can explain a bit (do correct me if I'm totally wrong). When srcHost tx a packet, normally, this packet 1. arrives at dpid1 2. is tx to the controller, 3. the controller installs a flow. 4. Then this packet gets tx to dpid2 and follows the same procedure as in 1, 2, and 3, until it gets to dstHost In my case however, the packet: 1. arrives at dpid1 2. is tx to the controller 3. I insert an action to rewrite the mac address such as 00:00:00:00:00:fc 4. I verify that the flow mod was installed using dpctl on the switch 5. However, the pkt is not transmitted to the next dpid, ie dpid2. Rather, srcHost, tx yet a second pkt to dpid1 and so on. I have realized that if the rewritten mac address is the same as the destination address (i.e. 00:25:64:a4:5c:f5 and NOT 00:00:00:00:00:fc), the pkt leaves dpid1, is transmitted to dpid2 just fine. -Ali Thanks, Dan On Wed, May 16, 2012 at 8:28 AM, Ali Sydney < asyd...@k-state.edu > wrote: Hi Everyone, I am having some issues with rewriting the destination mac address on the Pronto 3290. Below is my current setup: srcHost <--> dpid1 <--> dpid2 <--> dpid3 <--> dstHost REF: srcHost Mac: b8:ac:6f:2a:6a:ea dstHost Mac: 00:25:64:a4:5c:f5 Ideally, when I tx a pkt from srcHost to dstHost, at the controller, I see ip packets entering the dpids in the following order: 1. dpid1 2. dpid2 3. dpid3 As an example, assuming I am sending a pkt from srcHost to dstHost, and I rewrite the destination mac address as follows: actions = [[openflow.OFPAT_SET_DL_DST,"00:25:64:a4:5c:f5"],[openflow.OFPAT_OUTPUT, [0, prt[0]]]] using dpctl at dpid1, I see the flow installed with the actions above (NB. I am using the actual dstHost Mac address). This works just fine, and the next dpid accessed on this path is "dpid2". However, this is not the case if I change the destination mac address as follows: actions = [[openflow.OFPAT_SET_DL_DST,"00:00:00:00:00:fc"],[openflow.OFPAT_OUTPUT, [0, prt[0]]]] For these actions, the flow mod is registered at the switch (as I verified using dpctl). However, the next packet arrives at "dpid1" (which implies that perhaps the flow was not actually installed though it appears on the switch). As in the previous example, I would expect the next packet to arrive at "dpid2". Can you please provide some feedback? BTW. I am running the "indigo 12.03.19" firmware on all switches. Cheers! Syd _______________________________________________ openflow-discuss mailing list openflow-discuss@lists.stanford.edu https://mailman.stanford.edu/mailman/listinfo/openflow-discuss _______________________________________________ openflow-discuss mailing list openflow-discuss@lists.stanford.edu https://mailman.stanford.edu/mailman/listinfo/openflow-discuss