[CentOS] configuration file for tunneling device

Sun Jul 6 14:56:38 UTC 2008
Filipe Brandenburger <filbranden at gmail.com>

Hi,

On Sun, Jul 6, 2008 at 9:12 AM, Nabin Limbu <nlimbu at healthnet.org.np> wrote:
> For GRE tunneling, how can I specify the
> parameters for tunneling device, so that I ifup-tunnel will automatically
> read and start the interface and I don't have to write the below scripts
> in my start-up file.

Apparently you have to create a
/etc/sysconfig/network-scripts/ifcfg-gre2 file with content similar to
this one:

ONBOOT=yes
DEVICE=gre2
TYPE=GRE
MY_INNER_IPADDR=192.168.61.1
MY_OUTER_IPADDR=79.189.10.22
PEER_INNER_IPADDR=192.168.62.1
PEER_OUTER_IPADDR=84.234.113.51

By the way, I never did this before, and had no idea on how to do it,
but Google just lead me to the conclusion that this is the way to go
in about 5s. First, /etc/sysconfig/network-scripts/ifup-tunnel is a
script, so looking into that file I saw that it was using some
variables such as PEER_INNER_IPADDR. I looked for that name in Google,
and one of the results was this page
[http://bart.prokop.name/blog/unleash/linux/centos.html], which starts
in Polish (?) but then continues in English with explanation enough on
how to do that.

Although using the mailing lists is "easy" and very effective, one of
the advantages of Linux is that you can always "look inside" it, and
as many components are scripts, looking inside is actually quite easy.
Next time, please try to do your own poking and research before going
the mailing list route.

HTH,
Filipe