LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 13 (64 bit) IFNAME[4]="wlan0:1" (http://www.linuxquestions.org/questions/slackware-14/slackware-13-64-bit-ifname%5B4%5D%3D-wlan0-1-a-786365/)

KrazyKanuk 02-02-2010 02:12 AM

Slackware 13 (64 bit) IFNAME[4]="wlan0:1"
 
I have a fresh install of Slackware 13 64 bit, that all I have basically done is installed wireless with my desired encryption/security posted here: set up Apache with 2 Virtual Hosts (added 2 hosts to the /etc/hosts file and the Windows C:\Windows\System32\Driver\etc\hosts) Mysql and samba and changed the boot manager from Lilo to Grub2. Now if I set up an alias to my wireless device I get the following error:
Quote:

SIOCSIFFLAGS can not assign requested address
and it doesn't bring up the wlan0 device at all (normal one or the alias). BUT if I wait till it finishes booting and then issue:
Quote:

sudo /sbin/ifconfig wlan0 192.168.1.200 up
sudo /sbin/ifconfig wlan0:1 192.168.1.201 up
and check ifconfig and iwconfig and the error logs it brings them up with no errors. Also if I assign the alias in /etc/rc.d/rc.local it brings it up on boot with NO errors, what am I doing wrong in the /etc/rc.d/rc.inet1.conf file that it errors out on boot but I can do it from command line or the /etc/rc.d/rc.local file and it works perfectly? Only other thing I did was edit the start section of /etc/rc.d/rc.inet1 so that it loads in the background and I get a faster boot time.

santaslilslacker 02-02-2010 03:50 AM

Open /etc/rc.d/rc.inet1.conf and add somewhere following lines:

/sbin/ifconfig wlan0:1 192.168.1.201 netmask 255.255.255.0
/sbin/route add -host 192.168.1.201 dev lo

Assuming your wlan0 is already properly configured, everytime you boot your machine that alias will be up & running
Regards,

KrazyKanuk 02-02-2010 05:20 AM

Unfortunatly that didn't work either. What I did do after I tried your suggestion was changed my wlan0 device from IFNAME[4] to IFNAME[2] with all the accompanying settings and then used IFNAME[3] for the alias device like so
Quote:

# Config information for wlan:
IFNAME[1]="wlan0"
IPADDR[1]="192.168.1.200"
NETMASK[1]="255.255.255.0"
WLAN_ESSID[1]="Disfunctional"
WLAN__RATE[1]="auto"
WLAN_CHANNEL[1]="auto"
WLAN_WPA[1]="wpa_supplicant"
WLAN_DRIVER[1]="wext"
WLAN_WPACONF[1]="/etc/wpa_supplicant.conf"
#USE_DHCP[1]=""
#DHCP_HOSTNAME[1]=""

# Config information for wlan0:1:
IFNAME[2]="wlan0:1"
IPADDR[2]="192.168.1.201"
NETMASK[2]="255.255.255.0"
#USE_DHCP[2]=""
#DHCP_HOSTNAME[2]=""
I still get the error but BOTH the device and the alias come up on boot, well let me re-word that. While I sit and watch it boot I get the "SIOCSIFFLAGS can not assign requested address" error but if I view the /var/log/messages error log file there is no error for the wlan0 or wlan0:1 device. I didn't use IFNAME[0] by chance I ever need/want to use a wired device. Still strange that I get the error and they both come up.

affinity 02-02-2010 06:34 AM

From the IP-Alias Howto in /usr/src/doc/Linux-HOWTOs:
Quote:

3. Troubleshooting: Questions and Answers

3.1. Question: How can I keep the settings through a reboot?

Answer: Whether you are using BSD-style or SysV-style (Redhat?? for example)
init, you can always include it in /etc/rc.d/rc.local. Here's what I have on
my SysV init system (Redhat?? 3.0.3 and 4.0):

My /etc/rc.d/rc.local: (edited to show the relevant portions)
#setting up IP alias interfaces
echo "Setting 172.16.3.1, 172.16.3.10, 172.16.3.100 IP Aliases ..."
/sbin/ifconfig lo 127.0.0.1
/sbin/ifconfig eth0 up
/sbin/ifconfig eth0 172.16.3.1
/sbin/ifconfig eth0:0 172.16.3.10
/sbin/ifconfig eth0:1 172.16.3.100
#setting up the routes
echo "Setting IP routes ..."
/sbin/route add -net 127.0.0.0
/sbin/route add -net 172.16.3.0 dev eth0
/sbin/route add -host 172.16.3.1 eth0
/sbin/route add -host 172.16.3.10 eth0:0
/sbin/route add -host 172.16.3.100 eth0:1
/sbin/route add default gw 172.16.3.200
Hope that helps.


All times are GMT -5. The time now is 03:34 AM.