Can tc
be used with virtual network interfaces
Yes.
(like eth0:0, eth0:1)?
No.
Those aren't virtual network interfaces. They're aliases for network interfaces. There's a huge difference.
It's an oldfashioned way to specify more than one address per interface, instead of the modern approach of ip address add/change/replace/del $ip dev $interface
.
https://www.kernel.org/doc/Documentation/networking/alias.txt
IP-aliases are an obsolete way to manage multiple IP-addresses/masks
per interface.
And that's pretty much all you can use them for. Best not to use them at all. Aliases make you think they're virtual devices with all the bells and whistles but they're not. Aliases exist in name only - they don't do anything.
If you need a genuine virtual network device, you can have a look at bridge devices (virtualization), or tun/tap devices (openvpn). For tc
specifically, you might also be interested in IMQ / IFB.
If you just want to filter by IP address, you can specify those in tc filter
or mark them in iptables
and then filter by mark.