Would someone have a Idea of how to change vlan tag when sending or receive a ethernet packet on the wire? ( iRule)
what is the purpose?
I have never tried this. I would think in the majority of cases the VLAN tag would be determined as a result of the egress interface selection from either a route table lookup or auto last hop (for an existing flow). You may be able to achieve your result by changing the routing decision with the nexthop iRule command. The end result of this would be to modify the routing, which would change the VLAN tag by setting the next hop to the network associated with the VLAN tag.
Not sure if this helps with your requirement. Additional information as farukaydin requested would be helpful.