Contribute
Register

What defines the interface name in OS X?

Status
Not open for further replies.
Joined
Dec 9, 2011
Messages
91
Mac
  1. 0
Classic Mac
  1. 0
Mobile Phone
  1. 0
Hi all.

I'm curious about how OS X (Yosemite in my case) defines the interface name for each network interface. I saw today that in my hack the Ethernet port is called "Ethernet 1", and this is not because there are two duplicate services, the actual interface is called "Ethernet 1". I erased /Library/Preferences/SystemConfiguration/com.NetworkInterfaces.plist and /Library/Preferences/SystemConfiguration/preferences.plist to see if it reverted back to "Ethernet", but nothing changed.

So, what defines the interface name? The driver?
 
Hi all.

I'm curious about how OS X (Yosemite in my case) defines the interface name for each network interface. I saw today that in my hack the Ethernet port is called "Ethernet 1", and this is not because there are two duplicate services, the actual interface is called "Ethernet 1". I erased /Library/Preferences/SystemConfiguration/com.NetworkInterfaces.plist and /Library/Preferences/SystemConfiguration/preferences.plist to see if it reverted back to "Ethernet", but nothing changed.

So, what defines the interface name? The driver?

You can name it whatever you like in SysPrefs->Network.
 
You can name it whatever you like in SysPrefs->Network.

Yes, and I've done that. But this is what I mean:

130357-sshot.png


Interface name is "Ethernet 1", that name can't be changed. That's the name I'm referring to.

Thanks!
 
Last edited by a moderator:
Yes, and I've done that. But this is what I mean:

130357-sshot.png


Interface name is "Ethernet 1", that name can't be changed. That's the name I'm referring to.

Thanks!

Try resetting the network interfaces. To do that, go into SysPrefs->Network and remove all interfaces, Apply, then remove /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist. Reboot, then add all your network interfaces back, starting with Ethernet.
 
Last edited by a moderator:
Try resetting the network interfaces. To do that, go into SysPrefs->Network and remove all interfaces, Apply, then remove /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist. Reboot, then add all your network interfaces back, starting with Ethernet.

Tried that twice with no changes. Tried to delete all interfaces, reboot and then define them but the interface name stays the same.

I also tried booting up the installation media from a USB and injecting with Clover the Ethernet driver.
Executing networksetup -listallhardwareports also showed "Ethernet 1".
 
Tried that twice with no changes. Tried to delete all interfaces, reboot and then define them but the interface name stays the same.

I also tried booting up the installation media from a USB and injecting with Clover the Ethernet driver.
Executing networksetup -listallhardwareports also showed "Ethernet 1".

Post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html

Note: On my machine the service name is editable. The interface name is assigned by the system depending on type and number of devices with that type.
 
Post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html

Note: On my machine the service name is editable. The interface name is assigned by the system depending on type and number of devices with that type.

I discovered what was causing the name to show "Ethernet 1".

My DSDT has a _DSM patch for the Ethernet Device which I used from the PJALM repo for ASRock motherboards.
The code for the method is as follows:

Code:
Method (_DSM, 4, NotSerialized)
{
    Store (Package (0x0C)
        {
            "AAPL,slot-name", 
            "Built In", 
            "name", 
            "Intel Ethernet Controller", 
            "model", 
            "Intel I217-V Gigabit Network Controller", 
            "device_type", 
            Buffer (0x14)
            {
                "Ethernet Controller"
            }, 

            "built-in", 
            Buffer (One)
            {
                0x01
            }, 

            "location", 
            Buffer (0x02)
            {
                "1"
            }
        }, Local0)
    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
    Return (Local0)
}

Removing the "location" section fixed the problem. I had no idea that was defined in there, and its something I didn't knew, one can partially customize the interface name from the DSDT :)
 
I discovered what was causing the name to show "Ethernet 1".

My DSDT has a _DSM patch for the Ethernet Device which I used from the PJALM repo for ASRock motherboards.
The code for the method is as follows:

Code:
Method (_DSM, 4, NotSerialized)
{
    Store (Package (0x0C)
        {
            "AAPL,slot-name", 
            "Built In", 
            "name", 
            "Intel Ethernet Controller", 
            "model", 
            "Intel I217-V Gigabit Network Controller", 
            "device_type", 
            Buffer (0x14)
            {
                "Ethernet Controller"
            }, 

            "built-in", 
            Buffer (One)
            {
                0x01
            }, 

            "location", 
            Buffer (0x02)
            {
                "1"
            }
        }, Local0)
    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
    Return (Local0)
}

Removing the "location" section fixed the problem. I had no idea that was defined in there, and its something I didn't knew, one can partially customize the interface name from the DSDT :)

I assumed it was something you were doing in DSDT... thus why I asked for ioreg (you can see such injections that come from DSDT in ioreg).
 
Status
Not open for further replies.
Back
Top