12 Replies Latest reply: Mar 24, 2014 2:47 PM by Thorgal RSS

    DHCP Client does not send host name to DHCP Server

    Thorgal

      Hello,

       

      I installed Solaris 10 on VirtualBox and I cannot ping/ssh/telnet the virtual machine by its host name (even from the host computer) but only by it's ip.

      I tried everything I could find on internet with no success (I don't want to add the hostname in every hosts file on every computer because it's not really professionnal)

       

      I followed what said here: http://docs.oracle.com/cd/E26505_01/html/E27061/eyhuv.html#scrolltoc

       

      Can someone has an idea of what I can do or why this does not work.

      I installed a virtual Windows7 and an Ubuntu, and it worked perfectly.

       

      Any help would be grantly appreciated.

       

      Thank you

       

      Here is my current configuration:

       

      Oracle VM VirtualBox 4.3.8 (I choose "Oracle 10 10/09 and later (64 bit))

      Oracle Solaris 10 1/13

      Network: bridge with RealTek interface

       

      NB: I don't have access to dhcp server on my netgear router (access is disabled by my ISP)

       

      Files in /etc:

      dhcp.e1000g0 (empty)

      nodename (contains "thorgal")

       

      nsswitch.conf has following lines:

      ...

      hosts: files dns # Added by DHCP

      ipnodes: files dns # Added by DHCP

      networks:   files

      protocols:  files

      rpc:        files

      ethers:     files

      netmasks:   files

      bootparams: files

      ...

       

      hostname.e1000g0 (contains "inet thorgal")

       

      /etc/inet/hosts:

      ::1             localhost

      127.0.0.1       localhost loghost

      192.168.0.17    thorgal # Added by DHCP

       

      /etc/default/dhcpagent:

      REQUEST_HOSTNAME=yes

      PARAM_REQUEST_LIST=1,3,6,12,15,28,43

      .v6.PARAM_REQUEST_LIST=7,12,23,24,27,29

       

      I also try "ifconfig e1000g0 dhcp release" with no success

       

      the debugging of dhcpagent:

       

      # pkill -x dhcpagent

      # /sbin/dhcpagent -d1 -f &

      1088

      # ifconfig e1000g0 dhcp start

      /sbin/dhcpagent: debug: insert_pif: e1000g0: sdumax 1500, hwtype 1, hwlen 6

      /sbin/dhcpagent: debug: set_packet_filter: set filter 805869f (DHCP filter)

      /sbin/dhcpagent: debug: get_smach_cid: getting default client-id property on e1000g0

      /sbin/dhcpagent: debug: in state INIT; allowing start command on e1000g0

      /sbin/dhcpagent: debug: ipc_action_start: started start (command 4) on e1000g0

      /sbin/dhcpagent: debug: set_smach_state: changing from INIT to INIT_REBOOT on e1000g0

      /sbin/dhcpagent: debug: dhcp_selecting: host thorgal

      /sbin/dhcpagent: info: configure_v4_lease: setting IP netmask to 255.255.255.0 on e1000g0

      /sbin/dhcpagent: info: configure_v4_lease: setting IP address to 192.168.0.17 on e1000g0

      /sbin/dhcpagent: warning: configure_v4_lease: no IP broadcast specified for e1000g0, making best guess

      /sbin/dhcpagent: info: configure_v4_lease: using broadcast address 192.168.0.255 on e1000g0

      /sbin/dhcpagent: info: configure_v4_timers: e1000g0 acquired lease, expires Fri Mar 21 21:33:05 2014

      /sbin/dhcpagent: info: configure_v4_timers: e1000g0 begins renewal at Fri Mar 21 09:33:05 2014

      /sbin/dhcpagent: info: configure_v4_timers: e1000g0 begins rebinding at Fri Mar 21 18:33:05 2014

      /sbin/dhcpagent: debug: set_smach_state: changing from INIT_REBOOT to PRE_BOUND on e1000g0

      /sbin/dhcpagent: info: added default router 192.168.0.1 on e1000g0

      /sbin/dhcpagent: debug: set_smach_state: changing from PRE_BOUND to BOUND on e1000g0

      /sbin/dhcpagent: debug: configure_bound: bound e1000g0

      /sbin/dhcpagent: debug: ipc_action_finish: finished start (command 4) on e1000g0: 0

      #

        • 1. Re: DHCP Client does not send host name to DHCP Server
          Nitin.K-Oracle

          If you have followed the procedure correctly and if still it do not work then the link you provided says that :

           

          Note - The following procedure does not work with all DHCP servers. Through this procedure you are requiring the client to send a specific host name to the DHCP server, and to expect the same name in return.

          However, the DHCP server does not have to respect this request and many do not. They simply return a different name.

          By the way does Solaris guest gets the hostname assigned properly ?

           

          As a workaround you may need to provide DNS entries or host files on host where virtual box is installed.

          eg: on my Windows system C:\Windows\System32\drivers\etc\hosts

          • 2. Re: DHCP Client does not send host name to DHCP Server

            Thorgal wrote:


            NB: I don't have access to dhcp server on my netgear router (access is disabled by my ISP)

            Your router is your DHCP server.  That's where you are getting your 192.168.x.x addresses.

            It doesn't know what a hostname might be.

            The document expects you to have a separate computer configured to be a DHCP server but you chose to use a SOHO router to do that task.

             

            Your setup is virtual inside virtual inside virtual.

            You're not going to succeed with what you hoped to see.

            • 3. Re: DHCP Client does not send host name to DHCP Server
              Thorgal

              Thank you for your reply Nitin K.

               

              Yes it does, Solaris gets the hostname assigned properly.

               

              I am aware of these workaround. What I don't understand is why it works with every OS I install but this Solaris.

               

              As it works with Ubuntu or Debian it makes me think it's not the DHCP server who is bugging.

              • 4. Re: DHCP Client does not send host name to DHCP Server
                Thorgal

                Hello Rukbat,

                 

                Thank you for your answer.

                 

                It works if I install a virutal Ubuntu, Debian or Windows 7 so I don't see why it does not work with Solaris 10.

                 

                Kind Regards

                • 5. Re: DHCP Client does not send host name to DHCP Server

                  During the Solaris installation process, you told it what the hostname was going to be and that you wanted that environment to exist with a dynamic IP address instead of a specific address that you desired.

                  .

                  When Solaris boots it broadcasts that hostname and waits for a DHCP server to be quasi-intelligent enough to award an IP address based upon a pre-configured list inside that DHCP server.   Hostname ABC would always get IP address 123 on subnet rst, hostname DEF would always get IP address 456 on subnet xyz, and so on and so on.

                   

                  That's the fundamental process for proper (and thus secure) DHCP.

                   

                  All your other environments (Windows, Debian, Ubuntu) are what might be thought of as "hacked for convenience" to get around that sort of network configuration.  They take the lazy way to exist.  That partial networking setup is good enough for a home network but would be miserably insecure in a corporate environment.  Those choices are operating environments that are nice for end-user desktops but aren't Enterprise Class.

                   

                  My suggestion?

                  Review the IP address range in your Netgear router's setup.

                  It is likely something like 192.169.0.1 through 192.168.0.50 and can be customized.

                  You probably don't have 50 devices on your network and probably will never have 50 simultaneous devices on your network.

                   

                  ... just do a reconfigure reboot and set your Solaris to use a static IP of 192.068.0.45

                  Then reboot and I predict your issue that prompted this forum thread will be gone.

                   

                  That's how I've done it at home for many years, even when installing Solaris to bare metal (no virtualization).

                  • 6. Re: DHCP Client does not send host name to DHCP Server
                    Thorgal

                    Hello Rukbat,

                     

                    Thank you for this very useful answer.

                    I will do it and will keep you informed.

                    • 7. Re: DHCP Client does not send host name to DHCP Server
                      Thorgal

                      Hello rukbat,

                       

                      I just made what you suggest and now, I see 'thorgal' connected in my router.

                      but when I type arp -a I don't see it appearing (I see another virtual machine which is the ubuntu tho)

                      any suggestion?

                       

                      Kind Regards

                      • 8. Re: DHCP Client does not send host name to DHCP Server

                        When you started this forum thread, your question was:

                        Thorgal wrote:

                         

                        I cannot ping/ssh/telnet the virtual machine by its host name (even from the host computer) but only by it's ip.

                        Can you do that now?   If so, then this forum thread is complete.

                         

                        I have no documentation to give to you other than a vague guess that while in a virtual setup Solaris won't respond to an arp request because your virtual NIC isn't a real NIC with a real MAC address.  I think you now need to go to the Virtualbox forum community to finish understanding connectivity and networking while using their software. 

                         

                        All Virtualbox help is from their web site; there is no Virtualbox assistance here at OTN.   They are deliberately kept separate.

                         

                        Start a new forum discussion over there... Be very sure to paste a link to this one so that people over there can glance at what you've already discussed .  (That's good forum etiquette.)

                        • 9. Re: DHCP Client does not send host name to DHCP Server
                          Thorgal

                          Hello rukbat,

                           

                          No, I cannot ping/ssh/telnet my virtual solaris by its hostname. (I can see the hostname in the router tho)

                           

                          It cannot be virtualbox in case because arp -a returns my virtual ubuntu macaddress/ip

                          nb: I have two virtual machine in my virtualbox: 1 solaris10 and 1 ubuntu. With ubuntu everything is working fine (I can ping/ssh/telnet by its hostname - not the solaris10).

                          • 10. Re: DHCP Client does not send host name to DHCP Server

                            Well, I don't use any virtualization, so I can't give advice when I'm not familiar with the nuances of what might exist when an OS is sandboxed inside something like Virtualbox running on some other OS.

                             

                            You still need to go to the Virtualbox community for additional guidance.

                            • 11. Re: DHCP Client does not send host name to DHCP Server
                              Thorgal

                              That's ok rukbat.

                              I thank you very much that you took of your time to try to help me.

                              I noticed that the other linux have samba installed with share. Maybe that's the reason why windows sees them. I will investigate that way.

                              Again, thank you for your help ;-)

                              • 12. Re: DHCP Client does not send host name to DHCP Server
                                Thorgal

                                Hello,

                                 

                                I found out what happened.

                                My solaris configuration is correct and the hostname is well sent to the dhcp server.

                                What I found is that the other systems use WINS.

                                On the other linux, samba is running and resolve hostnames thru WINS

                                Same for Windows.

                                The order to check hostname is: hosts file - WINS - DNS

                                 

                                Now, if I want something more 'professionnal', I have to make a DNS server on my Solaris (with forwarder to external DNS)