Community discussions

MikroTik App
 
jjrhyde
just joined
Topic Author
Posts: 1
Joined: Tue Jun 22, 2021 7:07 pm

Help configuring a Hex S as a cluster gateway

Thu Jun 24, 2021 9:47 pm

hello everyone, thanks for taking the time to read this. I've just bought a Hex S and I'm hoping one of the longbeards of the mikrotik forums will be able advise me!

I'm a web dev by trade, but one of those devs who has never really had to worry too much about where his code runs. Even in terms of general networking my understanding isn't great. I figured that wasn't good enough, so I decided to throw myself in the deep end by building/maintaining a bare metal kube cluster for the homelab. Plus I get to play with Raspberry Pis, which is always fun.

I've made great progress with configuring the k8s side of things. The remaining task for that is to configure my load balancing and ingress but before I do that I figure I need to get the cluster properly positioned on my network.

So here's a diagram of what I'm trying to acheive:

https://i.imgur.com/gAJx7jM.png

Here's a rundown of what I'm after:

  • The cluster nodes are connected/powered via an unmanaged 8-port PoE switch.
  • The Hex S sits infront of the switch and act as a DHCP server for all the cluster nodes (also getting power from the Poe Switch)
  • The main router (dd-wrt) does all the normal house things and acts as a DHCP server for everything else (housemates' phones, laptops, desktops etc).
  • Internet connectivity is passed from the main router to the Hex S, allowing the k8s nodes to communiate with remote services.
  • I can access services being run on k8s over the local network (eg. a desktop given an IP from the main router could access a MediaWiki instance being run on k8s without going 'outside the house')
  • I can access the Hex S RouterOS from any device on the local network (with the right creds ofc)

Essentially I'd like the cluster to be as 'self-contained' as possible. It hands out IPs itself, and only really relies on the upstream for internet connectivity.

What I'm struggling with is how to configure both routers to achieve the above - this is where my networking knowledge really falls down. On top of that, there's actually doing the configuration in RouterOS (which seems awesome, despite it making me feel very dumb). I'm not even sure if what I describe with dual DHCP servers is even possible.

If anyone has any suggestions I would really appreciate it. I'm not looking for hand holding (although I'll take it!) and very much open to other suggestions for how to achieve the above!

Thanks again
 
ConnyMercier
Forum Veteran
Forum Veteran
Posts: 723
Joined: Tue Dec 17, 2019 1:08 pm

Re: Help configuring a Hex S as a cluster gateway

Tue Aug 17, 2021 5:36 pm

Good Morning,

Step 1: Only have 1 connection between your PoE-Switch and your Mikrotik Router. (Keep Ether1)
Step 2 : Reset your mikrotik to factory Default (No backup & No default-Config)
Step 3 : Set admin Password
Step 4 : Set IP-Address on Interface ether1 for Cluster-network (exemple : 172.16.16.1/24)
Step 5 : Activate DNS-Server (allow request)
Step 6 : Set DHCP-Server on ether1
Step 7 : Activate DHCP-Client on ether2
Step 8 : NAT masquerade for OUT.interface: ether2

Step 9 : Testing Phase 1
Your Router and all Devices in the Cluster-Network should have internet.

Step 10: Add route to your ISP / Home-Route 172.16.16.0/24 --> Mikrotik Home-Network IP-Address

Step 11: Testing Phase 2
You should now be able to connect from your home-network to your Cluster-Netwrok

Step 12: Firewall
Step 13: Secure your Router

Step 14: Testing Phase 3
Check if everything still working =)

Who is online

Users browsing this forum: Bing [Bot], unhuzpt and 27 guests