LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-18-2009, 10:23 AM   #1
joel_eire
LQ Newbie
 
Registered: Oct 2009
Posts: 5

Rep: Reputation: 0
Loopback adapter changes lost


Hi,

I'm running Red Hat Enterprise 5.1

I need to add the following to my network config:

ip address add 192.168.99.37/24 dev lo

This works fine but my issue is that if "service network restart" is run this config is lost and I have to manually re-run it.
I have added it in rc.local which covers me for reboots.

so, What the best way to make this command run in the network restart?

Thanks guys

Joel
 
Old 10-18-2009, 03:05 PM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
You should leave lo at 127.0.0.1, it can cause issues to change it like that.

Anyways there is a configuration file what is /etc/sysconfig/network-scripts/ifcfg-lo where you can change the default ip.

However I would suggest the following, copy the ifcfg-lo file to the file name ifcfg-lo:0 (within the /etc/sysconfig/network-scripts/ folder).

edit the ifcfg-lo:0 file to the following

Code:
DEVICE=lo:0
IPADDR=192.168.88.37
NETMASK=255.255.255.0
NETWORK=192.168.88.0
BROADCAST=192.168.88.255
ONBOOT=yes
NAME=loopback
This should set your machine up in a much better configuration.

Last edited by r3sistance; 10-18-2009 at 03:11 PM. Reason: Fixed network and broadcast IPs
 
Old 10-20-2009, 09:19 AM   #3
joel_eire
LQ Newbie
 
Registered: Oct 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Question loopback adapter changes lost

Quote:
Originally Posted by r3sistance View Post
You should leave lo at 127.0.0.1, it can cause issues to change it like that.
Hi r3sistance,

Thanks for the reply.
I need to create an additional ip on the loopback.
Do you know if that's possible from ifcfg-lo?

Thanks

Joel
 
Old 10-20-2009, 04:48 PM   #4
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
As I said previously .

Quote:
Originally Posted by r3sistance View Post
However I would suggest the following, copy the ifcfg-lo file to the file name ifcfg-lo:0 (within the /etc/sysconfig/network-scripts/ folder).

edit the ifcfg-lo:0 file to the following

Code:
DEVICE=lo:0
IPADDR=192.168.88.37
NETMASK=255.255.255.0
NETWORK=192.168.88.0
BROADCAST=192.168.88.255
ONBOOT=yes
NAME=loopback
This should set your machine up in a much better configuration.
This will give you a new network device what is called lo:0 that will hold the additional IP.
 
Old 10-30-2009, 09:58 AM   #5
joel_eire
LQ Newbie
 
Registered: Oct 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by r3sistance View Post
As I said previously .



This will give you a new network device what is called lo:0 that will hold the additional IP.
thanks for the advice, but that seemed to cause network connection issues on eth0.

Joel
 
Old 10-30-2009, 01:41 PM   #6
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Are you certain what you have is a direct copy of what I placed above...

if it is then might be worth checking what IP range eth0 is using.
 
  


Reply



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
Lost my network adapter with FC4-X86_64 TexasDevilDog Fedora 1 10-09-2005 01:21 PM
How do I emulate loopback adapter behaviour in wine halfhaggis Linux - Software 2 09-18-2005 05:57 AM
Trying to do a network install of Mandrake 10 on Virtual PC w/ MS Loopback Adapter crescentgazer Linux - Networking 0 08-20-2004 04:04 PM
What is the Linux equivalent to the MS loopback adapter? Phil51 Linux - Networking 1 11-03-2003 03:41 PM
loopback adapter --> unamanaged device sc300t Linux - General 0 01-17-2002 10:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:38 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