6 Replies Latest reply: Jan 18, 2013 1:19 PM by IndianDBA RSS

    Static and Dynamic IP's on same machine - linux

    IndianDBA
      Hi

      I have installed oracle 11g on Linux 5.2 under a VM machine(gust) which resides on Windows 7(host).

      From host machine (windows 7) I want to access the 11g database which is on guest machine(Linux) through putty.

      problem what i am facing is, when i use dhcp(automatic generated ip) under gust linux machine i can able to access guest machine from host through puuty.
      But when i use static IP(by desabling dhcp, i am not able access guest from host !!!

      As oracle recommends i am using static ip for Database configuration, but with static ip i am not able to access the gust machine from host.

      Is there any way i can access the guest machine from host even when i am using the static ip.

      Thanks in advance.
      AB
        • 1. Re: Static and Dynamic IP's on same machine - linux
          Srini Chavali-Oracle
          What does "not able to access" mean ? Are there any error codes or error messages ?

          HTH
          Srini
          • 2. Re: Static and Dynamic IP's on same machine - linux
            IndianDBA
            when i start putty using the ip of host-machine(Linux) at gust machine(Windows) getting error (Network error:Connection timed out)

            Thanks.
            AB
            • 3. Re: Static and Dynamic IP's on same machine - linux
              EdStevens
              IndianDBA wrote:
              Hi

              I have installed oracle 11g on Linux 5.2 under a VM machine(gust) which resides on Windows 7(host).

              From host machine (windows 7) I want to access the 11g database which is on guest machine(Linux) through putty.

              problem what i am facing is, when i use dhcp(automatic generated ip) under gust linux machine i can able to access guest machine from host through puuty.
              But when i use static IP(by desabling dhcp, i am not able access guest from host !!!

              As oracle recommends i am using static ip for Database configuration, but with static ip i am not able to access the gust machine from host.

              Is there any way i can access the guest machine from host even when i am using the static ip.

              Thanks in advance.
              AB
              It will depend on what virtualization software (VMware or VirtualBox) you are using. They each handle their virtualization of the network a bit differently.

              Please read http://edstevensdba.wordpress.com/category/personal-test-systems/ for a description of how I set up my networking for vm's I create under VirtualBox.
              • 4. Re: Static and Dynamic IP's on same machine - linux
                IndianDBA
                I am using vmware .... and your notes helped me ..... even though issue has not resolved full but got a concept where i can reach to solution

                Thanks a lot Ed.
                • 5. Re: Static and Dynamic IP's on same machine - linux
                  EdStevens
                  IndianDBA wrote:
                  I am using vmware .... and your notes helped me ..... even though issue has not resolved full but got a concept where i can reach to solution

                  Thanks a lot Ed.
                  Earlier you said "when i start putty using the ip of host-machine(Linux) at gust machine(Windows) getting error (Network error:Connection timed out)"

                  That seems absolutely the opposite of most people's setups. In this architecture, the "host" is the one actually installed on the physical machine, the one on which you have installed VMware itself. The "guest" is the virtual system running under VMware. For most people, that means the host system is Windows, running on their desktop/laptop, and the "guest" is Linux, running as a vm under VMware or VirtualBox.

                  But regardless of the above, since you are running under vmware, on the host system (please refer to previous paragraph) will show two network adapters associated with VMware. VMnet1 is for the hostonly adapter, and VMnet8 is for the NAT adapter. When I set up a vm guest under VMware, I take note of the ip address of the VMnet8 adapter. For the sake of explanation, let's say it is 192.168.8.1. So when you set up the network configuration on the guest vm, you want to give it an ip address of 192.168.8.n, where 'n' is between 3 and 255. My personal naming convention for my personal VMs is to end the server name with a 2-digit sequential number (vmlnxsrv01, vmlnxsrv02, etc). I then use that number as the last two digits of the IP address, starting at 101. So in the example I just gave, virtual machine vmlnxsrv01 would be given an IP address of 192.168.8.101, and vmlnxsrv02 would be at 192.168.8.102.

                  Also, as I noted in the blog, VMware and Vbox handle their networking differently. Unlike VBox, in VMware, I never had to define two NICs. I just used one and assigned it an ip address in the subnet of the VMnet8 (NAT) adapter. That met all the requirements I discussed in the blog post, to wit:
                  1 - the ability to have a fixed ip address
                  2 - that ip address NOT occupy space on the corporate or ISP's network - the device is not visible to anything outside of the host (see definition in first paragraph, above).
                  3 - the ability of the guest vm to initiate access to the internet
                  4 - the ability to access resources on the guest vm using the same tools as I use to access physical servers on my corporate network. And by that I don't mean a different copy of the same tool. I mean the same tool. For instance, I have PuTTY installed on my desktop, to give me an ssh client for accessing *nix servers.  Within that copy of PuTTY I have defined connections to 6 servers in my corporate data center AND 4 VM guests running under either VMware or VBox on my desktop.  My local tnsnames.ora has entries for both my corporate databases AND the databases running on on my priviate VMs.

                  Edited by: EdStevens on Jan 17, 2013 6:54 AM
                  • 6. Re: Static and Dynamic IP's on same machine - linux
                    IndianDBA
                    EdStevens wrote:
                    IndianDBA wrote:
                    I am using vmware .... and your notes helped me ..... even though issue has not resolved full but got a concept where i can reach to solution

                    Thanks a lot Ed.
                    Earlier you said "when i start putty using the ip of host-machine(Linux) at gust machine(Windows) getting error (Network error:Connection timed out)"
                    It was written mistakenly by me, actual setup what i have is windows is the host and Linux on VMVare is the guest machine.
                    But regardless of the above, since you are running under vmware, on the host system (please refer to previous paragraph) will show two network adapters associated with VMware. VMnet1 is for the hostonly adapter, and VMnet8 is for the NAT adapter. When I set up a vm guest under VMware, I take note of the ip address of the VMnet8 adapter. For the sake of explanation, let's say it is 192.168.8.1. So when you set up the network configuration on the guest vm, you want to give it an ip address of 192.168.8.n, where 'n' is between 3 and 255. My personal naming convention for my personal VMs is to end the server name with a 2-digit sequential number (vmlnxsrv01, vmlnxsrv02, etc). I then use that number as the last two digits of the IP address, starting at 101. So in the example I just gave, virtual machine vmlnxsrv01 would be given an IP address of 192.168.8.101, and vmlnxsrv02 would be at 192.168.8.102.
                    Yes, with your above instruction i have resolved the issue and now i am able to access my guest(Linux) from host(Windows) using the putty.
                    The configuration what i used is

                    VMnet8 shows 192.168.242.0 and gues machine(linux) i given is 192.168.242.101

                    Once again thanks for your time and guidance.

                    Regards.
                    AB