LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 09-10-2018, 04:32 AM   #1
mikudo
Member
 
Registered: Aug 2018
Posts: 57

Rep: Reputation: Disabled
openbsd 6.3 dns


Installing 6.3 in vmware workstation, I have the x environment and I am trying to get gnome going however dns is not resolving consistently.

It installed the first gnome session package with dns then I came back and no dns requests worked. So I set it manually in resolv.conf and restarted, it reverted due to dhcp and set the guest dns to the host 192 ip, which simply doesn't work. I set the dns manually again, it works but reverts on boot.

I have had problems like this on later versions of ubuntu also, you try to hard configure something and it constantly rewrites what you hard set on reboot and no documentation reveals what application does that and/or the means to use this dhcp client or dnsmasque or whatever to do a basic configuration.

So,
Why does dhcp not work through vmware host nat passsthrough?

and

how can I use dhcp for the ip and manually set dns without constant overwrite?
 
Old 09-10-2018, 04:58 AM   #2
mikudo
Member
 
Registered: Aug 2018
Posts: 57

Original Poster
Rep: Reputation: Disabled
While we're at it, I have actually more questions.

-when i try to shut down openbsd guest vm, vmware workstation never lets me close it or even the vmware application, it hangs by press any key to reboot and this disallows vmware from closing the window or the program, so it basically locks the program

-when i am entering my package paths manually, can I use https in the path? I can't tell if pkg_add isn't resolving dns or if it can't load https or what. It just says all packages aren't there (even though gnome-session installed fine for some reason)
 
Old 09-10-2018, 06:04 AM   #3
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 167

Rep: Reputation: 57
I can't answer the vmware questions, but I may be able to help you configure your guest's networking information.
  • When a network interface is configured by DHCP, the DHCP server (provided by vmware in this instance) defines address, netmask, routing, and may also set many options, including domain name server addresses.
  • The DHCP server also sets a lease length time, in seconds. The DHCP client on OpenBSD will renew the lease and reapply settings once the lease reaches 50% of its life. A 4-day lease will be renewed after 2-days. A 30-minute lease will be renewed after 15-minutes. This is why your attempts to edit resolv.conf manually appear to only be temporary.
You can add domain name server addresses in a resolv.conf.tail(5) file, but you can also override the DHCP-provided DNS server addresses, which may be the better solution.
  • The DHCP client on OpenBSD is dhclient(8), which is run for you during boot when your NIC/NICs are configured. You intially provision your NICs during installtion, and those setting are stored in your hostname.if(5) file(s) in /etc. If you requested DHCP configuration for a NIC, that file will contain the string "dhcp" and OpenBSD will run the dhclient(8) program to configure the NIC via the DHCP server.
  • The dhclient(8) program can "supersede" lease options, including DNS. To supersede means "ignore the option from the DHCP server, use my setting instead." One of those options is DNS server addresses, the option is called "domain-name-servers".
  • To set the option, create your dhclient.conf(5) file in /etc, and provision it to supersede the option. There is an example dhclient.conf(5) file in /etc/examples which shows example "supersede" commands in comments.
  • A complete list of DHCP options is found in the dhcp-options(5) man page.

Last edited by jggimi; 09-10-2018 at 06:13 AM. Reason: clarity
 
Old 09-10-2018, 03:48 PM   #4
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 167

Rep: Reputation: 57
I missed this question:
Quote:
Originally Posted by mikudo View Post
when i am entering my package paths manually, can I use https in the path? I can't tell if pkg_add isn't resolving dns or if it can't load https or what. It just says all packages aren't there (even though gnome-session installed fine for some reason)
Yes, you can use https in your $PKG_PATH, or in the installurl(5) file, if it is defined.

If you installed your filesets and kernels from a network location rather than local media, the install script will create an installurl(5) file for you. The pkg_add(1) tool will look for this file, only when there is no $PKG_PATH defined. So the local environment variable will override the installurl(5) file if it exists.
 
Old 09-11-2018, 07:26 AM   #5
mikudo
Member
 
Registered: Aug 2018
Posts: 57

Original Poster
Rep: Reputation: Disabled
Thank you! This is informative and helpful.

Although I am still curious why dhcp doesn't just forward dns requests to the host dns, I can do this.

However in dhclient there is no example to supersede dns, just host and domain, but I can experiment and read this dhcp-options file. Thanks!
 
Old 09-11-2018, 08:19 AM   #6
mikudo
Member
 
Registered: Aug 2018
Posts: 57

Original Poster
Rep: Reputation: Disabled
I did this. I copied dhclient, added the supercede domain-name-servers xx.xx.xx.xx, set permissions to match the other files in etc/ and then rebooted, same result. No dns.

