Hi everyone,
(sorry for not writing in French, I'm not quite that good at writing in it yet)
I saw here on the forum that many people that are trying to replace Orange's Livebox with a Linux router encounter one particular problem when using the ISC DHCP client:
dhclient, the default on many Ubuntu and Debian setups uses raw sockets for sending the initial DHCP request while the machine does not have an address yet. packets that are sent through those raw sockets bypass the normal IP stack, therefore cannot be classified in iptables (normally done through
-j CLASSIFY --set-class 0:6) and as a consequence setting the IEEE 802.1Q PCP value (VLAN priority) is kinda hard.
But Orange's equipment insists on receiving ARP, DHCP, ICMPv6, … packets on the 832 VLAN with the priority set to 6, otherwise it won't respond.
So I though I might share my solution to that:
The solution with which I went is to simply create a dedicated "net_prio" CGroup (I called it "dhcp-orange") and launch the dhclient instances (one for IPv4, one for IPv6) in that group.
Then, the interface priority map for this group can be set to the tag all packets going out on the VLAN interface ("enp2s0.832" in my case) with classification/ skb priority of 0:6.
The skb priority of 0:6 is then simpy mapped to a VLAN priority of 6 by using the normal egress map.
Here's the snippet from my
/etc/network/interfaces:
# VLAN 832 for internet traffic (incl. VoIP)
auto enp2s0.832
iface enp2s0.832 inet manual
pre-up cgcreate -g net_prio:dhcp-orange
pre-up cgset -r "net_prio.ifpriomap=enp2s0.832 6" dhcp-orange
post-up ip link set enp2s0.832 type vlan egress 5:5 6:6
post-up cgexec -g net_prio:dhcp-orange --sticky -- dhclient -4 -cf /etc/dhcp/dhclient-orange-v4.conf $IFACE
post-up cgexec -g net_prio:dhcp-orange --sticky -- dhclient -6 -cf /etc/dhcp/dhclient-orange-v6.conf -P -D LL $IFACE
pre-down dhclient -4 -r
pre-down dhclient -6 -r
vlan-raw-device enp2s0
- cgcreate creates a new CGroup
- cgset is used to do some configuration
- cgexec launches a new process in that group
all three tools can simply be installed through the
cgroup-tools package on Ubuntu & Debian.
I hope this might be useful to some of you

Cheers