Page 1 of 2

Can't ping default gateway

Posted: 2018/01/26 19:03:55
by ReeFaraday
I am just startingto learn and I try for a day and still can't ping my gateway. I hope you guys can help me. I'm using amd athlon ii x3 445 cpu and gigabyte m68mt-d3 motherboard.

/etc/sysconfig/network-scripts
vi ifcfg-enp0s7

TYPE="Ethernet"
BOOTPROTO="static"
IPADDR=192.168.1.245
NETMASK=255.255.255.0
NM_CONTROLLED=no
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="enp0s7"
DEVICE="enp0s7"
ONBOOT="yes"

/etc/sysconfig/network:

NETWORKING=yes
HOSTNAME=centos7
GATEWAY=192.168.1.1

/etc/resolv.conf:

nameserver 8.8.8.8
nameserver 8.8.4.4

ifconfig -a (the enp0s7 interface)

enp0s7: flags=4163<UP, BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.245 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::1ebf:65ff:feb1:d080 prefixlen 64 scopeid 0x20<link>
ether 1c:6f:65:b1:d0:80 txqueuelen 1000 (Ethernet)
RX packets 143 bytes 11508 (11.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 25 bytes 1404 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Re: Can't ping default gateway

Posted: 2018/01/26 21:41:46
by tunk
You could try to put GATEWAY=192.168.1.1 in /etc/sysconfig/network-scripts/ifcfg-enp0s7.

Re: Can't ping default gateway

Posted: 2018/01/28 15:54:44
by ReeFaraday
Hi tunk,

I tried and did a service network restart and still unable to ping

Re: Can't ping default gateway

Posted: 2018/01/28 17:03:42
by TrevorH
Post the output from lspci -nn | grep -i net so that we can see what sort of chipset it is.

Re: Can't ping default gateway

Posted: 2018/02/08 18:45:33
by ReeFaraday
When I run lspci -nn | grep -i net
The output is:

00:07.0 Bridge [0680]: NVIDIA Corporation MCP61 Ethernet [10de:03ef] (rev a2)

Re: Can't ping default gateway

Posted: 2018/02/08 19:03:27
by TrevorH
Right, and since this is CentOS 7 which doesn't have a driver for that card, did you install a package from somewhere else to enable it?

Re: Can't ping default gateway

Posted: 2018/02/09 11:06:29
by ReeFaraday
I install the kmod driver. Does that mean I can't use internet at all? How about if I nic card will it be possible to connect to internet?

Re: Can't ping default gateway

Posted: 2018/02/09 11:07:48
by TrevorH
Which package did you install?

Re: Can't ping default gateway

Posted: 2018/02/09 11:58:49
by ReeFaraday
kmod forcedeth-0.64

Re: Can't ping default gateway

Posted: 2018/02/09 12:48:25
by TrevorH
The latest version is

kmod-forcedeth.x86_64 0.64-3.el7.elrepo elrepo

Is that the one you are using? And what is the output from uname -a ?