{"id":24,"date":"2021-04-20T12:32:51","date_gmt":"2021-04-20T11:32:51","guid":{"rendered":"https:\/\/www.simplyhosting.com\/support\/?post_type=ht_kb&#038;p=24"},"modified":"2022-02-16T10:31:17","modified_gmt":"2022-02-16T10:31:17","slug":"vlan-interfaces-on-redhat","status":"publish","type":"ht_kb","link":"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/","title":{"rendered":"VLAN Interfaces on Redhat"},"content":{"rendered":"\n<p>This step by step guide is for configuring VLAN interfaces on Redhat based operating systems.<br><br>For the following guide we will use the following data:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Type<\/th><th>Value<\/th><\/tr><tr><td>VLAN Tag<\/td><td>1000<\/td><\/tr><tr><td>IP Address<\/td><td>192.0.2.1<\/td><\/tr><tr><td>Netmask<\/td><td>255.255.255.0<\/td><\/tr><tr><td>Device<\/td><td>em1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"VLANInterfacesonRedhat-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 802.1q VLAN module is loaded:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">lsmod | grep 8021q<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>If it is loaded, go straight to step 3, otherwise:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">modprobe 8021q<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>With the 802.1q 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>Create a VLAN interface based on the primary interface (usually the lowest numbered ethernet interface &#8211; eth0, em1, eno0, bce0 etc.) by opening a new file in your favourite editor<\/li><\/ol>\n\n\n\n<div class=\"wp-block-nco-info-block\"><p class=\"nco-info-block-content\"><strong>Info:<\/strong> This guide is intended for single interface configurations only, VLAN interfaces on bonded interfaces follow a similar configuration, however the primary interface at this point will be called something like &#8220;bond0&#8221; as referenced in the bonding guide.<\/p><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">nano \/etc\/sysconfig\/network-scripts\/ifcfg-em1.1000<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\"><li>In this new file, we create the configuration for the VLAN &#8211; please replace the data here with the correct interface name, VLAN tag and your preferred IP addressing schema (This should be RFC1918 private address space to avoid issues).<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">DEVICE=em1.1000 \nBOOTPROTO=none \nONBOOT=yes \nVLAN=yes \nIPADDR=192.0.2.1 \nNETMASK=255.255.255.0 \nNM_CONTROLLED=no<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\"><li>Bring up the VLAN interface by either restarting the networking stack or issuing the up command manually<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">RHEL\/CentOS 5: \"service network restart\" OR \"ifconfig up em1.1000\" \nRHEL\/CentOS 6: \"service network restart\" OR \"ip link set em1.1000 up\" \nRHEL\/CentOS 7: \"systemctl restart network\" OR \"ip link set em1.1000 up\"&nbsp;<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"7\"><li>The device should now be up and visible under the &#8220;ifconfig&#8221; or &#8220;ip address show&#8221; commands. You may test it by issuing a ping command to another machine that is already configured<\/li><\/ol>\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 VLAN Interfaces 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 VLAN interfaces on Redhat based operating systems. For the following guide we will use the following data: Type Value VLAN Tag 1000 IP Address 192.0.2.1 Netmask 255.255.255.0 Device em1 Step-by-step guide How to do it: Determine whether the 802.1q VLAN module is loaded: lsmod | grep 8021q [&hellip;]<\/p>\n","protected":false},"author":2,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[13,24],"ht-kb-tag":[35,33],"class_list":["post-24","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-infrastructure","ht_kb_category-control-panel-os","ht_kb_tag-redhat","ht_kb_tag-vlan"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>VLAN Interfaces on Redhat - Support Centre - Simply Hosting &amp; Servers<\/title>\n<meta name=\"description\" content=\"This step by step guide is for configuring VLAN interfaces 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\/vlan-interfaces-on-redhat\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"VLAN Interfaces on Redhat - Support Centre - Simply Hosting &amp; Servers\" \/>\n<meta property=\"og:description\" content=\"This step by step guide is for configuring VLAN interfaces on Redhat based operating systems.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/\" \/>\n<meta property=\"og:site_name\" content=\"Support Centre - Simply Hosting &amp; Servers\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-16T10:31:17+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=\"2 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\/vlan-interfaces-on-redhat\/\",\"url\":\"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/\",\"name\":\"VLAN Interfaces on Redhat - Support Centre - Simply Hosting &amp; Servers\",\"isPartOf\":{\"@id\":\"https:\/\/www.simplyhosting.com\/support\/#website\"},\"datePublished\":\"2021-04-20T11:32:51+00:00\",\"dateModified\":\"2022-02-16T10:31:17+00:00\",\"description\":\"This step by step guide is for configuring VLAN interfaces on Redhat based operating systems.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.simplyhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"VLAN Interfaces 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":"VLAN Interfaces on Redhat - Support Centre - Simply Hosting &amp; Servers","description":"This step by step guide is for configuring VLAN interfaces 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\/vlan-interfaces-on-redhat\/","og_locale":"en_GB","og_type":"article","og_title":"VLAN Interfaces on Redhat - Support Centre - Simply Hosting &amp; Servers","og_description":"This step by step guide is for configuring VLAN interfaces on Redhat based operating systems.","og_url":"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/","og_site_name":"Support Centre - Simply Hosting &amp; Servers","article_modified_time":"2022-02-16T10:31:17+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/","url":"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/","name":"VLAN Interfaces on Redhat - Support Centre - Simply Hosting &amp; Servers","isPartOf":{"@id":"https:\/\/www.simplyhosting.com\/support\/#website"},"datePublished":"2021-04-20T11:32:51+00:00","dateModified":"2022-02-16T10:31:17+00:00","description":"This step by step guide is for configuring VLAN interfaces on Redhat based operating systems.","breadcrumb":{"@id":"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.simplyhosting.com\/support\/articles\/vlan-interfaces-on-redhat\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.simplyhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"VLAN Interfaces 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\/24","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=24"}],"version-history":[{"count":7,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb\/24\/revisions"}],"predecessor-version":[{"id":366,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb\/24\/revisions\/366"}],"wp:attachment":[{"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb-category?post=24"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.simplyhosting.com\/support\/wp-json\/wp\/v2\/ht-kb-tag?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}