Link to home
Start Free TrialLog in
Avatar of mjustman
mjustman

asked on

LOOPBACK is lost!

What did I do?  (maybe in trying to set up samba and smbclient, maybe in setting up routing?  firewall? - I don't know. A friend did some of it.)

Bottom line is my linux box can ping 2 pcs it's connected to (ethernet), and they can ping him ... but he can't ping himself--not by name, not by ip address and NOT by 127.0.0.1.

Therefore, ping and lpr (and probably more) complain that they "can't find the network"  !!

Not incidentally, I really don't want to "just reinstall", 'cuz I'd lose the perfectly good ppp and firewall settings, and some lesser stuff I could redo myself. Samba has not yet worked, and has most likely been overconfigured.

What do I look for and what should I STRIP OUT to get my ordinary 127.0.0.1 back?

(Oh: one funny side effect of this is that SWAT works from the pcs, but not from the machine it's on!)

The current goal is to be able to PRINT to the Linux box' local printer!

Thanks

Marilyn Justman
Avatar of kannabis
kannabis

You have to make sure that your HOSTS file is defined properly.  

on redhat it should be in /etc/hosts

here is some info how to define your localhost:  http://www.tldp.org/HOWTO/Net-HOWTO/x540.html

and here you can make sure the rest of the name resolving is ok:  http://www.tldp.org/HOWTO/Net-HOWTO/x413.html

Avatar of mjustman

ASKER

kannabis:

/etc/hosts has  all 4 listings:
127.0.0.1 localhost
192.168.1.100  equipoise (the linux box, host)
192.168.1.101 rosalind (the desktop pc)
192.168.1.102 stewball (the laptop pc)

I remember reading somewhere (in Samba setup, maybe?) that the loopback SHOULD NOT be in something...what?

/etc/resolv.conf  ONLY contains the DNS server at my ISP.  That works such that when I'm online, this becomes the DNS server for my entire system. Should it ALSO contain all the other names? Is it used for anything besides DNS lookups?

I was under the impression that loopback was "below" and precedent to this. I'll try the ipconfig command for adding lo mentioned in the pieces you cited: do you have any idea WHICH FILE it writes to?

Thanks.

Marilyn Justman
(later)
Did all those things. Checked all those files.
Everything's in order.
Same results with ping.   On name and ip address, "invalid argument".   On localhost : "Can't find network".

Can I call the "Linux Setup" guys in on this?  Or does everybody read all the postings?

(I didn't see that category 1st time thru).

Thanks.

Marilyn

Does 'ifconfig -a' return something like the following for the loopback device?

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:4040573 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4040573 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:633452031 (604.1 Mb)  TX bytes:633452031 (604.1 Mb)

While online I get :

link encap Loopback
LOOKBACK MTU:16436 Metric:1
RX packets:0 errors:0 drop:0 overruns:0 frame:0
TX packets:0 errors:0 drop:0 overruns:0 carrier:0
collisions:0 txqueuelen:0

(No "local
Inet address / mask missing... and obviously,  NOT running)

! ! ! ! !  

Thanks!

Marilyn Justman
Pretty much what I though you'd see...

Okay, check to see if /etc/sysconfig/network-scripts/ifcfg-lo
exists and that it contains:

DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

or a resaonable facsimile. The above was taken from a RedHat 7.2 system and if that's not what you are using you might see a minor variation.

Also check dmesg carefully right after a boot and see if the boot process is complaining about anything.
Sorry...no time to do entire...however:

/etc/sysconfig/network-scripts/ifcfg-lo
 - does exist
 - contains ONLY
     BOOTPROTO = none

/var/log/dmesg exists.  IT's fairly long.  When I get back from errands, I'll make a file and copy it in here.  There  DO appear to be some glitches, only one I noted down was
   hm, page 01000000 reserved twice.

As I said, get back to this in a while (2-3 hrs at least)

Thanks.

Marilyn Justman

p.s. yes, it's RedHat 7.2

If you place what my 7.2 box has in ifcfg-lo and reboot I think you'll have your loopback device back.
Sorry...no time to do entire...however:

/etc/sysconfig/network-scripts/ifcfg-lo
 - does exist
 - contains ONLY
     BOOTPROTO = none

/var/log/dmesg exists.  IT's fairly long.  When I get back from errands, I'll make a file and copy it in here.  There  DO appear to be some glitches, only one I noted down was
   hm, page 01000000 reserved twice.

As I said, get back to this in a while (2-3 hrs at least)

Thanks.

Marilyn Justman

p.s. yes, it's RedHat 7.2

jlevie:

I'm running out of hope. Entered your fixes to ifcfg-lo script, NO  difference!

Here's the texts of a) a diff of the new/old ifcfg-lo file in tht order, and b) the ifcf-ppp0 files, which apparently got changed on 4/10 by something I did.  

I WISH I KNEW WHICH FILES GOT CHANGED BY WHICH COMMANDS!

Fishing thru memory, I recall that a) the very last thing I mucked with myself before this fell apart was passwords ... at one point, I had it working (with firewall in place) for both linux and pcs to print toeach other's printers ... but they could not see each other's FILES. Was there I "password" for localhost that I might have deleted? HOW WOULD I get it back?

If I just plain reinstall (OY!), can you guys help me get the network firewall (which somebody else set up for me and I REALLY don't understand) set up again?

Here's the diffs:
a) [extra?: SOME FILES don't allow comment lines. Which? is this one?]
1,8c1
< DEVICE = lo
< IPADDR= 127.0.0.1
< NETMASK=225.0.0.0
< NETWORK=127.0.0.0
< BROADCAST=127.255.255.255
< ONBOOT=yes
< NAME=loopback
< #BOOTPROTO=none
---
> BOOTPROTO=none

b) [this removed a duplicate entry of ISP's DNS server. Don't know what made this happen, or how duplicate got in at all]
10a11
> DNS2=207.229.143.1

Many thanks.

Marilyn
I'm not sure how you managed to effectively delet the loopback configuration, but muching about with passwords would not have had anything to do with it. The only thing that would affect the configuration of the the lo interface would have been something to do with configuration of networking or possibly ppp.

Normally, /etc/sysconfig/network-scripts/ifcfg-lo is a symlink to /etc/sysconfig/networking/ifcfg-lo, like so:

wilowisp# ls -l network-scripts/ifcfg-lo
lrwxrwxrwx    1 root     root           22 Mar 11 13:16 network-scripts/ifcfg-lo -> ../networking/ifcfg-lo

Make sure that that symlink is still there and and that /etc/sysconfig/networking/ifcfg-lo contains:

DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

Then try to manually bring up the interface with 'ifup lo'. If there's some config conflict or problem you ought ot get an error message.
jlevie:

I'm running out of hope. Entered your fixes to ifcfg-lo script, NO  difference!

Here's the texts of a) a diff of the new/old ifcfg-lo file in tht order, and b) the ifcf-ppp0 files, which apparently got changed on 4/10 by something I did.  

I WISH I KNEW WHICH FILES GOT CHANGED BY WHICH COMMANDS!

Fishing thru memory, I recall that a) the very last thing I mucked with myself before this fell apart was passwords ... at one point, I had it working (with firewall in place) for both linux and pcs to print toeach other's printers ... but they could not see each other's FILES. Was there I "password" for localhost that I might have deleted? HOW WOULD I get it back?

If I just plain reinstall (OY!), can you guys help me get the network firewall (which somebody else set up for me and I REALLY don't understand) set up again?

Here's the diffs:
a) [extra?: SOME FILES don't allow comment lines. Which? is this one?]
1,8c1
< DEVICE = lo
< IPADDR= 127.0.0.1
< NETMASK=225.0.0.0
< NETWORK=127.0.0.0
< BROADCAST=127.255.255.255
< ONBOOT=yes
< NAME=loopback
< #BOOTPROTO=none
---
> BOOTPROTO=none

b) [this removed a duplicate entry of ISP's DNS server. Don't know what made this happen, or how duplicate got in at all]
10a11
> DNS2=207.229.143.1

Many thanks.

Marilyn
messages are getting out of sequence.

I tried the 127.255.255.255 fix.

ifup lo does give SEVERAL error msgs - device not found, command not found (2x, incl for 127.0.0.1)

my hunch is it IS there, just hidden by some command to ignore it.  Could firewall be doing this?  or the DNS service?  SHOULD I  "run a DNS service" here?  I can't see any point, and would like to be reassured that that's NOT the way to get these few machines to talk to each other...

Does it make more sense to try to dismantle the system in pieces (uninstall samba for instance?), or just to reinstall?  Any (general) advice on re-install?  My recollection is that if I tell it it's an "upgrade" it won't do a repartition, and I can keep apps like emacs that I installed "later".  Of course, that'll probably leave these "errors" too???????

Marilyn

It would be most illuminating to see what errors are reported when you execute 'ifup lo'. If possible it would be best to cut'n'paste the command and its result into a comment.

I don't think that the loopback device is "just hidden by some command to ignore it". It sounds like something removed the lo interface from your configuration, and what you had in your ifcfg-lo file bears that out.

I'm reasonable certain that the interface can be brought back into the configuration, but I need to know exactly what the system complains about so that I can tell what else needs "adjusting".
Ok. I'll try.  I'm on this machine now.  Wish I had a app that'd COPY from a system screen as my pc telnet and ssh clients do... NO LUCK. Had to hand-copy...


/sbin/ifup: DEVICE: command not found
/sbin/ifup: 127.0.0.1: command not found
up: error fetching interface information: Device not found
/etc/sysconfig/network-scripts/ifup: POST: command not found

Incidentally, what showed up from ifup lo > ifuplo.txt is this:

usage: ifup-aliases <net-device>\n
usage: ifup-routes <net-device>

Does this tell you anything?

Thanks.

Marilyn
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK. I've succeeded in copying from your text to mine, and, using gedit (instead of my usual emacs) I managed to paste.

I'll have to get off the net to reboot.  Get back to you if it works... well, either way...

Thanks for the lesson on Unix/DOS CRs.  I'm usually considered more than safe on issues like that--what I know I don't know is which linux config files care about extra spaces, which do and which don't allow comments, which do and which don't care about sequence. -- even which pipe (|) and which redirect (>), eg to a printer.  No, none of these is universal.  

Thanks.

Marilyn
Well, I'll be .....!!!
It worked!!
He can ping himself every which way AND he can print to his printer.

I now have tons of work to do, printing out color pages from the net for my granddaughter's 1st grade poster!!!

For what it's worth (before I tackle samba again), any idea WHY on shutdown -r now:
     -system complains that it FAILED to unload NSF statd ... should that be running?
     -last few times, system has simply HUNG instead of rebooting. Does the fact that I'm now running at run level 3 instead of 5 have anything to do with it?

If these have "real" answers, I'll be glad to put them in as new questions.  Just say so.

I appreciate your patience and tenacity with this process -- reinstalling always feels like failure AND you don't learn anything!

Thanks again,

Marilyn Justman
Right off hand I don't know why it would be complaining about not being able to stop NFS statd (the process is actually rpc.statd). My fully up to date (which is all I have to look at) 7.2 systems don't produce that error and I don't know if it's an artifact of the firewall rule sets or some bug in the as-distributed packages.

The NFS statd is part of the NFS locking utilities (started by nfslock) and that is routinely started on a RedHat system whether you are using NFS for file sharing or not. So it's not a problem for rpc.statd to be running. It could be, in your case, that rpc.statd isn't in fact starting (check by 'ps -ef | grep statd | grep -v statd'), which would result in the error at shutdown.

The rpc services and just about everything else are running at runlevel 3, so that doesn't have anything to do with it. The only practical difference between runlevel 3 and 5 is that prefdm is running in 5 and it manages the GUI login.

At any rate, I'm glad it's fixed now even though I don't have a clue as to how the loopback interface got deleted.
Thanks for all that info.

Other good news (not incidentally) on the loopback fix what that the linux box now also prints to the PC's printer.
(NOT comparable news from the pc side: but that's a password problem...I"ll post separately)

over and out on this one.

Marilyn