You can do something like this. my_switch[0] -> Print(1) -> ... my_switch[1] -> Print(2) -> ... my_switch[2] -> Print(3) -> ...
Also, you need to strip the original Ethernet header first. Otherwise, you are just encapsulating an Ethernet frame inside another Ethernet frame. So you would want to place a Strip(14) after my_switch[x]. My favorite debugging method is using a Tee. path -> t :: Tee -> ... t[1] -> ToHostSniffers(ethX); and then you can just run tcpdump/wireshark to see what packets are on the path (assuming you have Ethernet packets). Roman On Tue, 07 Dec 2010 14:38:28 -0800 Sunjeet Singh <[email protected]> wrote > Can someone please help me troubleshoot? > > On Linux, I'm trying to configure a load-balancer that sits in front of > a cluster, receives all packets destined to that cluster, calculates a > hash of some fields of the packet using HashSwitch() to decide which > worker machine in the cluster to send that packet to, and finally then > forwards that packet to that worker machine by rewriting the MAC Address > field of that packet. > > Here's what my click script looks like (currently testing with one > frontend machine and one worker machine)- > > AddressInfo(mymac <IP add. of frontend/8> <mac add of eth0>); > AddressInfo(worker1 <IP add. of worker1/8> <mac add of worker eth0>); > AddressInfo(worker2 <IP add. of worker1/8> <mac add of eth1>); > AddressInfo(worker3 <IP add. of worker1/8> <mac add of eth2>); > > my_switch :: HashSwitch(26, 8); > > FromDevice(eth4, PROMISC true) -> my_switch; > todevice1 :: ToDevice(eth0); > todevice2 :: ToDevice(eth1); > todevice3 :: ToDevice(eth2); > > my_switch[0] -> EtherEncap(0x0800, mymac, worker1) -> Queue -> todevice1; > my_switch[1] -> EtherEncap(0x0800, mymac, worker2) -> Queue -> todevice2; > my_switch[2] -> EtherEncap(0x0800, mymac, worker3) -> Queue -> todevice3; > > > When I run the script with the command "sudo click try.click", it starts > executing and gives no messages. To test it, > I used tcpdump to first see if any of the interfaces on worker1 is > receiving any traffic -> No. > Then I checked if any traffic is going out of eth0, eth1 or eth2 on > frontend -> No. > Checked if eth4 is receiving the packets I sent through tcpreplay -> Yes. > > How can I go about debugging this? I will greatly appreciate any help in > this regard. > > Thank you, > Sunjeet Singh > > > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