Why is the basic stuff so hard?

Shouldn't it be the simplest thing in the world to set dns servers for a dhcp connection OR for dhcp connection to work like everything else through nat passthrough on the vm host?

fwiw in virtualbox dhcp/dns is working ok so I may just use that instead of vmware.
 
Old 09-11-2018, 08:51 AM   #7
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 167

Rep: Reputation: 57
Quote:
Originally Posted by mikudo View Post
I did this. I copied dhclient, added the supercede domain-name-servers xx.xx.xx.xx, set permissions to match the other files in etc/ and then rebooted, same result. No dns.

Why is the basic stuff so hard?
It's not basic. You are running a guest in VMWare. You can allocate a portion of your issues to that. How much, I am unable to say, because a) I don't know anything about the VMWare environment you are running, and b) in your newness to OpenBSD you don't know what information I might need to be able to help you.

There could be many causes for "no DNS." One of those could be an error in your dhclient.conf file. Check the contents of /etc/resolv.conf. Did your chosen domain name server addresses appear in it? If not, you have a provisioning error.

Another could be a failure of VMWare to route your packets to the DNS server addresses. Can you ping(8) the DNS server address(es), and obtain a response (or responses)? This would be pinging IP addresses, you can't ping DNS names if you have no DNS servers to provide name-to-address resolution.
Quote:
Shouldn't it be the simplest thing in the world to set dns servers for a dhcp connection OR for dhcp connection to work like everything else through nat passthrough on the vm host?
Only if you have the underlying understanding of how DNS works.

And while I may be able to help you, I can't address VMWare-specifics as I'm not a user of it. Nor, do I have enough information from you to provide you with a root cause of this problem. For example, I don't even know what the DNS server address(es) provided by your VMWare host are, or why they are non-operational for you.
Quote:
fwiw in virtualbox dhcp/dns is working ok so I may just use that instead of vmware.
Then this indicates the problem is a VMWare provisioning issue of some kind, and not the fault of the guest OS.
 
1 members found this post helpful.
Old 09-11-2018, 09:51 AM   #8
mikudo
Member
 
Registered: Aug 2018
Posts: 57

Original Poster
Rep: Reputation: Disabled
Yes, this is a very good and thorough response. I am kindof sorry you have to write it as I have simply moved on to building the same thing on virtualbox.

And you are right I am asking very obscure virtualization questions in the bsd forum and then asking why it's hard, which is a little bit silly. I'm doing it because it's hard so I should expect this type of thing and to learn.

fwiw I could ping the 192 address of the host but in after reboot resolv.conf didnt have the addresses in dhclient.conf i had written to supercede.

I did learn things about this. Now my problem is that dynamic disk resizing isnt working so my install thinks its 3gb but virtualbox says its 12gb. But I will resolve this some way or another or start all over and just memorize it.

I do like what I am seeing here and I think I can work with it, will be a slog ddthough until Im not on these forums banging on pots and pans wondering why something doesnt work...

Thanks anyway, hope youre around when i hit the next roadblock

Than
 
Old 09-11-2018, 10:54 AM   #9
jggimi
Member
 
Registered: Jan 2016
Distribution: None. Just OpenBSD.
Posts: 167

Rep: Reputation: 57
Quote:
Originally Posted by mikudo View Post
...after reboot resolv.conf didnt have the addresses in dhclient.conf i had written to supercede.
Then you know the root cause of this particular problem. An error in your dhclient.conf, or an error in DHCP connection to the server preventing dhclient from setting anything.

If you're still interested in debugging that, you could run dhclient(8) manually. See the man page for how to have it test the configuration file, or to log errors to stderr instead of syslog.
Quote:
Thanks anyway, hope youre around when i hit the next roadblock
I hope so, too, and that I can be more help than I've been so far.
 
  


Reply

Tags
openbsd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: OpenBSD Project Celebrates 20 Years of Activity with the OpenBSD 5.8 Release LXer Syndicated Linux News 0 10-19-2015 09:02 AM
OpenBSD: nvidia drivers, screen resolution and FreeBSD binaries on OpenBSD ::: *BSD 2 08-21-2009 05:18 AM
LXer: Fsck errors in the Linux filesystem on my OpenBSD laptop NOT caused by OpenBSD LXer Syndicated Linux News 1 08-31-2008 04:15 AM
DNS issues on OpenBSD 3.3 dkaplowitz *BSD 0 09-02-2003 12:02 AM
dns error messages in openbsd 3.1 glock19 Linux - Networking 2 06-25-2002 05:50 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 05:28 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration