Skip to contentSkip to conversation

question about major:minor numbers

LARTC Andre Correa 2 participants 2 messages Jan 14, 2004

lore
Share & tools
lore
#0 lore raw

Cord, you can use the same major numbers in diferent devices, no problem. You cannot have repeated minor numbers in the same device, but in diferent devices it is OK.

Note that sometimes using diferent major numbers may be a good idea, for example, when you are scripting this may help...

Andre

Quoted 24 lines · Cord Buhlert

Hi,
the documentation says "[the major number of a class] must be unique within a egress or ingress setup. The minor number must be unique within a qdisc and his classes."

What is meant by "setup"? Does that include all qdiscs attached to any network device? Ie, if I have a qdisc attached to eth0 and another attached to eth1, do the major numbers I use have to be different at all or could I use the same number structure in eth0 and eth1?

Short example to explain:
tc qdisc add dev eth0 root handle 1: htb default 13 tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps... tc class add dev eth0 parent 1:1 classid 1:10 htb rate...
...

tc qdisc add dev eth1 root handle 1: htb default 13 tc class add dev eth1 parent 1: classid 1:1 htb rate 100kbps... tc class add dev eth1 parent 1:1 classid 1:10 htb rate...
...

Is this valid? Or do I have to use "2:" instead of "1:" in the second part?

Quoted 9 lines

thanx
cb

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw

Hi,
the documentation says "[the major number of a class] must be unique within a egress or ingress setup. The minor number must be unique within a qdisc and his classes."

What is meant by "setup"? Does that include all qdiscs attached to any network device? Ie, if I have a qdisc attached to eth0 and another attached to eth1, do the major numbers I use have to be different at all or could I use the same number structure in eth0 and eth1?

Short example to explain:
tc qdisc add dev eth0 root handle 1: htb default 13 tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps... tc class add dev eth0 parent 1:1 classid 1:10 htb rate...
...

tc qdisc add dev eth1 root handle 1: htb default 13 tc class add dev eth1 parent 1: classid 1:1 htb rate 100kbps... tc class add dev eth1 parent 1:1 classid 1:10 htb rate...
...

Is this valid? Or do I have to use "2:" instead of "1:" in the second part?

thanx
cb

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/