Odroid-C2 as wired router

Post Reply
gechu
Posts: 3
Joined: Tue Dec 12, 2017 3:27 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Odroid-C2 as wired router

Post by gechu »

Hi!
I´m interested in running OpenWRT on my Odroid C2 as a wired-only router. Right now I´m running OpenWRT on a Ubiquiti EdgeRouter X (ER-X). It actually works really well. Guess my major motivator for using Odroid C2 as router is to get some more horse-power behind SQM processing.

To setup a router, I need to pair it with a USB based ethernet adapter. Is it any reason to get an USB 3.0 based adapter compared to USB 2.0? I know the board is limited to USB 2.0 but hardware driver support and backwards compatibility may make that choice not so easy. Are there any gigabit adapters which are known to work well?

There´s no official support from OpenWrt for my hardware, but from what I understand, one option should be to run it within a container. Is it better to go with LXC or Docker?

Also, picked up this https://github.com/graysky2/odroid-auto-bridge for configuring a network bridge in the host.

Stability is really important. I simply want a stable linux-based runtime hence no need for GUI. What are the pros and cons of these options:
  • Ubuntu-18.04-3.16-minimal-odroid-c2-20180626.img (kernel 3.16)
  • Armbian Stretch mainline kernel 4.18.y
  • Other option?
Thanks!

/Erik

sharky1337
Posts: 1
Joined: Fri Oct 12, 2018 3:48 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid-C2 as wired router

Post by sharky1337 »

Hey Gechu,

interesting project, do you know the following router distros ?

https://github.com/rtr7/router7

https://vyos.io

Or mabye you can build freebsd https://github.com/tomtor/image-freebsd-c2

I think the easiest way to run a router is to use a xu4 , because a lot of people are now trying to run routers on x86 servers.


Let me know which route you choose ;-)

User avatar
mad_ady
Posts: 10737
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 935 times
Contact:

Re: Odroid-C2 as wired router

Post by mad_ady »

I too had a plan to turn an odroid into a openwrt router (but got a free router from my isp in the meantime).

Things to consider:
* if your wan bandwidth is over 300Mbps consider either an xu4 or a switch with vlans (you can use a switch port in access mode in vlan 10 for your isp uplink, a tagged port with vlans 1 and 10 to your odroid (wan +lan) and you can use vlans on your odroid and only one NIC). The advantage is you can upload/download at close to 1Gbps from your lan (wan download becomes lan upload and the nic can handle it)
* if using a usb-ethernet adapter you can go for a gigabit/usb3 one. It should reach ~300Mbps on the C2. If you're using usb as well for other things consider using usb-otg for the ethernet so that usb bandwidth is not shared. You can use a usb2 adapter if you have it already, but it won't exceed 100Mbps by design. I tested asix based dongles and they worked fine. Anything supported by linux should be fine.
* You can turn eth0 into a bridge, but you should use static ip for the c2 in case the dhcp server/docker fails - so that you can still access it from lan and fix it
* I think you can find a docker instance for armhf for lede/openwrt that you can use, though I'd prefer using a container (I'm more familiar with those).
* Regarding kernel - 4.x is fine if you're not planning on using it as a media player. It has enough power to run the router and anything else (e.g. home automation, media player, nas, etc).
* If you only want it as a router the best way is to run it natively. You could use either yocto or buildroot to combine existing recipes for c2 with openwrt - but I haven't done it so no ideas on complexity.

Make sure to document your steps and publish an article/howto when done.

gechu
Posts: 3
Joined: Tue Dec 12, 2017 3:27 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid-C2 as wired router

Post by gechu »

Decided to shut down the "container initiative" when I learned that early work has been done to add support for an (openwrt) target referred to as &"mesongx". That target adds supports for AmLogic S9 SoCs. This has been developed and tested on the ODROID C2 (S905).

There may be some more info over at the openWRT forum where I had a parallel discussion about OpenWrt ARM in Linux Containers .

Anyhow, thanks all for your feedback!

User avatar
mad_ady
Posts: 10737
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 935 times
Contact:

Re: Odroid-C2 as wired router

Post by mad_ady »

Too bad you're giving up. Having a container for "router" frees up the box for other uses (like home automation gateway, etc). It has too many resources to be "just a router".
Anyway it's good to hear it's getting official support in openwrt.

felipejfc
Posts: 8
Joined: Tue Sep 17, 2019 11:04 pm
languages_spoken: english
ODROIDs: n2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Odroid-C2 as wired router

Post by felipejfc »

I managed to run openwrt on an n2, any other armlogic device is possible with the same approach, read:
https://felipejfc.medium.com/running-op ... 174008df04

I've also managed to run it inside a container on an armbian distro, just see here
https://github.com/oofnikj/docker-openwrt
These users thanked the author felipejfc for the post:
odroid (Mon Nov 23, 2020 12:44 pm)

User avatar
mad_ady
Posts: 10737
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 647 times
Been thanked: 935 times
Contact:

Re: Odroid-C2 as wired router

Post by mad_ady »

Thanks for the guide!
It's also great that the docker version can grab the wifi card to set an AP.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests