Очень нечетное сетевое значение по умолчанию направляет behavour

Я выполняю сервер 16.04 и недавно сделал dist-обновление после перезагрузки, я не мог получить сетевое соединение.

Когда я проверяю с помощью ping-запросов любой домен:

$ ping google.com
ping: unknown host google.com

$  ping 8.8.8.8
connect: Network is unreachable

$ ping 10.1.1.1
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.996 ms

проблемы nslookup

 nslookup google.com
;; connection timed out; no servers could be reached

Но если я указываю маршрут по умолчанию:

$ nslookup 
> server 10.1.1.1
Default server: 10.1.1.1
Address: 10.1.1.1#53
> google.com
Server:         10.1.1.1
Address:        10.1.1.1#53

Non-authoritative answer:
Name:   google.com
Address: 172.217.8.174
Name:   google.com
Address: 172.217.8.174
Name:   google.com
Address: 172.217.8.174

У меня есть 4 интерфейса

eth0      Link encap:Ethernet  HWaddr 52:54:00:5f:9b:74  
          inet addr:10.1.1.250  Bcast:10.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe5f:9b74/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:397 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:19855 (19.8 KB)  TX bytes:1542 (1.5 KB)

eth1      Link encap:Ethernet  HWaddr 52:54:00:93:61:40  
          inet addr:10.1.2.250  Bcast:10.1.2.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe93:6140/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:675 errors:0 dropped:0 overruns:0 frame:0
          TX packets:625 errors:0 dropped:0 overruns:0 carrier:0
          collisions:930 txqueuelen:1000 
          RX bytes:45296 (45.2 KB)  TX bytes:50167 (50.1 KB)

eth2      Link encap:Ethernet  HWaddr 52:54:00:ff:75:4c  
          inet addr:10.1.3.250  Bcast:10.1.3.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:feff:754c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:480 (480.0 B)  TX bytes:648 (648.0 B)

eth3      Link encap:Ethernet  HWaddr 52:54:00:e8:45:8f  
          inet addr:10.1.4.250  Bcast:10.1.4.255  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fee8:458f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:480 (480.0 B)  TX bytes:648 (648.0 B)

/etc/network/interfaces

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
        gateway 10.1.1.1

auto eth1
iface eth1 inet static
        address 10.1.2.250
        netmask 255.255.255.0
        gateway 10.1.1.250


auto eth2 
iface eth2 inet static
        address 10.1.3.250
        netmask 255.255.255.0
        gateway 10.1.1.250

auto eth3
iface eth3 inet static
        address 10.1.4.250
        netmask 255.255.255.0
        gateway 10.1.1.250

Таблица маршрутизации

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.1.1.1        255.255.255.0   UG    0      0        0 eth0
10.1.1.0        *               255.255.255.0   U     0      0        0 eth0
10.1.2.0        *               255.255.255.0   U     0      0        0 eth1
10.1.3.0        *               255.255.255.0   U     0      0        0 eth2
10.1.4.0        *               255.255.255.0   U     0      0        0 eth3
1
задан 15 May 2017 в 11:15

1 ответ

Попробуйте удалить gateway 10.1.1.250 из интерфейсов eth1, eth2 и eth3. Вам они не нужны. Шлюз по умолчанию устанавливается для всех сетей.

1
ответ дан 7 December 2019 в 15:36

Другие вопросы по тегам:

Похожие вопросы: