Re: Ip address assignment

2009-09-08 Thread Gaurang Shastri
Hello Vivek,

There is no drawback on ifconfig.  Ifconfig is used to configure the
kernel-resident network interfaces.  It is used at boot time to set up
interfaces as necessary.  After that, it is usually only needed when
debugging or when system tuning is needed.

Also if you see the network service script, we are using ifup for ifdown
for permanent storage. Please see man ifconfig for different uses of
ifconfig command.

Thank you.
Gaurang Shastri

On Tue, Sep 8, 2009 at 1:40 PM, Vivek Subbarao viv...@chelsio.com wrote:

  Hi,



 The ip address assigned through ifconfig is not persistent. Why is the
 behaviour so? Instead of editing files to add persistent addresses why not
 make ifconfig add persistent addresses? Is there a drawback to this?



 Thank you,

 Vivek S



Re: Ip address assignment

2009-09-08 Thread Shameem Ahamed
Please check, whether you have dhcp client running or not. 

dhcp will assign ips automatically. If so, disable dhcp.

Shammi



From: Vivek Subbarao viv...@chelsio.com
To: kernelnewbies@nl.linux.org
Sent: Tuesday, September 8, 2009 1:40:48 PM
Subject: Ip address assignment

 


Hi,
 
The ip address assigned through ifconfig is not persistent. Why
is the behaviour so? Instead of editing files to add persistent addresses why
not make ifconfig add persistent addresses? Is there a drawback to this?
 
Thank you,
Vivek S


  

Re: Ip address assignment

2009-09-08 Thread microbit
Hi,

On Tue, 8 Sep 2009 01:10:48 -0700, Vivek Subbarao viv...@chelsio.com
wrote:
 Hi,
 
  
 
 The ip address assigned through ifconfig is not persistent. Why is the
 behaviour so? Instead of editing files to add persistent addresses why
 not make ifconfig add persistent addresses? Is there a drawback to this?
 
  
 
 Thank you,
 
 Vivek S


