Wireless sensor networks are destined to see widespread adoption in such diverse sectors as industrial process control, health care, and home automation. A WSN is normally constructed from large numbers of low-power, inexpensive sensor devices that are densely embedded in the physical environment, operating together in a wireless network. Being energy constrained, the network environment requires a communication protocol to maximize the lifetime of each node in WSN. Sensor-medium access control (S-MAC) is a contention-based protocol designed specifically for WSN. It's operational principle is based on a periodic cycle, in which nodes take turns to sleep and wake-up to listen for awhile. The focus of this paper is to investigate and implement border nodes, or gateways in S-MAC, using network simulator-2 (ns-2). Border nodes have been previously defined, however, the life cycle of border nodes has not, nor have they been implemented and tested under a simulation package such as ns-2. We introduce the birth and death of border nodes in the implementation of S-MAC. Our simulation results demonstrate that, with border nodes implementation, the network latency is increased at the cost of prolonged network life.