OpenBSD cannot get an IP with DHCP


Recommended Posts

I have installed OpenBSD on VirtualBox this evening, everything seems fine, except the networking.

I have enabled networking in VirtualBox to use "Host interface" as network connection of the virtual machine. This configuration does work for Windows Vista on another virtual machine. I then, in OpenBSD, checked /etc/hostname.em0, there is only a word dhcp, which suppose to make OpenBSD to get a private IP from DHCP server. I also checked /etc/resolv.conf, I leave a line, 192.168.1.1, which points to the router in my home. I then ifconfig em0 down and then ifconfig em0 up. However, after these steps, OpenBSD still cannot find host 192.168.1.1.

I wonder if it is problem of OpenBSD or I missed something? I tried to use static IP for my OpenBSD too, but that didn't help.

Thanks for any input.

Link to comment
https://www.neowin.net/forum/topic/680934-openbsd-cannot-get-an-ip-with-dhcp/
Share on other sites

  Gundamdriver said:
I have installed OpenBSD on VirtualBox this evening, everything seems fine, except the networking.

I have enabled networking in VirtualBox to use "Host interface" as network connection of the virtual machine. This configuration does work for Windows Vista on another virtual machine. I then, in OpenBSD, checked /etc/hostname.em0, there is only a word dhcp, which suppose to make OpenBSD to get a private IP from DHCP server. I also checked /etc/resolv.conf, I leave a line, 192.168.1.1, which points to the router in my home. I then ifconfig em0 down and then ifconfig em0 up. However, after these steps, OpenBSD still cannot find host 192.168.1.1.

I wonder if it is problem of OpenBSD or I missed something? I tried to use static IP for my OpenBSD too, but that didn't help.

Thanks for any input.

I know in Linux just doing a ifconfig <interface> up/down does not reinitiate a request to the DHCP server for an IP address. It either takes the interface down or up.

Using some sort of DHCP client is what gets the IP address from a dhcp server, as someone above has just mentioned. try outputting the results of ifconfig. Do you see a private IP address listed there for that interface?

This afternoon I tried dhclient, DHCPDISCOVER still couldn't get a private IP from my router, perhaps there are some problems with the configuration of utility?

I also made a search on Google, and I found this:

http://www.bsdguides.org/guides/freebsd/ne...ure_network.php

The command ifconfig <IP> netmask <subnet mask> and route add default <gateway IP> helped me to get replies from ping google.com. The network is fine now, but it is using static IP (I want it to use DHCP).

Perhaps I need to spend sometime on dhclient and /etc/dhclient.conf.

Thanks everyone.

  markjensen said:
And Hurd, and Solaris, and ...?

1) Linux/BSD/Unix Installation, Hardware, and OS Configuration Help

2) Linux/BSD/Unix Server Services Configuration and Help

I think those two sub-forums would get posts categorized to be a lot more helpful in topic management.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Damn no doubt this is gonna be good, can't think of many franchises as consistent as RE (apart from 3 remake)
    • There are two version of qbittorrent 5.1.0 The normal version which I think is based of QT5 & the QT6 lt20 version. I'm currently using the QT6 LT20 version of 5.1.0 and it downloaded an ubuntu iso perfectly fine.
    • Are we forgetting the hardware degradation on 13th and 14th gen??
    • Cry more. The Ukrainians who had internet access because of Starlink were trash too, huh?
    • RoboForm 9.7.5 by Razvan Serea RoboForm is the top-rated Password Manager and Web Form Filler that completely automates password entering and form filling. RoboForm makes logging into Web sites and filling forms faster, easier, and more secure. RoboForm memorizes and securely stores each user name and password the first time you log into a site, then automatically supplies them when you return. RoboForm's powerful Logins feature eliminates the manual steps of logging into any online account. With just one click RoboForm will navigate to a Web site, enter your username and password and click the submit button for you. Completing long registration or checkout forms is also a breeze. Simply click on your RoboForm Identity and RoboForm fills-in the entire form for you. You no longer need to remember all your passwords. You remember one Master Password, and RoboForm remembers the rest. This allows you to use stronger passwords, making your online experience more secure. RoboForm uses strong AES encryption for complete data security. The all new RoboForm comes with Chrome and Safari browser support, iPhone/iPad and Android support, as well a brand new RoboForm Everywhere license for use on unlimited computers and mobile devices. RoboForm 9.7.5 changelog: Prepared for the upcoming RoboForm browser extension with New Auth. Download: RoboForm 9.7.5 | 42.1 MB (Free, paid upgrade available) View: RoboForm Website Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • One Year In
      Vladimir Migunov earned a badge
      One Year In
    • One Month Later
      daelos earned a badge
      One Month Later
    • Week One Done
      daelos earned a badge
      Week One Done
    • Mentor
      Karlston went up a rank
      Mentor
    • One Month Later
      EdwardFranciscoVilla earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      494
    2. 2
      snowy owl
      252
    3. 3
      +FloatingFatMan
      250
    4. 4
      ATLien_0
      225
    5. 5
      +Edouard
      181
  • Tell a friend

    Love Neowin? Tell a friend!