Direct attaching a Ubiquiti Edge Router to a fibre network

I’m not a big fan of the free-ish routers you get from your internet provider in Switzerland. Most devices are just cheap “crap devices” and they lack of any slightly advanced feature. Therefore I’m always going with a Ubiquiti Edge Router!

I like Ubiquti a lot, as I’ve experienced their devices as rock solid (more or less at least) and their software is quite nice. If you’re an Ansible user, you can also automate the whole configuration with it!

Internet providers in Switzerland

As mentioned before, internet providers in Switzerland often provide free routers or alike. And even if you decide to go with your own hardware, they often give you an ONT (Optical Network Terminal) for your fibre internet. Thus, usually you’ve to connect the provider’s ONT to the fibre port and your lovely router via Ethernet to the ONT.

This works as expected, but there’s a drawback. You’ve just one more device, one more layer of complexity, one more thing that can fail or malfunction from time to time. Trust me, I’ve been there and you don’t want to troubleshoot a FritzBox or alike!

So, if your router has an SFP interface, then you might want to connect it via fibre SFP directly to the fibre network of your internet provider. In Switzerland, there are a couple of them who allow you to do that.

iWay

I’m a bit biased and I always go with iWay, because:

  • They allow me to directly attach my fibre router officially (just mentioned “direct attached” on your registration)
  • Their customer service is friendly & responsive, as they immediately answer the phone and replying to support tickets very fast
  • Their support is remarkably good, never seen that on another Swiss internet provider so far

My hardware

This is the hardware I’m using to direct attach my router to the fibre network:

I think this hardware should work for most of the Swiss internet providers / OTO fibre connectors.

My configuration

Here’s what I had to configure to get the directly attached fibre router up & running with iWay.

Firmware update

Update the router firmware to version 1.10.8 or later. There are two reasons to update the firmware:

  • Security enhancements (of course)
  • Proper speed selection on the SFP port

Unfortunately, leaving the SFP port on auto negotation didn’t work for me, as the remote site (iWay or SAK) didn’t respond very well to it. The link didn’t want to come up. The old firmware only allowed me to set the port to 100/full. After the firmware update, I was able to select 1000/full and I immediately got a link up!

Interface configuration

On the Dashboard, configure the eth5 port as follows:

  • Enable: Check
  • Address: Use DHCP
  • MTU: 1500
  • Speed/Duplex: 1000/full (important, Auto negotiation won’t work)

 

The corresponding CLI commands are:

set interfaces ethernet eth5 address dhcp
set interfaces ethernet eth5 description WAN
set interfaces ethernet eth5 duplex full
set interfaces ethernet eth5 speed 1000

NAT

In the Firewall/NAT tab under Port Forwarding, configure the following settings to setup the correct routing:

  • WAN interface: eth5
  • LAN interface: (whatever your LAN interfaces are)

 

Also in the Firewall/NAT tab but under NAT, add a new Source NAT Rule to masquerade your outgoing traffic:

  • Description: AWAN masquerading
  • Enable: Check
  • Outbound Interface: eth5
  • Translation: Use Masquerade
  • Protocol: All Protocols

 

The corresponding CLI commands are:

set port-forward lan-interface switch0
set port-forward wan-interface eth5

set service nat rule 5000 description 'WAN masquerading'
set service nat rule 5000 log disable
set service nat rule 5000 outbound-interface eth5
set service nat rule 5000 type masquerade

Test connectivity

You should now see a public IP address on the eth5 interface. To test the connectivty, you can do the following steps:

  • Run ping example.net from your shell
    • If that works, you’re ready to go
    • If that doesn’t work, continue to the next step
  • Run ping 1.1.1.1 from your shell
    • If that works but not the above, then you might want to check your DNS configuration
    • If that doesn’t work, continue to the next step
  • Ping 1.1.1.1 from the Edge Router (via WebUI on top right corner or via SSH)
    • If that works but not the above, then you might want to check your NAT rules
    • If that doesn’t work, check the WAN port configuration, your firewall or check with your internet provider

I’d recommend using own DNS or Cloudfare’s DNS servers (1.1.1.1 &1.0.0.1). You can also use Google’s DNS servers, but I’m not a big fan of Google collecting and correlating all your data!

