Create a subinterface tagged with VLAN ID 10 on eth0
# create a new subinterface tied to dot1q vlan 20
ip link add link eth1 name eth1.20 type vlan id 20
# assign an IP addr
ip a add 192.168.20.1/24 dev eth1.20
# enable the new sub-interface
ip link set eth1.20 up
See - Configuring Macvlan and Ipvlan Linux Networking for more on Ipvlan/Macvlan/VLAN type interfaces