The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Add Static Routes to new physical address mehrdad68 SUN Solaris 4 02-07-2009 04:57 AM
How to apply brackets? vanitham Shell Programming and Scripting 2 01-27-2009 06:00 AM
Need to apply Checks SSh/SCP niceboykunal123 Shell Programming and Scripting 0 04-16-2008 02:41 AM
Slow from static IP ... fast from NAT address gseyforth UNIX for Dummies Questions & Answers 3 03-09-2007 12:27 PM
How to apply the awk commnad ? preethgideon UNIX for Dummies Questions & Answers 3 10-30-2006 09:32 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-12-2009
chebarbudo's Avatar
chebarbudo chebarbudo is offline
Registered User
  
 

Join Date: Nov 2008
Location: various
Posts: 188
Question How to apply static ip address

Hi there,
I have a Debian 5.0 server newly installed.
By default, the ip address is given by dhcp.
Code:
pegase:~# grep '^[^#]' /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
pegase:~# head -2 /etc/hosts
127.0.0.1       localhost
127.0.1.1       pegase.apltest  pegase
Then I modify the files so that they look like this:
Code:
pegase:~# grep '^[^#]' /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
        address 192.168.1.251
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
pegase:~# head -2 /etc/hosts
127.0.0.1       localhost
192.168.1.251   pegase.apltest  pegase
Then I try to apply changes with:
Code:
pegase:~# /etc/init.d/networking restart
But at that point, I loose eth0:
Code:
pegase:~# ifconfig
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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)
And the only way to apply changes is to reboot the server.
Is this normal? How can I switch from dhcp to static address without rebooting?
Thanks for your help.
Santiago
 

Bookmarks

Tags
dhcp, networking, static ip

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 05:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0