62 Comments

  • happy wheels

    I like your blog post. Keep on writing this type of great stuff. I’ll make sure to follow up on your blog in the future.

  • delete program in window 10

    You present wonderful skills. It is great to read this fabulous article.The Ideas in your blog is very wonderful and authentic.

  • Ghanshyam Gayri

    Helpful post for setting a ubiquiti router. I will try this setting with my router. Thanks once again

  • Andreu

    I was considering doing something similar (with another Ubiquiti router and a different internet provider), but I was really doubting because for what I have read it seems that the software in Ubiquiti’s routers can only handle Ethernet protocol for the SFP sockets but not GPON (or any other for that matter), and it is not very likely that a GPON-ONT SFP module will be even possible to configure… I noticed that the TPLink SFP module that you are using seems not to be a GPON-ONT (like for example the MA5671A from Huawei) but a “fiber NIC” which uses Ethernet protocol.

    I am not sure if my internet provider (databaar) needs an ONT interface or if I could mount a similar scenario with Ethernet protocol. I will send them an e-mail (hopefully Ethernet will be enough).

    I would like to know if iWay provides you something in addition to data (e.g. TV, phone) and if you could make them work as well.

    Congratulations for the interesting blog.

    • A

      @Andreu – Did you ever get this up and running ? I have the exact same scenario as you, that I to say a FTTH install with Databaar with a full stack of Ubiquiti kit (UDM pro, etc..) and have been itching to get rid of the MA5671A for quite some time now…

  • PUBG LOVER

    Great post with authentic information. I am really following your platform. Thank you.

  • bubble witch 3 saga

    Very well explained with small setup. I strongly recommended it. thank you.

  • Subway surfer PC

    Struggling to find the best router for your home? It can be quite challenging if you aren’t sure what to look for in the product, which is quite common amongst most people that aren’t too familiar with computers and technology.

    Choosing the best router can be difficult as they seem like complex devices. However, it’s not too difficult once you know what to look for and some buying considerations to make before you decide on a product.

  • tidewater news

    Glad you have elaborated the details and the instructions very well! Thanks!

  • diy electric bike

    Yay! This would also be a great guide for everyone. 🙂

  • Something more important is that when searching for a good on-line electronics store, look for online stores that are constantly updated, maintaining up-to-date with the most up-to-date products, the perfect deals, in addition to helpful information on products. This will ensure that you are doing business with a shop that really stays ahead of the competition and provide you what you should need to make intelligent, well-informed electronics purchases. Thanks for the important tips I’ve learned through the blog.

  • Leptitox Review

    Vip Karachi Escorts Services Will Provide you Young and Teenager Escorts In Karachi . Our Girls Will Able to Your Desire What you want when u met Her. If you Looking Real.

  • Resurge Review

    Wow, excellent post. I’d like to draft like this too – taking time and real hard work to make a great article. This post has encouraged me to write some posts that I am going to write soon.

  • Wow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks

  • Leptitox

    I really loved reading your blog. It was very well authored and easy to understand. Unlike other blogs I have read which are really not that good.Thanks alot!

  • LeptoConnect

    It’s late discovering this demonstration. At any rate, it’s a thing to be acquainted with that there are such occasions exist.

  • Resurge

    I concur with your Blog and I will have returned to examine it more later on so please keep up your demonstration.

  • shell shockers

    Step by step, that’s how success is created. As long as you keep trying, the sweet fruit is right behind.

  • LeptoConnect Review

    I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work.

  • Can we all just agree that internet service equipment made in Switzerland are the best? They’re affordable and get the job done. What more can you ask for?

  • grosir tas Bandung

    Apakah kamu sedang mencari tas murah model terbaru untuk kerja, sekolah, ataupun untuk acara-cara santai? Yuk cek tas-tas model terbari yang tersedia di toko kami di link ini.

  • LLC

    Struggling with this one but thanks for sharing this.

  • Vikky Corner

    I’m glad I found this web site, I couldn’t find any knowledge on this matter prior to.

  • greenwalls brisbane

    quite as important as when it was “a building with 5 APs on a guest network”.

  • Omari Bookal

    Love the blog post, keep posting good content for the people who need it.

  • https://www.towtruckipswich.com/

    Internet quality in Switzerland beats any other European countries by a mile. Heck, even their neighboring countries struck a deal with the Swiss for them to make use of the outer lying towers near the country’s borders.

  • cherry u

    I wish we had that here in the Ph! Internet connection is so poor. What a shame.

    • potatochief

      Hi cherry, im from QC philippines also. Im testing out an sfp module but cant make it detect LOS from converge. I want to get rid of the Huawei ont Modem.

  • laser hair removal

    Yes! such a great idea! wish i could do this too!

  • septic tank

    Thanks for the share.

    • Short links

      Really a great addition. I have read this marvelous post. Thanks for sharing information about it. I really like that. Thanks so lot for your convene.

  • http://www.lakewoodfencing.org/

    I envy you for having such a good ISP. For us, we really have to get a separate modem for the fiber connection and then connect a router in order to utilize the connection.

  • Driveway

    Great blog, thanks for the share.

  • Ombre

    Very interesting information you’ve shared.

  • Couvreur Lille

    This is how I also installed my Tenda Router. This blog has presented everything in a very beautiful way. I use fiber LAN to my PC and not use POE.

  • fencing tulsa

    I really love to read such a nice article. Thanks! Keep rocking.

  • Kindersley oilfield rentals

    Our heating oil pricing plans are all designed with you in mind, to help you manage your heating costs all year, and there’s no enrollment or sign-up fees!

  • Business Listings

    Have you heard of Li-Fi? They said that it is the answer for 5G but not sure how this li-fi is the solution.

  • bat

    love your ideas!

  • kitchen remodeling

    Internet Service Providers don’t typically give life, they suck it

  • guitar lessons

    a fantastic display! A lot of useful information and inspiration, both of which are all that is needed! RELAY appreciate your work. With the game, you can give a new look striking.

  • life insurance

    You are soo inspiring! Thank you for this!

  • siouxfallstrees.com

    imagine if someone breaks/cut that fibre cable that’s outside the building

  • Plumbers

    Really interesting article.

  • tree removal service

    Thanks for this awesome advice, Keep on writing this type of great stuff.