How to know the network name

Little Girl littlergirl at gmail.com
Sun Oct 24 02:58:22 UTC 2021


Hey there,

Jerry Geis wrote:
>Little Girl wrote:
  
>> ip address | grep "BROADCAST" | cut -d' ' -f2 | cut -d':' -f1

>This is useful "after" ubuntu is installed...  I am "converting" a
>centOS machine with network names like eth0 and eth1 - which is what
>your command prints to the screen.

Yes, it prints the current network name.

>I need to know a command I can run on CentOS that will tell me what
>the ubuntu netowrk name will be bill.

I'm pretty certain this can't be done or wouldn't be reliable. Even
though the new naming convention solves some issues that the previous
one suffered from, there are still ranges of firmware index numbers
and hotplug slot numbers that are available for use and you'd need to
know which PCI slot the adapter is in (see the link Colin Law
provided in an earlier message in this thread). Last, but not least,
if the information needed for the new naming convention is invalid or
disabled, then the former eth network names can be used, and there's
also  a range for those. If you can use wildcards in your command,
that would probably work best.

>like in this case I did manually eth0 gets renamed to ens3 or eth1
>gets renames to ens4. I need to build that Ubuntu grub kernel
>install line with the correct network name so when I reboot from
>centos into ubuntu - hte correct network name is given.

If that's a reliably repeatable pattern, you could use it to derive
the potential future network name from the existing network name. I'm
not sure if it is, though.

-- 
Little Girl

There is no spoon.




More information about the ubuntu-users mailing list