We aim to implement a new deterministic wavelength conversion algorithm in local area networks (LANs). The network has been studied from a layered approach, and we describe how it can be interpreted as both a trunk network and a LAN. The limitation on the total number of wavelength conversions that a packet can undergo on its path has been addressed. Our algorithm employs online routing methods to attribute intelligence to the network and thus provides an improvement in the call connection probability. © 2004 Optical Society of America.