Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
08-28-2010, 01:24 PM
|
#1
|
Member
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254
Rep:
|
Interaction between a Host OS and a Guest OS
Hi,
I have installed Red Hat Eterprise Linux as a Guest OS using VirtualBox on the Host OS Windows XP SP 2 on my PC.
I want to access my local / intranet web site from this Guest OS which is running on the top of on Windows XP, the Host OS.
I am not sure as to what IP Settings I need to do.
Though I am able to access Internet from both the OSes.
The IP of this Guest OS is:
Code:
[root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:30:E9:72
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe30:e972/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1871 errors:0 dropped:0 overruns:0 frame:0
TX packets:1926 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1427538 (1.3 MiB) TX bytes:415769 (406.0 KiB)
Interrupt:11 Base address:0xd020
[root@localhost ~]#
I have installed Microsoft Self Loop Adapter (Autoconfiguration IP Address: 169.254.25.129) on the Host OS Windows XP. There is another adapter: VirtualBox Host-Only Network whose IP Address is: 192.168.56.1
So, how can we access intranet web site from the Host OS to Guest OS and vice versa.
Please note that I also want to access this virtual Red Hat machine /console from within windows XP using PUTTY application.
From Windows XP the Red Hat machine is pinging. But when I use the IP to access the machine through PUTTY it doesn't work.
Thanks!
Last edited by Hi_This_is_Dev; 08-28-2010 at 01:34 PM.
|
|
|
08-28-2010, 01:57 PM
|
#2
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
Not really sure what exactly you're asking for with the first part. But for the SSH issue, try stopping iptables on the Red Hat install and seeing if thats it. If it is you can allow SSH through iptables or leave it off(not really recommended, but thats a different discussion(
|
|
|
08-28-2010, 02:04 PM
|
#3
|
Member
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254
Original Poster
Rep:
|
Quote:
Originally Posted by ncsuapex
Not really sure what exactly you're asking for with the first part. But for the SSH issue, try stopping iptables on the Red Hat install and seeing if thats it. If it is you can allow SSH through iptables or leave it off(not really recommended, but thats a different discussion(
|
I did this:
Code:
service iptables stop
But the Host OS is still unreachable.
To say in a few words, what I want to do:
Host OS: Windows XP
Virtual / Guest OS: Red Hat Linux
I want to ping the Guest / Virtual OS from the Host OS and vice versa.
|
|
|
08-28-2010, 05:07 PM
|
#4
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
What IP/hostname are you using to SSH?
What output do you get when you run this command from a command prompt on your windows machine?
Whats the output when you run this command from the command line on your linux virtual machine?
or if youre not root
|
|
|
08-28-2010, 06:31 PM
|
#5
|
Member
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254
Original Poster
Rep:
|
Quote:
Originally Posted by ncsuapex
What IP/hostname are you using to SSH?
What output do you get when you run this command from a command prompt on your windows machine?
Whats the output when you run this command from the command line on your linux virtual machine?
or if youre not root
|
Please note: I made some changes to the IP Address on the network connections of my Windows machine. But it is not working yet. Here is the output of ipconfig on my Windows machine:
Code:
C:\>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 1.23.144.27
Subnet Mask . . . . . . . . . . . : 255.255.224.0
Default Gateway . . . . . . . . . : 1.23.128.1
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.56.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
C:\>
The first one is being used for connecting to the Internet and the IP address, etc. is being taken from the ISP via its DHCP as you would know.
Code:
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 1.23.144.27
Subnet Mask . . . . . . . . . . . : 255.255.224.0
Default Gateway . . . . . . . . . : 1.23.128.1
So, I can't make changes for the above network connection / ethernet adapter.
And here is the output of ifconfig on my virtual machine (Linux):
Code:
[root@devarishi ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:30:E9:72
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe30:e972/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:656 errors:0 dropped:0 overruns:0 frame:0
TX packets:714 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:451041 (440.4 KiB) TX bytes:122810 (119.9 KiB)
Interrupt:11 Base address:0xd020
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:16436 Metric:1
RX packets:2599 errors:0 dropped:0 overruns:0 frame:0
TX packets:2599 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4905486 (4.6 MiB) TX bytes:4905486 (4.6 MiB)
[root@devarishi ~]#
I am using the same IP address as displayed in the above output, to log-in through ssh on the virtual machine (Linux).
Last edited by Hi_This_is_Dev; 08-28-2010 at 06:36 PM.
|
|
|
08-28-2010, 07:18 PM
|
#6
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
What gateway is being used on your virtual machine?
|
|
|
08-28-2010, 07:43 PM
|
#7
|
Member
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254
Original Poster
Rep:
|
Quote:
Originally Posted by corp769
What gateway is being used on your virtual machine?
|
No Default Gateway value is present there. I have not done any configurations on the Virtual Machine.
I just did this:
Code:
system-config-network
and found that the network adapter eth0 is taking the IP address automatically and all the fields are not filled in, that is they are blanks.
|
|
|
08-29-2010, 11:32 AM
|
#8
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
Post the output of the route command.
on the linux vm
|
|
|
08-30-2010, 06:51 AM
|
#9
|
Member
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254
Original Poster
Rep:
|
Quote:
Originally Posted by ncsuapex
Post the output of the route command.
on the linux vm
|
Hi,
Thanks for the command. I will check it on my PC and tomorrow I will post the output here.
By the way, what does the Destination field denote in the output of
I just checked on a Linux Machine I am accessing from my office.
|
|
|
08-30-2010, 07:48 AM
|
#10
|
Member
Registered: Apr 2009
Location: Perth, Australia
Distribution: Ubuntu/CentOS
Posts: 208
Rep:
|
Using VMWare, change the network adapter on the guest from NAT to Bridged. Then, from your host (windows XP) set your internet interface to 'Shared' from network connections.
Last edited by SuperJediWombat!; 08-30-2010 at 07:50 AM.
|
|
|
08-31-2010, 05:11 PM
|
#11
|
Member
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254
Original Poster
Rep:
|
Quote:
Originally Posted by ncsuapex
Post the output of the route command.
on the linux vm
|
Hi,
Here is the output of the following two commands:
Code:
[root@devarishi ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
[root@devarishi ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:30:E9:72
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe30:e972/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43 errors:0 dropped:0 overruns:0 frame:0
TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4567 (4.4 KiB) TX bytes:11525 (11.2 KiB)
Interrupt:11 Base address:0xd020
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:16436 Metric:1
RX packets:2056 errors:0 dropped:0 overruns:0 frame:0
TX packets:2056 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4286252 (4.0 MiB) TX bytes:4286252 (4.0 MiB)
[root@devarishi ~]#
|
|
|
08-31-2010, 05:15 PM
|
#12
|
Member
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254
Original Poster
Rep:
|
Quote:
Originally Posted by SuperJediWombat!
Using VMWare, change the network adapter on the guest from NAT to Bridged. Then, from your host (windows XP) set your internet interface to 'Shared' from network connections.
|
Hi,
I am using Sun VirtualBox. In the Network section it is mentioned NAT. I am going to shutdown this VM so that I can edit its settings.
The Network guys in my company also suggested me to make it Bridged. So, let me try it now. Thanks!
|
|
|
08-31-2010, 07:40 PM
|
#13
|
Member
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254
Original Poster
Rep:
|
Accessing VirtualBox - Virtual Linux from Host OS
Quote:
Originally Posted by SuperJediWombat!
Using VMWare, change the network adapter on the guest from NAT to Bridged. Then, from your host (windows XP) set your internet interface to 'Shared' from network connections.
|
Hi,
The idea of Bridged has helped me.
I took these steps (I failed but finally succeeded by correcting my steps):
First, I selected two Adapters in Network Connections on Windows XP.
They are:
Microsoft Looback Adapter and VirtualBox Host-Only Adapter
I created a Bridged Network and created a third Adapter out of them.
Second, I changed Network settings to Bridged in the Settings of Virtual OS installed with VirtualBox. I selected the Bridge Network Adapter which I created by selecting the two Adapters.
Thirdly, I assigned an IP to this Bridged Adapter.
Fourth, I restarted the VM and... voil! It took the IP automatically in of the same range as the IP I assigned to the Bridged Adapter.
Finally, I started PUTTY and loged-in through ssh on the VM.
It worked!
|
|
|
08-31-2010, 07:45 PM
|
#14
|
Member
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254
Original Poster
Rep:
|
Friends, now I can ping the VM (Linux) from Host OS (Windows XP). I can ssh to it.
But I am not able to ping the Host OS (Windows XP) from within the VM (Linux).
I am not sure what steps I need to take further.
Besides, my work is not complete yet. I need to do this:
I want to access the Website / Web Pages being hosted on the VM (Linux). It's working fine on the VM. But I can't access it from the Host OS.
Any ideas about it?
|
|
|
09-01-2010, 02:15 AM
|
#15
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
Is the firewall still off, or did you re-enable it? If anything, try disabling both firewalls in linux and windows, and see what it does. If it does nothing, it has to be a routing issue man. Does everything match up between both OS's for the network settings, besides the IP's?
|
|
|
All times are GMT -5. The time now is 05:08 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|