Auteur Sujet: Draft Orange DHCP conformité protocolaire 2026 + CGNAT - Lire depuis le début  (Lu 225 fois)

0 Membres et 2 Invités sur ce sujet

levieuxatorange

  • Expert Orange
  • Expert
  • *
  • Messages: 355
Réservation pour Mise à jours de la spec a date de 2026 avec inclusion de la partie CGNAT

Sera à épingler quand cela sera terminé
« Modifié: Hier à 12:55:02 par levieuxatorange »

levieuxatorange

  • Expert Orange
  • Expert
  • *
  • Messages: 355
Réserve

levieuxatorange

  • Expert Orange
  • Expert
  • *
  • Messages: 355
Réserve

levieuxatorange

  • Expert Orange
  • Expert
  • *
  • Messages: 355
Réserve

levieuxatorange

  • Expert Orange
  • Expert
  • *
  • Messages: 355
Réserve

Mastah

  • Abonné Orange Fibre
  • *
  • Messages: 762
  • XGS-PON et G-PON
Reservé pour publication du script bash / envsubst qui génère les bonnes valeurs des fichiers de config (dhcpcd, isc-dhcp-client, ...) sur debian, openwrt, ...

Merci levieuxatorange pour les efforts "d'ouverture" de la connexion.

Script actuel

/etc/dhcp/dhclient-orange-generator
#!/bin/bash

LOGIN='fti/XXXXXXX'
PASSWORD='YYYYYYY'
LIVEBOX_VERSION=5
LIVEBOX_HARDWARE='sagem'

# Forge DHCP option 90
tohex() {
  for h in $(echo $1 | sed "s/\(.\)/\1 /g"); do printf %02x \'$h; done
}

addsep() {
  echo $(echo $1 | sed "s/\(.\)\(.\)/:\1\2/g")
}

r=$(dd if=/dev/urandom bs=1k count=1 2>&1 | md5sum | cut -c1-16)
id=${r:0:1}
h=3c12$(tohex ${r})0313$(tohex ${id})$(echo -n ${id}${PASSWORD}${r} | md5sum | cut -c1-32)

# vendor class
export VENDOR_CLASS_IDENTIFIER_4=${LIVEBOX_HARDWARE}
export VENDOR_CLASS_IDENTIFIER_6=00:00:04:0e:00:05$(addsep $(tohex ${LIVEBOX_HARDWARE}))
echo "Vendor class has been generated"

# user class
export USER_CLASS_4=+FSVDSL_livebox.Internet.softathome.Livebox${LIVEBOX_VERSION}
export USER_CLASS_6=00$(addsep $(tohex "+FSVDSL_livebox.Internet.softathome.Livebox${LIVEBOX_VERSION}"))
echo "User class has been generated"

# option 90
export AUTHENTICATION_STR=00:00:00:00:00:00:00:00:00:00:00:1a:09:00:00:05:58:01:03:41:01:0d$(addsep $(tohex ${LOGIN})${h})
echo "Option 90 has been generated"

# Generate DHCP client (ivp4 and ivp6) files
envsubst < /etc/dhcp/dhclient-orange-v4.conf.template > /etc/dhcp/dhclient-orange-v4.conf
envsubst < /etc/dhcp/dhclient-orange-v6.conf.template > /etc/dhcp/dhclient-orange-v6.conf


/etc/dhcp/dhclient-orange-v4.conf.template
# Debug: tcpdump -i wan port 67 or port 68 -e -n -v

# Definition
option user-class       code 77 = string;
option authentication   code 90 = string;

# Send Option
send dhcp-parameter-request-list 1, 3, 6, 15, 28, 51, 58, 59, 90, 119, 120, 125;
# Uncomment for absolutly no Orange domain/dns/server-name related
#send dhcp-parameter-request-list 1, 3, 28, 51, 58, 59, 90, 120, 125;
send vendor-class-identifier "${VENDOR_CLASS_IDENTIFIER_4}";
send dhcp-client-identifier = hardware;                                 # equivalent to 01:xx:xx:xx:xx:xx:xx but use mac specified on interface (cf. hw-mac-address on iface)
send user-class "${USER_CLASS_4}";
send authentication ${AUTHENTICATION_STR};


/etc/dhcp/dhclient-orange-v6.conf.template
# Debug: tcpdump -i wan port 546 or port 547 -e -n -v

# Definition
option dhcp6.vendorclass        code 16 = string;
option dhcp6.userclass          code 15 = string;
option dhcp6.auth               code 11 = string;

# Send Option
# 73:61:67:65:6d == sagem
send dhcp6.vendorclass ${VENDOR_CLASS_IDENTIFIER_6};
# 2b:46:53:56:44:53:4c:5f:6c:69:76:65:62:6f:78:2e:49:6e:74:65:72:6e:65:74:2e:73:6f:66:74:61:74:68:6f:6d:65:2e:4c:69:76:65:62:6f:78:35 == "+FSVDSL_livebox.Internet.softathome.Livebox5"
send dhcp6.userclass ${USER_CLASS_6};
# auth str
send dhcp6.auth $AUTHENTICATION_STR;

request dhcp6.auth, dhcp6.vendorclass, dhcp6.userclass;

Script mise à jour
TODO