Article View: es.comp.redes.misc
Article #243Re: Enrutamiento din�mico... una ayudita, please. (el script y los resultados)
From: Cossus
Date: Wed, 25 Jan 2006 01:18
Date: Wed, 25 Jan 2006 01:18
90 lines
4624 bytes
4624 bytes
---------- SCRIPT ----------
route del default gw `nvram get lan_gateway`
# Borra la gateway predeterminada por que por defecto la pone con m�trica 0
route add default gw `nvram get lan_gateway` dev `nvram get lan_ifname`
metric 4
route add default gw 10.58.15.1 dev `nvram get lan_ifname` metric 5
# A�ade las dos puertas, la chachi con m�trica 4 y la alternativa con 5
sleep 10
echo "`date` \n" > /tmp/prueba.txt
# espera 10 segundos y pone la fecha
echo "`route` \n" >> /tmp/prueba.txt
# imprime la tabla de rutas actual
echo "`traceroute -n -w 2 212.170.238.91` \n" >> /tmp/prueba.txt
echo "`date` \n \n \n" >> /tmp/prueba.txt
# Comprobamos por donde sale
sleep 180
# espera 3 minutos para que me de tiempo a apagar el AP con la ruta chachi
# y de tiempo tambi�n a que se distribuyan las rutas por el RIP
echo "`date` \n" >> /tmp/prueba.txt
echo "`route` \n" >> /tmp/prueba.txt
echo "`traceroute -n -w 2 212.170.238.91` \n" >> /tmp/prueba.txt
echo "`date` \n" >> /tmp/prueba.txt
------------ FIN ------------
---------- RESULTADOS DEL SCRIPT ----------
Wed Jan 25 01:11:55 UTC 2006
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.200.16 10.58.15.251 255.255.255.240 UG 2 0 0 br0
213.98.97.192 10.58.15.251 255.255.255.192 UG 3 0 0 br0
10.58.15.0 * 255.255.255.0 U 0 0 0 br0
192.168.200.0 10.58.15.251 255.255.255.0 UG 2 0 0 br0
213.98.97.0 10.58.15.251 255.255.255.0 UG 3 0 0 br0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.58.15.251 0.0.0.0 UG 4 0 0 br0
default 10.58.15.1 0.0.0.0 UG 5 0 0 br0
traceroute to 212.170.238.91 (212.170.238.91), 30 hops max, 40 byte packets
1 10.58.15.251 2.651 ms 2.455 ms 2.888 ms
2 192.168.200.30 4.066 ms 11.697 ms 2.602 ms
3 10.0.241.129 46.573 ms 45.825 ms 48.930 ms
4 80.58.115.18 105.977 ms 46.194 ms 46.079 ms
5 80.58.79.173 77.394 ms 93.184 ms 74.022 ms
6 80.58.72.209 72.572 ms 98.808 ms 72.917 ms
7 80.58.86.94 97.408 ms 53.571 ms 55.884 ms
8 * * * Request timed out.
9 81.46.5.37 168.273 ms 227.461 ms 85.768 ms
10 * * * Request timed out.
11 213.0.251.129 72.425 ms 73.029 ms 132.201 ms
12 217.124.115.42 71.469 ms 74.414 ms 112.780 ms
13 * * * Request timed out.
14 * * * Request timed out.
15 212.170.238.91 67.365 ms 66.608 ms 142.902 ms
Trace complete.
Wed Jan 25 01:12:22 UTC 2006
Wed Jan 25 01:16:01 UTC 2006
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
10.58.15.0 * 255.255.255.0 U 0 0 0 br0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.58.15.251 0.0.0.0 UG 4 0 0 br0
default 10.58.15.1 0.0.0.0 UG 5 0 0 br0
traceroute to 212.170.238.91 (212.170.238.91), 30 hops max, 40 byte packets
1 * * * Request timed out.
2 * * * Request timed out.
3 * 10.58.15.252 1000.166 ms !H *
4 10.58.15.252 999.792 ms !H * 999.951 ms !H
Wed Jan 25 01:16:23 UTC 2006
---------- FIN DE LOS RESULTADOS ----------
Evidentemente no funciona :'(
Technical Details
Message-ID:
<dr6jks$toe$1@news.ya.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!fu-berlin.de!nsnmpen1-lo.nuria.telefonica-data.net!news.ya.com!yacom!not-for-mailReferences:
<dr5hg2$34o$1@news.ya.com> <p8uct1ph2t3pbml9irl0okj7ft4m7up5ak@4ax.com> <dr6ivj$r02$1@news.ya.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 110030,d8ace1c17b9e1762 X-Google-Thread: 102d4d,d8ace1c17b9e1762 X-Google-Attributes: gid110030,gid102d4d,public X-Google-Language: ENGLISH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!fu-berlin.de!nsnmpen1-lo.nuria.telefonica-data.net!news.ya.com!yacom!not-for-mail From: "Cossus" <cossusBI@OSaberanta.com> Newsgroups: es.comp.redes.misc,es.comp.os.linux.redes Subject: Re: Enrutamiento din�mico... una ayudita, please. (el script y los resultados) Date: Wed, 25 Jan 2006 02:18:05 +0100 Organization: ya.com internet factory Lines: 95 Message-ID: <dr6jks$toe$1@news.ya.com> References: <dr5hg2$34o$1@news.ya.com> <p8uct1ph2t3pbml9irl0okj7ft4m7up5ak@4ax.com> <dr6ivj$r02$1@news.ya.com> NNTP-Posting-Host: 213-98-97-205.adsl.ya.com X-Trace: news.ya.com 1138151900 30478 213.98.97.205 (25 Jan 2006 01:18:20 GMT) X-Complaints-To: newsmaster@ya.com NNTP-Posting-Date: Wed, 25 Jan 2006 01:18:20 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-RFC2646: Format=Flowed; Original