Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!panix!not-for-mail From: wpaul@panix.com (Bill Paul) Newsgroups: comp.os.386bsd.questions Subject: Re: FreeBSD: error message during boot Date: 8 Jul 1994 16:14:20 -0400 Organization: The M00se Illuminati (bl00p!) Lines: 114 Message-ID: <2vkc2s$84p@panix3.panix.com> References: <2vjuhk$qev@panix3.panix.com> <2vk6oe$ate@ohlone.kn.PacBell.COM> NNTP-Posting-Host: panix3.panix.com X-Newsreader: TIN [version 1.2 PL2] Daring to challenge the will of the almighty Leviam00se, *YET ANOTHER TIME*, Sherman Mui (smui@news.kn.PacBell.COM) had the courage to say: : Bill Paul (wpaul@panix.com) wrote: : : In /etc/hosts, you must have a line that says: : : 127.0.0.1 localhost localhost.my.domain : : Errors that will result if you don't do this: ifconfig will not be : : able to figure out what IP address goes with the name 'localhost' : : and you'll get 'localhost: bad value.' : Ok, should I also have my hostname and domain? Erm, well, that's tricky. If you aren't going to be connected to any other network at all, then technically you don't have to. You could do this: 127.0.0.1 localhost myhostname localhost.my.domain myhostname.my.domain With that in place, 'telnet myhostname' would achieve the same results as 'telnet localhost.' Creating a seperate line with a made up IP address for your host would be a bad idea unless you were willing to go through some additional nonsense. : Also my machine is not on any network, however, I will be getting a uucp : connection from work. Would my domain need to be changed or does this : stuff have nothing to do with uucp? Your uucp hostname need not be the same as your machine's 'offical' hostname. I'm afraid I'm a bit inexperienced with uucp, but I believe your uucp name gets placed one of the many uucp configuration files. I imagine you're going to have to do some work to get sendmail to behave though, which is a little out of my league (without the books in front of me, anyway :). : : In /etc/netstart, you must do: : : ifconfig lo0 localhost : : route add localhost <-- could well be optional, but doesn't hurt : Yeah, I found that line commented out but it looked a bit different: : rout add $hostname localhost This actually serves another purpose, and it's related to the 'additional nonsense' I mentioned earlier. Take my setup, for example. I have two interfaces defined: lo0 and sl0 (loopback and SLIP). My /etc/hosts file says: 127.0.0.1 localhost localhost.my.domain 198.7.7.73 skynet skynet.dialup.access.net 198.7.0.124 slip-gw slip-gw.access.net Skynet is me, and slip-gw is my SLIP server. I configure my system thusly: ifconfig lo0 localhost ifconfig sl0 $hostname slip-gw (where $hostname == skynet) route add $hostname localhost route add default slip-gw What happens now is this: if I ping skynet (who's IP address is 198.7.7.73), the kernel routes the packets through the loopback device lo0 instead of through the slip device sl0. Why? Because otherwise, the ping request would go out over the SLIP link and get bounced back to me from the server, which is stupid. :) It would work, sure, but it's silly: why clutter your SLIP link with traffic meant for yourself? Additionally, this works even if the SLIP link isn't up. Now, packets for any other host (besides skynet and localhost) will go through the 'default' route, which points to the SLIP link. If the link is down, I get errors, of course. In a nutshell: this makes telnet 198.7.7.73 and telnet 127.0.0.1 do the same thing, which is one way to give your machine its own personal IP address without being on another network. Of course, you'll be using sl0 as a dummy interface, which is a bit of a waste, but since it's there... :) : : Lastly, be very careful with /etc/hosts.equiv. If you add a hostname : : to it, say 'otherhost.domain,' then root on otherhost.domain will : : be able to rsh/rlogin to your machine without a password. : But should my hostname be in there? It should already have 'localhost' in it by default. That should be enough. :) (Try 'rlogin localhost' sometime.) Also, be advised that users can create their own .rhosts files which can bypass the settings in /etc/hosts.equiv. This won't be a problem for you since you're not connected to any other machines, but it's important to remember. : Oh, should I have been replacing 'localhost' with my hostname? See above. You can put your machine's hostname in the definition for 127.0.0.1 if you really want both 'telnet myhostname' and 'telnet localhost' to work. :) : Btw, I just successfully telnetted to localhost and logged in! Careful: talking to yourself is a sure sign of... uh... something. : Thanks a bunch! : Sherman : -- : ---------------------------------------------------------------------- : Sherman | Mui | moooster| @thetech| .com | smui@kn | .pacbell| : ---------------------------------------------------------------------- Share and enjoy! -Bill -- _ /\ _ Join the / \_/\_/ \_/\_/ \ .----. M00se Illuminati Bill Paul \_____/ () \_____/ (bl00p!) Face it: wouldn't <Big City M00se> / \ `----' you feel much wpaul@panix.com -or- / \__/ \ --' safer? ghod@drycas.club.cc.cmu.edu /__________\