Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Trashing the Vodafone Station

How to replace the Vodafone Station with your very own router

Vodafone forces its customers to use their modem/router, the "Vodafone Station": using any other router is impossible because authentication is being done via a custom PPPoE setup.
In the PPPoE packet there is a field named Host-Uniq which is used to separate packets from different PPPoE sessions: Vodafone requires the Station serial number to be put in this field as authentication.

Hardware setup

A Linux router with root access is needed to replace the Station with. With an xDSL connection a modem with a custom firmware like OpenWrt has to be used, most likely one based on a Lantiq SoC.
For a FTTH internet connection then every machine with at least two gigabit ethernet interface and a decent CPU will do it.

Software setup

PPPD by default puts its PID in the Host-Uniq field, while, as previously mentioned, Vodafone requires the Station serial number in it.
PPPD needs to be patched to set an arbitrary Host-Uniq field, but in decent distributions like Debian or OpenWrt the patch is already included.

Configuration

Line setup

Two separate WAN interfaces must be configured, for data and voice. The required setup depends on the connection type, ADSL, VDSL2 or FTTH.
With an ADSL connection you should use 10/36 as VPI/VCI for data, and 10/35 for voice, both of them configured with LLC encapsulation.
With a VDSL2 or FTTH connection you have to create two tagged VLANs with VID 1036 for data and 1035 for voice.

PPPoE

Once the ATM circuits or VLANs are configured, bring two PPPoE interfaces up for data and voice.
PPPoE configuration is a bit tricky because the Station serial number needs to be put in the Host-Uniq tag.
The serial number is in the form X12345678901234 where X is the Station manufacturer:

  • D ADB
  • C/S Sercomm
  • W Huawei

Convert it to hex:

$ echo -n X12345678901234 |xxd -ps
583132333435363738393031323334

and pass the argument host-uniq 583132333435363738393031323334 to PPPD to bringup the PPPoE connections.
In Debian it can be put globally in /etc/ppp/options or in the providers file in /etc/ppp/peers.
In OpenWrt then edit /etc/config/network and in the wan section add host_uniq=583132333435363738393031323334.

Data

The data PPPoE connection must use the Station serial number prepended with D- as username,
and something in the form of VJ|5.4.8.1.160.12.56.1.28|RA|CGN=1|pw=Vodafone as password, which means:

VJ stands for Vodafone Jungo (now OpenRG, the closed, crappy, monolithic, obsolete software inside the Station)
5.4.8.1.160.12.56.1.28 is the Station software version
RA don't really know
CGN=1 Carrier Grade Nat enabled
pw=Vodafone lol?

For example, in Debian a provider file this in /etc/ppp/peers/data will work:

persist
noauth
defaultroute
ifname pppoe-data
name D-X12345678901234
plugin rp-pppoe.so
host-uniq 583132333435363738393031323334
nic-eth0.1036

and add this line in /etc/ppp/pap-secrets:

D-X12345678901234       *       VJ|5.4.8.1.160.12.56.1.28|RA|CGN=1|pw=Vodafone

Voice

The voice PPPoE connection must use the Station serial number prepended with V- as username, and vodafone as password.
In your beloved Debian system it can be done by creating /etc/ppp/peers/voice with this content:

nodefaultroute
noauth
ifname pppoe-voice
name V-X12345678901234
plugin rp-pppoe.so
host-uniq 583132333435363738393031323334
nic-eth0.1035

and this entry in /etc/ppp/pap-secrets:

V-X12345678901234       *       vodafone

The SIP and RTP server are accessible only via the voice WAN and belong to the 10.0.0.0/8 subnet.
To access them create a script which configures that route every time that the voice WAN brings up,
I used to put this script in /etc/ppp/ip-up.d/0002route:

#!/bin/sh
[ "$PPP_IFACE" = 'pppoe-voice' ] && ip route add 10.0.0.0/8 dev pppoe-voice via $PPP_LOCAL

Getting the SIP credentials is difficult but not impossible, you have to query the ACS server to get them.

Connect

To connect both PPPoE sessions simultaneously, the two VLAN must have different MAC addresses, so one of the two interface address mus be spoofed.
Now it should be possible to connect with pon pppoe-data and pon pppoe-voice or with ifup, if the network is configured in /etc/network/interfaces.

Here there is a working Debian configuration:

auto eth0 eth0.1036 eth0.1035 pppoe-data pppoe-voice

iface eth0 inet manual

iface eth0.1036 inet manual
        vlan-raw-device eth0

iface eth0.1035 inet manual
        vlan-raw-device eth0
        up ifconfig eth0.1035 hw ether $(sed 's/^../02/' /sys/class/net/eth0/address)

iface pppoe-data inet ppp
        pre-up ifconfig eth0.1036 up
        provider data

iface pppoe-voice inet ppp
        pre-up ifconfig eth0.1035 up
        provider voice

Don't ever try to use crappy software like systemd-networkd or NetworkManager to do such network configuration:
system-networkd doesn't supports PPPoE and never will because "It's importance is questionable in modern OSs",
NetworkManager does a little better, it supports PPPoE but not over a VLAN, so no way either.

Multiple sessions

Multiple PPPoE sessions can be raised, but they must have different MAC addresses and Host-Uniq.
An option cuold be using a macvlan over the VLAN, like:

ip link add link eth0.1036 veth1 address $(sed 's/^../12/' /sys/class/net/eth0/address) type macvlan

and then starting another PPPoE session over the veth1 device, with another Host-Uniq.
The session will get a public IP and extra bandwidth ;)

