Using a generic OpenWRT router with a Vodafone Italy FTTH home line

I have put together this tutorial to make clarity on the different options Vodafone Italy FTTH residential customers have for using a generic openWRT router. This guide is for basic OpenWRT users not very familiar with VLAN configuration aspects. A good resource for VLAN configuration is this guide: https://openwrt.org/docs/guide-user/network/vlan/start

I decided to write this guide as Vodafone Italy was not covered in the main ISP configuration guide of the OpenWRT community: https://openwrt.org/docs/guide-user/network/wan/isp-configurations#italy

There are multiple scenarios Vodafone customers might be as I wrote this guide (May 2023). It’s good to try making clarity on what the situation is right now and what the most actual settings are for ONT, sft and router devices. Many people are not familiar with GPON ONT boxes and with sfp modules.

Objective: Using a generic OpenWRT with a WAN ethernet port for data connectivity using a fiber optic line provided by Vodafone Italy. The speed of the connection can be influenced by the router WAN ethernet port speed, the sft module, the ONT and the media converter used.

Warning: If you have a line faster than 1Gbps (e.g. 2.5Gbps) you need to use specific routers and ONT boxes.

Warning: This tutorial is not covering using the phone voice service. A suitable router with the required features (e.g. Fritzbox) is required. You can still try to use OpenWRT there, but a suitable router is required.

Prerequisite: As a Vodafone customer, you should be in one of the following scenarios:

  1. You have requested to use a personal router and not one provided by Vodafone when the line was originally installed. In this case you have a GPON ONT box with an ethernet port. The ONT was configured by the technician when the line was installed. Your current router is not running OpenWRT and you would like to replace it with an OpenWRT-powered one.

if you prefer to buy your own GPON ONT, where you can set the user ID (codice pratica), you might considering watching this video: https://www.youtube.com/watch?v=qj_Z6mqhrEU

  1. You have a Vodafone Power Station without sfp module, but one connecting through an ONT. You are in the same situation of scenario 1.

  2. You have a Vodafone Power Station with a sfp module. This module is most likely a Huawei MA5671A and it should be preconfigured by the installer with the right parameter to allow you to access the network (codice pratica, converted in ASCII text).

If you would like to source a similar module with root access, you can try watching this youtube video: https://www.youtube.com/watch?v=-RA_3qVA7NQ
After having ejected the sftp module from the Vodafone station using its metal ring for better handling, you need to insert it in a media converter with an ethernet port. I have used a TP-LINK MC220L for this purpose.

  1. You have Vodafone Station Revolution with an integrated ONT. In this case you need to consider sourcing either your own sfp module or a ONT box. I suggest to go for a ONT, as this is the most flexible solution.
    Just make sure to buy a ONT or sfp that are compatible with the optical network installed in your building (wavelength etc...)

Assuming you have sorted your specific scenario (in my case is with a preconfigured sfp module plus a media converter -picture below-), it's time to edit your own OpenWRT router network configuration.

Connessioni

OpenWRT /etc/config/network configuration:
After having accessed the OpenWRT router with SSH access, you need to set the proper parameters on the network configuration file, including the VLAN ID required for the Vodafone line.
The parameters are posted by Vodafone on this page: https://www.vodafone.it/privati/area-supporto/assistenza-dispositivi/altri-dispositivi/modem-alternativo-alla-vodafone-station.html
Here the parameters to consider for an FTTH connection:
ecapsulation: VLAN Ethernet 802.1q
VPI/VCI: none
VLAN: 1036
username: vodafoneadsl
password: vodafoneadsl
NAT: attivo

Once you have connected your WAN router to the ethernet port of the media converter (or the ONT box) you can modify your WAN interface as the following:

config interface 'wan'
        option username 'vodafoneadsl'
        option password 'vodafoneadsl'
        option ipv6 '0'
        option metric '10'
        option peerdns '1'
        option proto 'pppoe'
        option ifname 'eth0.1036'

Just make sure to activate this new eth0.1036 WAN in case you have other WAN intefaces previously configured for using the ethernet port with the DHCP client protocol and not tagged traffic.
Don't forget to make sure you have the right settings for creating the eth0.1036 VLAN device.
This configuration may be different depending on your router ethernet switch architecture and enumeration of the ethernet ports. In my case, I have used a 4 LAN ports, 1 WAN ethernet port. The WAN port was enumerated as Port 5. Here the settings that resulted in my /etc/configuration/network file:

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

config switch_vlan               # this was creating eth0.1 on the LAN ports
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 5t'

config switch_vlan
        option device 'switch0'    # this was creating eth0.2 as WAN for getting non-tagget traffi and for getting an IP with DHCP protocol. It's good to leave this part if you want to switch back usign the WAN port as normal ethernet port. 
        option vlan '2'
        option ports '0 5t'

