Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-22-2009, 05:30 AM
|
#1
|
LQ Newbie
Registered: Oct 2009
Posts: 2
Rep:
|
To Increase routing Table Entries in a Linux box.
hi ,
I need to routing table entries.How can it be done.
using Script i'm adding entries into routing table.it supports upto 250.but i need to add more than this limit.
is there any way that we can tweak kernel code and increase the limitation??
|
|
|
10-22-2009, 05:58 AM
|
#2
|
Member
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
|
You need to add more than 250 routing table entries? Wow.
Okay, for starters, you do know that you don't have to specify a route for each individual host, right?
You can specify network-based routes.
As for increasing the 250 route limit...I didn't even know there was one. I imagine there's something in the kernel source, but that would require a kernel recompile for the changes to take effect (which is not a small undertaking).
Please provide the distribution you are using, as well as an example of what/how you are trying to route.
Also, "man route" may really help you out, here.
|
|
|
10-22-2009, 07:29 AM
|
#3
|
LQ Newbie
Registered: Oct 2009
Posts: 2
Original Poster
Rep:
|
this is for simulation purpose.i'm just going to create virtual interfaces and route packets through these interface.
I want to know which part of kernel code should be tweaked so that i can increase the number.
man route tells you how to add r delete entries ,no where it tells which file should be meld to increase it beyond limit.so i need to get into kernel code to meld it.so plz guide me in this path.
|
|
|
10-24-2009, 01:41 AM
|
#4
|
Member
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
|
Alright, for starters, I'm not sure about the 250-route-limit you're talking about.
However, here's what I would suggest;
When you want to ask kernel-specific questions, include your Linux Distro's name, the version of your kernel, and what you're trying to do.
What you're trying to do sounds more like "tweaking" rather than "Oh, where's that routing.c file for the kernel?" Messing with one of the available settings in /proc sounds more up your alley.
Visit this site, or read your kernel's documentation (as *that* would be the most relevant source of information).
Use iproute2 for any advanced routing.
If you're running Red Hat, CentOS, or something similar, there should be a package in your yum repository.
If you get completly lost, you can visit here for an example of how iproute2 works.
Regardless, if you're new to Linux, and you're still not able to create 250 routes to virtual interfaces for testing, then there's one last site that might help explain things.
Be warned, you'll have to have a sense of humor.
Goodluck!
|
|
1 members found this post helpful.
|
08-30-2010, 12:34 AM
|
#5
|
LQ Newbie
Registered: Apr 2010
Posts: 4
Rep:
|
If there is a route limit, I haven't found it yet
I know this is an old thread with a new post.
I was doing some research to find if there was a limit to adding routes in a Linux kernel. Could be days of reading google output, but my last 2 hours of searching have not found any threads pertinent. So I am Still looking but wanted to drop a note on this old thread.
Slackware Distro 13.0 is what I am using and used the route command to add routes to point to the loopback (lo) interface (a Virtual Interface) as a means to null route. I have scripted 990 routes in and the kernel didn't even blink. A `/sbin/route -n | lc -l` yields the count and just the `/sbin/route -n` shows them all. All my tests indicate packets traversals are being dropped.
The Slackware is installed on an Acer One Netbook with a N270 processor. It took 3 seconds to apply it. Bouncing the interface with the rc.inet1 script clears the table out quickly.
If I do find an answer, I will report back with the limit. I may just have to fake in a bunch of routes to see if it does puke. But if I could go over let say 5000 routes, I would be happy I could add the 5000 and would prove the concept proposal I am working on. MartianRabbit
|
|
|
08-30-2010, 12:54 AM
|
#6
|
Member
Registered: Mar 2005
Location: INDIA
Posts: 79
Rep:
|
i remember once i wrote a script to add host based routes starting from class A address and the test was just to see how many route i could add before the system appears hang and before it went unresponsive i remember it had added around 26,4000
routes to its routing table.
So is it addassss that the routes you are trying to add belong to class C with a subnet mask of 255.255.255.0. In such a case u wont be able to go beyond 253 routes in that subnet. what you can do is modify your script to change the subnet masks or class.
hope that helps.
|
|
|
09-03-2010, 12:44 AM
|
#7
|
LQ Newbie
Registered: Apr 2010
Posts: 4
Rep:
|
That is a nice size limit
Agreed,
It is helpful someone flushed out how many entries it could take. My experiment does use the concepts of networks, and the table size can be tuned to encompass large spans with the proper masking, so my intention would stay well inside this limit. The limit exceeds my expectations on the number of entries I would need to accomplish the end state of the experiment. I noted you comma is in a odd place, could you respecify if you intention to express 26,400 or 264,000. There is quite a difference in magnitude. if you are saying a quarter million that is incredible. Even the 26,400 exceeds my expectations! MartianRabbit
|
|
|
10-18-2014, 01:55 AM
|
#8
|
LQ Newbie
Registered: Oct 2014
Posts: 1
Rep:
|
net.ipv4.route.max_size = 2147483647
Not sure whether this applies but net.ipv4.route.max_size = 2147483647
I am using Ubuntu 14.04
Just wondering whether this is correct size or I am missing some points here. I am also doing this for research purpose.
|
|
|
All times are GMT -5. The time now is 05:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|