Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   configuration file for tunneling device (http://www.linux-archive.org/centos/119844-configuration-file-tunneling-device.html)

"Nabin Limbu" 07-06-2008 01:12 PM

configuration file for tunneling device
 
Hi,

For Ethernet and others, we have a configuration file inside
/etc/sysconfig/newtork-script/ like ifcfg-ethx where we specify ip
address, mask, type etc... 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.

ip tunnel add netx mode gre remote 69.77.7.7 local 192.168.0.1 ttl 255
ip addr add 192.168.0.1 dev netx


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

"Filipe Brandenburger" 07-06-2008 02:56 PM

configuration file for tunneling device
 
Hi,

On Sun, Jul 6, 2008 at 9:12 AM, Nabin Limbu <nlimbu@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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 06:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.