Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.unix.questions Subject: Re: Getting the Ethernet Address? Keywords: network ethernet interface Message-ID: <22380@mimsy.umd.edu> Date: 8 Feb 90 14:02:11 GMT References: <12763@vicorp.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 25 In article <12763@vicorp.UUCP> patrick@vicorp.UUCP (Patrick Johnstone) writes: >I've been slogging through the Unix manuals trying to find a way to get >the Ethernet address of my system. What makes you think that a system as *an* Ethernet address? We have a number of machines with 2 or more Ethernets, and a few with none (because their underlying network is not Ethernet). >... I'm interested in getting the raw Ethernet address (the one with >format %x:%x:%x:%x:%x:%x). There is no generally-available 4BSD or SunOS ioctl to read an Ethernet address from an interface, but there is a generally-available ioctl to read an ARP address. Hence, if your Ethernet uses ARP to implement Internet address translation, you can bounce a packet off the IP address (forcing an ARP query) and then ask for the ARP entry with SIOCGARP or with /etc/arp. If you have 4.3BSD and run the Xerox NS protocols, the Ethernet address of an interface appears as part of the XNS address. (XNS runs only on Ethernets and things that allow themselves to be addressed as if they were Ethernets.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris