Tuesday, November 24, 2020

Advertise routes to wireguard connected hosts

Hey,

I have some baremetal libvirt hosts with virtual networks (bridges) and VMS on them. I want put them together in a mesh network (I'm thinking of using wesher for this as I've used it before) and advertise the virtual networks to the other hosts so they can route freely to them over the wireguard network.

Wesher works by creating a single wireguard interface and then a peer for each of the hosts along with adding a route to each them over the wireguard interface.

I'm thinking about using OSPF for this using either quagga or bird (I'm liking the configuration syntax of bird more) but I have not managed to get them to advertise anything.

I'd like to do this in the most hands off way possible, deployed with ansible.

So I have a couple of questions.

  • Do you know of a good resource on this subject that can get me started on this?
  • Should I be using some other solution for creating this overlay type of network?

Thanks!

EDIT: I thought I should add some more info on the wesher setup.

Each host gets a /32 address so they're not in the same network.

```

ip a ... 3: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default link/none inet 100.100.177.204/32 brd 100.100.177.204 scope global wg0 valid_lft forever preferred_lft forever ```

```

wg interface: wg0 public key: GUBhK2xfbUK7y3n34HqXBfqyg7alHk0RT3VrSatESkM= private key: (hidden) listening port: 51988

peer: +2p6S0h37vd5tzxeO1uECDVKLznkmy5EeUvse5H0B2A= endpoint: 10.100.4.2:51988 allowed ips: 100.100.59.47/32 ```

```

ip route ... 100.100.59.47 dev wg0 scope link ```



No comments:

Post a Comment