S
S
Sweetsweetloot2021-07-14 10:41:26
linux
Sweetsweetloot, 2021-07-14 10:41:26

Ubuntu server ping and internet only work when specified, a specific network interface, how to fix this?

in our organization there are 2 subnets, one local, the second with Internet access.
configured netplan:

network:
  ethernets:
    enp8s0:
      dhcp4: true
      link-local: [ipv6]
      dhcp-identifier: mac
      gateway4: 192.168.1.1
      nameservers:
        addresses: [8.8.8.8]
  enp4s0:
    addresses:
    - 192.168.100.4/24
    gateway4: 192.168.100.1
    dhcp-identifier: mac
    link-local: [ipv6]
    version: 2

I checked the connection according to the red hat article, everything works up to step 3 , ping almost does not work,

you have to specify the interface in ping, only in this case it starts to ping normally
ping -I enp8s0 8.8.8.8

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sand, 2021-07-14
@Sweetsweetloot

Leave only 1 gateway

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question