{"id":874,"date":"2024-05-04T20:16:20","date_gmt":"2024-05-04T20:16:20","guid":{"rendered":"https:\/\/www.spktechfit.com\/?p=874"},"modified":"2024-05-04T20:19:22","modified_gmt":"2024-05-04T20:19:22","slug":"4-vlans","status":"publish","type":"post","link":"https:\/\/www.spktechfit.com\/?p=874","title":{"rendered":"4. VLANS"},"content":{"rendered":"<h3>VLANS<\/h3>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">VLANs are used to isolate endpoints so you have better control over the traffic<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Default VLAN is VLAN 1<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Devices in the same VLAN can communicate without routing.<\/p>\n<p>&nbsp;<\/p>\n<h3>Collison Domains<\/h3>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">On a Layer 1 <span style=\"font-weight: bold;\">Hub, o<\/span>nly one ethernet host on a particular segment may transmit at a time, otherwise there is a collision. This is controlled by an algorithm on all Ethernet NICs called Carrier Sends Multiple Access\/Collison Detection (CSMA\/CD)<\/p>\n<ul style=\"direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">NIC detects others transmitting<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Waits for a period<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Then tries again to transmit<\/span><\/li>\n<\/ul>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Thankfully Hubs are outdated and no longer used. They have been replaced by intelligent Layer 2 switches. On a properly configured Layer 2 switch, collisions do not occur.<\/p>\n<p>&nbsp;<\/p>\n<h1><\/h1>\n<h3>Broadcast Domains<\/h3>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">A Broadcast Domain is simply a group of devices that are on the same network, capable of receiving and responding to a broadcast frame from any device.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-877 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/1.png\" alt=\"\" width=\"621\" height=\"253\" \/><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">In the diagram above, when Host A sends a broadcast message, hosts B &amp; C will receive it. None of the hosts in Domain 2 will receive it though because Layer 3 routers do not forward broadcasts.<\/p>\n<h2 style=\"margin: 0in; font-family: Calibri; font-size: 14.0pt; color: #2e75b5;\">Broadcast domain Issues<\/h2>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">The main issue is Performance issues. All hosts must process the traffic and switches forward or flood broadcast frames causing increased resource utilisation and increase bandwidth utilisation.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Hackers can even write programs to generate millions of broadcast packets that flood the network, leaving no resources for valid traffic. This is called Denial Of Service (DoS) attack.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Smaller Broadcast domains mean better performance.<\/p>\n<h1><\/h1>\n<h3>Virtual LAN<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-878 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/2.png\" alt=\"\" width=\"610\" height=\"346\" \/><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">VLANs allow you to create separate Broadcast Domains on a single physical switch.<\/p>\n<h1 style=\"margin: 0in; font-family: Calibri; font-size: 16.0pt; color: #1e4e79;\">Benefits of VLANs<\/h1>\n<ul style=\"direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;\" type=\"disc\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Security: e.g.: CCTV vlan<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Control: who can access what<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Decreasing size of broadcast domains. <\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\"><span style=\"font-family: Calibri; font-size: 11.0pt;\">Improved use of resources (due to decreased size of broadcast domains)<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Untagged Vs Tagged<\/h3>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">If you want to send packets for different VLANs over the same port, the VLANs must be tagged<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">The standard is IEEE 802.1Q<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-875 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/3.png\" alt=\"\" width=\"625\" height=\"415\" \/><\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">The 802.1Q standard allows only one VLAN on a port which has no tag or is &#8220;untagged&#8221;.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-876 aligncenter\" src=\"https:\/\/www.spktechfit.com\/wp-content\/uploads\/2024\/05\/4.png\" alt=\"\" width=\"637\" height=\"391\" \/><\/p>\n<h3>Forwarding Addresses<\/h3>\n<h2 style=\"margin: 0in; font-family: Calibri; font-size: 14.0pt; color: #2e75b5;\">MAC Address Table<\/h2>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">Layer-2 switches use the MAC address table to make forwarding decisions. The switch builds this table automatically based on the source MAC address of the frames that it receives.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">The default table entries are maintained for 300 seconds. You view the MAC address table using the command: <span style=\"font-weight: bold;\">show mac-address<\/span><\/p>\n<h2 style=\"margin: 0in; font-family: Calibri; font-size: 14.0pt; color: #2e75b5;\">Address Resolution Protocol (ARP)<\/h2>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">ARP maps layer 3 IP addresses to Layer-2 MAC addresses. The switch has an ARP table which maps IPs to MACs.<\/p>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\">If the switch needs to send a packet and only has the IP but not the MAC of the destination, it sends a broadcast ARP request saying &#8220;Who is 172.16.5.24?&#8221;, only the device with this IP replies and it sends its MAC address. This is then added to the ARP table for the future.<\/p>\n<p>&nbsp;<\/p>\n<h3>VLAN Configuration<\/h3>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Create VLAN 1111 and name it EMPLOYEES<\/span><\/p>\n<pre style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Conf<\/span>\r\n<span style=\"font-style: italic;\">VLAN1111<\/span>\r\n<span style=\"font-style: italic;\">Name EMPLOYEES<\/span>\r\n<span style=\"font-style: italic;\">Exit<\/span><\/pre>\n<p style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-weight: bold;\">Assign VLAN 1111 to interfaces 1\/1\/1 and 1\/1\/3 as an access VLAN<\/span><\/p>\n<pre style=\"margin: 0in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Conf<\/span>\r\n<span style=\"font-style: italic;\">Interface 1\/1\/1<\/span>\r\n<span style=\"font-style: italic;\">VLAN access 1111<\/span>\r\n<span style=\"font-style: italic;\">Interface 1\/1\/3<\/span>\r\n<span style=\"font-style: italic;\">VLAN access 1111<\/span>\r\n<span style=\"font-style: italic;\">Exit<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>VLANS VLANs are used to isolate endpoints so you have better control over the traffic Default VLAN is VLAN 1 Devices in the same VLAN can communicate without routing. &nbsp; Collison Domains On a Layer 1 Hub, only one ethernet host on a particular segment may transmit at a time, otherwise there is a collision. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[17],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/874"}],"collection":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=874"}],"version-history":[{"count":6,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/874\/revisions"}],"predecessor-version":[{"id":884,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=\/wp\/v2\/posts\/874\/revisions\/884"}],"wp:attachment":[{"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.spktechfit.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}