The network layer is responsible for transporting data segments from the sending host to the receiving host. Key functions of the network layer include forwarding, which moves packets through routers, and routing, which determines the path between source and destination. There are two main network architectures: connection-oriented networks using virtual circuits and connectionless networks using datagrams. Routers examine packet headers to perform forwarding and contain input/output ports connected by a switching fabric, as well as a routing processor that maintains routing tables.