Tunnel device semantics

Jan Kasprzak (kas@informatics.muni.cz)
Wed, 04 Nov 1998 19:19:20 +0100


Hello,

I have just played a bit with Linux tunnel devices (IPIP and GRE).
I would like to suggest the way tunnel devices are configured.

At present the interface itself is configured in the following way:

# ifconfig {tunl,gre}0 myend netmask 255.255.255.255
# route add -host otherend dev {tunl,gre}0 # hack
# route add -net othernet netmask 255.255.255.0 gw otherend
# route del -host otherend dev {tunl,gre}0 # hack

Where "othernet" is the private internal network on the other side,
"otherend" is the public IP address of the remote router/tunnel endpoint
and "myend" is the public IP address of the local router.
The "#hack" commands are needed on 2.1 because the
"route add -net othernet ..." command would fail with "network unreachable"
error otherwise.

I think the more logical approach to the problem would be
the following:

# ifconfig {tunl,gre}0 myend pointopoint otherend [ netmask 255.255.255.255 ]
# route add -net othernet gw otherend

This approach will (IMHO) have several advantages:

- it seems more logical to me.
- no "route hack" similar to the above is needed.

Any comments?

-Yenya

--
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz>       http://www.fi.muni.cz/~kas/
\\ PGP: finger kas at aisa.fi.muni.cz   0D99A7FB206605D7 8B35FCDE05B18A5E //
\\\             Czech Linux Homepage:  http://www.linux.cz/              ///
/// I think I'd rather be forced to learn perl than 68020 MMU. -Alan Cox \\\

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/