The network layer is responsible for delivering packets across multiple networks from source to destination by adding a header containing logical addresses. It provides routing to direct packets through routers to their final destination when independent networks are connected. The transport layer ensures whole messages are delivered intact and in order from specific processes on one computer to specific processes on another by using port addresses and sequencing packets. It can provide connection-oriented or connectionless services and performs error control through retransmissions to ensure reliable end-to-end delivery of data.