Re: How to set hostnam alias

Michael Bond <[email protected]> Fri, 2 Mar 2007 09:47:34 -0500
Newsgroups gmane.org.user-groups.linux.morlug
Message-ID <[email protected]>
--===============1638009593==
Content-Type: multipart/alternative; boundary=Apple-Mail-3--881357504


--Apple-Mail-3--881357504
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


Depends on what you are trying to do. Are you trying to set the  
hostname on a remote box or the localhost?

that is, do you have Box1 set to DHCP and you want to set an alias on  
a remote box (not Box1)?

If its the local box, you can do it by using the 127.0.0.1

if its a remote box, you'll need to use some sort of dynamic dns  
solution (of which, there are many .. which again depends on your  
situation and what you are trying to do).

Mike.
[email protected]




On Mar 2, 2007, at 9:38 AM, Andrei Smirnov wrote:

> I used to set the hostname alias like 'hostname' instead of  
> 'hostname.domainname' in /etc/hosts, like
>
> 192.168.1.1  myhost.mydoamin  myhost
>
> But what if the host is on DHCP and I don't know it's IP? I could  
> not find how Ican bypass writing
> the IP in /etc/hosts. Anyone knows the answer?
>
> Andrei
> _______________________________________________
> Morlug mailing list
> [email protected]
> http://mailman.morlug.org/mailman/listinfo/morlug


--Apple-Mail-3--881357504
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; "><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>Depends on what you are =
trying to do. Are you trying to set the hostname on a remote box or the =
localhost?</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>that=
 is, do you have Box1 set to DHCP and you want to set an alias on a =
remote box (not Box1)?</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>If its the local box, you =
can do it by using the 127.0.0.1</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>if its a remote box, you'll =
need to use some sort of dynamic dns solution (of which, there are many =
.. which again depends on your situation and what you are trying to =
do).=A0</DIV><BR><DIV> <SPAN class=3D"Apple-style-span" =
style=3D"border-collapse: separate; border-spacing: 0px 0px; color: =
rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: =
normal; font-variant: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; =
"><DIV>Mike.</DIV><DIV><A =
href=3D"mailto:[email protected]">[email protected]</A></DIV><=
DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><BR =
class=3D"Apple-interchange-newline"></SPAN></SPAN> =
</DIV><BR><DIV><DIV>On Mar 2, 2007, at 9:38 AM, Andrei Smirnov =
wrote:</DIV><BR class=3D"Apple-interchange-newline"><BLOCKQUOTE =
type=3D"cite">I used to set the hostname alias like 'hostname' instead =
of 'hostname.domainname' in /etc/hosts, like<BR><BR><A =
href=3D"http://192.168.1.1">192.168.1.1</A>=A0 myhost.mydoamin=A0 =
myhost<BR><BR>But what if the host is on DHCP and I don't know it's IP? =
I could not find how Ican bypass writing <BR>the IP in /etc/hosts. =
Anyone knows the answer?<BR clear=3D"all"><BR>Andrei<BR><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; =
">_______________________________________________</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">Morlug mailing list</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A =
href=3D"mailto:[email protected]">[email protected]</A></D=
IV><DIV style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; "><A =
href=3D"http://mailman.morlug.org/mailman/listinfo/morlug">http://mailman.=
morlug.org/mailman/listinfo/morlug</A></DIV> =
</BLOCKQUOTE></DIV><BR></BODY></HTML>=

--Apple-Mail-3--881357504--

--===============1638009593==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Morlug mailing list
[email protected]
http://mailman.morlug.org/mailman/listinfo/morlug

--===============1638009593==--