# Hetzner servers connected to same switch - no connection between them



## CyberCr33p (May 5, 2022)

> Both servers are connected to the same switch. If you need a connection between the servers, you have to set a static route on each server (if using DHCP) or change their netmask to /32 (if using static IP configuration). This is necessary as we use the "protected ports" security feature on our switches.



Any idea how to "change their netmask to /32" ?

I tried:

ifconfig_igb0="inet {MY-IP} netmask 255.255.255.255"

but network is not accessible with this setting.


----------



## Alain De Vos (May 5, 2022)

I might be wrong but you could try in hex :

```
netmask 0xffffffff
```

To show your routes you can use:

```
netstat -rn
```


----------



## SirDice (May 6, 2022)

CyberCr33p said:


> but network is not accessible with this setting.


You might have some issues setting your default gateway. FreeBSD really doesn't want to set a gateway to an address that's _outside_ of the host's IP/netmask range. With a /32 _everything_ is outside of that 'network'. 

You might need to resort to setting a gateway like this: `route add default -iface igb0` to force it out of igb0.


----------

