Re: question on using Linux as a router
From: Jean-Francois Stenuit
Date: Thu Apr 27 2006 - 05:09:17 EST
I'm using those settings at kernel level (exerpt from grub config) :
kernel /boot/vmlinuz-2.6.14 root=/dev/sda1 ro maxbatch=300 rhash_entries=1048575
maxbatch is used to prevent Quagga killing the machine by sending a
massive route update.
rhash_entries gives more room to handle a full internet routing table.
Queuing should be done at the ethernet card level. Use 'ethtool' to tune
the settings of your card. For instance, when compiling a kernel for Intel
Pro1000-MT cards, use the following settings (kernel .config file) :
Then tune the settings by using :
/usr/sbin/ethtool -G eth0 rx 4096 tx 4096
With NAPI, the network card does not trigger an interrupt each time a
packet is sent or received. That's up to the kernel to poll the network
Hope this helps,
(and for the other readers, correct me if I'm wrong ;-) )
|--- Jean-Francois "Jef" Stenuit
On Thu, 27 Apr 2006, Serge Goodenko wrote:
> Hi everybody!
> I got the following question.
> When I use linux as a router (via ip forwarding) what kernel variables
> (maybe some queues?) represent the closest analogue of usual hardware router
> input and output buffers? May this be, say, backlog queue or something else?
> The things I need to get are the sizes and loads of that buffers during
> I know about variables such as sk->sk_rcvbuf and sk->sk_rmem_alloc but they
> are not used during ip forwarding as the socket (i.e. sock structure) is not
> even being created for that purpose. As far as I understood these variables
> in sock structure are mostly used for tcp-level packet processing and they
> represent the values written in files like /proc/sys/net/core/wmem_default
> etc. (please correct me if that's wrong), but nevertheless maybe I also can
> use these values for "routing" buffers (i.e. on ip level)?
> thanks in advance,
> Moscow, Russia
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html