I intend to use Kickstart to automate the deployment/configuration of CentOS 7.

I am trying to generate an appropriate Kickstart file to pre-configure networking for the operating system, using a basic configuration file from a sample install of the operating system as a reference point.

I am not clear about how the network interface names are constructed, which poses a problem; I need to know what the interface name is/will be on deployment, so I can configure the network settings such as IP address/gateway/subnet mask, etc.

I do however have access to the MAC address information for each of the network cards on the hosts which will have the operating system deployed to them.


Do I have enough information to predict the network interface name and/or is there another approach I should consider?

  • Since you've marked my answer as correct, I assume I must have interpreted your question correctly. Could I ask that you clarify it a little though please, for future visitors to it? – BE77Y Jan 25 '17 at 9:54
  • Yes, since I apparently can predict the device name as I know the hardware when I create the configuration file, the problem is solved. :) – Christoffer Reijer Jan 25 '17 at 10:05
  • OK - I have edited your question myself for clarity for future visitors. Feel free to approve the edit yourself, or make any necessary amendments. – BE77Y Jan 25 '17 at 12:15

OK, so if I interpreted your question correctly, you have a couple of things here to think about.

Firstly: it seems that you are being confused by the new network interface naming nomenclature introduced in CentOS 7. In theory, this nomenclature is actually more predictable than the previous one (just a bit less intuitive/readable).

The naming works as follows (from the Red Hat documentation):

 Two character prefixes based on the type of interface:
   en -- ethernet
   sl -- serial line IP (slip)
   wl -- wlan
   ww -- wwan

 Type of names:
   b<number>                             -- BCMA bus core number
   ccw<name>                             -- CCW bus group name
   o<index>                              -- on-board device index number
   s<slot>[f<function>][d<dev_port>]     -- hotplug slot index number
   x<MAC>                                -- MAC address
                                         -- PCI geographical location
                                         -- USB port number chain

So, you should actually be able to predict the interface name based on knowledge of the board (or to be more basic - if you're using the same board every time, you could just deploy once and see what the interface(s) in question are named to, and use that.

Secondly, you can actually disable this new nomenclature if you so choose, which is actually something which has been covered before in this context here on SF:

You may use the bootloader section in the kickstart file to suppress predictable network interface names.

Adding net.ifnames=0 and [if needed] biosdevname=0 to the --append should do what you're asking.

bootloader --location=mbr --append="net.ifnames=0 biosdevname=0"

However, this is of course just a workaround - it might be a good opportunity to take this prompt to just familiarise yourself with the new nomenclature and how it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.