{"id":821,"date":"2021-08-20T03:09:47","date_gmt":"2021-08-20T03:09:47","guid":{"rendered":"http:\/\/feralpacket.org\/?p=821"},"modified":"2021-08-20T03:09:47","modified_gmt":"2021-08-20T03:09:47","slug":"switching-notes","status":"publish","type":"post","link":"https:\/\/feralpacket.org\/?p=821","title":{"rendered":"Switching Notes"},"content":{"rendered":"<p><span style=\"font-weight: bold;\">Layer 2<\/span>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/5287b6df47e562084e68a1a61e57543f.png\" style=\"\" width=\"429\" height=\"\"><\/p>\n<p>ACL &#8211;&gt; Frame allowed \/ denied<\/p>\n<p>QoS &#8211;&gt; Priority frame marking<\/p>\n<p>CAM &#8211;&gt; next-hop information -&gt; exit interface&nbsp;<\/p>\n<p>&nbsp; &nbsp;|<\/p>\n<p>&nbsp; &nbsp;|&#8211;&gt; All three operations are performed at the same time using dedicated co-processors (ASICs)<\/p>\n<p>Terney Content Addressable Memory<\/p>\n<p>&nbsp;&#8211; 3 values (VMR)<\/p>\n<p>&nbsp; &nbsp; &nbsp;&#8211; Value<\/p>\n<p>&nbsp; &nbsp; &nbsp;&#8211; Mask<\/p>\n<p>&nbsp; &nbsp; &nbsp;&#8211; Result<\/p>\n<p>If destination is starting with 10.x.x.x, then deny<\/p>\n<p>&nbsp;&#8211; 10.x.x.x &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211;&gt; Value<\/p>\n<p>&nbsp;&#8211; 0.255.255.255 &nbsp; &nbsp; &#8211;&gt; Mask<\/p>\n<p>&nbsp;&#8211; Deny &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8211;&gt; Result<\/p>\n<p>show mac address-table<\/p>\n<p>&nbsp;&#8211;&gt; Vlan<\/p>\n<p>&nbsp;&#8211;&gt; MAC address<\/p>\n<p>&nbsp;&#8211;&gt; Type (how learned)<\/p>\n<p>&nbsp;&#8211;&gt; Ports (exit interface)<\/p>\n<p><span style=\"font-weight: bold;\">Layer 3<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/feralpacket.org\/wp-content\/uploads\/2018\/10\/1d5dd54cf48168293c496ff118bbe12c.png\" style=\"\" width=\"\" height=\"\"><\/p>\n<p>FIB &#8211;&gt; Forwarding Information Base<\/p>\n<p>PR &#8211;&gt; Packet Rewrite<\/p>\n<p>CEF &#8211;&gt; Cisco Express Forwarding<\/p>\n<p>PR<\/p>\n<p>&nbsp;&#8211; rewrite TTL (IP headers)<\/p>\n<p>&nbsp;&#8211; MAC source \/ destination<\/p>\n<p>&nbsp;&#8211; IP checksum<\/p>\n<p>&nbsp;&#8211; ethernet CRC<\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">show ip cef<\/span><\/p>\n<p>&nbsp;-&gt; Prefix<\/p>\n<p>&nbsp;-&gt; Next-hop<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; no route<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; receive<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; drop<\/p>\n<p>&nbsp;-&gt; Interface<\/p>\n<p>Switching is all about interfaces<\/p>\n<p>Interface Modes<\/p>\n<p>&nbsp;-&gt; Access &#8211; connected to end devices<\/p>\n<p>&nbsp;-&gt; Trunk &#8211; connected to other switches<\/p>\n<p>&nbsp;-&gt; Tunnel &#8211; Q in Q tunnel<\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">int fa0\/1<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">&nbsp;switchport mode { access | trunk }<\/span><\/p>\n<p>Tunnel mode is configured in access mode<\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">int range fa0\/1 &#8211; 5<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">int range fa0\/1, fa0\/5 &#8211; 8 , fa0\/15<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">define interface ABC fa0\/1, fa0\/5 &#8211; 8<\/span><\/p>\n<p><span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">int range macro ABC<\/span><\/p>\n<p><span style=\"font-weight: bold;\">Trunking<\/span><\/p>\n<p>&nbsp;-&gt; ISL &#8211; Inter-Switch Link<\/p>\n<p>&nbsp;-&gt; 802.1Q &#8211; IEEE standard<\/p>\n<p>ISL<\/p>\n<p>&nbsp;-&gt; not in the R&amp;S v5 lab<\/p>\n<p>&nbsp;-&gt; Cisco proprietary<\/p>\n<p>&nbsp;-&gt; 30 bytles additionally added to the frame<\/p>\n<p>&nbsp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>&nbsp;| 26 | frame | 4 |<\/p>\n<p>&nbsp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>&nbsp;-&gt; only 15 bits used to identify the VLAN<\/p>\n<p>&nbsp;-&gt; no untagged VLAN<\/p>\n<p>802.1Q<\/p>\n<p>&nbsp;-&gt; 4 bytes added to the frame<\/p>\n<p>&nbsp; &nbsp;6 &nbsp; &nbsp; &nbsp;6 &nbsp; &nbsp; &nbsp;4 &nbsp; &nbsp; &nbsp;up to 1500 bytes &nbsp;4<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>| DA | SA | .1q | type | data&#8230;&#8230;&#8230;| FCS |<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^<\/p>\n<p>&nbsp;-&gt; 12 bits<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; 2^12 VLANs &#8211;&gt; 4096<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 to 4095<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; Vlan 0 (hidden system VLAN)<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; Vlan 4095 (hidden system VLAN)<\/p>\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; Vlans 1 &#8211; 4094 usable<\/p>\n<p>Normal frame<\/p>\n<p>&nbsp;-&gt; 1518 bytes<\/p>\n<p>802.1Q frame<\/p>\n<p>&nbsp;-&gt; 1522 bytes<\/p>\n<p>Vlan 1<\/p>\n<p>&nbsp;-&gt; Management VLAN<\/p>\n<p>&nbsp;-&gt; Default native VLAN<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; untagged VLAN<\/p>\n<p>&nbsp;-&gt; used for:<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; CDP packets<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; VTP packets<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; STP packets<\/p>\n<p>&nbsp;-&gt; Shutting down VLAN 1 only affects data traffic<\/p>\n<p>&nbsp;-&gt; All switching protocols use VLAN 1<\/p>\n<p>VLANs 1002 &#8211; 1005<\/p>\n<p>&nbsp;-&gt; Tolken Ring VLANs<\/p>\n<p>ISL<\/p>\n<p>&nbsp;-&gt; VLANs 1 &#8211; 1001<\/p>\n<p>Reduced MAC Address feature<\/p>\n<p>&nbsp;&#8211; One VLAN -&gt; priority number + Base MAC address<\/p>\n<p>&nbsp;&#8211; Configured with:<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; SW1(config)# <span style=\"background-color: rgb(255, 250, 165);-evernote-highlight:true;\">spanning-tree extended system-id<\/span><\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Default configuration<\/p>\n<p>&nbsp; &nbsp; &nbsp;-&gt; Required to create more than 1001 VLANs<\/p>\n<p>SW1<\/p>\n<p>&nbsp;&#8211; priority number: 32768<\/p>\n<p>&nbsp;&#8211; Base MAC address: &nbsp;0001.0002.0003<\/p>\n<p>&nbsp;&#8211; VLAN 10: &nbsp;32768.0001.0002.0003<\/p>\n<p>&nbsp;&#8211; VLAN 11: &nbsp;32769.0001.0002.0003<\/p>\n<p>Spanning Tree Protocol (801.2D)<\/p>\n<p>&nbsp;-&gt; used to prevent loops while maintaining redundancy<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Layer 2\u00a0<\/p>\n","protected":false},"author":1,"featured_media":819,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[31,60],"class_list":["post-821","post","type-post","status-publish","format-standard","hentry","category-ccie","tag-published","tag-switching"],"_links":{"self":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=821"}],"version-history":[{"count":1,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/821\/revisions"}],"predecessor-version":[{"id":976,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/posts\/821\/revisions\/976"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=\/wp\/v2\/media\/819"}],"wp:attachment":[{"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feralpacket.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}