Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Hi I am new to this stuff and confused. I have a CentOS VM and I cannot get it to see the outside world. I have a bridged adapter. I have tried NAT and a host only network.

/etc/sysconfig/network:

NETWORKING=yes
HOSTNAME=manager
GATEWAY=10.10.10.1

My ifconfig is below.

[ed@manager ~]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:3A:43:0F
          inet6 addr: fe80::a00:27ff:fe3a:430f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:212 (212.0 b)  TX bytes:468 (468.0 b)

eth1      Link encap:Ethernet  HWaddr 08:00:27:0A:BB:73
          inet addr:192.168.56.102  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe0a:bb73/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1180 (1.1 KiB)  TX bytes:1584 (1.5 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:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:480 (480.0 b)  TX bytes:480 (480.0 b)


cat  /etc/sysconfig/network-scripts/ifcfg*
DEVICE=eth0
HWADDR=08:00:27:3A:43:0F
TYPE=Ethernet
UUID=83736310-e42c-4e8b-9444-d906f99b9dc6
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=dhcp
DEVICE=eth1
HWADDR=08:00:27:0A:BB:73 # confirm your MAC Address of vboxnet0
TYPE=Ethernet
# UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx # Don't change
ONBOOT=yes # no -> yes
NM_CONTROLLED=yes
BOOTPROTO=none # dhcp -> none
# add the following
BROADCAST=192.168.56.255
IPADDR=192.168.56.102
NETMASK=255.255.255.0
NETWORK=192.168.56.0
IPV6INIT=no
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback


[ed@manager ~]$ ping google.com
ping: unknown host google.com
share|improve this question

closed as off-topic by Michael Mrozek Sep 28 '13 at 18:32

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Michael Mrozek
If this question can be reworded to fit the rules in the help center, please edit the question.

    
What IP address range are you using in your network? The VM seems to have the IP address 192.168.56.102, but you've set your gateway to 10.10.10.1... that doesn't seem right, because with that IP address, you have no way to reach that gateway. Which IP does the router with the Internet connection have? Can you ping the router's IP, or any other IP on your network for that matter? –  Martin von Wittich Sep 27 '13 at 19:13
    
Try using bridge mode. –  Keith Sep 28 '13 at 5:07

1 Answer 1

Thanks Martin and Keith , both suggestions seemed to help, as I could then ping my host. But one of my problems was that I did not connect to a network in the VM (I am an idiot).

share|improve this answer
    
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. –  Anthon Sep 28 '13 at 15:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.