Short answer, depends on the protocols available on the L2 host.
Every Layer 2 protocol family has some means to advertise/discover the MACs of the systems on the lan. This is usually done by Broadcast, as HeavyD mentioned, and the technique is used in ARP.
Back in the old days (when your question was pertinent), the only people who performed network related tasks like these were the network admins, who could as easily read the MAC off the sticker on the router/bridge when doing things like setting up spanning trees, or other non-routed multi-segmented LANs. you will either have to rely on a name-mapping protocol (like old-school NetBUI, which relies on broadcasts in case your interested), or configure them by hand.
You could always use the Ethernet broadcast address (FF:FF:FF:FF:FF:FF) if you don't know the actual MAC.
This is actually how ARP works, the request is sent out to the broadcast address then the host that has the IP being requested responds with its own MAC. If using the broadcast exclusively is not a viable option you'll need to implement a protocol similar to ARP to discover the host.
|show 2 more comments|
If it doesn't support IPv4, it doesn't need the IPv4 router's MAC address.
If it doesn't even know what IPv4 is, how could it know what an IPv4 router even is? Why would it ever need to talk to the IPv4 router?
It's important to realize that the "router" you think about on your LAN is actually an IPv4 concept, up at the Network Layer (layer 3). There's no such thing as an "Ethernet-layer router"; inter-network routing is a Network-layer (layer 3) task. At the Ethernet layer, there could be a "forwarding path" through multiple switches (technically called "bridges") on the network, but that kind of Ethernet-layer path finding is called "switching" or "bridging", not "routing". When using precise terminology, we reserve the term "routing" for something that layer-3 devices do.
If a host supports some other routable layer-3 protocol, it will find that protocol's layer-3 router using protocols defined by that other routable layer-3 protocol.
For example, IPv6 uses a different EtherType (Ethernet protocol ID number) than IPv4. IPv4 uses 0x0800, whereas IPv6 uses 0x86dd. IPv6 hosts use IPv6's Neighbor Discovery Protocol (NDP) to find MAC addresses of their neighboring hosts and routers on the same Ethernet LAN. NDP is built on ICMPv6, which of course is built on IPv6.
As another example, AppleTalk was Apple's proprietary protocol stack for Macs in the 80's and 90's before TCP/IP took over. AppleTalk's Network layer (layer 3) was called DDP (Datagram Delivery Protocol). AppleTalk hosts found their DDP routers via the AppleTalk Address Resolution Protocol (AARP), EtherType 0x80f3.
Someone else could probably give you examples of how similar things were accomplished with all the 80's and 90's proprietary protocol stacks that TCP/IP eventually vanquished: Novell IPX/SPX, Banyan VINES, DECnet, etc.
The few non-IPv4/ARP/IPv6 Ethernet-based protocols still in use today are generally not directly routable beyond the edge of the current Ethernet LAN, and thus don't need to find any layer-3 routers. PPPoE, 802.1X (EAPOL), and 802.1D Spanning Tree Protocol (STP) spring to mind. PPPoE finds PPPoE Access Concentrators (servers) and their MAC addresses via a broadcast-based protocol called PPPoE Active Discovery (PAD). 802.1X and STP just multicast their packets to special multicast MAC addresses that were specified and reserved by the IEEE for those protocols' purposes.