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.
|
|
01-23-2014, 06:59 PM
|
#1
|
Member
Registered: Oct 2003
Posts: 156
Rep:
|
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.
|
|
|
01-24-2014, 10:27 AM
|
#2
|
Member
Registered: Jan 2014
Distribution: CentOS, Fedora, Ubuntu
Posts: 108
Rep:
|
Can to ping to 8.8.8.8?
If you are in bridge mode, can you reach to your gateway IP address?
|
|
|
01-24-2014, 11:13 AM
|
#3
|
Member
Registered: Oct 2003
Posts: 156
Original Poster
Rep:
|
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).
|
|
|
01-24-2014, 11:20 AM
|
#4
|
Member
Registered: Jan 2014
Distribution: CentOS, Fedora, Ubuntu
Posts: 108
Rep:
|
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
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
|
|
|
01-24-2014, 11:20 AM
|
#5
|
Member
Registered: Oct 2003
Posts: 156
Original Poster
Rep:
|
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.
|
|
|
01-24-2014, 11:45 AM
|
#6
|
Member
Registered: Oct 2003
Posts: 156
Original Poster
Rep:
|
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
|
|
|
01-24-2014, 11:49 AM
|
#7
|
Member
Registered: Jan 2014
Distribution: CentOS, Fedora, Ubuntu
Posts: 108
Rep:
|
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.
|
01-24-2014, 12:34 PM
|
#8
|
Member
Registered: Oct 2003
Posts: 156
Original Poster
Rep:
|
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
|
|
|
01-24-2014, 12:43 PM
|
#9
|
Member
Registered: Oct 2003
Posts: 156
Original Poster
Rep:
|
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
|
|
|
01-24-2014, 08:12 PM
|
#10
|
Member
Registered: Jan 2014
Distribution: CentOS, Fedora, Ubuntu
Posts: 108
Rep:
|
Mac OSX Host - RHEL 6.4 Guest - Virtual Box can't talk to network
cool. glad to hear that.
|
|
|
All times are GMT -5. The time now is 04:48 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
|
|