{"id":55,"date":"2017-02-02T20:37:35","date_gmt":"2017-02-02T20:37:35","guid":{"rendered":"http:\/\/coherence.co.za\/?p=55"},"modified":"2017-02-03T15:52:16","modified_gmt":"2017-02-03T15:52:16","slug":"making-your-debian-server-networking-redundant","status":"publish","type":"post","link":"http:\/\/coherence.co.za\/?p=55","title":{"rendered":"Making your Debian server networking redundant"},"content":{"rendered":"<p>You will need at least the following&#8230;<\/p>\n<ol>\n<li>A pair of stacked switches that support creating an LACP bonded port across the stack on 2 different nodes. This gives you the best of all worlds being able to provide redundancy and increase your bandwidth.<\/li>\n<li>Or alternatively, 2 ports on the same or on different unstacked switches. This is the bare minimum you can do to mitigate link failure. Note this setup has no polling mechanism so if the physical ethernet link stays up but is not operational because of device switching failure, or a failure on the another port on the device that provides the uplink, then this wont help you.<\/li>\n<\/ol>\n<p>On your server you will need 2 (or more) network cards and some &#8220;simple&#8221; setup<\/p>\n<p>Install the packages that you will need in case you don&#8217;t have them already.<\/p>\n<ul>\n<li><i>apt-get install ifenslave vlan bridge-utils<\/i><\/li>\n<\/ul>\n<p>The example sets up the following<\/p>\n<ul>\n<li>eth0 and eth1 bonded together into bond0<\/li>\n<li>create 2 bridges br8 and br9<\/li>\n<li>create 2 vlans bond0.8 and bond0.9<\/li>\n<li>place them in each bridge respecitvely<\/li>\n<li>add IP details on br9<\/li>\n<li>br8 has no L3 config on it and in this specific case is used by KVM to bridge virtual machines into as they come online<\/li>\n<\/ul>\n<p>For option 1 edit your \/etc\/network\/interfaces to look something like this<\/p>\n<hr \/>\n<pre># This file describes the network interfaces available on your system\r\n# and how to activate them. For more information, see interfaces(5).\r\n\r\nsource \/etc\/network\/interfaces.d\/*\r\n\r\n# The loopback network interface\r\nauto lo bond0 bond0.8 bond0.9 br8 br9\r\niface lo inet loopback\r\n\r\niface bond0 inet manual\r\n bond-slaves eth0 eth1\r\n bond-mode 802.3ad\r\n mond-miimon 100\r\n bond-use-carrier 1\r\n bond-lacp-rate 1\r\n bond-min-links 1\r\n # send traffic over the available links based on src\/dst MAC address\r\n bond-xmit-hash-policy layer2\r\n mtu 1600\r\n\r\niface bond0.8 inet manual\r\niface bond0.9 inet manual\r\n\r\niface br8 inet manual\r\n bridge_stp off\r\n bridge_ports bond0.8\r\n\r\niface br9 inet static\r\n address 192.168.0.2\r\n netmask 255.255.255.0\r\n gateway 192.168.0.1\r\n bridge_ports bond0.9\r\n bridge_stp off<\/pre>\n<hr \/>\n<p>For option 2 edit your \/etc\/network\/interfaces to look something like this (only the bond0) config changes<\/p>\n<hr \/>\n<pre># This file describes the network interfaces available on your system\r\n# and how to activate them. For more information, see interfaces(5).\r\n\r\nsource \/etc\/network\/interfaces.d\/*\r\n\r\n# The loopback network interface\r\nauto lo bond0 bond0.8 bond0.9 br8 br9\r\niface lo inet loopback\r\n\r\niface bond0 inet manual\r\n slaves eth0 eth1\r\n bond_mode active-backup\r\n bond_miimon 100\r\n bond_downdelay 200\r\n bond_updelay 200\r\n\r\niface bond0.8 inet manual\r\niface bond0.9 inet manual\r\n\r\niface br8 inet manual\r\n bridge_stp off\r\n bridge_ports bond0.8\r\n\r\niface br9 inet static\r\n address 192.168.0.2\r\n netmask 255.255.255.0\r\n gateway 192.168.0.1\r\n bridge_ports bond0.9\r\n bridge_stp off<\/pre>\n<hr \/>\n<p>Most use cases probably will not require bridging or VLAN but I thought it best to provide examples of the entire feature set, you can always reduce to what you need.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You will need at least the following&#8230; A pair of stacked switches that support creating an LACP bonded port across the stack on 2 different nodes. This gives you the best of all worlds being able to provide redundancy and increase your bandwidth. Or alternatively, 2 ports on the same or on different unstacked switches. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[15,9,14,12,13],"_links":{"self":[{"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/posts\/55"}],"collection":[{"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/coherence.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":8,"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":75,"href":"http:\/\/coherence.co.za\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions\/75"}],"wp:attachment":[{"href":"http:\/\/coherence.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/coherence.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/coherence.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}