I guess you already knew this, but you can make ifconfig assign consistent
names.
See 
etc/udev/static-nic.rules 
or 
/etc/udev/rules.d/*persistent-net.rules

HTH
Kris



--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: Ip address assignment

2009-09-08 Thread Vivek Subbarao
Hi,

I am on CentOS 5.3 and i don’t find the files you have mentioned. Can you 
please give me a brief explanation or the command that actually will allow me 
to assign persistent(across reboots) addresses.

Thank you,
Vivek S

 -Original Message-
 From: kernelnewbies-bou...@nl.linux.org [mailto:kernelnewbies-
 bou...@nl.linux.org] On Behalf Of micro...@virginbroadband.com.au
 Sent: 08 September 2009 15:35
 To: Kernelnewbies
 Subject: Re: Ip address assignment
 
 Hi,
 
 On Tue, 8 Sep 2009 01:10:48 -0700, Vivek Subbarao
 viv...@chelsio.com
 wrote:
  Hi,
 
 
 
  The ip address assigned through ifconfig is not persistent. Why is
 the
  behaviour so? Instead of editing files to add persistent addresses
 why
  not make ifconfig add persistent addresses? Is there a drawback to
 this?
 
 
 
  Thank you,
 
  Vivek S
 
 
 I guess you already knew this, but you can make ifconfig assign
 consistent
 names.
 See
 etc/udev/static-nic.rules
 or
 /etc/udev/rules.d/*persistent-net.rules
 
 HTH
 Kris
 
 
 
 --
 To unsubscribe from this list: send an email with
 unsubscribe kernelnewbies to ecar...@nl.linux.org
 Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Ip address assignment

2009-09-08 Thread Bernd Petrovitsch
On Tue, 2009-09-08 at 01:10 -0700, Vivek Subbarao wrote:
[...]
 The ip address assigned through ifconfig is not persistent. Why is the
 behaviour so? Instead of editing files to add persistent addresses why
 not make ifconfig add persistent addresses? Is there a drawback to
 this?
- It's not the kernels job to persistently store this or that data item.
  Period.
  IP addresses may be configured by hand (if you install a machine the
  first time), statically but also come through BOOTP, DHCP (or whatever
  protocol or system in the future).
  The above is decided by the admin and it's the most simple way to do
  it there (and have in the kernel just some sys-calls to configure
  that).
- Even if: consider the implications (or at least the first few that 
  come to my mind):
  a)
  * Kernel boots
  * Kernel wants to load data from the persistent storage.
That implies that the persistent storage (e.g. file in local
filesystem on whatever hardware, file in remote filesystem, raw in
NVRAM or similar, over ethernet/USB/SATA/IDE/SCSI/SAS/...).
  See the contents of /etc/rc.d on CentOS-5.3 for all of the script
  logic which is used now to bring up your host. A good part of it (if
  not all) should be copied into the kernel?
  Basically you get a *lot* of code and complexity into the kernel which
  is already present (and must be also dealt with) in user-space anyways
  (usually by the SysV-Init and around provided by $distribution).
  What to do in case of an error/problem (let alone development and
  testing)?
  - Boot without that data: That may work for IP addresses but not for
many other persistent kernel data.
And where are we then? Just like today.
  b) How do you backup and recover(!) that data seriously (and for lots
 of machines)?
 Add some special filesystem to export it as file(s)?
 If yes: Where is the real difference to today?
  c) And you actually want the possibility to try stuff without any
 immediate persistent storage (e.g. configuring a firewall on the
 other side of the planet over ssh. You schedule a reboot in 5-10
 minutes and load the new rule set. If the new rule set works, you
 cancel the reboot and copy the new rule set over the really used
 one. If it doesn't work - and you just cut the ssh connection -,
 you just wait for the reboot to happen and fix it up).
 So you need at least one additional flag everywhere for persistent
 or not.

Bernd

PS: In case you didn't realize it: The registry in the Windows-NT-and
newer world was a nice try but doesn't solve more problems than it adds.
-- 
Firmix Software GmbH   http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
  Embedded Linux Development and Services



--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: Ip address assignment

2009-09-08 Thread Vivek Subbarao
Thanks for the explanation. I understood your point.

 -Original Message-
 From: Bernd Petrovitsch [mailto:be...@firmix.at]
 Sent: 08 September 2009 16:38
 To: Vivek Subbarao
 Cc: kernelnewbies@nl.linux.org
 Subject: Re: Ip address assignment
 
 On Tue, 2009-09-08 at 01:10 -0700, Vivek Subbarao wrote:
 [...]
  The ip address assigned through ifconfig is not persistent. Why is
 the
  behaviour so? Instead of editing files to add persistent addresses
 why
  not make ifconfig add persistent addresses? Is there a drawback to
  this?
 - It's not the kernels job to persistently store this or that data
 item.
   Period.
   IP addresses may be configured by hand (if you install a machine the
   first time), statically but also come through BOOTP, DHCP (or
 whatever
   protocol or system in the future).
   The above is decided by the admin and it's the most simple way to do
   it there (and have in the kernel just some sys-calls to configure
   that).
 - Even if: consider the implications (or at least the first few that
   come to my mind):
   a)
   * Kernel boots
   * Kernel wants to load data from the persistent storage.
 That implies that the persistent storage (e.g. file in local
 filesystem on whatever hardware, file in remote filesystem, raw in
 NVRAM or similar, over ethernet/USB/SATA/IDE/SCSI/SAS/...).
   See the contents of /etc/rc.d on CentOS-5.3 for all of the script
   logic which is used now to bring up your host. A good part of it (if
   not all) should be copied into the kernel?
   Basically you get a *lot* of code and complexity into the kernel
 which
   is already present (and must be also dealt with) in user-space
 anyways
   (usually by the SysV-Init and around provided by $distribution).
   What to do in case of an error/problem (let alone development and
   testing)?
   - Boot without that data: That may work for IP addresses but not for
 many other persistent kernel data.
 And where are we then? Just like today.
   b) How do you backup and recover(!) that data seriously (and for
lots
  of machines)?
  Add some special filesystem to export it as file(s)?
  If yes: Where is the real difference to today?
   c) And you actually want the possibility to try stuff without any
  immediate persistent storage (e.g. configuring a firewall on the
  other side of the planet over ssh. You schedule a reboot in 5-10
  minutes and load the new rule set. If the new rule set works, you
  cancel the reboot and copy the new rule set over the really used
  one. If it doesn't work - and you just cut the ssh connection -,
  you just wait for the reboot to happen and fix it up).
  So you need at least one additional flag everywhere for
 persistent
  or not.
 
   Bernd
 
 PS: In case you didn't realize it: The registry in the
Windows-NT-and
 newer world was a nice try but doesn't solve more problems than it
 adds.
 --
 Firmix Software GmbH   http://www.firmix.at/
 mobil: +43 664 4416156 fax: +43 1 7890849-55
   Embedded Linux Development and Services
 


--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