I know there’s a page on the Red Hat website that explains the new network device names and how they’re created. But, for me, a concrete example that I worked with is always much better. I set up a new server yesterday and had some issues with a fiber network card, so I thought I’d write up what I learned.

The system has two built-in ethernet cards and I added a fiber card as well. The first thing I want to mention is that this server has space for two cpus, but we’re only using one. And on my first attempt at adding the fiber card, I put it in a slot that was for things for cpu2, which we’re not using. After I moved the card to a slot for cpu1, it showed up. So here is the info on my cards:

`

lspci|grep Eth

65:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
b5:00.0 Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GBASE-T (rev 09)
b5:00.1 Ethernet controller: Intel Corporation Ethernet Connection X722 for 10GBASE-T (rev 09)
`

The Realtek card is the fiber one and the other two are built in. Note the numbers for the built-in cards, b5:00.0 and b5:00.1. This number is the basis for how the device names are made. If you convert b5 from hex to decimal, you get 181. Now if I look in /etc/sysconfig/network-scripts, I see two device files: ifcfg-enp181s0f0 and ifcfg-enp181s0f1. These devices all start with en. Then they’re followed by the numbers from the lspci command.

enp#s#f#

For b5:00.0, the p is b5 in decimal, the s is 00 (though you only need one 0) and since there are two cards .0 and .1, add the f with 0 or 1.

Now the device for my fiber card didn’t show up. But if I want to make my own device, I can. The hex number 65 in decimal is 101. So I created enp101s0. I don’t need the f because there’s only one card here. And I created the file /etc/sysconfig/network-scripts/ifcfg-enp101s0 with the information needed for the fiber card.

The other thing that I needed to do is to assign the mac address of the card to that device. I ran this command:

`

ifconfig enp101s0 hw ether aa:bb:cc:dd:ee:ff

ifup enp101s0

`

I found a number on the actual card that is the length of the mac address, so I used that in my command. After the ifup command, the card showed with the ifconfig command.

The big question was did it work. Right now, I don’t know. I didn’t have a fiber cable to test things out. I hope that next week the student who is using this card will get back to me and let me know how things go.

My other issue is that this card doesn’t come up automatically at boot. I’m not sure why I have to manually assign the hw address to it with the ifconfig command. This makes me think that perhaps I did something wrong as there’s no reason for it not to come up automatically. I’ll find out next week when things are actually set up so I can test it.