{"id":1548,"date":"2024-07-27T22:58:07","date_gmt":"2024-07-27T21:58:07","guid":{"rendered":"https:\/\/www.labtinker.net\/?p=1548"},"modified":"2024-07-27T22:58:07","modified_gmt":"2024-07-27T21:58:07","slug":"sonic-and-leaf-and-spine","status":"publish","type":"post","link":"http:\/\/18.135.13.153\/?p=1548","title":{"rendered":"SONIC and Leaf and Spine"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If that title makes you think of a pixelated hedgehog who has acquired two new sidekicks then you&#8217;re probably as old as me.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, SONIC is an open source networking operating system originally developed by Microsoft and its command line will be familiar to anybody who has worked with Cisco. I used it to play with leaf and spine networking.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This fine gentlemen provides a YouTube tutorial on how to set-up a simple leaf and spine network in GNS3 using vxlan evpn which I wholeheartedly recommend. This post is essentially me following this video, adapting it slightly and just playing with it to try and gain a little more understanding.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"SONiC - Configuring VXLAN EVPN\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/Jwl_ctrVAFY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">My network looked like this &#8211; and probably had a few more hosts than I needed. I will include the spine and leaf switch configurations but they are all explained in the video above which also has links to the relevant configuration elements rather than the full configs.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"638\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-1024x638.png\" alt=\"\" class=\"wp-image-1550\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-1024x638.png 1024w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-300x187.png 300w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-768x479.png 768w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image.png 1033w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"> I thought I would try and see what was going on when we ping from <em>PC4 <\/em>(11.1.1.3) on the left and which hangs off <em>leaf1 <\/em>to <em>PC2 <\/em>(11.1.1.2) on the right which hangs off <em>leaf2<\/em>; both these hosts are in VLAN 11.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"633\" height=\"163\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-1.png\" alt=\"\" class=\"wp-image-1551\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-1.png 633w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-1-300x77.png 300w\" sizes=\"auto, (max-width: 633px) 100vw, 633px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">And the arp for this is&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"579\" height=\"112\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-2.png\" alt=\"\" class=\"wp-image-1552\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-2.png 579w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-2-300x58.png 300w\" sizes=\"auto, (max-width: 579px) 100vw, 579px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;which is the VXLAN interface on the <em>leaf1 <\/em>switch<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"229\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-3.png\" alt=\"\" class=\"wp-image-1553\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-3.png 802w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-3-300x86.png 300w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-3-768x219.png 768w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The capture from PC4 to leaf1 is unremarkable..<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"965\" height=\"199\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-4.png\" alt=\"\" class=\"wp-image-1554\" style=\"width:840px;height:auto\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-4.png 965w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-4-300x62.png 300w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-4-768x158.png 768w\" sizes=\"auto, (max-width: 965px) 100vw, 965px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">However, the capture between the leaf1 switch and the spine switch shows the vxlan protocol nestled between UDP and Ethernet&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"195\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-5.png\" alt=\"\" class=\"wp-image-1555\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-5.png 936w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-5-300x63.png 300w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-5-768x160.png 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Expanding this out, we see that VLAN 11 has been mapped to a VNI of 100011, as described in the video&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"509\" height=\"116\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-6-1.png\" alt=\"\" class=\"wp-image-1558\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-6-1.png 509w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-6-1-300x68.png 300w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;with the source ip address of 100.1.1.1 and the destination ip address of 100.2.2.2 being the <em>leaf1 <\/em>and <em>leaf2 <\/em>vlxan vtep addresses respectively.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Vtep address on <em>leaf1<\/em>&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"375\" height=\"218\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-7.png\" alt=\"\" class=\"wp-image-1557\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-7.png 375w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-7-300x174.png 300w\" sizes=\"auto, (max-width: 375px) 100vw, 375px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;And on <em>leaf2<\/em>&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"349\" height=\"196\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-8.png\" alt=\"\" class=\"wp-image-1559\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-8.png 349w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-8-300x168.png 300w\" sizes=\"auto, (max-width: 349px) 100vw, 349px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The capture from <em>leaf2 <\/em>to PC2 has no special encapsulation<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"236\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-10.png\" alt=\"\" class=\"wp-image-1561\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-10.png 1000w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-10-300x71.png 300w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-10-768x181.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">But the source mac address is shown on <em>leaf2 <\/em>as originating from the <em>leaf1 <\/em>vxlan interface<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"653\" height=\"223\" src=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-12.png\" alt=\"\" class=\"wp-image-1563\" srcset=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-12.png 653w, http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/image-12-300x102.png 300w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">So any host on vlans 10 and 11 (which are defined in the configuration) can connect to any other host on these vlans on either switch. <\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-abb283eb-37e7-4f4b-b999-3c417b7717d4\" href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/spine.txt\">spine<\/a><a href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/spine.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-abb283eb-37e7-4f4b-b999-3c417b7717d4\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-8c118707-87eb-4058-90c2-6f0d86c22a66\" href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/leaf1.txt\">leaf1<\/a><a href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/leaf1.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-8c118707-87eb-4058-90c2-6f0d86c22a66\">Download<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-9a745768-a5d8-4d6c-b660-70b14e04e4d8\" href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/leaf2.txt\">leaf2<\/a><a href=\"http:\/\/18.135.13.153\/wp-content\/uploads\/2024\/07\/leaf2.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-9a745768-a5d8-4d6c-b660-70b14e04e4d8\">Download<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If that title makes you think of a pixelated hedgehog who has acquired two new sidekicks then you&#8217;re probably as old as me. However, SONIC is an open source networking operating system originally developed by Microsoft and its command line will be familiar to anybody who has worked with Cisco. I used it to play [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1548","post","type-post","status-publish","format-standard","hentry","category-networking"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/18.135.13.153\/index.php?rest_route=\/wp\/v2\/posts\/1548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/18.135.13.153\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/18.135.13.153\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/18.135.13.153\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/18.135.13.153\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1548"}],"version-history":[{"count":0,"href":"http:\/\/18.135.13.153\/index.php?rest_route=\/wp\/v2\/posts\/1548\/revisions"}],"wp:attachment":[{"href":"http:\/\/18.135.13.153\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/18.135.13.153\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1548"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/18.135.13.153\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}