config switch_port              
        option device 'switch0'
        option port '5'
        option pvid '2'

config switch_vlan                     # I have added these new lines to create the required VLAN device for accessing the Vodafone FTTH line, that used tagget packets on pvid 1036.
        option device 'switch0'
        option ports '0t 5t'
        option vlan '1036'

config switch_port
        option device 'switch0'
        option port '5'
        option pvid '1036'

At this point you need to restart/reload your network.
If everything works as expected, you should see something like this when you check the ifconfig:

eth0.1036 Link encap:Ethernet  HWaddr XX:YY:ZZ:KK:UU:12
          UP BROADCAST RUNNING MULTICAST  MTU:1600  Metric:1
          RX packets:2682433 errors:0 dropped:0 overruns:0 frame:0
          TX packets:953245 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1833988307 (1.7 GiB)  TX bytes:366523434 (349.5 MiB)

This is the VLAN software switch working fine as you can see RX/TX traffic

pppoe-wan Link encap:Point-to-Point Protocol
          inet addr:2.36.54.38  P-t-P:2.36.0.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:2653557 errors:0 dropped:0 overruns:0 frame:0
          TX packets:924369 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:1811421369 (1.6 GiB)  TX bytes:345321016 (329.3 MiB)

If everything works fine, you should be able to see the WAN ppoe inferface up and running with a valid public IP address assigned by Vodafone Italy!

The same working configuration can be verified with Luci -> Network -> Interfaces:

If you are using a 1Gbps ports router, you should now be able to do a speed test with your PC connected to one of the LAN ports. This test should get closer to the 1Gbps download speed. Upload might be either 200Mbps or 500Mbps depending on the network speed of your area.

If you are using a 100Mbps ports router, the speed test should be close to 100Mbps download and upload speed.

Testing speed over wifi might be influenced by the negotiated speed of your device with the router.

3 Likes

Hi,
thanks for this guide, in which I think my current configuration falls into:

FTTH --> VDS (set to play modem role) --> OpenWRT router (configured WAN on VDS and LAN for local network)

I have recently purchased an ONT LEOX configured for my FTTH Voda. I then need to configure the VLAN on the router, here are my doubts:

  1. Can I create and configure the VLAN via the OpenWRT Web GUI avoiding going through SSH?
  2. Since I don't want to lose the router's current WAN and LAN configuration, can I add the VLAN so I can test enabling/disabling interfaces?
  3. Curiosity, if I may ask. Italian user?

Thanks

Just adding a message to confirm the configuration did work for me and allowed me to replace a Vodafone Station with SFP module with a TP-Link MC220L + a RPI4 running OpenWrt.

And in case this might save others time, I have lost a couple of hours before realising that the reason it was not working out of the box for me (with weird user errors) was because I had to tweak the last line from

option ifname 'eth0.1036'

to

        option ifname 'eth1.1036'

based on my setup :upside_down_face:

Buongiorno Paolo,

Thanks for posting your experience on the RPI-4 configuration.

I have also recently replaced my Asus Router with a Raspberry Pi 4 for better performance when connecting to VPN servers. Since I don't need two ethernet ports, I am just using the single port of the RPI-4 to handle the WAN connection to the ONT with the VLAN 1036 settings. Just for sanity-check, I post here the network configuration that I have used (I have omitted the interface options defined for handling the VPN client):

on:


| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -| || | | || || |
|
_____|| |
||||___||| |____|
|
| W I R E L E S S F R E E D O M

OpenWrt SNAPSHOT, r26289-61e8728d86

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
option device 'lo'

config interface 'lan'

This is the LAN subnet for clients connecting to the RPI-4 SSID access point

    option type 'bridge'
    option proto 'static'
    option netmask '255.255.255.0'
    option ip6assign '60'
    option ipaddr '192.168.4.1'

config interface 'WAN'
option proto 'pppoe'
option device 'eth0.1036'
option username 'vodafoneadsl'
option password 'vodafoneadsl'
option ifname 'eth0.1036'
option ipv6 'auto'

config device
option type '8021q'
option ifname 'wan'
option vid '1036'
option name 'br-wan.1036'
list ports 'eth0'

config device
option name 'eth0'

It took me a couple of hours to sort this configuration to properly handle the eth0.1036 VLAN switch. No way to define this file using the Luci interface. I had to edit the /etc/config/network until I have found the right settings. Probably some of the options used for the br-wan device are not needed.

Can you please post the /etc/config/network file you used on the Raspberry Pi 4 OpenWRT configuration? In case you have used a secondary ethernet port eth1 for connecting the ONT (using a USB to ethernet adaptor) probably it was more straightforward to configure the WAN interface and related devices.