{"id":1886,"date":"2018-05-04T00:03:00","date_gmt":"2018-05-03T23:03:00","guid":{"rendered":"https:\/\/www.balajibandi.com\/?p=1886"},"modified":"2023-02-27T00:18:28","modified_gmt":"2023-02-27T00:18:28","slug":"routing-with-vrf-lite","status":"publish","type":"post","link":"https:\/\/www.balajibandi.com\/?p=1886","title":{"rendered":"Routing with VRF Lite."},"content":{"rendered":"\n<p>I have followed some blogs with experts in the market available and cisco official documentation :<\/p>\n\n\n\n<p><a href=\"https:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/switches\/lan\/catalyst4500\/12-2\/31sg\/configuration\/guide\/conf\/vrf.pdf\">https:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/switches\/lan\/catalyst4500\/12-2\/31sg\/configuration\/guide\/conf\/vrf.pdf<\/a><\/p>\n\n\n\n<p>I have simple topology testing :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"335\" height=\"314\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image.png\" alt=\"\" class=\"wp-image-1887\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image.png 335w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image-300x281.png 300w\" sizes=\"auto, (max-width: 335px) 100vw, 335px\" \/><figcaption class=\"wp-element-caption\"><strong>ISP and CUSTA and CUSTB<\/strong><\/figcaption><\/figure>\n\n\n\n<p>Config file is attached below :<\/p>\n\n\n\n<p><strong>ISP<\/strong><\/p>\n\n\n\n<p>ip vrf Blue<br>rd 65000:3<br>!<br>ip vrf Green<br>rd 65000:2<br>route-target export 65000:2<br>route-target import 65000:99<br>!<br>ip vrf Red<br>rd 65000:1<br>route-target export 65000:1<br>route-target import 65000:99<br>!<br>ip vrf Shared<br>rd 65000:99<br>route-target export 65000:99<br>route-target import 65000:1<br>route-target import 65000:2<br>!<\/p>\n\n\n\n<p>interface Loopback0<br>ip address 192.0.2.1 255.255.255.255<br>!<br>interface Loopback99<br>description VOIP Services<br>ip vrf forwarding Shared<br>ip address 192.168.99.1 255.255.255.0<br>!<br>interface GigabitEthernet0\/0<br>switchport trunk encapsulation dot1q<br>switchport mode trunk<br>negotiation auto<br>!<br>interface GigabitEthernet0\/1<br>switchport trunk encapsulation dot1q<br>switchport mode trunk<br>negotiation auto<br>!<br>interface GigabitEthernet0\/2<br>no switchport<br>ip vrf forwarding Red<br>ip address 172.16.1.2 255.255.255.252<br>negotiation auto<br>!<br>interface GigabitEthernet0\/3<br>no switchport<br>ip vrf forwarding Green<br>ip address 172.17.1.2 255.255.255.252<br>negotiation auto<br>!<br>interface GigabitEthernet1\/0<br>no switchport<br>ip vrf forwarding Blue<br>ip address 172.18.1.2 255.255.255.252<br>negotiation auto<\/p>\n\n\n\n<p>!<\/p>\n\n\n\n<p>interface Vlan16<br>ip vrf forwarding Red<br>ip address 172.16.0.1 255.255.255.0<br>!<br>interface Vlan17<br>ip vrf forwarding Green<br>ip address 172.17.0.1 255.255.255.0<br>!<br>interface Vlan18<br>ip vrf forwarding Blue<br>ip address 172.18.0.1 255.255.255.0<br>!<br>router ospf 1 vrf Red<br>redistribute bgp 65000 subnets<br>network 0.0.0.0 255.255.255.255 area 0<br>!<br>router ospf 2 vrf Green<br>redistribute bgp 65000 subnets<br>network 0.0.0.0 255.255.255.255 area 0<br>!<br>router ospf 3 vrf Blue<br>network 0.0.0.0 255.255.255.255 area 0<br>!<br>router bgp 65000<br>bgp log-neighbor-changes<br>!<br>address-family ipv4 vrf Blue<br>redistribute connected<br>redistribute ospf 3<br>exit-address-family<br>!<br>address-family ipv4 vrf Green<br>redistribute connected<br>redistribute ospf 2<br>exit-address-family<br>!<br>address-family ipv4 vrf Red<br>redistribute connected<br>redistribute ospf 1<br>exit-address-family<br>!<br>address-family ipv4 vrf Shared<br>redistribute connected<br>exit-address-family<br>!<\/p>\n\n\n\n<p><strong>CUSTA<\/strong><\/p>\n\n\n\n<p>ip vrf Green<br>rd 65000:2<br>!<br>ip vrf Red<br>rd 65000:1<br>!<\/p>\n\n\n\n<p>interface GigabitEthernet0\/0<br>switchport trunk encapsulation dot1q<br>switchport mode trunk<br>negotiation auto<br>!<\/p>\n\n\n\n<p>interface Vlan16<br>ip vrf forwarding Red<br>ip address 172.16.0.2 255.255.255.0<br>!<br>interface Vlan17<br>ip vrf forwarding Green<br>ip address 172.17.0.2 255.255.255.0<br>!<br>interface Vlan216<br>ip vrf forwarding Red<br>ip address 172.16.2.1 255.255.255.0<br>!<br>interface Vlan217<br>ip vrf forwarding Green<br>ip address 172.17.2.1 255.255.255.0<br>!<br>router ospf 1 vrf Red<br>passive-interface Vlan216<br>network 0.0.0.0 255.255.255.255 area 0<br>!<br>router ospf 2 vrf Green<br>passive-interface Vlan217<br>network 0.0.0.0 255.255.255.255 area 0<br>!<\/p>\n\n\n\n<p><strong>CUSTB<\/strong><br><\/p>\n\n\n\n<p>ip vrf Blue<br>rd 65000:3<br>!<br>ip vrf Red<br>rd 65000:1<br>!<br>!<\/p>\n\n\n\n<p>interface GigabitEthernet0\/1<br>switchport trunk encapsulation dot1q<br>switchport mode trunk<br>negotiation auto<br>!<\/p>\n\n\n\n<p>interface Vlan16<br>ip vrf forwarding Red<br>ip address 172.16.0.3 255.255.255.0<br>!<br>interface Vlan18<br>ip vrf forwarding Blue<br>ip address 172.18.0.3 255.255.255.0<br>!<br>interface Vlan316<br>ip vrf forwarding Red<br>ip address 172.16.3.1 255.255.255.0<br>!<br>interface Vlan318<br>ip vrf forwarding Blue<br>ip address 172.18.3.1 255.255.255.0<br>!<br>router ospf 1 vrf Red<br>passive-interface Vlan316<br>network 0.0.0.0 255.255.255.255 area 0<br>!<br>router ospf 3 vrf Blue<br>passive-interface Vlan318<br>network 0.0.0.0 255.255.255.255 area 0<\/p>\n\n\n\n<p>Verifications :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"570\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image-1.png\" alt=\"\" class=\"wp-image-1888\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image-1.png 662w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image-1-300x258.png 300w\" sizes=\"auto, (max-width: 662px) 100vw, 662px\" \/><\/figure>\n\n\n\n<p><strong>CUSTB verifications :<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"644\" height=\"356\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image-2.png\" alt=\"\" class=\"wp-image-1889\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image-2.png 644w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image-2-300x166.png 300w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/figure>\n\n\n\n<p>Now I do not see redistributed routes<\/p>\n\n\n\n<p>After a struggle of 1 hour and cisco docs, I found I have not added the VRF-lite capabilities <\/p>\n\n\n\n<p><strong>CUST A :<\/strong><\/p>\n\n\n\n<p>router ospf 1 vrf Red<br><strong>capability vrf-lite<\/strong><br>passive-interface Vlan216<br>network 0.0.0.0 255.255.255.255 area 0<\/p>\n\n\n\n<p><strong>CUSTB:<\/strong><\/p>\n\n\n\n<p>router ospf 1 vrf Red<br><strong>capability vrf-lite<\/strong><br>passive-interface Vlan316<br>network 0.0.0.0 255.255.255.255 area 0<\/p>\n\n\n\n<p>Now verification works as expected :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"626\" height=\"379\" src=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image-3.png\" alt=\"\" class=\"wp-image-1890\" srcset=\"https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image-3.png 626w, https:\/\/www.balajibandi.com\/wp-content\/uploads\/2023\/02\/image-3-300x182.png 300w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><\/figure>\n\n\n\n<p>Good luck to whoever ever struggling with the same issue&#8230;!<\/p>\n\n\n\n<p>Happy Labbbing&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have followed some blogs with experts in the market available and cisco official documentation : https:\/\/www.cisco.com\/c\/en\/us\/td\/docs\/switches\/lan\/catalyst4500\/12-2\/31sg\/configuration\/guide\/conf\/vrf.pdf I have simple topology testing : Config file is attached below : ISP ip vrf Bluerd 65000:3!ip vrf Greenrd 65000:2route-target export 65000:2route-target import 65000:99!ip vrf Redrd 65000:1route-target export 65000:1route-target import 65000:99!ip vrf Sharedrd 65000:99route-target export 65000:99route-target import 65000:1route-target [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,13,2],"tags":[],"class_list":["post-1886","post","type-post","status-publish","format-standard","hentry","category-ccie-rns","category-ccie-sp","category-cisco"],"_links":{"self":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/1886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1886"}],"version-history":[{"count":4,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/1886\/revisions"}],"predecessor-version":[{"id":1894,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=\/wp\/v2\/posts\/1886\/revisions\/1894"}],"wp:attachment":[{"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.balajibandi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}