RE: RV: Agregar una ruta permanente
Es muy sencillo.
Puedes ubicarte en el archivo
/etc/network/interfaces y agregar en este, las rutas
necesarias. Cuando reinicia la máquina un rc llama a este archivo. Te
anexo un ejemplo de este archivo.
------- Inicio ----
pluton:/etc/network# cat interfaces
# Used by
ifup(8) and ifdown(8). See the interfaces(5) manpage or
#
/usr/share/doc/netbase/examples for more information.
#
iface lo inet loopback
iface eth0 inet
static
address
192.9.65.1
network
192.9.65.0
netmask
255.255.255.0
broadcast
192.9.65.255
#iface eth1 inet
static
# address
210.24.71.142
# network
210.24.71.140
# netmask
255.255.255.252
# broadcast
210.24.71.143
# up route add -host
210.24.71.141 eth1
# up route add default
gw 210.24.71.141
# down route del default
gw 210.24.71.141
# down route del -host
210.24.71.141
iface eth1 inet
static
address
200.41.175.74
#network
200.41.175.64
netmask
255.255.255.192
broadcast
200.41.175.127
up route add -host
200.41.175.65 eth1
up route add
default gw 200.41.175.65
down
route del default gw 200.41.175.65
down route del -host 200.41.175.65
iface eth2 inet
static
address
10.8.11.30
network
10.8.0.0
netmask
255.255.0.0
broadcast
10.8.255.255
up route add -host
10.8.2.1 eth2
up route add -net
10.8.0.0 netmask 255.255.0.0 gw
10.8.2.1
up route add -net
10.2.0.0 netmask 255.255.0.0 gw
10.8.2.1
down route del -net
10.2.0.0 netmask 255.255.0.0 gw
10.8.2.1
down route del -net
10.8.0.0 netmask 255.255.0.0 gw
10.8.2.1
down route del -host
10.8.2.1
iface eth3 inet
static
address
192.168.56.1
network
192.168.56.0
netmask
255.255.255.0
broadcast
192.168.56.255
iface eth4 inet
static
address
192.168.57.2
network
192.168.57.0
netmask
255.255.255.0
broadcast
192.168.57.255
up route add -host
192.168.57.1 eth4 || true
up route
add -net 172.19.3.0 netmask 255.255.255.0 gw 192.168.57.1 ||
tr
ue
up route add -net
192.168.29.0 netmask 255.255.255.0 gw 192.168.57.1
||
true
up route add -net
172.18.0.0 netmask 255.255.0.0 gw 192.168.57.1 ||
true
up ip route add
192.168.56.0/24 table redetb dev eth3 src 192.168.56.1 |
|
true
up ip route add 192.168.57.1
table redetb dev eth4 || true
up
ip route add 172.19.3.0/24 table redetb via 192.168.57.1 dev eth4
||
true
up ip route add
192.168.29.0/24 table redetb via 192.168.57.1 dev eth4 |
|
true
up ip route add 172.18.0.0/16
table redetb via 192.168.57.1 dev eth4
||
true
up ip route add
192.9.65.0/24 table redetb dev eth0 ||
true
up ip rule add from
192.168.56.0/24 table redetb ||
true
up ip rule add from
192.168.56.0/24 to 63.171.232.0/24 table main ||
tru
e
up ip rule add from
192.168.56.0/24 to 200.75.44.0/24 table main ||
true
up ip route add default table
redetb via 192.168.57.1 dev eth4 ||
true
up ip route flush cache ||
true
down ip route flush cache ||
true
down ip route delete default
table redetb via 192.168.57.1 dev eth4 ||
t
rue
down ip rule delete from
192.168.56.0/24 table redetb ||
true
down ip rule delete from
192.168.56.0/24 to 200.75.44.0/24 table main
||
true
down ip rule
delete from 192.168.56.0/24 to 63.171.232.0/24 table main |
|
true
down ip route delete
192.9.65.0/24 table redetb dev eth0 ||
true
down ip route delete
172.18.0.0/16 table redetb via 192.168.57.1 dev eth
4 ||
true
down ip route delete
192.168.29.0/24 table redetb via 192.168.57.1 dev e
th4 ||
true
down ip route delete
172.19.3.0/24 table redetb via 192.168.57.1 dev eth
4 ||
true
down ip route delete
192.168.57.1 table redetb dev eth4 ||
true
down ip route delete
192.168.56.0/24 table redetb dev eth3 src 192.168.5
6.1 ||
true
down route del -net
172.18.0.0 netmask 255.255.0.0 gw 192.168.57.1 ||
tr
ue
down route del -net
192.168.29.0 netmask 255.255.255.0 gw 192.168.57.1 |
|
true
down route del -net
172.19.3.0 netmask 255.255.255.0 gw 192.168.57.1
||
true
down route del -host
192.168.57.1 eth4 || true
pluton:/etc/network#
------ Fin ----
Espero te sirva.
Exitos,
EAGP
Sent: Thursday, December 11, 2003 6:07
PM
Subject: Re: RV: Agregar una ruta
permanente
> Si, yo necesito añadir a mi servidor
un comando "route add ip mask gw eth0" para que este servidor se vea desde una
vlan determinada en mi red, quiero que al reiniciar mi servidor este no pierda
esa ruta.
>
>
>
>
Desarrollo_y_Tecnología_TAS-COLDECON wrote:
> > A qué tipo de ruta te
refieres? Una ruta de red? acaso? Firewall? ?????
> >
> >
----- Original Message -----
> > From: xoma <abaigar1@madritel.es>
> > To:
Lista Debian <debian-user-spanish@lists.debian.org>
>
> Sent: Thursday, December 11, 2003 2:59 PM
> > Subject: Agregar una
ruta permanente
> >
> >
> > > Hola
Lista;
> > >
> > > Necesito que una maquina que tengo
mantenga una ruta de manera permanente,
> > de tal forma que si se
reiniciase siguiese manteniendo la ruta... alguien
> > puede
ayudarme?
> > >
> > > Un saludo a la lista.
> >
>
> > >
> > > ---------------
> > >
xoma
> > > abaigar1@madritel.es
> > >
---------------
> > >
> > >
> > > --
>
> > To UNSUBSCRIBE, email to debian-user-spanish-request@lists.debian.org
>
> > with a subject of "unsubscribe". Trouble? Contact
> > listmaster@lists.debian.org
>
> >
> > >
> >
> >
> > --
>
> To UNSUBSCRIBE, email to debian-user-spanish-request@lists.debian.org
>
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
>
>
> ---------------
> xoma
> abaigar1@madritel.es
>
---------------
>
>
> --
> To UNSUBSCRIBE, email to
debian-user-spanish-request@lists.debian.org
>
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
Reply to: