A method and system for automatically detecting a wide area network (WAN)
communication connection to a selected one of a plurality of
substantially equivalent communication ports. An initiation event, such
as a link detect or a power on event, is detected for the selected port.
An attempt is then made to access the WAN through the selected port. For
example, an Internet connection request may be sent through the selected
port. If a response is received through the selected port, the response
is evaluated to determine if the attempt to access the WAN was
successful. If the attempt was successful, the selected port is set as
the WAN communication connection. Otherwise, the selected port is set as
a local area network communication connection. Preferably, the dynamic
WAN port detection is performed by a network device, such as a gateway,
or by a computer in communication with a network device.