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 01-23-2014, 06:59 PM   #1
boyd98
Member
 
Registered: Oct 2003
Posts: 156

Rep: Reputation: 15
Mac OSX Host - RHEL 6.4 Guest - Virtual Box can't talk to network


This was working, so I'm not sure what I broke.

I can't seem to talk to the outside world with my RHEL guest.

root@app01 network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=08:00:27:9F:E5:14
ONBOOT=yes
[root@app01 network-scripts]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:9F:E5:14
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe9f:e514/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1065 errors:0 dropped:0 overruns:0 frame:0
TX packets:859 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:88823 (86.7 KiB) TX bytes:101171 (98.7 KiB)

[root@app01 network-scripts]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 192.168.2.38
nameserver 192.168.2.46
nameserver 192.168.2.246

DHCP is giving me a 10. address
resolv.conf is populating correctly

I can't ping by IP, 192.168.2.38
and I can't resolve DNS names, but I think that's because i can't communicate with the DNS server.

Any thoughts are appreciated- I'm stumped

Tried using BRIDGE mode, but worked as NAT before and Bridged mode produces the same exact results.
 
Old 01-24-2014, 10:27 AM   #2
myatthu
Member
 
Registered: Jan 2014
Distribution: CentOS, Fedora, Ubuntu
Posts: 108

Rep: Reputation: 18
Can to ping to 8.8.8.8?
If you are in bridge mode, can you reach to your gateway IP address?
 
Old 01-24-2014, 11:13 AM   #3
boyd98
Member
 
Registered: Oct 2003
Posts: 156

Original Poster
Rep: Reputation: 15
Thanks for the reply.

I can't ping 8.8.8.8 from NAT or BRIDGE mode.

In Bridge Mode, I obtained my gateway from route -n, and was able to successfully ping it. Although, on boot into bridge mode, I can no longer ssh to the localhost using port forwarding. (not sure how, if any, that's related).
 
Old 01-24-2014, 11:20 AM   #4
myatthu
Member
 
Registered: Jan 2014
Distribution: CentOS, Fedora, Ubuntu
Posts: 108

Rep: Reputation: 18
Although I am a bit confuse, based on your previous post.
inet addr:10.0.2.15 Bcast:10.0.2.255
your gateway ip should be 10.0.2.2
Code:
netstat -nr
and post the output here.
If you are using bridge, your network should be different.Can you also post output of
Code:
ifconfig
netstat -nr
 
Old 01-24-2014, 11:20 AM   #5
boyd98
Member
 
Registered: Oct 2003
Posts: 156

Original Poster
Rep: Reputation: 15
Also in Bridge Mode,

I can ping my host from my guest. But i can't ping the DNS server with my guest, where as with my host I can.
 
Old 01-24-2014, 11:45 AM   #6
boyd98
Member
 
Registered: Oct 2003
Posts: 156

Original Poster
Rep: Reputation: 15
Sorry, the first time, I'm thinking my NAT must have chose my wireless connection (which i intented to have off for troubleshooting purposes.)

When I chose bridge mode this time, I forced it to pick my wired connection.

[root@app01 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:9F:E5:14
inet addr:10.32.120.128 Bcast:10.32.121.255 Mask:255.255.254.0
inet6 addr: fe80::a00:27ff:fe9f:e514/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20163 errors:0 dropped:0 overruns:0 frame:0
TX packets:243 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2032369 (1.9 MiB) TX bytes:26399 (25.7 KiB)

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:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10482 (10.2 KiB) TX bytes:10482 (10.2 KiB)

[root@app01 ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.32.120.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0

[root@app01 ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 192.168.2.38
nameserver 192.168.2.46
nameserver 192.168.2.246
 
Old 01-24-2014, 11:49 AM   #7
myatthu
Member
 
Registered: Jan 2014
Distribution: CentOS, Fedora, Ubuntu
Posts: 108

Rep: Reputation: 18
Obviously, you don't have proper gateway IP
[root@app01 ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.32.120.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0

Since you are using Mac OS, Can you run netstat -nr at your Mac and give output
 
1 members found this post helpful.
Old 01-24-2014, 12:34 PM   #8
boyd98
Member
 
Registered: Oct 2003
Posts: 156

Original Poster
Rep: Reputation: 15
This is from my mac terminal:

Internet:
Destination Gateway Flags Refs Use Netif Expire
default 10.32.120.1 UGSc 34 3 en0 #### Wired
default 10.138.112.1 UGScI 1 0 en1 #### Wireless
 
Old 01-24-2014, 12:43 PM   #9
boyd98
Member
 
Registered: Oct 2003
Posts: 156

Original Poster
Rep: Reputation: 15
Ugg -

Thanks man.

I forgot i was initially building this VM as part of an internal cluster.

I had my default gateway set wrong in my /etc/sysconfig/network file -

Removed it, restarted and working like a champ.

Thanks again - rep'd
 
Old 01-24-2014, 08:12 PM   #10
myatthu
Member
 
Registered: Jan 2014
Distribution: CentOS, Fedora, Ubuntu
Posts: 108

Rep: Reputation: 18
Mac OSX Host - RHEL 6.4 Guest - Virtual Box can't talk to network

cool. glad to hear that.
 
  


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
VirtualBox - Mac Host, RHEL 6.4 Guest boyd98 Linux - Software 6 12-30-2013 03:57 PM
Linux host with windows guest virtual box Hioushi Linux - Virtualization and Cloud 8 02-17-2011 06:35 PM
How to log in as root in Guest OS Linux Mint on host Windows Vista using virtual box apanimesh061 Linux - Software 3 11-01-2010 01:03 PM
Virtual box guest additions gone when host os is restarted / cold boot hottdogg Linux - Virtualization and Cloud 3 01-21-2010 11:01 PM
windows7 host, virtual box linux guest, trying to do samba glorsplitz Linux - Networking 5 12-29-2009 08:52 PM

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

All times are GMT -5. The time now is 04:48 PM.

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