In the below image what would be the ip address in the outer ip header when packet goes from R1 to R2. If the ip address in the outer header is 172.16.0.1 , how does it travels the internet as its not a public ip address ?
2 Answers
In the outer IP header, it would definitely be 1.1.1.10
/ 2.2.2.10
, as this is what is used to route the packet to the tunnel endpoint.
Note that you may not even need IP addresses on the tunnel interfaces, you could use ip unnumbered
as it's a point-to-point link.
While Configuring GRE tunnel you may have specify source and destination address. That Source and destination IP are 1.1.1.10 and 2.2.2.10. These IPs will be routed in the internet and helps to bring up GRE tunnel.
Once tunnel is up we can assign IP between two end point which in this case is 172.16.0.0/24 network. So any tunnel with IP address on top of it at the end points are called numbered and without IP are called un-numbered.
Advantage of using ip address on the tunnel interface is, we can run any dynamic routing protocol to route any traffic over the tunnel.