I'm running an application in Ubuntu12.04 that I've written that does some remote switch management. I have only a single NIC connected to the network of managed switches, eth0 which is set with IPv4 10.0.0.1/24. This IPv4 address is the only address that this Ubuntu machine can use since this is the only "globally" routable address assigned to the Ubuntu machine (due to some network administration, not due to technical issues...)
I need the switch management traffic (NetConf over SSH, using UDP port 830) to include a 802.1q VLAN tag with VLAN ID 444), when sending the NetConf frames and the replies will be received also with this tag. All other traffic (http, ftp, dhcp, snmp, etc.) will use eth0 without the VLAN tag.
I've tried using a VLAN interface eth0.444 on eth0, but is seems the traffic sent doesn't include the VLAN tag.
Can (and how) can I use ebtables/iptables to add a specific VLAN tag to specific UDP port traffic? Will the ebtables/iptables solution work also for the receive path?
Thank you!
David