how to set hostname on a cable line?

Polytropon freebsd at edvax.de
Thu Mar 22 17:13:28 UTC 2018


On Thu, 22 Mar 2018 12:13:20 +0000, Anton Shterenlikht wrote:
> On Wed, Mar 21, 2018 at 11:22:54PM +0100, Polytropon wrote:
> > > > 
> > > > Have you tried setting the hostname with 'bsdconfig networking' ?
> > > 
> > > Maybe I didn't explain myself well.
> > > 
> > > I need a fully qualified domain name (FQDM).
> > > 
> > > Perhaps I just cannot have one from a wireless router
> > > at home?
> > 
> > Check the configuration of the device that hands out configuration
> > data via DHCP to check if you can define the FQDN from within there.
> 
> No, cannot find anything.
> This is a basic router provided by Virgin media.
> Everything is done by IP only.
> 
> > If not, you can always manually set it using
> > 
> > 	hostname="fqdn.example.com"
> >
> > in /etc/rc.conf (or using "bsdconfig networking" interactively).
> 
> But what shall I choose?

Whatever you want. For maximum consistency, don't hesitate
to create the corresponding entries for your hostname in
/etc/hosts, for example:

	127.0.0.1	localhost
	127.0.0.1	fqdn.example.com
	123.45.678.90	fqdn.example.com

Of course, a part of this can be donw with with DHCP.



> No matter what I put there,
> ssh `hostname` will not work, because
> my randomly chosen hostname will not resolve to my IP!

Okay, then you also have a DNS issue. ;-)



> It seems I'm completely missing some piece here,
> perhaps some DNS must be involved at some stage?

Definitely, and probably the router won't let you configure
those things at the level required. Maybe you can replace
that unit with a more generic one, with more powerful tools
for configuration?



> But more likely, I just cannot have a FQDN
> on a cable connection.

Why not?





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list