Networking Forums

Networking Forums > Computer Networking > Linux Networking > static IP problem with ifstate on debian sarge

Reply
Thread Tools Display Modes

static IP problem with ifstate on debian sarge

 
 
hakim
Guest
Posts: n/a

 
      07-28-2005, 10:40 AM
Hi,

I have rent a server. It is configured over dhcp in
/etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

I changed it to static like that in /etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address x.x.x.x
netmask 255.255.255.255
broadcast x.x.x.x
gateway x2.x2.x2.x2

But the interface does not come up proberly. The only hint I have found
is /etc/network/run/ifstate.

Under dhcp looks ifstate like:

lo=lo
eth0=eth0

And it works fine.

under static ifstate looks like that:

lo=lo

It missess my eth0 interface and most probably it doesn't work because
of that. The default gateway isn't up too. I have plugged in my own
script after booting which tries to set a default gw but it doesn't
show up.
It is a server in the house of my provider.

Does anyone have a hint why under static configuration the ifstate file
does not list eth0=eth0 to bring up my interface correctly.

Many Thanks...

Achim

 
Reply With Quote
 
 
 
 
Dan
Guest
Posts: n/a

 
      07-28-2005, 11:12 AM
On 28 Jul 2005 03:40:58 -0700, "hakim" <(E-Mail Removed)> wrote:

You probably want a netmask of 255.255.255.0 (if it's a class C
network).

Also, is the address you give it on your local network?

Dan

>Hi,
>
>I have rent a server. It is configured over dhcp in
>/etc/network/interfaces:
>
>auto lo
>iface lo inet loopback
>
>auto eth0
>iface eth0 inet dhcp
>
>I changed it to static like that in /etc/network/interfaces:
>
>auto lo
>iface lo inet loopback
>
>auto eth0
>iface eth0 inet static
>address x.x.x.x
>netmask 255.255.255.255
>broadcast x.x.x.x
>gateway x2.x2.x2.x2
>
>But the interface does not come up proberly. The only hint I have found
>is /etc/network/run/ifstate.
>
>Under dhcp looks ifstate like:
>
>lo=lo
>eth0=eth0
>
>And it works fine.
>
>under static ifstate looks like that:
>
>lo=lo
>
>It missess my eth0 interface and most probably it doesn't work because
>of that. The default gateway isn't up too. I have plugged in my own
>script after booting which tries to set a default gw but it doesn't
>show up.
>It is a server in the house of my provider.
>
>Does anyone have a hint why under static configuration the ifstate file
>does not list eth0=eth0 to bring up my interface correctly.
>
>Many Thanks...
>
>Achim


 
Reply With Quote
 
hakim
Guest
Posts: n/a

 
      07-28-2005, 11:23 AM
As I sad it is a server of a provider, which I have rent.

let us assume:
IP: 1.1.1.1
netmask: 255.255.255.255
gateway: 10.255.200.1

with dhcp it works fine. And that is the dhcp configuration which I get
of my providers dhcp-server.

The address is not on the local network it has a direct connection to
the internet over ethernet in the house of my provider...

 
Reply With Quote
 
Dan
Guest
Posts: n/a

 
      07-28-2005, 12:40 PM
On 28 Jul 2005 04:23:31 -0700, "hakim" <(E-Mail Removed)> wrote:

>As I sad it is a server of a provider, which I have rent.
>
>let us assume:
>IP: 1.1.1.1
>netmask: 255.255.255.255
>gateway: 10.255.200.1
>
>with dhcp it works fine. And that is the dhcp configuration which I get
>of my providers dhcp-server.
>
>The address is not on the local network it has a direct connection to
>the internet over ethernet in the house of my provider...


Does your provider give you a static ip address? If not, then the
only way to get an address is via dhcp.

And a netmask of 255.255.255.255 just isn't going to work.

Dan

 
Reply With Quote
 
hakim
Guest
Posts: n/a

 
      07-28-2005, 03:20 PM
>And a netmask of 255.255.255.255 just isn't going to work

Over DHCP the network is configured and works proberly like that:
(IP-Adressess are fake but it really looks like that)

eth0 Link encap:Ethernet HWaddr 00:20:ED:2E:A6:3B
inet addr:220.178.190.90 Bcast:220.178.190.90
Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1993 errors:0 dropped:0 overruns:0 frame:0
TX packets:741 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:199483 (194.8 KiB) TX bytes:87228 (85.1 KiB)
Interrupt:11

ns:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
10.255.0.1 0.0.0.0 255.255.255.255 UH 0 0 0
eth0
0.0.0.0 10.255.0.1 0.0.0.0 UG 0 0 0
eth0

It works over DHCP.

If I configure it statically it doesn't work. Why. If you are right
then why does it work under dhcp and not statically?

Achim

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      07-28-2005, 07:58 PM
hakim wrote:
>>And a netmask of 255.255.255.255 just isn't going to work

>
>
> Over DHCP the network is configured and works proberly like that:
> (IP-Adressess are fake but it really looks like that)
>
> eth0 Link encap:Ethernet HWaddr 00:20:ED:2E:A6:3B
> inet addr:220.178.190.90 Bcast:220.178.190.90
> Mask:255.255.255.255
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:1993 errors:0 dropped:0 overruns:0 frame:0
> TX packets:741 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:199483 (194.8 KiB) TX bytes:87228 (85.1 KiB)
> Interrupt:11
>
> ns:~# route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 10.255.0.1 0.0.0.0 255.255.255.255 UH 0 0 0
> eth0
> 0.0.0.0 10.255.0.1 0.0.0.0 UG 0 0 0
> eth0
>
> It works over DHCP.
>
> If I configure it statically it doesn't work. Why. If you are right
> then why does it work under dhcp and not statically?


Your ISP may grant access only to addresses given out
by its DHCP server. It's fairly improbable that you
could set up a fixed address so thet the ISP has
proper routings for it.

The ifconfig settings and route table entries in the
example above do not match. If you have to fudge with
the addresses, do it carefully and correctly.

--

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DEBIAN SARGE PPPOECONF hakim Linux Networking 1 05-30-2005 04:49 PM
Problem setting up home ADSL <- linux -> LAN on Debian Sarge Robert Rozman Linux Networking 3 04-24-2005 08:14 PM
More lan configuration under Debian Sarge Robert Murr Linux Networking 2 10-10-2004 07:11 PM
LAN configuration - Debian Sarge Robert Murr Linux Networking 15 10-08-2004 05:12 PM
problem with cyrus21-imapd-2.1.14 and debian sarge Simon Weber Linux Networking 0 11-24-2003 03:36 PM



1 2 3 4 5 6 7 8 9 10 11