{"id":32,"date":"2021-04-20T12:53:31","date_gmt":"2021-04-20T11:53:31","guid":{"rendered":"https:\/\/www.simplyhosting.com\/support\/?post_type=ht_kb&#038;p=32"},"modified":"2022-02-11T16:55:44","modified_gmt":"2022-02-11T16:55:44","slug":"interface-bonding-on-redhat","status":"publish","type":"ht_kb","link":"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/","title":{"rendered":"Interface Bonding on Redhat"},"content":{"rendered":"\n<p>This step by step guide is for configuring interface bonding on Redhat based operating systems.<br><br>For the following guide we will use the following data and assume that you are running all commands as the root user:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Type<\/th><th>Value<\/th><\/tr><tr><td>Primary interface<\/td><td>em1<\/td><\/tr><tr><td>Secondary interface<\/td><td>em2<\/td><\/tr><tr><td>Bond interface<\/td><td>bond0<\/td><\/tr><tr><td>IP Address<\/td><td>192.0.2.2<\/td><\/tr><tr><td>Netmask<\/td><td>255.255.255.0<\/td><\/tr><tr><td>Gateway<\/td><td>192.0.2.1<\/td><\/tr><tr><td>Primary MAC address<\/td><td>00:00:5E:00:53:00<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"InterfaceBondingonRedhat-Step-by-stepguide\">Step-by-step guide<\/h2>\n\n\n\n<p>How to do it:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Determine whether the bonding module is loaded:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">lsmod | grep bonding<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>If it is loaded go to step 3, otherwise:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">modprobe bonding<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>With the bonding module loaded into the kernel we need to determine what the interfaces are called:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">ls \/sys\/class\/net\/<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>From this list we need to select which interfaces we are going to use in the bond (the slaves). In most cases this will be the first two interfaces (eth0 &amp; eth1, em1 &amp; em2, eno0 &amp; eno1 etc.)<br>Before we change the physical interface configurations, we need to create the bond interface.<br>The simplest way to create the bond interface configuration file is to copy the primary interface file (ifcfg-em1) to the bond interface file (ifcfg-bond0) and edit it.<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">cp \/etc\/sysconfig\/network-scripts\/ifcfg-em1 \/etc\/sysconfig\/network-scripts\/ifcfg-bond0 &amp;&amp; sed -i 's\/em1\/bond0\/g' \/etc\/sysconfig\/network-scripts\/ifcfg-bond0 &amp;&amp; sed -i 's\/HWADDR\/MACADDR\/g' \/etc\/sysconfig\/network-scripts\/ifcfg-bond0 &amp;&amp; sed -i '\/uuid\/d' \/etc\/sysconfig\/network-scripts\/ifcfg-bond0 &amp;&amp; echo 'BONDING_OPTS=\"mode=802.3ad lacp_rate=1\"' &gt;&gt; \/etc\/sysconfig\/network-scripts\/ifcfg-bond0 &amp;&amp; echo 'USERCTL=no' &gt;&gt; \/etc\/sysconfig\/network-scripts\/ifcfg-bond0 &amp;&amp; echo 'NM_CONTROLLED=no' &gt;&gt; \/etc\/sysconfig\/network-scripts\/ifcfg-bond0<\/pre>\n\n\n\n<p>This will do the following configuration changes:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DEVICE=em1 \nBOOTPROTO=static \nIPADDR=192.0.2.2 \nSCOPE=\"peer 192.0.2.1\" \nGATEWAY=192.0.2.1 \nNETWORK=192.0.2.1 \nHWADDR=00:00:5E:00:53:00 \nNETMASK=255.255.255.255 \nONBOOT=yes \nTYPE=Ethernet \nDNS1=217.112.87.147 \nDNS2=217.112.88.90 \nDNS3=217.112.88.10 \nIPV6INIT=yes \nIPV6ADDR=2001:0db8:0000:0800:0192:0000:0002:0002\/128 \nUUID=\"6eb9d580-b46e-4d63-adcc-17e5df965054\"<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">DEVICE=bond0 \nBOOTPROTO=static \nIPADDR=192.0.2.2 \nSCOPE=\"peer 192.0.2.1\" \nGATEWAY=192.0.2.1 \nNETWORK=192.0.2.1 \nMACADDR=00:00:5E:00:53:00 \nNETMASK=255.255.255.255 \nONBOOT=yes \nTYPE=Ethernet \nDNS1=217.112.87.147 \nDNS2=217.112.88.90 \nDNS3=217.112.88.10 \nIPV6INIT=yes \nIPV6ADDR=2001:0db8:0000:0800:0192:0000:0002:0002\/128 \nBONDING_OPTS=\"mode=802.3ad lacp_rate=1\" \nUSERCTL=no \nNM_CONTROLLED=no <\/pre>\n\n\n\n<p id=\"block-334251a7-7289-4cd9-8373-80ee192cc23f\">We have:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Renamed the device from em1 to bond0<\/li><li>Changed the HWADDR to MACADDR<\/li><li>Set the bonding mode to LACP and set the lacp rate to &#8220;Active\/Fast&#8221;<\/li><li>Disabled USERCTL<\/li><li>Disabled Network Manager via NM_CONTROLLED=no<\/li><\/ul>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>Now our bond is configured, we need to configure our slave devices, these should both be identical except for the device name (and the UUID if we are using them), you should edit the ifcfg-em1 and ifcfg-em2 files to look like this:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">DEVICE=em1 \nBOOTPROTO=none \nONBOOT=yes \nSLAVE=yes \nMASTER=bond0 \nUSERCTL=no \nNM_CONTROLLED=no<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">DEVICE=em2 \nBOOTPROTO=none \nONBOOT=yes \nSLAVE=yes \nMASTER=bond0\nUSERCTL=no \nNM_CONTROLLED=no<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\"><li>With our interfaces configured we need to restart networking to bring up the bond and start using it:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">Redhat\/CentOS 6: service network restart Redhat\/CentOS 7: systemctl restart network<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"get-in-touch\"><strong>Get in touch<\/strong><\/h2>\n\n\n\n<p>If you need advice on Interface Bonding for Redhat, we\u2019re here to help.<\/p>\n\n\n\n<p><strong>Call us on 0333 247 0222: <\/strong>Monday &#8211; Friday, 9am \u2013 5.30pm.<\/p>\n\n\n\n<p id=\"chat-to-us-on-livechat-monday-friday-9am-5-30pm\"><strong>Chat <strong>with<\/strong> us on LiveChat:<\/strong> Monday &#8211; Friday, 9am &#8211; 5.30pm.<\/p>\n\n\n\n<p id=\"write-to-us-send-us-a-support-ticket-from-your-simply-portal-and-we-ll-get-back-to-you-as-soon-as-we-can-https-portal-simplyhosting-com-site-login\"><strong>Write to us:<\/strong> Send us a support ticket from your <a href=\"https:\/\/portal.simplyhosting.com\/site\/login\/\">Simply portal<\/a> and we\u2019ll get back to you as soon as we can. <\/p>\n\n\n\n<p>If you don\u2019t have an account with Simply Hosting yet, you can also send our <a href=\"https:\/\/www.simplyhosting.com\/info\/contact-us\">Sales team<\/a> an enquiry and we&#8217;ll get back to you between <strong>9am<\/strong> and <strong>5.30pm<\/strong>, <strong>Monday<\/strong> to <strong>Friday<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This step by step guide is for configuring interface bonding on Redhat based operating systems. For the following guide we will use the following data and assume that you are running all commands as the root user: Type Value Primary interface em1 Secondary interface em2 Bond interface bond0 IP Address 192.0.2.2 Netmask 255.255.255.0 Gateway 192.0.2.1 [&hellip;]<\/p>\n","protected":false},"author":2,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[13],"ht-kb-tag":[35],"class_list":["post-32","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-infrastructure","ht_kb_tag-redhat"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Interface Bonding on Redhat - Support Centre - Simply Hosting &amp; Servers<\/title>\n<meta name=\"description\" content=\"This step by step guide is for configuring interface bonding on Redhat based operating systems.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Interface Bonding on Redhat - Support Centre - Simply Hosting &amp; Servers\" \/>\n<meta property=\"og:description\" content=\"This step by step guide is for configuring interface bonding on Redhat based operating systems.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/\" \/>\n<meta property=\"og:site_name\" content=\"Support Centre - Simply Hosting &amp; Servers\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-11T16:55:44+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/\",\"url\":\"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/\",\"name\":\"Interface Bonding on Redhat - Support Centre - Simply Hosting &amp; Servers\",\"isPartOf\":{\"@id\":\"https:\/\/www.simplyhosting.com\/support\/#website\"},\"datePublished\":\"2021-04-20T11:53:31+00:00\",\"dateModified\":\"2022-02-11T16:55:44+00:00\",\"description\":\"This step by step guide is for configuring interface bonding on Redhat based operating systems.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.simplyhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Interface Bonding on Redhat\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.simplyhosting.com\/support\/#website\",\"url\":\"https:\/\/www.simplyhosting.com\/support\/\",\"name\":\"Support Centre - Simply Hosting &amp; Servers\",\"description\":\"Simply Hosting &amp; Servers Support Centre\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.simplyhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Interface Bonding on Redhat - Support Centre - Simply Hosting &amp; Servers","description":"This step by step guide is for configuring interface bonding on Redhat based operating systems.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/","og_locale":"en_GB","og_type":"article","og_title":"Interface Bonding on Redhat - Support Centre - Simply Hosting &amp; Servers","og_description":"This step by step guide is for configuring interface bonding on Redhat based operating systems.","og_url":"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/","og_site_name":"Support Centre - Simply Hosting &amp; Servers","article_modified_time":"2022-02-11T16:55:44+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/","url":"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/","name":"Interface Bonding on Redhat - Support Centre - Simply Hosting &amp; Servers","isPartOf":{"@id":"https:\/\/www.simplyhosting.com\/support\/#website"},"datePublished":"2021-04-20T11:53:31+00:00","dateModified":"2022-02-11T16:55:44+00:00","description":"This step by step guide is for configuring interface bonding on Redhat based operating systems.","breadcrumb":{"@id":"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.simplyhosting.com\/support\/articles\/interface-bonding-on-redhat\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.simplyhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Interface Bonding on Redhat"}]},{"@type":"WebSite","@id":"https:\/\/www.simplyhosting.com\/support\/#website","url":"https:\/\/www.simplyhosting.com\/support\/","name":"Support Centre - Simply Hosting &amp; Servers","description":"Simply Hosting &amp; Servers Support Centre","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.simplyhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"}]}},"_links":{"self":[{"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":5,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb\/32\/revisions"}],"predecessor-version":[{"id":363,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb\/32\/revisions\/363"}],"wp:attachment":[{"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb-category?post=32"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb-tag?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}