ifupdown: interface does not get properly configured

1

Since some days ago, I'm suffering a traumatic problem with Debian Wheezy.

Every time I boot the server, the only up interface is loopback. I have configured a static IP at /etc/network/interfaces

ifconfig -a shows properly the ethernet interface (eth2 in this case). When I do ifconfig eth2 up, it ups the interface as usual but without IP. I have to do ifconfig eth2 x.x.x.x to get an IP.

ifconfig after doing ifconfig eth2 up:

eth2      Link encap:Ethernet  HWaddr 00:25:22:0d:dd:b1  
          inet6 addr: fe80::225:22ff:fe0d:ddb1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:398 (398.0 B)
          Interrupt:42 Base address:0x2000 

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:36 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:17653 (17.2 KiB)  TX bytes:17653 (17.2 KiB)

After that, I still have no acces to the internet. When I do a ping to Google, I get "ping: unknown host google.com"

Is not a problem from the router because I have other computers at this network working and I can acces to the computer with the problem through ssh too (after giving him an IP with ifconfig)

I tried a lot of things and a lot of people tried to help me, but I still have no idea to solve this issue.

I have to say that I think (and this is a personal opinion of a non-expert) the problem is at the start because the first problem is the lack of the interface up and it's IP.

Thanks for reading me and for your time.

This is the /etc/network/interfaces file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth2
iface eth2 inet static
        address 192.168.1.45
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

SouL

Posted 2013-10-10T15:34:34.550

Reputation: 13

1have you tried asking your dhcp server for an address? dhclient -v eth2... do you get a proper reply? – MariusMatutiae – 2013-10-10T15:44:27.890

Do not you have managed=true in /etc/NetworkManager/NetworkManager.conf? Also try to initialize the interface manually: ifup eth2. – pabouk – 2013-10-10T16:13:24.557

Answers

0

The problem has been found to be with the netscript-2.4 Debian Wheezy package which, while claiming to be compatible with the ifupdown package, failed to properly configure a "static" interface after bringing it up.

Installing ifupdown fixed the problem.

kostix

Posted 2013-10-10T15:34:34.550

Reputation: 2 435

0

Check your scripts in dirs:

if-down.d
if-post-down.d
if-pre-up.d
if-up.d
interfaces.d

smooker

Posted 2013-10-10T15:34:34.550

Reputation: 19