Visualizing tunnelsPosted by stretch in Networking on Friday, 11 Jul 2008 at 11:08 a.m. GMTWhen I was first introduced to tunnel interfaces, it took me a while to work out a solid visualization in my mind. Referencing documentation on the topic at the time probably would have sped things along considerably, but I digress. For the novice, I suggest thinking of a tunnel interface as simply adding or removing protocol headers, rather than transmitting packets. Consider the following illustration.
Routers 1, 2, and 3 are physically connected in series using point-to-point links in the 172.16.0.0/24 range. A tunnel between routers 1 and 3 is configured and addressed as 10.0.0.0/30. R1 has been configured to source the tunnel from its physical interface FastEthernet0/0, with the destination address of R3's 172.16.0.6 interface. R3's configuration is a mirror image of R1: R1 and R3 both view the 10.0.0.0/30 network as directly connected. Because we didn't specify a tunnel type in our setup, GRE encapsulation (the default mode) is used. Although the tunnel terminates at a (virtual) interface, it isn't responsible for obtaining layer two adjacency information or for transmitting packets. Instead, packets routed into or out of a tunnel interface have a protocol header added or removed, respectively. Consider what happens when R1 receives a packet to be routed through the GRE tunnel.
Having illustrated the outbound tunnel process, it's simple to reverse the flow and examine the inbound process.
Note that R2 never sees packets destined to or from the 10.0.0.0/30 subnet, only for the tunnel endpoints 172.16.0.1 and 172.16.0.6. There are other, more interesting modes of tunnel encapsulation, such as IPv6-in-IP and IPsec, but the general flow remains the same. |
Navigation
Armory
Online Toolbox
|
You're so spot-on about this! I even remembered when I realized this myself, certainly over eight years ago. It's an eureka!-moment.
(btw. this makes me hate the way cisco ASA/FWSMs treats 'tunnels' with their crypto-maps).
Notice the default bandwidth on this tunnel is 9k! Might want to adjust that also for traffic flows...
Thanks! Another excellent article! Nice diagrams with good explanations. I enjoy checking your site daily for new installments! I have setup your GRE example in GNS3 and it worked a treat. Maybe you could do a simple IPsec example for people new to tunneling? Thanks again. Keep up the good work.
Thanks for the clear explanation! Where would this be most useful?
In most cases, GRE tunnels are used to carry multicast traffic. Example = dynamic routing protocols
There are several other uses as well that aren't coming to mind but I do recall reading about.
By the way, great site and articles! Your attention to detail is awesome and your study notes/guides are a big help.
@Paul: I expanded on this example to implement an IPsec tunnel in the post IPsec quick and dirty. Enjoy!
THNX...gr8 article...
I would also like to see (as Dirk-Jan van Helmond commented) the way how ASA/FWSMs treats 'tunnels' with their crypto-maps...TIA
Bingo! Easy as apple pie.. great piece of 'technical writing' :)