{"id":744,"date":"2024-11-26T02:35:39","date_gmt":"2024-11-25T23:35:39","guid":{"rendered":"https:\/\/itgen.itbumper.com\/?page_id=744"},"modified":"2024-11-26T02:35:40","modified_gmt":"2024-11-25T23:35:40","slug":"0018_cisco-dtp-and-vtp","status":"publish","type":"page","link":"https:\/\/itgen.itbumper.com\/?page_id=744","title":{"rendered":"0018_Cisco: DTP and VTP"},"content":{"rendered":"<ul>\n<li>\n<p><strong>VTP (VLAN Trunking Protocol)<\/strong><br \/>A protocol for managing VLANs across switches within the same VTP domain. It allows centralized creation, deletion, and modification of VLANs, automatically synchronizing them across other switches.<br \/><strong>Operating modes:<\/strong><\/p>\n<ul>\n<li><strong>Server<\/strong>: Manages and propagates VLAN changes.<\/li>\n<li><strong>Client<\/strong>: Receives VLAN updates but cannot modify them.<\/li>\n<li><strong>Transparent<\/strong>: Does not propagate VLANs but forwards VTP messages.<br \/><strong>Risk<\/strong>: Misconfigured VTP can delete all existing VLANs.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>DTP (Dynamic Trunking Protocol)<\/strong><br \/>A protocol for dynamically negotiating the port mode (trunk or access). It automatically sets up the connection type between switches.<br \/><strong>Modes:<\/strong><\/p>\n<ul>\n<li><strong>Dynamic Desirable<\/strong>: Actively tries to establish a trunk.<\/li>\n<li><strong>Dynamic Auto<\/strong>: Passively waits for trunk negotiation.<\/li>\n<li><strong>Access\/Trunk<\/strong>: Manually sets the mode.<br \/><strong>Risk<\/strong>: Automation can lead to vulnerabilities, such as when an attacker connects their device.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nL2 switches\n\n#DTP - Dynamic Trunking Protocol\nenable\n\tconfigure terminal\n\t\tint g0\/0\t\t\t\t\t\t\t\t#\n\t\t\tswitchport mode access\t\t\t\t#assigned to a single VLAN and the port doesn`t send DTP packets\n\t\t\tswitchport mode trunk\t\t\t\t#multiple VLANs 802.1Q-tagged frames,except for the native VLAN, which is untagged\n\t\t\tswitchport mode dynamic auto\t\t#the port will negotiate trunking only if requested by the peer - it is default mode\n\t\t\tswitchport mode dynamic desirable\t#the port will actively try to negotiate a trunk link\n\t\t\tswitchport nonegotiate\t\t\t\t#disables DTP negotiation on the port\n\t\t\t#Examples:\n\t\t\t====\n\t\t\tswitchport mode access\n\t\t\tswitchport access vlan 10\n\t\t\t====\n\t\t\tswitchport mode trunk\n\t\t\tswitchport trunk allowed vlan 10,20,30\n\t\t\tswitchport trunk native vlan 99\n\t\t\t====\n\n#VTP - VLAN Trunking Protocol (Ver.1 - 1-1005 VLANs, Ver.2 + VTP pruning, Ver.3 1006-4095 VLANs + description + VTP authen)\n#VTP is enable by default and all switches work in server mode.\n#In client mode switch joins to any domain\n#Old switches, witch has VTP configuration can rewrite all your VLANs in case they have bigger number in the &quot;configuration revision&quot;\n\t\tvtp domain &lt;some-domain&gt;\t#a logical group of Cisco switches that share VLAN configuration information\n\t\tvtp mode {server | client |transperent}\n\t\t\tServer: switches can create, modify, and delete VLANs for the entire VTP domain.\n\t\t\tClient: switches cannot create, modify, or delete VLANs. They receive VLAN information from VTP servers. It is auto.\n\t\t\tTransparent: switches in transparent mode do not participate in VTP advertisements.\n\t\t\tVTP Pruning - then enabled, a switch will only forward VTP advertisements for VLANs that exist on that switch or on other switches connected through trunks.\n\t\t\n\t\tvtp version {2 |3 }\t\t\t\t\t#set VTP version\n\t\tvtp mode server\t\t\t\t\t\t#set server mode\t\n\t\tvtp mode client\t\t\t\t\t\t#set client mode\n\t\tvtp mode transparent\t\t\t\t#set transparent mode\n\t\tvtp password &lt;YourPassword&gt;\t\t\t#set a password for the domain (if you don`t input on to client SW\n\t\tvtp pruning\t\t\t\t\t\t\t#sets only on servers, info auto shares to the domain clients\n\t\tshow vtp status\t\t\t\t\t\t#show vtp status\n\t\t#use for interfaces: switchport trunk allowed vlan 1,10,20 to circumvent the restriction\n\t\t\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>VTP (VLAN Trunking Protocol)A protocol for managing VLANs across switches within the same VTP domain. It allows centralized creation, deletion, and modification of VLANs, automatically synchronizing them across other switches.Operating modes: Server: Manages and propagates VLAN changes. Client: Receives VLAN updates but cannot modify them. Transparent: Does not propagate VLANs but forwards VTP messages.Risk: Misconfigured &hellip; <a href=\"https:\/\/itgen.itbumper.com\/?page_id=744\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;0018_Cisco: DTP and VTP&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/744"}],"collection":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=744"}],"version-history":[{"count":1,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/744\/revisions"}],"predecessor-version":[{"id":745,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=\/wp\/v2\/pages\/744\/revisions\/745"}],"wp:attachment":[{"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itgen.itbumper.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}