LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-20-2014, 09:54 AM   #1
dbdude
LQ Newbie
 
Registered: May 2014
Posts: 5

Rep: Reputation: Disabled
How to connect to Linux Virtual Machine


I am a database administrator. For testing purpose I have installed OEL (Oracle Enterprise Linux) on my laptop using VMWare player. The OEL is very much similar to RHEL. I want to connect to the OEL using putty from my laptop. I am not even able to ping this machine from the laptop at present. Setting up the OEL so that I can access using putt, is that some thing I can do on my own? If this is doable by me, will you please help me with setting it up?

Linux: Oracle Enterprise Linux 6 update 5. (This is same as Red Hat Linux).
VMware: VMWare player 6.0.2.
OS On Laptop: Windows 7
Network Adaptors on the Virtual Machine: the first is NAT and the second is Bridged.

Code:
[root@oel3 ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
[root@oel3 ~]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:50:56:2E:37:FF
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 KiB)  TX bytes:0 (0.0 KiB)

eth1      Link encap:Ethernet  HWaddr 00:50:56:21:01:C1
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 KiB)  TX bytes:0 (0.0 KiB)
          Interrupt:16 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (102.0 b)  TX bytes:0 (0.0 b)

[root@oel3 ~]# uname -a
Linux oel3 3.8.13-16.2.1.el6uek.x86_64 #1 SMP Thu Nov 7 17:01:44 PST 2013 x86_64 x86_64 x86_64 GNU/Linux

Last edited by dbdude; 05-20-2014 at 10:28 AM.
 
Old 05-20-2014, 10:00 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Neither of the interfaces on the VM is active, there is no IP. What address are you trying to ping?

Focus on getting a valid network address on the VM first, then you can think about trying to connect to it from the outside.
 
Old 05-20-2014, 10:27 AM   #3
dbdude
LQ Newbie
 
Registered: May 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
I have brought up eth0 and eth1 by changing ONBOOT=yes in ifcfg-eth0/1 files. Now I am able to connect to VM from the putty of my laptop. I am also able to access internet from VM. Still eth1 is not able to obtain IP address. Please see below screen capture. I still have two questions.
1) I have eth0 as NAT and eth1 as Bridge network card. When I am able to do everything with eth0 do I need eth1?
2) I want to assign static address so that every time VM will get the same IP address. Is it possible, if yes how?

Code:
[root@oel3 ~]# cd /etc/sysconfig/network-scripts
[root@oel3 network-scripts]# cat ifcfg-eth0
DEVICE=eth0
HWADDR=00:50:56:2E:37:FF
TYPE=Ethernet
UUID=bdfa3781-95a8-4959-9ba5-e581f0ab870f
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp

[root@oel3 network-scripts]# cat ifcfg-eth1
DEVICE=eth1
HWADDR=00:50:56:21:01:C1
TYPE=Ethernet
UUID=cec5d9e3-e5f2-4456-a1b2-da624cc6eefb
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp

[root@oel3 network-scripts]# service network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down interface eth1:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:
Determining IP information for eth0... done.

                                                           [  OK  ]
Bringing up interface eth1:
Determining IP information for eth1... failed.
                                                           [FAILED]
[root@oel3 network-scripts]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:50:56:2E:37:FF
          inet addr:192.168.160.133  Bcast:192.168.160.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe2e:37ff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1035 errors:0 dropped:0 overruns:0 frame:0
          TX packets:285 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:96824 (94.5 KiB)  TX bytes:38211 (37.3 KiB)

eth1      Link encap:Ethernet  HWaddr 00:50:56:21:01:C1
          inet6 addr: fe80::250:56ff:fe21:1c1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:741 errors:0 dropped:0 overruns:0 frame:0
          TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:68172 (66.5 KiB)  TX bytes:8244 (8.0 KiB)
          Interrupt:16 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

[root@oel3 network-scripts]# ping www.google.com
PING www.google.com (173.194.115.19) 56(84) bytes of data.
64 bytes from dfw06s39-in-f19.1e100.net (173.194.115.19): icmp_seq=1 ttl=128 time=52.3 ms
64 bytes from dfw06s39-in-f19.1e100.net (173.194.115.19): icmp_seq=2 ttl=128 time=53.7 ms
64 bytes from dfw06s39-in-f19.1e100.net (173.194.115.19): icmp_seq=3 ttl=128 time=113 ms
^C
--- www.google.com ping statistics ---

Last edited by dbdude; 05-20-2014 at 10:29 AM.
 
Old 05-20-2014, 10:59 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
My best guess is your network doesn't allow anonymous dhcp clients. Either the dhcp server has been turned off or it's using MAC filtering to reject unknown MAC addresses.

As for a static IP, there are many guides online for setting a static IP with networkmanager. Here's one:
http://superuser.com/questions/64548...networkmanager
 
Old 05-20-2014, 11:05 AM   #5
dbdude
LQ Newbie
 
Registered: May 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
Suicidaleggroll, thank you very much for your help.
 
  


Reply


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
Connect to internet through Linux Virtual Machine . . . eng_mohammedmostafa Linux - Software 13 10-26-2016 07:30 AM
Can't connect VNC to Windows 7 virtual machine from Linux Mint host HellesAngel Linux - Networking 2 03-17-2014 02:53 PM
unable to connect to internet from my Linux virtual machine praveen.amboji Linux - Newbie 1 12-17-2013 12:34 AM
port forwarding -and more- how to connect to my virtual machine jbcolmena Linux - Virtualization and Cloud 5 08-10-2010 08:11 AM
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:04 AM.

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
Open Source Consulting | Domain Registration