LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-08-2007, 06:04 AM   #1
makram.ng
LQ Newbie
 
Registered: Jan 2007
Posts: 1

Rep: Reputation: 0
Loosing IP configuration after reboot


Hi everybody

I am new to this forum. I have a problem with one of my production servers which is running under Linux Suse 9.
The problem is that after I configure the NIC (with yast tool) all is ok. the ifconfig returns the correct values and I can ping to remote IP addresses, however, after rebooting, I loose the whole configuration and I should re-configure my NIC once for each reboot.

Is there a way to make this configuration permanently ?

Thanks in advance for your help
 
Old 01-08-2007, 08:00 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Well, once you've setup your configuration using yast, do this in a terminal:

[rylan@StefanLinux ~]$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.254.255.0 * 255.255.255.0 U 0 0 0 eth0
default 192.254.255.100 0.0.0.0 UG 0 0 0 eth0
[rylan@StefanLinux ~]$

Make a note of the value in the "default" line (192.254.255.100) - this is your gateway.

To setup the above manually you need to do:

/sbin/ifconfig eth0 192.254.255.20 netmask 255.255.255.0 broadcast 192.254.255.255 up

route add default gw 192.254.255.100 eth0

Of course, the 192.254.255.20 is my IP address, and that you cannot get off the route command. Instead, call ifconfig to get your IP address assigned with yast:

[rylan@StefanLinux ~]$ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:22:A4:47:61
inet addr:192.254.255.20 Bcast:192.254.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6819 errors:0 dropped:0 overruns:0 frame:0
TX packets:6700 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3391379 (3.2 MiB) TX bytes:965585 (942.9 KiB)
Interrupt:225 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:225 errors:0 dropped:0 overruns:0 frame:0
TX packets:225 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:483988 (472.6 KiB) TX bytes:483988 (472.6 KiB)

[rylan@StefanLinux ~]$

Thus, you then just need to substitute your correct address, and place the following into your /etc/rc.local file. This will then get run each time the PC is started up:

Code:
/sbin/ifconfig eth0 192.254.255.20 netmask 255.255.255.0 broadcast 169.254.255.255 up

route add default gw 192.254.255.100 eth0
with, of course, your yast-configured addresses substituted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem: loosing eth0 interface after reboot driesel Linux - Networking 4 07-13-2006 12:28 PM
Mouse configuration lost on reboot swtraver Linux - Hardware 2 02-19-2006 07:59 PM
eth0 configuration reset after reboot ChillyWillie Linux - Networking 1 05-31-2005 09:21 PM
iptables - loosing entries after reboot mule Linux - Security 7 08-21-2003 12:49 AM
Loosing hardware settings on reboot..? ScreeminChikin Linux - General 1 09-09-2002 03:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration