networking - Preferred way to add second nic on separate network? - Ask Ubuntu
i creating small web cluster starting maas 2.0. have 5 physical machines each utilizing 2 nics.
my maas server runs dhcp in 10.14.0.0/20, each physical node in cluster gets static assigned 10.14.0.101, 102, etc, assigned eno0. maas server has ip forwarding setup , nodes route 10.14.0.1 default gateway. network on own switch dedicated internal traffic , ipmi.
the second nic on each node plugged switch part of public network, 199.16.x.x. each node statically assigned 199.16.x.x address, no default gateway assigned. if assign default gateway removes gateway assigned on 10.14.0.0/20 network. maybe not remove, maybe overwrite better explanation.
if don't have route 199.16.x.x incoming traffic requests sent out 10.14.0.0 fails.
i've solved issue adding secondary route , adding few commands interfaces files.
echo "1 rt2" >> /etc/iproute2/rt_tables
i've added following eno2 configuration in /etc/network/interfaces
post-up ip route add 199.16.xxx.8/28 dev eno2 src 199.16.xxx.14 table rt2 post-up ip route add default via 199.16.xxx.9 dev eno2 table rt2 post-up ip rule add 199.16.xxx.14/32 table rt2 post-up ip rule add 199.16.xxx.14/32 table rt2
is there alternative method more efficient, or way around better alternative?
starting maas 2.1 support static routes subnets. believe trying perform. on subnet details page can add/edit/delete static routes subnet. when new machine deployed machine static routes subnet.
update 2.1 on xenial:
sudo add-apt-repository ppa:maas/next sudo apt update sudo apt upgrade
Comments
Post a Comment