LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-11-2011, 05:29 AM   #1
yenn
Member
 
Registered: Jan 2011
Location: Czech Republic
Distribution: Slackware, Gentoo, FreeBSD
Posts: 172

Rep: Reputation: 26
IP alias - SIOCSIFFLAGS: Cannot assign requested address


Hi,

I'm trying to set up IP alias on one NIC for MIMO (Nanostation M5) administration and network monitoring. There is one cable from MIMO to router and router network interface is configured for outer network. It works fine, but I can't set IP alias eth0:0
Code:
root@router:~# ifconfig eth0:0 172.16.172.1 netmask 255.255.255.0 up
SIOCSIFFLAGS: Cannot assign requested address
I also tried simple tests (on different NIC's), but they also fails
Code:
root@router:~# ifconfig eth0:0 up
SIOCSIFFLAGS: Cannot assign requested address
Strange thing is that same network setup works fine on another router running Debian. However it doesn't work on Slackware 13.37, -current (another linux box, just for sure).

ifconfig:
Code:
eth0      Link encap:Ethernet  HWaddr 00:1A:4D:6E:B0:99  
          inet addr:1.2.3.4  Bcast:1.2.3.255  Mask:255.255.255.0
          inet6 addr: fe80::21a:4dff:fe6e:b099/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4574071 errors:0 dropped:457 overruns:0 frame:0
          TX packets:747590 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1432436789 (1366.0 Mb)  TX bytes:111777822 (106.5 Mb)
          Interrupt:41 Base address:0x6000 

eth2      Link encap:Ethernet  HWaddr 00:0E:2E:D0:57:D9  
          inet addr:10.1.4.1  Bcast:10.1.7.255  Mask:255.255.252.0
          inet6 addr: fec0::c:20e:2eff:fed0:57d9/64 Scope:Site
          inet6 addr: 2002:9320:1d9c:c:20e:2eff:fed0:57d9/64 Scope:Global
          inet6 addr: fe80::20e:2eff:fed0:57d9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:594914 errors:0 dropped:0 overruns:0 frame:0
          TX packets:931406 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:85421426 (81.4 Mb)  TX bytes:1115441768 (1063.7 Mb)
          Interrupt:20 Base address:0xa000 

eth3      Link encap:Ethernet  HWaddr 00:50:FC:B1:55:A6  
          inet addr:10.1.1.1  Bcast:10.1.3.255  Mask:255.255.252.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:19 Base address:0xa400 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:130004 errors:0 dropped:0 overruns:0 frame:0
          TX packets:130004 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:11424593 (10.8 Mb)  TX bytes:11424593 (10.8 Mb)
 
Old 11-11-2011, 06:19 AM   #2
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,267

Rep: Reputation: 2195Reputation: 2195Reputation: 2195Reputation: 2195Reputation: 2195Reputation: 2195Reputation: 2195Reputation: 2195Reputation: 2195Reputation: 2195Reputation: 2195
tried this now at home: seems like that error is misleading as the interface responds fine
Code:
# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:1e:ec:05:61:32  
          inet addr:192.168.2.8  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:46 Base address:0x6000
# ifconfig -v eth1:0 up 192.168.3.2 netmask 255.255.255.0
SIOCSIFFLAGS: Cannot assign requested address
WARNING: at least one error occured. (-1)
# ifconfig eth1:0
eth1:0    Link encap:Ethernet  HWaddr 00:1e:ec:05:61:32  
          inet addr:192.168.3.2  Bcast:192.168.3.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          Interrupt:46 Base address:0x6000
# ping 192.168.3.2
PING 192.168.3.2 (192.168.3.2) 56(84) bytes of data.
64 bytes from 192.168.3.2: icmp_req=1 ttl=64 time=0.048 ms
64 bytes from 192.168.3.2: icmp_req=2 ttl=64 time=0.049 ms
^C
--- 192.168.3.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.048/0.048/0.049/0.007 ms
EDIT: sorry, gotta correct myself, the error was given because I added (?) the "up" string when I assigned the alias: without that no errors at all.
maybe, also for you, it's only a matter of omitting the "up".

Last edited by ponce; 11-11-2011 at 06:51 AM.
 
Old 11-14-2011, 05:13 PM   #3
yenn
Member
 
Registered: Jan 2011
Location: Czech Republic
Distribution: Slackware, Gentoo, FreeBSD
Posts: 172

Original Poster
Rep: Reputation: 26
Well, the "SIOCSIFFLAGS: Cannot assign requested address" error was probably caused by my IP address manipulation via ip tool. I tried to set IP address via 'ip' before, in case it would work
Code:
$ ip address add 172.16.172.1/24 dev eth0
[...]
$ ip address delete 172.16.172.1/24 dev eth0
and removing did the trick.

Now I can assign address to eth0:0 and ifconfig recognizes it
Code:
eth0      Link encap:Ethernet  HWaddr 00:1A:4D:6E:B0:99  
          inet addr:1.2.3.4  Bcast:1.2.3.255  Mask:255.255.255.0
          inet6 addr: fe80::21a:4dff:fe6e:b099/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9211629 errors:0 dropped:798 overruns:0 frame:0
          TX packets:1943239 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3906439522 (3725.4 Mb)  TX bytes:275619695 (262.8 Mb)
          Interrupt:41 Base address:0x6000 

eth0:0    Link encap:Ethernet  HWaddr 00:1A:4D:6E:B0:99  
          inet addr:172.16.172.1  Bcast:172.16.172.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:41 Base address:0x6000
However, when I try to ping something (MIMO in my case) I get this error
Code:
root@router:~# ping 172.16.172.31
PING 172.16.172.31 (172.16.172.31) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
I experienced similar errors few times before (with routerboard-based AP) and solution was put switch between device and router. This time I can't (and don't want to) put switch between MIMO and router.
Of course I tried Google, but all I came across was "is your cable plugged in?", "does your NIC actually work?", etc. I'm pretty sure wiring and NIC are OK, cause there is working network over eth0, but I can't completely rule out hardware malfunction.
 
Old 11-15-2011, 08:45 AM   #4
yenn
Member
 
Registered: Jan 2011
Location: Czech Republic
Distribution: Slackware, Gentoo, FreeBSD
Posts: 172

Original Poster
Rep: Reputation: 26
Eventually I figured it out. Firewall rules were causing trouble
Code:
iptables -A OUTPUT -p all -s $outer_ip -j ACCEPT
iptables -A OUTPUT -p all -s $wired_ip -j ACCEPT
iptables -A OUTPUT -p all -s $wifi_ip -j ACCEPT
I simply forgot to add
Code:
iptables -A OUTPUT -p all -s 172.16.172.1 -j ACCEPT
Mystery solved thanks for help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RTNETLINK answers: Cannot assign requested address mattsoftnet Linux - Networking 2 08-17-2011 04:09 AM
err, eth0: ioctl SIOCSIFFLAGS: Cannot assign requested address dumdadum Slackware 2 04-27-2010 07:17 AM
[SOLVED] Cannot assign requested address, problem, shred_eng Linux - Networking 2 03-03-2010 10:47 AM
cannot assign requested address multios Slackware 5 05-18-2009 08:17 PM
Ssh tunnel : cannot assign requested address sieker Linux - Networking 6 11-11-2005 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration