{"id":315,"date":"2011-01-04T10:10:55","date_gmt":"2011-01-04T10:10:55","guid":{"rendered":"http:\/\/www.esds.co.in\/data-centers\/kb\/?p=315"},"modified":"2017-12-13T12:23:00","modified_gmt":"2017-12-13T12:23:00","slug":"linux-gre-tunnel","status":"publish","type":"post","link":"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/","title":{"rendered":"Linux GRE Tunnel"},"content":{"rendered":"<p><!-- @page { margin: 2cm } P { margin-bottom: 0.21cm } --><\/p>\n<p lang=\"en-US\"><span style=\"font-family: Times New Roman,serif;\"><span style=\"font-size: small;\"><img loading=\"lazy\" class=\"aligncenter wp-image-316 size-full\" title=\"Linux-GRE-Tunnel\" src=\"http:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2011\/01\/gre-tunnel.jpg\" alt=\"\" width=\"712\" height=\"352\" srcset=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2011\/01\/gre-tunnel.jpg 712w, https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2011\/01\/gre-tunnel-300x148.jpg 300w\" sizes=\"(max-width: 712px) 100vw, 712px\" \/><\/span><\/span><\/p>\n<p lang=\"en-US\">\n<h3 lang=\"en-US\">Graphic Explained Below<\/h3>\n<p lang=\"en-US\">In this small example we will see how to connect two remote networks using advanced routing tools, Linux kernel (iproute2).<\/p>\n<p lang=\"en-US\">The network A (192.168.0.0\/24) is connected to the Internet with Router A (192.168.0.254 for the local interface 200.1.2.3 to the external interface) while the network B (192.168.1.0\/24) is connected with The Router B (192.168.1.254 for the local interface 190.5.6.7 to the external interface).<\/p>\n<p lang=\"en-US\">We assume that from the external interface of Router A can reach the external interface of the router B and vice versa.<\/p>\n<p lang=\"en-US\">The GRE tunnel create a new network which will assign 10.0.0.0\/24 block where 10.0.0.1 is the end of router A and 10.0.0.2 will be the end of the router B.<\/p>\n<p lang=\"en-US\"><strong>Important Note<\/strong>: It is important that both networks do not share the same block as this would generate routing problems. You can use the same block only if you use subnets but that configuration is beyond the scope of this tutorial.<\/p>\n<p lang=\"en-US\">This tutorial is based on iprouite2 which comes with 2.2 and later kernels. Both routers must be lifted ip_gre.o module.<\/p>\n<p lang=\"en-US\">Start with the configuration of router A, verification of the corresponding module<\/p>\n<p lang=\"en-US\"># Modprobe ip_gre.o<\/p>\n<p lang=\"en-US\">GRE tunnel creation<\/p>\n<p lang=\"en-US\"># Ip tunnel add mode gre remote NetB local 190.5.6.7 200.1.2.3 255 ttl<\/p>\n<p lang=\"en-US\"><strong>It lifts the end of the tunnel<\/strong><\/p>\n<p lang=\"en-US\"># Link set up NetB<\/p>\n<p lang=\"en-US\">Assigned IP address<\/p>\n<p lang=\"en-US\"># Ip addr add 10.0.0.1 dev NetB<\/p>\n<p lang=\"en-US\">Add route to network B<\/p>\n<p lang=\"en-US\"># Ip route add 192.168.1.0\/24 dev NetB<\/p>\n<p lang=\"en-US\"><strong>In the same way as is done in the router B.<\/strong><\/p>\n<p lang=\"en-US\"># Modprobe ip_gre.o<\/p>\n<p lang=\"en-US\"># Ip tunnel add mode gre remote REDA local 200.1.2.3 190.5.6.7 255 ttl<\/p>\n<p lang=\"en-US\"># Link set up REDA<\/p>\n<p lang=\"en-US\"># Ip addr add 10.0.0.2 dev REDA<\/p>\n<p lang=\"en-US\"># Ip route add 192.168.0.0\/24 dev REDA<\/p>\n<p><strong>Please Note<\/strong>: If you are looking for Rich Data Center Web Hosting, Cloud Services, Dedicated Hosting, Colocation or Software Services in India at Affordable Costs, Visit our website at <a href=\"http:\/\/www.esds.co.in\/\" target=\"_blank\">WWW.ESDS.CO.IN<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Graphic Explained Below In this small example we will see how to connect two remote networks using advanced routing tools, Linux kernel (iproute2). The network A (192.168.0.0\/24) is connected to the Internet with Router A (192.168.0.254 for the local interface 200.1.2.3 to the external interface) while the network B (192.168.1.0\/24) is connected with The Router&#8230; <\/p>\n<div class=\"clear\"><\/div>\n<p><a href=\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/\" class=\"gdlr-button small excerpt-read-more\">Read More<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[69],"tags":[126,43,127],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.9.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux GRE Tunnel | GRE Tunnel<\/title>\n<meta name=\"description\" content=\"Linux GRE Tunnel tutorial is based on iprouite2 which comes with 2.2 and later kernels. Both routers must be lifted ip_gre.o module.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux GRE Tunnel | GRE Tunnel\" \/>\n<meta property=\"og:description\" content=\"Linux GRE Tunnel tutorial is based on iprouite2 which comes with 2.2 and later kernels. Both routers must be lifted ip_gre.o module.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/\" \/>\n<meta property=\"og:site_name\" content=\"ESDS Official Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ESDSdc\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-01-04T10:10:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-13T12:23:00+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2011\/01\/gre-tunnel.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ESDSDataCenter\" \/>\n<meta name=\"twitter:site\" content=\"@ESDSDataCenter\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#website\",\"url\":\"https:\/\/www.esds.co.in\/kb\/\",\"name\":\"ESDS Official Knowledgebase\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.esds.co.in\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2011\/01\/gre-tunnel.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/#webpage\",\"url\":\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/\",\"name\":\"Linux GRE Tunnel | GRE Tunnel\",\"isPartOf\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/#primaryimage\"},\"datePublished\":\"2011-01-04T10:10:55+00:00\",\"dateModified\":\"2017-12-13T12:23:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/#\/schema\/person\/d951a1b6843822458f3c5f5ee02a74e8\"},\"description\":\"Linux GRE Tunnel tutorial is based on iprouite2 which comes with 2.2 and later kernels. Both routers must be lifted ip_gre.o module.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/\",\"url\":\"https:\/\/www.esds.co.in\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/\",\"url\":\"https:\/\/www.esds.co.in\/kb\/linux-gre-tunnel\/\",\"name\":\"Linux GRE Tunnel\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#\/schema\/person\/d951a1b6843822458f3c5f5ee02a74e8\",\"name\":\"ESDS ADMIN\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5618393df3c15e5b6b3b9ef917e83827?s=96&d=mm&r=g\",\"caption\":\"ESDS ADMIN\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/315"}],"collection":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/comments?post=315"}],"version-history":[{"count":10,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/315\/revisions"}],"predecessor-version":[{"id":3460,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/315\/revisions\/3460"}],"wp:attachment":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/media?parent=315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/categories?post=315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/tags?post=315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}