LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Slackware and virtual network interfaces... (https://www.linuxquestions.org/questions/linux-networking-3/slackware-and-virtual-network-interfaces-579048/)

jademan83 08-22-2007 05:08 PM

Slackware and virtual network interfaces...
 
I am running Slackware 12.0 and trying to setup virtual ethernet interfaces. I have setup 6 interfaces thus far without any problems, in the /rc.d/rc.inet1.conf file. However, the 7th, 8th, and 9th interfaces continuously fail as soon as I restart the inet1 service. I can temporarily add them with the ifconfig command, but nothing solid with the inet1 file. The error is something along the lines of "SIOCSIFFLAGS: Cannot assign requested address". I have double checked for any mis-typing in the file, and the computer is not currently connected to any internet, for any type of IP conflict situation. Is there some type of limitation on the number of interfaces or a file I have to change to have more interfaces? Any help would be appreciated.


Thanks

MS3FGX 08-22-2007 08:41 PM

From /etc/rc.d/rc.inet1:

Code:

############################
# DETERMINE INTERFACE LIST #
############################

# Compose a list of interfaces from /etc/rc.d/rc.inet1.conf (with a maximum
# of 6 interfaces, but you can easily enlarge the interface limit
# - send me a picture of such a box :-).
# If a value for IFNAME[n] is not set, we assume it is an eth'n' interface.
# This way, the new script is compatible with older rc.inet1.conf files.
# The IFNAME array will be used to determine which interfaces to bring up/down.
MAXNICS=6

So yes, by default you are limited to 6 interfaces (virtual or physical), but you can increase the "MAXNICS" variable if you need more.

Berhanie 08-22-2007 10:34 PM

Also, I was a little confused by the mention of 'virtual' in your post. As far as I'm aware, Slackware's scripts do not have a mechanism for handling virtual interfaces (e.g. eth0:0). I put mine in rc.local.

MS3FGX 08-23-2007 09:15 AM

You can specify "IFNAME" for any of the interface configurations, which would allow you to specify a virtual interface rather than a physical one.

If left to it's own devices, the rc.inet1 script would attempt to increment ethx for each configuration, which will fail when you don't have the physical devices to back it up. But if you used something like "IFNAME[1]="eth0:1", it would force the script to use eth0:1 rather than eth1. Since ifconfig generates the virtual interfaces as soon as you assign it an IP, the script creates the virtual interface without explicit support for doing so.

A bit of a hack, and probably not officially supported, but I am guessing that is what he has done here.

Berhanie 08-23-2007 06:27 PM

Thanks for the pointer, MS3FGX. I wasn't aware of recent changes.


All times are GMT -5. The time now is 06:15 PM.