Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to make an installable linux kernel that has routing enabled already. So anyone can install it on their machine, do some configuration as required, and machine will work fine for their routing needs. This is what I did so far.

  1. Downloading and decompressing a vanilla linux kernel.
  2. placing a ".config" file in that kernel directory.
  3. Ready to make kernel....

I want to ask what options do I need to enable or disable in .config to make this a bootable software router (I don't need any other functionality)?

Note: I don't want to use any already built router, I want to create my own so I can manipulate and test it further.

share|improve this question

closed as too broad by Faheem Mitha, Anthon, Zelda, Timo, Karlson Feb 28 at 16:35

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
A standard Linux-based OS is already able to route. You don't need a special configuration for that, except enabling packet forwarding. I may be wrong but I'd say that options you need in you .config depend more on your hardware than your specific routing needs. –  lgeorget Feb 28 at 15:14
    
I want it to be working on any x86/x64 hardware mainly. Other than that, do I need to set CONFIG_IP_FORWARD only? or should I enable/disable more parameters in .config file to make it work? Default kernel (without changing Sysctl.conf) is not able to route IMHO. But I want to change it at compile time, so anyone who installs my package, does not need to change any settings (enabling/disabling anything). –  JuliandotNut Feb 28 at 15:22
    
If you just want a router, then yes, CONFIG_IP_FORWARD seems necessary as it allows you to have IP forwarding enabled by default. Then of course you need the driver for your network interfaces. Depending on what you want to do, you may need IPv6 stack or not. etc. etc. –  lgeorget Feb 28 at 16:08
    
A Linux kernel alone will not do this. You also need a userland to configure network interfaces, enable routing, set up the routing table, etc. You say you don't want to use an already built one, but you can use that as a reference to see how someone else did it. Then build your own from what you learn by looking at the work others have already done. –  derobert Feb 28 at 16:38
    
@lgeorget CONFIG_IP_FORWARD is no more there in kernel config for 3.12.14 at least. Any alternatives or any ideas? –  JuliandotNut Apr 9 at 20:22

1 Answer 1

There is no simple make so "anyone can install it on their machine". What you may need to do is cross compile the kernel for the specific architecture. This will probably look something like this for an arm machine (which most routers you want to use might be) (note you will need an arm tool chain for the compiling, google around for that please)

ARCH=arm CROSS_COMPILE=/path/to/arm/toolchain/bin make

Then the bzImage will be inside of arch/arm/boot and tadah, get that onto a router you would like to use and have at it

Also possibly look up common configs from openwrt, they are the router guys when it comes to linux

share|improve this answer
    
The question was about the options necessary in the .config. Although your point is worth noting, you don't answer the OP's question. –  lgeorget Feb 28 at 16:10
    
ah, I guess I read it wrong. In his steps he had already made the .config and was ready to make. Then definitely look at openwrt's .config –  Jacob Minshall Feb 28 at 16:11
    
OK, I know hardware architectures issue, I meant any x86/x64 architecture only. And I don't want to use openwrt, click or anything pre-built as I mentioned in the question. Point is not using, but I want to make one. –  JuliandotNut Feb 28 at 16:11
1  
something like this may work github.com/cozybit/openwrt_11s/blob/master/config_files/… –  Jacob Minshall Feb 28 at 16:18
    
Thanks @JacobMinshall It will hopefully help. I will read it now. –  JuliandotNut Feb 28 at 17:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.