SlackwareThis Forum is for the discussion of Slackware Linux.
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.
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.
I have several machines that use multiple IP addresses. I normally do not need to add the route command at all. Usually though these are additional IP's on the existing network and no additional routing is required. Under 2.4 kernel when the IP is assigned it creates a routing entry for the subnet if required. They are also currently running 2.4 series kernel. If I recall Slack 7.1 was 2.2 kernel based. It might be required though for a 2.2 kernel, I do not remember. But it is easy enough to check after the the NIC is configured. (route -n)
I looked at the config for a 2.2.19 kernel source, probably from Slack 8.0, there was an option to enable IP: aliasing support. Also, 2.0 kernel has an option to enable Network Aliasing. So you probably want to check your kernel build options to see if it is enabled. When I enabled modules, the option would not allow for a module and the help did not state that a module was available or what the name would be. The option seems to have been removed in the 2.4 kernel.
From the error message reported, I am *assuming* that the initial config is working on the device eth0. I do not think the alias assignments have to be sequential on the assignment, unless it is required on the first alias. I noticed that you are using eth0:1 instead of eth0:0. If the device eth0 cannot be configured then you probably need to load the module support for the network adapter. I have always configured, eth0, eth0:0, eth0:1, etc. in that order.
I have 16 IP#'s that my ISP has assigned to me. 2 are being used on desktops, the others I have setup on three different servers. 2 with 1 IP each and the other is where I am trying to setup additional IP's on the machine. I am still stuck on this.
If you are running a 2.2.x kernel then it looks like you will need to build a custom kernel to enable IP Aliasing. Since it looks you need to do a kernel build then perhaps consider the latest stable, 2.4.20 kernel.
Also, in regards to the numbers you posted. I think you are using the wrong subnet mask. I believe it should be 255.255.255.240. For a 16 IP subnet block assignment with a broadcast on .175 then the net assignment would be on .160 and the first usable IP address would be .161 and the last IP would be .174.
For a subnet assignment the 8 bit number would a sequence of one's starting with the most significant bit.
Bit = Subnet mask : size of subnet
1 = 128 : 128 IP subnet
1 = 192 : 64 IP subnet
1 = 224 : 32 IP subnet
1 = 240 : 16 IP subnet
1 = 248 : 8 IP subnet
1 = 252 : 4 IP subnet
1 = 254 : 2 IP subnet
1 = 255 : single IP address
A value of 176 would leave a zero in the 7th significant bit. ( 10110000 ) I would think this would be an illegal subnet assignment. It should be 11110000 or a decimal value of 240. Or another way to consider the subnet assignment value; 128 + 64 + 32 + 16 = 240.
Originally posted by Excalibur If you are running a 2.2.x kernel then it looks like you will need to build a custom kernel to enable IP Aliasing.........
Also, in regards to the numbers you posted. I think you are using the wrong subnet mask. I believe it should be 255.255.255.240.
Excalibur,
How would I enable IP Aliasing when I rebuild a kernal? I am downloading the latest 2.4.20 source now.
Also I changed the netwmask to 255.255.255.240. then original was set to this but I changed it for some odd reason I do not remember.
From what I can deternine you only need to enable TCP/IP protocol for the support. I am not able to locate any specific option for IP Aliases in the 2.4.x kernel. Now, I have the TCP/IP enabled with IP Mulitcasting, IP Advanced router, and IP Policy routing enabled. But none these options mention the alias support. Now my kernel also has Packet socket, packet filtering, socket filtering, Unix Domain Sockets, and a lot of stuff under Netfilter options. It is firewall, Masq, gateway server as well as a hosting server.
Since there are so many options to compiling a new kernel when you really do not have a starting config file. I may suggest two choices. If you want a modules based kernel then use a config file of your choice from the Slack 9 distro. It is 2.4.20 based. If you want a module disabled starting point and the options that I have, then send me an email through my profile and I will attach a config and return it to you. I don't mind using modules on workstations that are generally behind firewalls, but I do not like modules on production servers. I prefer to fully integrate all drivers and support into the kernel whenever possible.
Also, something else that you may or may not have a problem with. I think it was around Slack 8.0 that the firewall support changed from ipchains to iptables. If you are using ipchains currently for filtering, then be carefull not to disable it in the 2.4.20 kernel. Your older Slack version does not have iptables installed and it would require a complete rewrite of the firewall rules to switch to iptables.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.