Networking Forums

Networking Forums > Computer Networking > Linux Networking > IP assignment

Reply
Thread Tools Display Modes

IP assignment

 
 
Mickybadia
Guest
Posts: n/a

 
      01-24-2004, 02:56 PM
Hi all,

How do you keep an IP address over boot? I know 'ifconfig', but when I
reboot, I loose it. Same for routing tables, how can I save them?

Thanks a lot.


--
Mickybadia [http://mickybadia.free.fr/]

To reply, please remove "SAY_HELLO_TO_" from address.
Veuillez supprimer "SAY_HELLO_TO_" de l'adresse pour me répondre.

 
Reply With Quote
 
 
 
 
Widow Twankey
Guest
Posts: n/a

 
      01-24-2004, 03:02 PM
Which O/S?

Under Win 98 I did it in network properties.

Under XP....

Start - Settings - Local Area Connection Properties - General

Select TCP/IP then click Properties

Select "Use the following IP address"

enter your IP address and subnet mask.

Click OK

--
Yours

Widow Twankey

Now 10% Twankier than ever

"Mickybadia" <(E-Mail Removed)> wrote in message
news:40129514$0$7165$(E-Mail Removed)...
> Hi all,
>
> How do you keep an IP address over boot? I know 'ifconfig', but when I
> reboot, I loose it. Same for routing tables, how can I save them?
>
> Thanks a lot.
>
>
> --
> Mickybadia [http://mickybadia.free.fr/]
>
> To reply, please remove "SAY_HELLO_TO_" from address.
> Veuillez supprimer "SAY_HELLO_TO_" de l'adresse pour me répondre.
>



 
Reply With Quote
 
Bit Twister
Guest
Posts: n/a

 
      01-24-2004, 03:08 PM
On Sat, 24 Jan 2004 16:56:47 +0100, Mickybadia wrote:
> Hi all,
>
> How do you keep an IP address over boot? I know 'ifconfig', but when I
> reboot, I loose it. Same for routing tables, how can I save them?


Please read http://www.catb.org/~esr/faqs/smart-questions.html

It always helps if you provide some basic system information and what
you are having problems with when you post questions to the
news groups.

That info helps us to provide better examples/responses.

There are several "linuxes", about 190+ according to
http://www.distrowatch.com/stats.php

Always provide what distro and release level you are using
when you post questions (Pink Tie 10, Suse 9.0, Mandrake 9.2,...).

Different distros have different commands, files, and links to files,
pacakges and package/software managers.
Even happens between release levels of the same distribution.

Internet connection problem (ISP, cable, adsl, PPPoE, LAN, dialup, eth0. USB..)

If dhcp, which client (pump, dhcpcd, dhclient,...)

 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      01-24-2004, 03:39 PM
On Sat, 24 Jan 2004, Mickybadia <(E-Mail Removed)> wrote:
>
> How do you keep an IP address over boot? I know 'ifconfig', but when I
> reboot, I loose it. Same for routing tables, how can I save them?


You forgot to say which Linux distribution and version (not same as kernel
version), what network interface, and how it gets an IP now. You likely
need to configure your network scripts, which in SuSE, for example, could
be done with YaST2. But other distros have their own specific tools,
which may vary by distro version.

--
David Efflandt - All spam ignored http://www.de-srv.com/
 
Reply With Quote
 
Mickybadia
Guest
Posts: n/a

 
      01-24-2004, 04:03 PM
Hi all!
David Efflandt wrote:

>> How do you keep an IP address over boot? I know 'ifconfig', but when I
>> reboot, I loose it. Same for routing tables, how can I save them?

>
> You forgot to say which Linux distribution and version (not same as kernel
> version), what network interface,


Well I didn't think the distro was the issue here. Obviously each one will
have its own user-friendly tools for net configging, but I would have
thought there was a manual way of adding a line somewhere in conf.d/rc.d.
My distro is Gentoo.

Would a simple
ifconfig eth0 192.168.1.1
in the boot scripts do?

I looks like iptables (which is what I am planning to do, see other thread)
is trying to start earlier than the local scripts are started, that's why I
am not too keen on doing that. But maybe I could add the iptable lines to
these scripts too, afterwards? I saw that on
http://www.linuxforum.com/linux_tutorials/5/1.php
However, it doesn't seem to be the way it is usually done.


--
Mickybadia [http://mickybadia.free.fr/]

To reply, please remove "SAY_HELLO_TO_" from address.
Veuillez supprimer "SAY_HELLO_TO_" de l'adresse pour me répondre.

 
Reply With Quote
 
Budyanto Himawan
Guest
Posts: n/a

 
      01-24-2004, 05:52 PM
You need to have an ifcfg file in /etc/sysconfig/network-scripts

The file name would be ifcfg-eth0 for example.
It should contain

DEVICE=eth0
BOOTPROTO=none
IPADDR=192.168.0.100
NETMASK=255.255.255.0
ONBOOT=yes
GATEWAY=""

You wouldn't need to fill in the GATEWAY info as it should be in
/etc/sysconfig/network aleady

Budyanto

Mickybadia wrote:
> Hi all!
> David Efflandt wrote:
>
>
>>>How do you keep an IP address over boot? I know 'ifconfig', but when I
>>>reboot, I loose it. Same for routing tables, how can I save them?

>>
>>You forgot to say which Linux distribution and version (not same as kernel
>>version), what network interface,

>
>
> Well I didn't think the distro was the issue here. Obviously each one will
> have its own user-friendly tools for net configging, but I would have
> thought there was a manual way of adding a line somewhere in conf.d/rc.d.
> My distro is Gentoo.
>
> Would a simple
> ifconfig eth0 192.168.1.1
> in the boot scripts do?
>
> I looks like iptables (which is what I am planning to do, see other thread)
> is trying to start earlier than the local scripts are started, that's why I
> am not too keen on doing that. But maybe I could add the iptable lines to
> these scripts too, afterwards? I saw that on
> http://www.linuxforum.com/linux_tutorials/5/1.php
> However, it doesn't seem to be the way it is usually done.
>
>


 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      01-24-2004, 08:46 PM
Mickybadia wrote:

> How do you keep an IP address over boot? I know 'ifconfig', but when I
> reboot, I loose it. Same for routing tables, how can I save them?
>


It depends on your distro, but there should be some method to asign IPs etc.

--

Fundamentalism is fundamentally wrong.

To reply to this message, replace everything to the left of "@" with
james.knott.
 
Reply With Quote
 
Lew Pitcher
Guest
Posts: n/a

 
      01-25-2004, 04:25 PM
Mickybadia wrote:
> Hi all,
>
> How do you keep an IP address over boot? I know 'ifconfig', but when I
> reboot, I loose it. Same for routing tables, how can I save them?


I'm going to sound impatient here, but how about thinking about the problem a
bit before asking the question?

Problem: ip address and routing tables are lost over reboot.

Observation: only those things recorded to permenant media (disk, flash memory,
etc) are retained across reboots.

Solution: before rebooting, store ip address and routing info in permenant
media, then restore after rebooting.

Implementation: as part of the shutdown script, record the results of ifconfig
and route into files. On reboot, parse the files and issue the appropriate
ifconfig and route commands.

But, that would be only if you actually /needed/ to save such over a reboot.
Most of the time, routing tables are rebuilt on the fly, and your system already
assigns an IP address (through already existing startup scripts), so your
problem may not be an issue.


--
Lew Pitcher

Master Codewright and JOAT-in-training
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.

 
Reply With Quote
 
Lew Pitcher
Guest
Posts: n/a

 
      01-25-2004, 04:26 PM
Widow Twankey wrote:
> Which O/S?
>
> Under Win 98 I did it in network properties.
>
> Under XP....

[snip]

Please tell me, under which circumstances does a question to
comp.os.LINUX.networking require a solution for MSWindows98 or MSWindowsXP?


--
Lew Pitcher

Master Codewright and JOAT-in-training
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.

 
Reply With Quote
 
Mickybadia
Guest
Posts: n/a

 
      01-26-2004, 09:45 AM
Hi all!
Lew Pitcher impatiently wrote:

> Problem: ip address and routing tables are lost over reboot.
>
> Observation: only those things recorded to permenant media (disk, flash
> memory, etc) are retained across reboots.
> Solution: before rebooting, store ip address and routing info in permenant
> media, then restore after rebooting.


Obviously. The question was "where is this usually done?"

> Implementation: as part of the shutdown script, record the results of
> ifconfig and route into files. On reboot, parse the files and issue the
> appropriate ifconfig and route commands.


Obviously, but that would be done last in boot sequence, and the iptables
(using the IPs) script appears before "Starting local". So I thought I had
to edit a file that would be used by a former script it boot sequence.

> But, that would be only if you actually /needed/ to save such over a
> reboot. Most of the time, routing tables are rebuilt on the fly, and your
> system already assigns an IP address (through already existing startup
> scripts), so your problem may not be an issue.


I DO need to add the default gateway on the second comp, don't I? That can't
be learnt on the fly, can it? Anyway, as far as the second comp is
concerned, I DID use the local boot script, as there is no iptables there.


--
Mickybadia [http://mickybadia.free.fr/]

To reply, please remove "SAY_HELLO_TO_" from address.
Veuillez supprimer "SAY_HELLO_TO_" de l'adresse pour me répondre.

 
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
Assignment of local IP Nomen Nescio Wireless Internet 3 11-14-2010 01:12 AM
Assignment of local IP Nomen Nescio Wireless Networks 3 11-14-2010 01:12 AM
Radius ip assignment SuderMan Windows Networking 3 07-31-2006 11:13 PM
IP assignment with ISPs phil.jacobs@starlizard.com Broadband 14 12-01-2005 02:37 PM
IP address assignment for VPN computers Jaime Stuardo Windows Networking 5 05-09-2005 01:53 AM



1 2 3 4 5 6 7 8 9 10 11