On Thu, May 16, 2019 at 12:44 PM Ed Greshko <ed.greshko(a)greshko.com> wrote:
On 5/16/19 4:40 AM, Alex wrote:
>
> Typically NAME and DEVICE are the name of the device, like enp4s6,
> but they don't exist in this config. Is that what is missing?
Doubtful.
I have a system with a ifcfg-enp0s3 file and NAME=LAN-1 and
everthing works just fine.
But "DEVICE=..." would have to be ""DEVICE=enp4s6" if the NIC is
"enp4s6", especially if there's no "HWADDR=...".
If you set "DEVICE=enp4s6" in "ifcfg-foo", "enp4s6" will be
configured
and brought up. The ifcfg file name isn't used.
If you set "NAME=bar", you can run "if{up,down} bar" and "nmcli
<cmd>
... bar", but "ip {l,a,r}" will display "enp4s6".
If I have "enp4s6", I set "DEVICE=enp4s6" and "NAME=enp4s6"
in
"ifcfg-enp4s6", so that everything corresponds and "ip a sh enp4s6"
and "nmcli c sh enp4s6" are possible and correspond to the same NIC.
Going back to OP's original query, do you have more than one NIC? Do
their ifcfg files both have "DEFROUTE=yes"? What's the output of "ip
r" (or "route") before you run "route add default gw 192.168.9.1 dev
enp4s6".