The Seductive Pull of 'ifconfig ... media ...'

The ifconfig manpage (FreeBSD 3.1) makes it sound like one should use the 'media' or 'mediatype' options to change amongst the AUI/BNC/10baseT interface options on your combo card. Or at least that's how I read it. This is in fact not the case, and I spent a little over an hour figuring that out this morning. In doing so, I was unable to find and clear resources on the web to help me. Maybe posting this info here will save you some time or hair-pulling.

[Yeah, I know, I should also submit a change to the appropriate man pages to make them clearer. And maybe I'll do that eventually, but I'll have to work out how to Get Involved in FreeBSD first, I suppose.]

Having scanned the 'ifconfig' and 'ep' manpages, I was thinking that the following would work, for instance:

ifconfig ep0 media link1

Of course, it doesn't. It results in an error like:

ifconfig ep0 media link1
ifconfig: SIOCGIFMEDIA: Invalid argument

The correct answer is instead:

ifconfig ep0 link1

Simply pretend that that tempting 'media' option just doesn't exist. ;)

Which finally dawned upon me after searching various mailing list archives, rereading the manpages, and scratching my head for a while. Simple. Hope it helped....

The definitive source for FreeBSD information is, of course I recommend using the website and mailing list search tools there if you have some other configuration problem. Beyond that, there are umpteen newsgroups and mailing lists and a questions-address to which you can email a question if you can't find the right forum in which to ask it.

Jason Campbell, April 1999