|
Re: lug-bg: No link beat found
- Subject: Re: lug-bg: No link beat found
- From: mano@xxxxxxxxxxxxx (Marian Popov)
- Date: Thu, 15 Aug 2002 05:32:38 +0300
Napishi si edin script na bash koito da pingva prez opredelen interval ot
vreme gateway-a na taia karta i ako
zagubi packet da runva nekyv drug file v koito pyk da e opisan celia proces
na ifconfig eth1 down i posle up .
Neshto ot sorta na tova tuk det osym go pisal za takiva sluchai:
#!/bin/bash
dir="/root/moitefiles/"
while [ 1 ]; do
TMP=`ping -c 4 90.0.0.1 | grep packet | tr "%" " " |awk {' print $7
'}`
if [ $TMP -gt 15 ]; then
cd $dir
./run_scipt
echo $TMP
else
echo " Link is OK "
fi
sleep 120
done;
V sluchaia v papka /root/moitefiles/ triabav da imash fail s gornoto
sydyrjanie i
fail, koito da se kazva run_script. Tova mojesh da si g opromenish kakto ti
si iskash de.
Znachi puskash toia file s gornoto sydyrjanie i toi prez 120 sec shte pingva
po 4 pyti
90.0.0.1 i ako izpuska packetite sha puska scripta "run_script", koito
script
predvaritelno e setnat chmod -x run_script za da byde executable (syshtoto
se otnasia i za drugia file).
V faila run_script triabva daima neshto ot roda na:
ifcondif eth1 down
ifconfig eth1 90.0.0.2 netmask 255.255.255.0 up
route add default gw 90.0.0.1
Toiva vsichkoto e spored zavisi ot nastroikite na tvoita mreja.
Nadiavam se da sym bil polezen makar che si mislia che ako si smenish
kartata shte byde po-dobria variant :)
--
Marian Popov
mano@xxxxxxxxxxxxx
----- Original Message -----
From: <Lupos@xxxxxxxxx>
To: <lug-bg@xxxxxxxxxxxxxxxxxx>
Sent: Wednesday, August 14, 2002 11:08 PM
Subject: lug-bg: No link beat found
> Zdrasti na Vsichki ... !!!
>
> Ot skoro sum si napravil firewall sys Slackware 8.1 na edin starichuk IBM
PC
> 330.
> Imam Inst. 2 Mrejovi Karti ednata e:
> eth0: RealTek RTL-8029
> drugata e:
> eth1: DECchip Tulip (dc21x4x) ( Linux Tulip driver version 0.9.15-pre9
(Nov
> 6, 2001))
>
> Imam edin gaden Problem sys vtorata (dc21040). Tja e svurzana sys
kvartalnia
> i-net. RTL kum Home-Intranet (s neia niamam problemi).
>
> Po niakoe vreme v kernlog-a se poiaviava slednoto neshto :
> kernel: eth1: No link beat found.
> kernel: NETDEV WATCHDOG: eth1: transmit timed out
> I kartata spira da raboti :( , kogato svalia i vdigna otnovo Interfejsa (s
> Ifconfig ) Kartata Trugva !!!
> Ako ne moje tova da se opravi (zashtoto si mislia che e ot Driver-a) pone
> kak da go avtomatiziram tozi proces
> za da ne go pravia ruchno. Predvaritelno Blagodaria ...
>
> Best Regards:
> _________________
> Lyubomir Babukchiev
>
>
>
>
============================================================================
> A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
> http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara
Zagora
> To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
>
============================================================================
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|
|
|