LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Network interface is not coming up in virtual box (https://www.linuxquestions.org/questions/linux-newbie-8/network-interface-is-not-coming-up-in-virtual-box-4175598239/)

linuxmantra 01-25-2017 02:11 PM

Network interface is not coming up in virtual box
 
2 Attachment(s)
I am using Oracle VM virutal box. I created VM with CentOS6.4 and RHEL 6.4 on my laptop running window 7. Problem here is, I network interface is not coming up. I did what ever I have to do to make the interface up, but it is not coming up.
See the attached pictures.


Thanks

jefro 01-25-2017 03:40 PM

This may help http://unix.stackexchange.com/questi...-in-virtualbox

frankbell 01-26-2017 09:06 PM

Quote:

I did what ever I have to do to make the interface up, but it is not coming up.
So what exactly did you do? Knowing what has been tried and hasn't worked is often helpful in figuring out what would work.

How are you networks for the VMs configured in the VirtualBox settings?

What is the output of

Code:

ip addr (or ipconfig -a)
in the VMs?

The more information you provide, the easier it is to help.

Brains 01-26-2017 10:41 PM

Since you mention changing router recently to a dual band router. 5Ghz band does not have great range, great speed if your ISP is fast, but apparently famous for not reaching every room in the house. 2.4Ghz band has great range, and because a lot if ISPs (internet service providers) don't have the greatest speed during peek hours anyway, it can be just as fast as the 5Ghz.
Google "speed test" and try the link to "bandwidth place", wait till the page loads completely before running a test in both bands to see if it's worth using the 5ghz over the 2.4Ghz.

linuxmantra 01-29-2017 11:33 AM

Quote:

Originally Posted by frankbell (Post 5660767)
So what exactly did you do? Knowing what has been tried and hasn't worked is often helpful in figuring out what would work.

How are you networks for the VMs configured in the VirtualBox settings?

What is the output of

Code:

ip addr (or ipconfig -a)
in the VMs?

The more information you provide, the easier it is to help.

FIRST: What I did to bring interface up. Here is what I did.
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=..
HWADDR=..
UUID=...
BOOTPROTO=dhcp
ONBOOT=yes
NM_CONTROLLED=no

- I even changed the MAC add and deleted the file # rm -rf /etc/udev/rules.d/70-persistent.net.rules and restated the system.
-Cleared the lease also and try to get new lease as # dhclient -r # dhclient -v eth0

Here is another thing, When I connect my laptop to Public Library wifi,my VM works fine, No network issues. I checked my router (brand name 'SAGEMCOM') to check whether any rules applied but there is nothing at all.

linuxmantra 01-29-2017 11:36 AM

Quote:

Originally Posted by Brains (Post 5660784)
Since you mention changing router recently to a dual band router. 5Ghz band does not have great range, great speed if your ISP is fast, but apparently famous for not reaching every room in the house. 2.4Ghz band has great range, and because a lot if ISPs (internet service providers) don't have the greatest speed during peek hours anyway, it can be just as fast as the 5Ghz.
Google "speed test" and try the link to "bandwidth place", wait till the page loads completely before running a test in both bands to see if it's worth using the 5ghz over the 2.4Ghz.

Well, it has nothing to do with my VM interface network. I have good connection every where in my room. Issue why VM network interface is failing in my home network while when I use Public Library wifi, everything works fine.

frankbell 01-29-2017 08:27 PM

Quote:

Well, it has nothing to do with my VM interface network. I have good connection every where in my room. Issue why VM network interface is failing in my home network while when I use Public Library wifi, everything works fine.
Just to clarify, when you are at home, does the host machine's internet connection work?

If so, there might be some firewall or port setting, perhaps in your router, that is causing issues. I've not run into any such problems with VB, but this document discusses VB port usage; scroll down to section 6.3.1.

You might also try the traceroute command in the VM at the library, save the results to a file, then do the same at home, and compare the results. Just to be thorough, I'd do it for the host machine as well as for the VM.

Code:

traceroute google.com > [somefile.txt]
will send a traceroute to google and save the output to [somefile.txt]. See man traceroute for more.

That would give you some hint as to where the connection is failing at home.

AwesomeMachine 01-29-2017 11:45 PM

In one of your posts eth0 is managed by Network-manager (NM), but in another reply it isn't. If it's managed by NM, then you should use network-manager to control it. It sounds like a problem with the DHCP server. It's not giving you an IP address.

I would let network-manager handle the interface in the VM and troubleshoot from there.

Jjanel 01-30-2017 02:43 AM

Did you change the VBox default from default NAT, where the guest gets 10.0.2.15?
In the library, what ['category' of] IP address does it get from the DHCP there?
My router [ISP] generally -refuses- to give my (XPhost) VBox clients an IP *when bridged*!

Something 'non-obvious until exposed' is likely going on here. since "it should work".

http://www.dedoimedo.com/computers/v...k-sharing.html

p.s. yes, per #3, more info is always useful, like the [library!]: ip a

linuxmantra 02-04-2017 07:56 PM

Finally, I solved this issues by changing the adaptor to Host-only.. phewwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

linuxmantra 02-04-2017 08:14 PM

1 Attachment(s)
Though I was able to get IP and ssh it via putty. but I can't ping google or download any rpm via internet.

Jjanel 02-04-2017 11:18 PM

http://virtualbox.org/manual/ch06.html#network_hostonly
Quote:

the virtual machines cannot talk to the world outside the host
My 'trick' *with NAT*, is to add "Port Forwarding"
(for [unfortunately] each&every desired host->guest port)
so host 127.0.0.1 port# -> guest 10.0.2.15 port#
(IF >1 guest, I need to do ssh like: 221 -> 10.0.3.15 22)

Oh: PF is 'hiding'! On Adapter#, when NAT selected,
** click-down Advanced; click Port Forwarding **!!

OR, give guest TWO NICs: #1:NAT for Internet; #2:HostOnly to go host->guest

This is all because my ISP (/router) won't give out a DHCP for bridged.
'evil' SAGEMCOM?

Yes, "phewwwwwwww...": this all had me *lost for months* (at first)!


All times are GMT -5. The time now is 02:15 AM.