Dyndns

A fancy hostname like vox1234567.mynet.vodafone.it is assigned to every Vodafone line, where 1234567 is the line identifier, which is written in the phone bill.
The hostname can be used as free and reliable dyndns, and it's also the ONT authentication token.

Conclusion

I've made this tutorial because I find the Station extremely buggy and feature limited, and I really hate that Vodafone forces me to use this crappy, OpenRG based device.
It's not my intention to harm or damage any of the parties involved in developing, selling or using this device.
I just want to use my fiber line with a customizable, reliable and powerful device, like my x86 based Debian box, nothing more, nothing less.

cheers and happy hacking,
teknoraver

@mtrimarchi
Copy link

mtrimarchi commented Feb 21, 2017

Perfect as always!

@vinz486
Copy link

vinz486 commented Mar 8, 2017

I will flash with OpenWRT my Tplink TD-W8970 only to follow this tutorial. Thank you!

EDIT: no way to configure a VLAN on ptm0 phisical iface. VLAN is available only on 4 port switch. W8970 cannot run a FTTC directly :-(
EDIT2: got the VLAN on the modem iface BUT vdsl binary is bugged:

/home/buildbot/slave-local/lantiq_xrx200/build/build_dir/target-mips_34kc+dsp_uClibc-0.9.33.2/linux-lantiq_xrx200/ltq-ptm-vr9/ifxmips_ptm_vdsl.c:281:ptm_hard_start_xmit: not in showtime

and no one in The Internet know ho to fix.

@teknoraver
Copy link
Author

teknoraver commented Jul 23, 2017

A lamer seems to have stolen the tutorial without citing me: https://www.youtube.com/watch?v=EHUm_3bW9dQ
shame on him, small man ;)

@The-Incubus
Copy link

The-Incubus commented Aug 22, 2017

The lamer posted it also here http://smarthome.hwupgrade.it/forum/showpost.php?p=44824738&postcount=261 (http://smarthome.hwupgrade.it/forum/showthread.php?t=2812168&page=14).
He also got a friend posting a similar guide (https://bitsh4rk.wordpress.com/2017/06/30/come-sostituire-la-vodafone-station-revolution/) and thanking him for 'his' work...

BTW, having different (and valid) login informations, do you think it's possible to initiate different pppoe sessions and balance the traffic through them?

@appignanesi
Copy link

appignanesi commented Sep 25, 2017

Hello!
Just a question. I have an ASUS RT-AC68U. VSR in DMZ doesn't allow me to use DDNS because of Multi-NAT issues. Would it be possible to use the infos to have VSR in bridge mode so to connect to it from RT-AC68U using PPPOE?
Thank in advance for your time and help.
Paolo

@raikoug
Copy link

raikoug commented Nov 26, 2017

Hi,
I'm really interested. I'd like to buy a nice one to replace Vodafone Station Revolution.
Can some one suggest a good modem to be used with OpenWrt firmware?
Thanks!

@MikeOnTheWork
Copy link

MikeOnTheWork commented Mar 19, 2018

Hi All,
my connection is a Vodafone ADSL and I'm curios to know if on the Ethernet port labelled as WAN on my ADB Vodafone station revolution can be used to connect openwrt to untag the VLAN 1035. I ve tried to do that using openwrt in a VMWARE guest machine with the eth0 bridged on my laptop ethernet card. Checking with wireshark the VLAN broadcast discovery start but there is not any answer coming back (I ve tried to changing the VLAN interface mac address with the vodafone station mac address stamped on the router back .

Do you know if that architecture should work ?

Thanks

@frillicca
Copy link

frillicca commented Dec 9, 2018

Hi guys
I have LEDE running on WNDR4700. I am becoming crazy, I am not able to bypass my Vodafone Station. I have FFTH connection. Here below my /etc/config/network:

config interface 'wan'
option ifname 'eth0.1036'
option _orig_ifname 'eth0.2'
option _orig_bridge 'false'
option proto 'pppoe'
option username 'D-W17030001339527'
option password 'VJ|5.4.8.1.327.1.12.1.7|RA|CGN=1|pw=Vodafone'
option host_uniq '573137303330303031333339353237'
option ipv6 'auto'

config interface 'wan6'
option ifname 'eth0.2'
option proto 'dhcpv6'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '4 3 2 1 0t'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '5 0t'

I also tried to change the switch section moving option vlan '2' in '1036', nothing...

Any advice please ?
Gen

@jsparber
Copy link

jsparber commented Nov 25, 2019

@frillicca Not sure if you are still looking for a solution.
Try to add option vid '1036' to the last config switch_vlan, there is a difference between vlan and vid

My config looks like this:

config switch_vlan           
        option device 'switch0'
        option vlan '2'      
        option vid '1036'
        option ports '4t 6t' 

@teknoraver
Copy link
Author

teknoraver commented Mar 23, 2020

@teknoraver
Copy link
Author

teknoraver commented Mar 23, 2020

Well, that's easy now. Setup a phone (I use a Gigaset Cordless) using the correct outbound proxy, user, pass and all the parameters.
Do some tests with a Linux application like Yate or Linphone, when it work configure a standalone device

@djStolen
Copy link

djStolen commented May 26, 2021

Hi,

Is this how to applicable for Vodafone Station in Germany?

Thanks

@teknoraver
Copy link
Author

teknoraver commented May 27, 2021

Yes, maybe some parameters are different, but it's the same stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment