On Tue, Oct 27, 2015 at 2:46 PM, Ramesh Karuppusamy <[email protected]> wrote: > > Hello List, > > For a set up here, we have a ROACH1 with it 10GbE (assigned to 10.0.0.30) > ports connected to a HP 5412l switch’s VLAN (subnet 10.0.0.0/24). Is there a > way to get the ROACH1’s 10GbE packets on a second VLAN (subnet 10.0.2.0/24) > on the same switch? > > On starting tgtap, the following routing table looks as follows on the ROACH1: > > root@dhcpeff64253:~# route -n > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use Iface > 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tap0 > 134.104.64.0 0.0.0.0 255.255.240.0 U 0 0 0 eth0 > 0.0.0.0 134.104.64.16 0.0.0.0 UG 0 0 0 eth0 > > > I did manually add a static route on the ROACH1 as soon as the gateway was > loaded: route add -net 10.0.2.0 netmask 255.255.255.0 gw 10.0.0.200 dev tap0
Shouldn't you then have a route involving the tap0 interace with a G flag in it ? > I have enabled routing on the switch, and I can ping 10.0.2.20 from 10.0.0.11 > on adding relevant static routes on both machines. However this doesn’t work > for the ROACH1. What is going wrong here? The tgtap logic handles arp and thus also needs to substitute the ethernet mac of the gateway - I don't remember when support was added for that - github/ska-sa/katcp_devel has the code in transmit_ip_fpga(), there is a chance you might have to backport it. However, this is for control traffic (packets that the kernel sends) only. In the case of the packets being generated by gateware on the fpga, this substitution is made differently - I think the gateway register needs to be loaded up (at offset 0xc). Doesn't the tap-start call have an option for that ? regards marc > > Cheers, > Ramesh

