PLS-Major Problem in LAN (natd, IP alias, Port and IP redirections)

PLS-Major Problem in LAN (natd, IP alias, Port and IP redirections)

Post by Mina » Wed, 12 Dec 2001 00:31:05



PLS tell me what to do, because I am in great need!!!

-=Short=-: My FreeBSD server (running natd for other machines) looses the
internet connection (every ~hour) and the message "ping: sendto: No buffer
space available" appears if I ping my internet gateway.

-=Long=-
During the weekend I changed my lan and I put a fbsd server to act as a
masquerade server/firewall/router.

I had already 15 IP addresses and thus I put 15 alias command in my rc.conf
for the vr0 interface.

Also I run natd daemon for my internal (192.168.3.0/24) lan.
I redirect one IP to an internal IP, and some tcp & udp ports to some
machines on my NET.

All were working and tested. But my problem starts here.......

After 1 hour or less all the machines from my internal net (windows, Linux,
hp) are unable to ping outside the net, and tracert from windows (from my
internal lan) says

Reply from 192.168.3.10: Source quench received.

Other traceroutes just print * after my server

From my 192.168.3.10 router I ping the next gateway and I see that FreeBSD
reports....

ping: sendto: No buffer space available

and you can't do anything else..

(What is buffer space???)

After a lot of experiments I found that if I do an
ifconfig vr0 down
and
ifconfig vr0 up

the problem is solved (temporally).

So I have to ping all the time my gateway in a terminal window, and when I
see the message

ping: sendto: No buffer space available

then I have to issue the ifconfig vr0 down and ifconfig vr0 up.

Just for the info. My router system is a Pentium 200MMX / 32 MB RAM, FreeBSD
release 4.4 and all this time as a single host had no problem. and for my
network card:
vr0: <VIA VT6102 Rhine II 10/100BaseTX>. My total traffic of the internet is
usually < 200 KB/sec

PLS PLS PLS. I am in great trouble because I am in charge of over 20
machines here and all the people get frustrated when the internet connection
breaks up. PLS any suggestions?

 
 
 

PLS-Major Problem in LAN (natd, IP alias, Port and IP redirections)

Post by Dan Luke » Wed, 12 Dec 2001 00:52:20



> My total traffic of the internet is usually < 200 KB/sec
> PLS PLS PLS. I am in great trouble because I am in charge of over 20
> machines here and all the people get frustrated when the internet connection
> breaks up. PLS any suggestions?

        Well, what's about run trafshow to see your total traffic now ?

        Somebody may flood you, for example.

                                                Dan

--
Dan Lukes      tel: +420 2 21914205, fax: +420 2 21914206
root  of FIONet,  KolejNET,  webmaster  of www.freebsd.cz


 
 
 

PLS-Major Problem in LAN (natd, IP alias, Port and IP redirections)

Post by Mina » Wed, 12 Dec 2001 02:48:44


Now its 340 KB/sec average....

I found a temporary solution....

a) I use arp -S to add the HW address of my Internet gw to my arp table
b) when the connection is lost I to "ifconfig vr0 up" and the connection is
re-established

In fact I measured the time between the internet gateway lost and found to
varying from 5 minutes to 30...

So I put in the crontab

*/5 * * * * /sbin/ifconfig vr0 up

So with this * trick I can do my job at least...but I want to find a
solution..

I think that the network card cann't keep up and thinking of changing it
with an old realteak 10Mbips..

The old network cards are much stable than the newer interfaces...I will
just wait a couple of days to find some time to do it...

(p.s. Some times I see in the console 'vr0:reset never completed'....)

 
 
 

PLS-Major Problem in LAN (natd, IP alias, Port and IP redirections)

Post by Dan Luke » Wed, 12 Dec 2001 05:57:07



> b) when the connection is lost I to "ifconfig vr0 up" and the connection is
> re-established
> In fact I measured the time between the internet gateway lost and found to
> varying from 5 minutes to 30...
> (p.s. Some times I see in the console 'vr0:reset never completed'....)

        There are other error messages on console or in /var/log/messages ?

        The "No buffer space available" mean the NIC is unable to send out
packets (or send it so slow).

        Send "netstat -i; ifconfig -a" to us (or to me).

        Is the media options (speed and full/half duplex) set correctly on NIC
?

        Is the IRQ used by vr0 shared ? Can you change configuration to avoid
shared IRQ and test it ?

                                                Dan

--
Dan Lukes      tel: +420 2 21914205, fax: +420 2 21914206
root  of FIONet,  KolejNET,  webmaster  of www.freebsd.cz

 
 
 

PLS-Major Problem in LAN (natd, IP alias, Port and IP redirections)

Post by Dan Luke » Wed, 12 Dec 2001 06:03:32



> ping: sendto: No buffer space available
> (What is buffer space???)

        Calling the "send" function from application program doesn't pass the
packet trought NIC to wire immediatelly. The packet is saved to buffer
and placed to send queue. The NIC driver pop the data from queue and
send it. There are limited number of buffers only, so the buffer pool
can be exhausted.

                                                Dan

--
Dan Lukes      tel: +420 2 21914205, fax: +420 2 21914206
root  of FIONet,  KolejNET,  webmaster  of www.freebsd.cz

 
 
 

PLS-Major Problem in LAN (natd, IP alias, Port and IP redirections)

Post by Mina » Wed, 12 Dec 2001 16:06:39


I think there is a fauly implementation of the network drivers for cards
based on MII bus.

When the card operated at promiscuous mode (it was listening to a bunch of
addresses) the system was losing the connectivity. I search in the net, and
found that some people have experiencing the same problems with these cards
and messages like "reset never completed" was appearing steadilly.

I changed the card (It is D-LINK-DFE 530 TX - 100MBps) with another one of
the same model and the problems existed. So I changed the network card with
an old realtek 10MB and worked fine.

This is a problem that I've experienced when I used my PC as a standalone
host and wanted to check my network using sniffers program. When I used
these programs, after some minutes messages of type 'vr0: reset never
completed' was appearing and after some time my computer hang. So, after
some time I've never used programs that put the network card into
promiscuous mode.

So in IMHO cards that based on MII bus have a faulty driver implementation
in freebsd.

p.s. With realtek network card my router has absolutery no problem!!

 
 
 

PLS-Major Problem in LAN (natd, IP alias, Port and IP redirections)

Post by Dan Luke » Thu, 13 Dec 2001 04:21:15



> I think there is a fauly implementation of the network drivers for cards
> based on MII bus.

        I have several computers on many network, some of it under heavy
network load without any problem (I'm using tcpdump and trafshow). I'm
using fxp (MIIfied a few months ago).

        So, it's your opinion, not mine.

        May be, the implementation is faulty for vr0 (for specific revison ?)
only ...

                                        Dan

--
Dan Lukes      tel: +420 2 21914205, fax: +420 2 21914206
root  of FIONet,  KolejNET,  webmaster  of www.freebsd.cz