{"id":338,"date":"2018-10-29T19:28:23","date_gmt":"2018-10-29T18:28:23","guid":{"rendered":"https:\/\/zed-network.fr\/?p=338"},"modified":"2020-08-24T19:30:36","modified_gmt":"2020-08-24T18:30:36","slug":"configure-route-leaking-between-global-and-vrf-routing-with-pbr","status":"publish","type":"post","link":"https:\/\/zed-network.fr\/?p=338","title":{"rendered":"How to Leak routes Between Global and VRF with PBR"},"content":{"rendered":"<h1>Diagram<\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-337\" src=\"https:\/\/zed-network.fr\/wp-content\/uploads\/NAT-PBR-VRF-1024x302.png\" alt=\"\" width=\"584\" height=\"172\" srcset=\"https:\/\/zed-network.fr\/wp-content\/uploads\/NAT-PBR-VRF-1024x302.png 1024w, https:\/\/zed-network.fr\/wp-content\/uploads\/NAT-PBR-VRF-300x89.png 300w, https:\/\/zed-network.fr\/wp-content\/uploads\/NAT-PBR-VRF-768x227.png 768w, https:\/\/zed-network.fr\/wp-content\/uploads\/NAT-PBR-VRF-500x148.png 500w, https:\/\/zed-network.fr\/wp-content\/uploads\/NAT-PBR-VRF.png 1108w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/p>\n<h2>Interface to Internet<\/h2>\n<pre>interface Ethernet0\/0\ndescription Outside\nip vrf forwarding INTERNET\nip address 192.0.0.1 255.255.255.252<\/pre>\n<h2>Interface Inside in the GRT (Global Routing Table)<\/h2>\n<pre>interface Ethernet0\/1\ndescription Inside\nip address 192.168.1.254 255.255.255.0<\/pre>\n<h2>Leaking default route to internet<\/h2>\n<pre>ip route 0.0.0.0 0.0.0.0 Ethernet0\/0 192.0.0.2<\/pre>\n<h2>NAT configuration<\/h2>\n<pre>ip nat inside source list NAT interface Ethernet0\/0 overload\naccess-list NAT permit 192.168.1.0 0.0.0.255<\/pre>\n<h2>PBR configuration<\/h2>\n<pre>ip prefix-list PREF seq 5 permit 192.168.1.0\/24\n!\nroute-map PBR permit 10\n  match ip address 101\n  set global\n!\naccess-list 101 permit ip any 192.168.1.0 0.0.0.255\n\ninterface Ethernet0\/0\n ip policy route-map PBR\n<\/pre>\n<h1>Verification<\/h1>\n<pre>Router#sh ip nat translations\nPro Inside global Inside local Outside local Outside global\nicmp 192.0.0.1:7 192.168.1.1:7 8.8.8.8:7 8.8.8.8:7\n\nRouter#sh ip policy\nInterface      Route map\nEthernet0\/0    PBR\n\nRouter#sh route-map\nroute-map PBR, permit, sequence 10\n  Match clauses:\n    ip address (access-lists): 101\n  Set clauses:\n    global\n  Policy routing matches: 25 packets, 2850 bytes<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Diagram Interface to Internet interface Ethernet0\/0 description Outside ip vrf forwarding INTERNET ip address 192.0.0.1 255.255.255.252 Interface Inside in the GRT (Global Routing Table) interface Ethernet0\/1 description Inside ip address 192.168.1.254 255.255.255.0 Leaking default route to internet ip route 0.0.0.0 0.0.0.0 Ethernet0\/0 192.0.0.2 NAT configuration ip nat inside source list NAT interface Ethernet0\/0 overload access-list [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-338","post","type-post","status-publish","format-standard","hentry","category-ccie-rs","category-cisco"],"_links":{"self":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts\/338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=338"}],"version-history":[{"count":4,"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts\/338\/revisions"}],"predecessor-version":[{"id":552,"href":"https:\/\/zed-network.fr\/index.php?rest_route=\/wp\/v2\/posts\/338\/revisions\/552"}],"wp:attachment":[{"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zed-network.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}