{"id":322,"date":"2015-02-19T12:34:27","date_gmt":"2015-02-19T12:34:27","guid":{"rendered":"http:\/\/www.flat-planet.net\/?p=322"},"modified":"2015-02-19T12:34:27","modified_gmt":"2015-02-19T12:34:27","slug":"arista-eos-vrfs-and-the-cli","status":"publish","type":"post","link":"https:\/\/flat-planet.net\/?p=322","title":{"rendered":"Arista EOS, VRFs, and the CLI"},"content":{"rendered":"<p>A very common approach for networks is to have the management interface of the network node (switch, router, load balancer, etc.) in a separate VRF [Virtual Routing and Forwarding] instance. This has many security benefits, especially in the case of internet facing devices.<\/p>\n<p>Main ones from my perspective are:<\/p>\n<ul>\n<li>Separate routing table to the rest of the device<\/li>\n<li>Isolation of management services<\/li>\n<li>Independent virtual\/physical interfaces, with tightened ACLs<\/li>\n<\/ul>\n<p>Arista EOS for quite some time has supported VRFs, but something that you need to keep in mind when using them is that the VRF has it&#8217;s own routing table. So when you create a VRF e.g. MGMT-VRF all your addresses and routes for the management network are no longer in the default routing instance.<br \/>\n<code><br \/>\nswitch(config)# vrf definition MGMT-VRF<br \/>\nswitch(config-vrf-MGMT-VRF)# rd 123:12<br \/>\nswitch(config)# interface et1<br \/>\nswitch(config-if-et1)# vrf forwarding MGMT-VRF<br \/>\n<\/code><br \/>\nSome commands are VRF aware e.g. ping. For example you can run the following command:<br \/>\n<code><br \/>\nping vrf MGMT-vrf 10.10.10.1<br \/>\n<\/code><br \/>\nUnfortunately not all commands are VRF aware yet &#8211; an obvious one is the copy command. The solution to this is to switch to the routing-context that you are trying to copy to\/from and then run the copy command (this applies to all non-VRF-aware commands).<br \/>\n<code><br \/>\nswitch# routing-context vrf MGMT-VRF<br \/>\nswitch# show routing-context vrf<br \/>\nCurrent VRF routing-context is MGMT-VRF<br \/>\nswitch# copy ...<br \/>\n<\/code><br \/>\nThen afterwards switch back to the default<br \/>\n<code><br \/>\nswitch# routing-context vrf default<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A very common approach for networks is to have the management interface of the network node (switch, router, load balancer, etc.) in a separate VRF [Virtual Routing and Forwarding] instance. This has many security benefits, especially in the case of internet facing devices. Main ones from my perspective are: Separate routing table to the rest [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96,38],"tags":[97,161,160,106,42,163,162,164,159],"series":[],"class_list":["post-322","post","type-post","status-publish","format-standard","hentry","category-arista","category-linux","tag-arista-2","tag-cli","tag-copy-command","tag-eos","tag-linux-2","tag-management","tag-routing-instance","tag-system-management","tag-vrf"],"_links":{"self":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts\/322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=322"}],"version-history":[{"count":1,"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts\/322\/revisions"}],"predecessor-version":[{"id":323,"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts\/322\/revisions\/323"}],"wp:attachment":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}