Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Ubuntu 12.04.1 and am trying to configure an ethernet interface alias eth0:0.

Here is my /etc/network/interfaces:

auto lo
iface lo inet loopback
pre-up iptables-restore < /etc/iptables.up.rules

auto eth0
iface eth0 inet static
address 192.168.0.1
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255

auto eth0:0
iface eth0:0 inet static
address 192.168.1.1
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

If I reboot, the system starts with message: Starting with partial network configuration, and eth0 configured only.

I've tried

  • Removing pre-up iptables-restore < /etc/iptables.up.rules
  • Changing the netmask of eth0:0 to 255.255.0.0
  • Changing the gateway of eth0:0 to 192.168.0.1

"ifup" fails like this:

$ sudo ifup eth0:0
RTNETLINK answers: File exists
Failed to bring up eth0:0.

service networking restart never works (even before I added eth0:0):

$ sudo service networking restart
stop: Unknown instance: 
networking stop/waiting

Unfortunately after the commands I even don't see updates in /var/log/syslog or /var/log/dmsg.

Output of ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:1e:33:71:cd:a4  
          inet addr:192.168.0.1  Bcast:192.168.0.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:45 Base address:0x4000 

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:3248 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3248 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:279379 (279.3 KB)  TX bytes:279379 (279.3 KB)

wlan0     Link encap:Ethernet  HWaddr 00:11:22:33:44:55  
          inet addr:78.225.121.83  Bcast:78.225.121.255  Mask:255.255.255.0
          inet6 addr: fe80::211:22ff:fe33:4455/64 Scope:Link
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:37801 errors:0 dropped:0 overruns:0 frame:0
          TX packets:39871 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:36003811 (36.0 MB)  TX bytes:7490816 (7.4 MB)

Any ideas?

share|improve this question
    
can you still manually configure eth0:0? –  Foon Oct 7 '12 at 11:59
    
What's the output of sudo ifconfig? –  Darth Android Oct 8 '12 at 14:32
    
I added output of ifconfig :) –  Rodnower Oct 9 '12 at 19:52
1  
You have a mistake in your configuration: The IP address you've assigned for eth0:0 is not within the same subnet as eth0. What exactly are you trying to do? –  Michael Hampton Oct 9 '12 at 22:10
    
In reality I try to create different interfaces for different networks, because sometime I move from place to place... So what can I do? –  Rodnower Oct 11 '12 at 14:25

1 Answer 1

Is the broadcast 192.168.0.255 correct for eth0:0, or should it be 192.168.1.255?

share|improve this answer
    
Thank you for response. I tried with right broadcast, same result... –  Rodnower Oct 7 '12 at 11:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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