LinuxQuestions.org
Visit Jeremy's Blog.
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 02-26-2018, 05:24 AM   #1
sysmicuser
Member
 
Registered: Mar 2010
Posts: 458

Rep: Reputation: 0
Unhappy Internet not available on Guest OS - CentOS 7


Hi Guys,

i am not sure what is the issue is but I'm not getting on my guest despite of all correct configurations.

My network configuration file is below:

Code:
[jim@test1 ~]$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s3 
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
NAME="enp0s3"
UUID="9e228ad9-9a95-42ba-b9ce-363e163cf9e8"
DEVICE="enp0s3"
ONBOOT="yes"
PREFIX=24
GATEWAY=192.168.1.1
NM_CONTROLLED=yes
DNS1=192.168.1.1
Output of ifconfig is below:
Code:
[jim@test1 ~]$ ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:7e:3d:dd:bc  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::a00:27ff:fe4a:4c1c  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:4a:4c:1c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 156  bytes 28296 (27.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 719  bytes 59403 (58.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 719  bytes 59403 (58.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:f5:2d:10  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
What I fail to understand is, routing table does not have a default route. It is clear from the output below:

Code:
[jim@test1 ~]$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
Therefore I cannot access Internet on browser and on command for packages installation.

Code:
[jim@test1 ~]$ ping google.com
ping: google.com: Name or service not known
Network daemon is down and Network Manager is up.
Code:
[jim@test1 ~]$ sudo systemctl status network
[sudo] password for jim: 
● network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
   Active: active (exited) since Mon 2018-02-26 21:36:03 AEDT; 12min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 4491 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)
   Memory: 0B

Feb 26 21:36:03 test1 systemd[1]: Starting LSB: Bring up/down networking...
Feb 26 21:36:03 test1 network[4491]: Bringing up loopback interface:  [  OK  ]
Feb 26 21:36:03 test1 network[4491]: Bringing up interface enp0s3:  [  OK  ]
Feb 26 21:36:03 test1 systemd[1]: Started LSB: Bring up/down networking.
[jim@test1 ~]$ sudo systemctl status NetworkManager
● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-02-26 21:35:33 AEDT; 13min ago
     Docs: man:NetworkManager(8)
 Main PID: 4361 (NetworkManager)
   Memory: 10.7M
   CGroup: /system.slice/NetworkManager.service
           └─4361 /usr/sbin/NetworkManager --no-daemon

Feb 26 21:46:28 test1 dhclient[5638]: DHCPDISCOVER on enp0s3 to 255.255.255.255 port 67 interval 15 (xid=0x5b90cb4f)
Feb 26 21:46:34 test1 NetworkManager[4361]: <warn>  [1519641994.9231] dhcp4 (enp0s3): request timed out
Feb 26 21:46:34 test1 NetworkManager[4361]: <info>  [1519641994.9235] dhcp4 (enp0s3): state changed unknown -> timeout
Feb 26 21:46:34 test1 NetworkManager[4361]: <info>  [1519641994.9293] dhcp4 (enp0s3): canceled DHCP transaction, DHCP client pid 5638
Feb 26 21:46:34 test1 NetworkManager[4361]: <info>  [1519641994.9294] dhcp4 (enp0s3): state changed timeout -> done
Feb 26 21:46:34 test1 NetworkManager[4361]: <info>  [1519641994.9297] device (enp0s3): state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]
Feb 26 21:46:34 test1 NetworkManager[4361]: <info>  [1519641994.9319] manager: NetworkManager state is now CONNECTED_LOCAL
Feb 26 21:46:34 test1 NetworkManager[4361]: <info>  [1519641994.9320] policy: disabling autoconnect for connection 'enp0s3'.
Feb 26 21:46:34 test1 NetworkManager[4361]: <warn>  [1519641994.9323] device (enp0s3): Activation: failed for connection 'enp0s3'
Feb 26 21:46:34 test1 NetworkManager[4361]: <info>  [1519641994.9328] device (enp0s3): state change: failed -> disconnected (reason 'none') [120 30 0]
I just tried to disable NetworkManager and enable network daemon to see if it works.

Code:
[jim@test1 ~]$ sudo systemctl disable NetworkManager
[sudo] password for jim: 
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
[jim@test1 ~]$ sudo systemctl enable network
network.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig network on
[jim@test1 ~]$ sudo systemctl start network
Still no charm !!!
Code:
[jim@test1 ~]$ ping google.com
ping: google.com: Name or service not known
[jim@test1 ~]$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
[jim@test1 ~]$ 

[jim@test1 ~]$
What is the issue ?

I have connected to Host via Bridged mode.

Kindly assist.

Thank you
 
Old 02-26-2018, 05:50 AM   #2
sysmicuser
Member
 
Registered: Mar 2010
Posts: 458

Original Poster
Rep: Reputation: 0
I did NM_CONTROLLED=no and NETMASK=255.255.255.0 in my ifcfg-enp0s3 file and systemctl restart network failed. Then I un-installed dhclient... still no internet...

no clue what I am doing.....
 
Old 02-28-2018, 05:07 PM   #3
sysmicuser
Member
 
Registered: Mar 2010
Posts: 458

Original Poster
Rep: Reputation: 0
Boom ! Issue resolved !!
 
  


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
[SOLVED] CentOS 7 Host and Virtualbox Win 8.1 Guest with Guest Additions Installed Sum1 Linux - Virtualization and Cloud 1 03-26-2015 02:31 PM
Centos 6.3 host+guest: try scp to guest: scp cmd not found. ssh ok chrism01 Linux - Virtualization and Cloud 3 08-24-2012 01:52 AM
Problem installing guest additions on virtualbox Centos 5.5 64bit guest eljay313 Linux - Virtualization and Cloud 1 09-03-2010 08:22 AM
Virtualbox CentOS Guest can not connect to Internet from XP Host sokha Linux - Virtualization and Cloud 2 03-30-2010 11:28 PM
KVM: Mouse under Windows Guest performs way better than under Centos Guest martdj Linux - Virtualization and Cloud 3 03-29-2010 04:20 AM

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

All times are GMT -5. The time now is 08:20 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