상세 컨텐츠

본문 제목

Ifconfig Command For Mac

카테고리 없음

by ranmateto1988 2020. 2. 17. 12:08

본문

  1. Ifconfig Command Mac Os X

The ifconfig utility is used to assign an address to a network interface and/or. This can be used to e.g. Set a new MAC address on an ethernet interface, though. Of having its ethernet address reprogrammed, the bonddev command will fail.

Mac

Ifconfig Command Mac Os X

It is a matter of 'how do you get that information', assuming it is available. All the drivers for the network cards will know how to do this, but like I describe below, the information is read then stored, and if that gets overwritten later, then that's it - gone. You could add some code to each driver, but that would be a lot of work, and almost certain not to get into the Linux kernel, so you'd forever carry a patch for every network driver available - that would be rather a lot of effort to maintain. – Feb 19 '13 at 11:41. The only way to find the original MAC address is to use the same method the network card driver does - unfortunately, I don't believe there is a generic way to tell the driver to provide it's MAC address 'as provided by the hardware'. Of course, there are cases where there isn't a hardware network card for that particular interface - virtual network drivers for virtualization and when using bridges and software switches for example.

And of course, the hardware may be such that you can't actually read the 'original' MAC address when it has been overwritten by software, because there is only one set of registers for the MAC address itself. I had a quick look at the pcnet32.c drivers (because it's one of the models of network card that I have a rough idea how it works and where the different registers are, etc, so I can see what it does). As far as I can see, it supports no method of actually asking 'what is your PROM ethernet address' - the MAC address is read out during the 'probe1' section of the module initialization, and stored away. No further access to those hardware registers is made.