{"id":3429,"date":"2020-08-26T09:00:57","date_gmt":"2020-08-26T01:00:57","guid":{"rendered":"https:\/\/www.casbay.com\/blog\/?p=3429"},"modified":"2022-09-22T18:39:21","modified_gmt":"2022-09-22T10:39:21","slug":"how-to-configure-802-1q-vlan-tagging","status":"publish","type":"post","link":"https:\/\/www.casbay.com\/blog\/tips-sharing\/how-to-configure-802-1q-vlan-tagging","title":{"rendered":"How to Configure 802.1q VLAN Tagging"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3429\" class=\"elementor elementor-3429\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3165ca15 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3165ca15\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-36e5e376\" data-id=\"36e5e376\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-44c53185 elementor-widget elementor-widget-text-editor\" data-id=\"44c53185\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h2><strong>How to Configure 802.1q VLAN Tagging on RHEL \/ CentOS 7\/8 &amp; Fedora Interface<\/strong><\/h2><p>VLAN tagging is a way of handling a network port with more than one VLAN. VLAN tagging is use to show which packet VLAN is use for a network medium as packets. In this guide 802.1q VLAN Tagging will built on a RHEL \/ CentOS \/ Fedora framework network interface.<br \/>In addition to a parent interface, an interface is create to construct a VLAN. As they pass through the network, the VLAN interface marks packets with VLAN ID, and the return packets are unmark.<br \/>Before doing any configuration, ensure 8021q module is load.<\/p><figure id=\"attachment_4021\" aria-describedby=\"caption-attachment-4021\" style=\"width: 630px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-4021 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/ensure-8021q-module-is-load.png\" alt=\"ensure 8021q module is load\" width=\"630\" height=\"74\" \/><figcaption id=\"caption-attachment-4021\" class=\"wp-caption-text\">Ensure 8021q module is load<\/figcaption><\/figure><p>In this example, I\u2019ll configure an\u00a0<strong>enp6s0<\/strong>\u00a0interface on the server.<\/p><figure id=\"attachment_4020\" aria-describedby=\"caption-attachment-4020\" style=\"width: 631px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-4020 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/enp6s0-interface-on-the-server.png\" alt=\"configure an enp6s0 interface on the server.\" width=\"631\" height=\"135\" \/><figcaption id=\"caption-attachment-4020\" class=\"wp-caption-text\">Configure an &#8220;enp6s0&#8221; interface on the server.<\/figcaption><\/figure><p>You can use the network manager command line tool \u2013\u00a0<strong>nmcli<\/strong> to accomplish this or directly edit network configuration files.<br \/><br \/><\/p><h3><strong>Manually Edit Configuration files<\/strong><\/h3><p>Edit the parent interface configuration file and set like below.<\/p><figure id=\"attachment_4019\" aria-describedby=\"caption-attachment-4019\" style=\"width: 631px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-4019 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/Edit-parent-interface-configuration-file-and-set.png\" alt=\"Edit parent interface configuration file and set\" width=\"631\" height=\"251\" \/><figcaption id=\"caption-attachment-4019\" class=\"wp-caption-text\">Edit parent interface configuration file and set<\/figcaption><\/figure><p>As seen above, we\u2019ve set the interface to come up on boot and we don\u2019t assign IP information here.<br \/>Now configure the VLAN interface. The configuration file name should be the parent interface plus a.\u00a0character plus the VLAN ID number. In my setup, the VLAN ID is\u00a0<strong>21<\/strong>, and the parent interface is\u00a0enp6s0, so the configuration file name should be:<\/p><figure id=\"attachment_4016\" aria-describedby=\"caption-attachment-4016\" style=\"width: 633px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4016 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/configure-VLAN-interface.png\" alt=\"configure VLAN interface\" width=\"633\" height=\"29\" \/><figcaption id=\"caption-attachment-4016\" class=\"wp-caption-text\">Configure VLAN interface<\/figcaption><\/figure><p>All network configuration information is add into this file.<\/p><figure id=\"attachment_4023\" aria-describedby=\"caption-attachment-4023\" style=\"width: 630px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4023 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/network-configuration-information.png\" alt=\"\" width=\"630\" height=\"289\" \/><figcaption id=\"caption-attachment-4023\" class=\"wp-caption-text\">Network configuration information<\/figcaption><\/figure><figure id=\"attachment_4024\" aria-describedby=\"caption-attachment-4024\" style=\"width: 632px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4024 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/network-configuration-information-2.png\" alt=\"network configuration information\" width=\"632\" height=\"73\" \/><figcaption id=\"caption-attachment-4024\" class=\"wp-caption-text\">Network configuration information<\/figcaption><\/figure><p>Once the update has made, restart the network service to make adjustments.<\/p><figure id=\"attachment_4026\" aria-describedby=\"caption-attachment-4026\" style=\"width: 632px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4026 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/restart-network-service.png\" alt=\"restart network\" width=\"632\" height=\"28\" \/><figcaption id=\"caption-attachment-4026\" class=\"wp-caption-text\">Restart network service<\/figcaption><\/figure><p>Alternatively, manually bring up the interface.<\/p><figure id=\"attachment_4022\" aria-describedby=\"caption-attachment-4022\" style=\"width: 631px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4022 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/manually-bring-up-the-interface.png\" alt=\"manually bring up the interface\" width=\"631\" height=\"74\" \/><figcaption id=\"caption-attachment-4022\" class=\"wp-caption-text\">Network manually bring up the interface<\/figcaption><\/figure><p>Confirm IP address information for the interface.<\/p><figure id=\"attachment_4017\" aria-describedby=\"caption-attachment-4017\" style=\"width: 631px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4017 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/confirm-IP-Address-information-for-the-interface.png\" alt=\"Confirm IP address information for the interface\" width=\"631\" height=\"219\" \/><figcaption id=\"caption-attachment-4017\" class=\"wp-caption-text\">Confirm IP address information for the interface<\/figcaption><\/figure><h3><strong><br \/>Using NMCLI Tool<\/strong><\/h3><p>The same configurations can done purely from the command-line interface. For this method, the <strong><em>NetworkManager<\/em><\/strong>\u00a0service should be running.<\/p><figure id=\"attachment_4025\" aria-describedby=\"caption-attachment-4025\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4025 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/NetworkManager.png\" alt=\"networkmanager\" width=\"635\" height=\"31\" \/><figcaption id=\"caption-attachment-4025\" class=\"wp-caption-text\">NetworkManager<\/figcaption><\/figure><p>Check current network configurations.<\/p><figure id=\"attachment_4015\" aria-describedby=\"caption-attachment-4015\" style=\"width: 633px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4015 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/check-current-network-configuration.png\" alt=\"Check current network configurations\" width=\"633\" height=\"29\" \/><figcaption id=\"caption-attachment-4015\" class=\"wp-caption-text\">Check current network configurations<\/figcaption><\/figure><p>To create an 802.1Q VLAN interface on Ethernet interface\u00a0<strong>enp6s0<\/strong>, with VLAN interface\u00a0<strong>VLAN21<\/strong>\u00a0and ID\u00a0<strong>21<\/strong>, issue a command as follows:<\/p><figure id=\"attachment_4018\" aria-describedby=\"caption-attachment-4018\" style=\"width: 634px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4018 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/create-an-802.1Q-VLAN-interface-on-Ethernet-interface.png\" alt=\"To create an 802.1Q VLAN interface on Ethernet interface\" width=\"634\" height=\"51\" \/><figcaption id=\"caption-attachment-4018\" class=\"wp-caption-text\">Create an 802.1Q VLAN interface on Ethernet interface<\/figcaption><\/figure><p>You can then assign an IP address to the VLAN Interface.<\/p><figure id=\"attachment_4014\" aria-describedby=\"caption-attachment-4014\" style=\"width: 632px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4014 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/assign-an-IP-Address-to-VLAN-Interface.png\" alt=\"assign an IP address to the VLAN Interface\" width=\"632\" height=\"137\" \/><figcaption id=\"caption-attachment-4014\" class=\"wp-caption-text\">Assign an IP address to the VLAN Interface<\/figcaption><\/figure><p>To view all the parameters associated with the VLAN created above, issue a command as follows:<\/p><figure id=\"attachment_4027\" aria-describedby=\"caption-attachment-4027\" style=\"width: 634px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4027 size-full\" src=\"https:\/\/www.casbay.com\/blog\/wp-content\/uploads\/2021\/02\/show-VLAN21.png\" alt=\"view all the parameters associated with the VLAN created above\" width=\"634\" height=\"29\" \/><figcaption id=\"caption-attachment-4027\" class=\"wp-caption-text\">To view all the parameters associated with the VLAN created above<\/figcaption><\/figure><p>You have successfully configured VLAN tagging on an interface in RHEL \/ CentOS or Fedora server.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>How to Configure 802.1q VLAN Tagging on RHEL \/ CentOS 7\/8 &amp; Fedora Interface VLAN tagging is a way of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":33087,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":"","_wpscppro_custom_social_share_image":0},"categories":[89],"tags":[102],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/posts\/3429"}],"collection":[{"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/comments?post=3429"}],"version-history":[{"count":20,"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/posts\/3429\/revisions"}],"predecessor-version":[{"id":34770,"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/posts\/3429\/revisions\/34770"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/media\/33087"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/media?parent=3429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/categories?post=3429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.casbay.com\/blog\/wp-json\/wp\/v2\/tags?post=3429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}