{"id":3702,"date":"2015-01-14T17:18:00","date_gmt":"2015-01-14T17:18:00","guid":{"rendered":"https:\/\/jay-miah.co.uk\/?p=3702"},"modified":"2024-11-18T17:21:47","modified_gmt":"2024-11-18T17:21:47","slug":"hp-procurve-create-a-new-vlan-assign-ports","status":"publish","type":"post","link":"https:\/\/jay-miah.co.uk\/index.php\/hp-procurve-create-a-new-vlan-assign-ports\/","title":{"rendered":"HP Procurve \u2013 Create a New VLAN &amp; Assign Ports"},"content":{"rendered":"<p>A VLAN\u00a0has the same attributes as a physical local area network (LAN), but it allows for end stations to be grouped together more easily even if they are not on the same network switch.\u00a0VLAN membership can be configured through software instead of physically relocating devices or connections.\u00a0VLANs are used to segregate networks or traffic, each VLAN has its own collision domain and broadcast domain. Using VLANs can reduce network collisions and improve performance.<\/p>\n<p><strong>Create a VLAN<\/strong><\/p>\n<p>To create a VLAN on a HP Procurve switch \u2013\u00a0connect to the device using putty and enter privileged mode (see \u201c<a href=\"http:\/\/www.tech.linknetworksolutions.co.uk\/?p=79\">Connecting to a HP ProCurve Switch Using a Console cable &amp; Putty<\/a>\u201c)<\/p>\n<p><strong>1.\u00a0<\/strong>To see what VLANS currently exist on the switch, In privileged mode issue<\/p>\n<p><strong>#show vlan<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"267\" class=\"wp-image-3703\" src=\"https:\/\/jay-miah.co.uk\/wp-content\/uploads\/2024\/11\/image001.jpeg\" alt=\"image001\" \/><\/p>\n<p>We can see from the list we have the following VLANS:<\/p>\n<p><strong>1 Default<\/strong><\/p>\n<p><strong>100 Curric<\/strong><\/p>\n<p><strong>150 Management<\/strong><\/p>\n<p><strong>2.<\/strong>\u00a0We now want to add a VLAN called\u00a0<strong>\u201cVPN\u201d<\/strong>\u00a0\u00a0to do this first enter Global Configuration Mode<\/p>\n<p><strong>#config t<\/strong><\/p>\n<p>Then issue the following command<\/p>\n<p><strong>#vlan 101 name VPN<\/strong><\/p>\n<p><strong>#Exit<\/strong><\/p>\n<p><strong>\u201cvlan\u201d<\/strong>\u00a0indicates we want to configure a VLAN,<\/p>\n<p><strong>\u201c101\u201d<\/strong>\u00a0indicates a VLAN ID which can be anything of your choice, but this must meet the requirements of the switch VLAN ID policy, it\u2019s a good idea to keep them uniform.<\/p>\n<p><strong>\u201cName VPN\u201d<\/strong>\u00a0indicates a name of the new VLAN.<\/p>\n<p><strong>\u201cExit\u201d<\/strong>\u00a0indicates that we want to leave the global configuration mode and return to privileged mode.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"425\" class=\"wp-image-3704\" src=\"https:\/\/jay-miah.co.uk\/wp-content\/uploads\/2024\/11\/image003.jpeg\" alt=\"image003\" \/><\/p>\n<p>If we now issue a\u00a0<strong>#show vlan<\/strong>\u00a0command, we can verify the new VLAN is now listed.<\/p>\n<p><strong>3.<\/strong>\u00a0Although there wont be any ports associated with the new VLAN yet, we can issue a\u00a0<strong>#show vlan 101<\/strong>\u00a0command to see if there are any ports associated.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"249\" class=\"wp-image-3705\" src=\"https:\/\/jay-miah.co.uk\/wp-content\/uploads\/2024\/11\/image005.jpeg\" alt=\"image005\" \/><\/p>\n<p>As expected nothing is listed.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Assign a port to a VLAN<\/strong><\/p>\n<p><strong>1.<\/strong>\u00a0To Assign a port to a VLAN we need to enter global configuration mode again,<\/p>\n<p><strong>#Config t<\/strong><\/p>\n<p>then we need to attach the port we want to the new VLAN<\/p>\n<p><strong>#vlan 101 untagged 21<\/strong><\/p>\n<p><strong>#exit<\/strong><\/p>\n<p><strong>\u201cvlan 101\u201d<\/strong>\u00a0indicates we want to make a configuration change to this vlan<\/p>\n<p><strong>\u201cuntagged\u201d<\/strong>\u00a0indicates that we want to untag a port to the vlan specified \u2013 an untagged port in a VLAN is a physical member of that VLAN, ie. when you plug your host into that port it is physically connected to that VLAN (also known as an \u201caccess port\u201d in Cisco terminology).<\/p>\n<p><strong>\u201c21\u201d<\/strong>\u00a0indicates physical port 21 of the switch<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"672\" height=\"424\" class=\"wp-image-3706\" src=\"https:\/\/jay-miah.co.uk\/wp-content\/uploads\/2024\/11\/image007.jpeg\" alt=\"image007\" \/><\/p>\n<p><strong>2.<\/strong>\u00a0<strong>#show vlan 101<\/strong>\u00a0now verifies that port 21 is now untagged onto the VPN VLAN.<\/p>\n<p>The status is\u00a0<strong>\u201cdown\u201d<\/strong>\u00a0due to the fact this port has nothing plugged into it.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Untag a range of ports<\/strong><\/p>\n<p><strong>#Config t<\/strong><\/p>\n<p><strong>#vlan 101 untagged 21-25<\/strong><\/p>\n<p><strong>#exit<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"427\" class=\"wp-image-3707\" src=\"https:\/\/jay-miah.co.uk\/wp-content\/uploads\/2024\/11\/image009.jpeg\" alt=\"image009\" \/><\/p>\n<p><strong>#show vlan 101<\/strong>\u00a0verifies the untagged port range<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Tag a port to a VLAN<\/strong><\/p>\n<p><strong>#config t<\/strong><\/p>\n<p><strong>#vlan 101 tagged 26<\/strong><\/p>\n<p><strong>#exit<\/strong><\/p>\n<p><strong>\u201ctagged\u201d<\/strong>\u00a0indicates that we want to port to carry traffic for multiple VLANs from the switch to other network devices such as an upstream router or an edge switch (In Cisco terminology this is called trunking, HP have no specific term for it).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"674\" height=\"424\" class=\"wp-image-3708\" src=\"https:\/\/jay-miah.co.uk\/wp-content\/uploads\/2024\/11\/image011.jpeg\" alt=\"image011\" \/><\/p>\n<p><strong>#show vlan 101<\/strong>\u00a0verifies the port has been tagged to the VLAN.<\/p>\n<p>To save all the changes to the running configuration issue<\/p>\n<p><strong>#wri mem<\/strong>\u00a0command.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A VLAN\u00a0has the same attributes as a physical local area network (LAN), but it allows for end stations to be grouped together more easily even<\/p>\n","protected":false},"author":1,"featured_media":3709,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,9],"tags":[174,172,173,175],"class_list":["post-3702","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-network","category-switching","tag-cli","tag-hp-procurve","tag-switch","tag-vlans"],"_links":{"self":[{"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/3702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=3702"}],"version-history":[{"count":1,"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/3702\/revisions"}],"predecessor-version":[{"id":3710,"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/3702\/revisions\/3710"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/media\/3709"}],"wp:attachment":[{"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=3702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=3702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jay-miah.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=3702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}