N
N
Nikolay2019-01-25 16:16:07
linux
Nikolay, 2019-01-25 16:16:07

How to fix the lack of Internet (LAN is present)?

Installed Debian - everything is fine (there was Internet), set up packages for little things (ssh, samba), transferred the system unit to the server room, plugged it into another port - the Internet was gone. Lokalka responds and is seen well.
The port is working - I tried to connect a laptop - the Internet is excellent.

ifconfig
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.2  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::224:1dff:fe3d:b3d1  prefixlen 64  scopeid 0x20<link>
        ether 00:24:1d:3d:b3:d1  txqueuelen 1000  (Ethernet)
        RX packets 3333  bytes 573428 (559.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1981  bytes 572835 (559.4 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 5  bytes 480 (480.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5  bytes 480 (480.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
/etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp2s0
/etc/network/interfaces.d/enp2s0
iface enp2s0 inet static
   address 192.168.0.2
   netmask 255.255.255.0
   getaway 192.168.0.1
systemctl status networking.service
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: active (exited) since Fri 2019-01-25 15:58:58 MSK; 9min ago
     Docs: man:interfaces(5)
  Process: 377 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
  Process: 374 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment 
 Main PID: 377 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/networking.service

янв 25 15:58:57 mserver systemd[1]: Starting Raise network interfaces...
янв 25 15:58:58 mserver systemd[1]: Started Raise network interfaces.
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:24:1d:3d:b3:d1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.2/24 brd 192.168.0.255 scope global enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::224:1dff:fe3d:b3d1/64 scope link 
       valid_lft forever preferred_lft forever
3: enp3s1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 14:d6:4d:54:14:01 brd ff:ff:ff:ff:ff:ff
ip r
192.168.0.0/24 dev enp2s0 proto kernel scope link src 192.168.0.2

ping 8.8.8.8Responds to the request connect: Сеть недоступна
In administration, he is not very strong, please tell me what to do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitsliputsli, 2019-01-25
@iNickolay

Judging by ip r there is no gateway for the Internet. Probably because the word gateway is incorrectly specified in /etc/network/interfaces.d/enp2s0.
But it is not clear why it worked ... Maybe the gateway was manually registered and it worked until the first reboot?

F
frundrwood, 2019-01-26
@frundrwood

Perhaps the port is in a different VLAN.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question