Computer Networking:network Layer

Source: Internet
Author: User
Tags switches

Forwarding and routing

2 Important Network-layer functions– forwarding and Routing .

Forwarding: The router-local action of transferring a packet from an input link interface to the appropriate OU Tput Link Interface (within a single router).

Terms ' forwarding ' and ' switching ' are often used interchangeably.

Every router has a forwarding table. A router forwards a packet by examining the value of a field in the arriving packet ' s header, and then using this header V Alue to index into the router ' s forwarding table. The value stored in the forwarding table entry for this header indicates the router ' s outgoing link interface to which tha T packet is to be forwarded.

Routing: The network-wide process that determines the End-to-end paths this packets take from source to Destinati On (involves all of a network ' s routers).

Switches & Routers

Packet Switch: A general packet-switching device, transfer a Packet from input link interface to output link interface, according to the value in a field in the header of the packet.

link-layer Switches: Packet switches that base their forwarding decision on values in the fields of the Link Laye R frame. [Layer 2 devices]

Routers: Packet switches that bases their forwarding decision on the value in the Network layer field. [Layer 3 devices]

Connection Setup

Connection Setup: The process of the routers along the chosen path from source to destination handshaking with EA CH Other in order to set the before Network-layer data packets can begin to flow.

Connection Setup is a another important network-layer function required by some network-layer architectures. (e.g. ATM, Frame Relay, MPLS.)

Network Service Models

Network Service Model: Defines the characteristics of end-to-end transport of packets between sending and Receivi Ng End Systems.

Some possible services, the network layer could provide:

Guaranteed delivery; Guaranteed delivery with bounded delay; In-order packet delivery; Guaranteed minimal bandwidth; Guaranteed maximum jitter; Security Services, etc.

The Internet ' s network layer provides a single service– Best-effort Service .

Virtual Circuit and Datagram network

A Network layer can provide connection and connectionless services between 2 hosts, which has Some parallels with Transport-layer connection-oriented and connectionless services. The crucial differences is:

1) in the network layer, host-to-to Services is provided by the network layer for the transport LAYER;

In the transport layer, process-to-process Services is provided by the transport layer for the application layer .

2) in many major computer network architectures, the network layer provides either a host-to-host connectionl ESS Service or a Host-to-host connection service, but not both.

3) The Transport-layer connection-oriented service is implemented at the edge of the "the" end Syste Ms;

The Network-layer Connection service is implemented in the routers of the network core as well as in the end systems .

Virtual-circuit Network and Datagram network are 2 fundamental classes of computer networks.

Virtual-circuit (VC) networks: Computer Networks a provide service at the network layer. e.g. ATM, Frame Relay.

Datagram Networks: Computer Networks a provide service at the network layer. e.g. the Internet.

Virtual-circuit Networks

Virtual Circuits (VCs): Network-layer connections used in VC networks. A VC consists of (1) a path (a series of links and routers) between the source and destination hosts; (2) VC numbers, one number for each link along the path; (3) entries in the forwarding table with each router along the path.

Each router have number translation in its forwarding table, so-it can replace the VC number of each traversing packet With a new VC number according to the forwarding table.

signaling Messages: The message, the end systems send into the network to initiate or terminate a VC, and the Messages passed between the routers to set up the VC.

signaling Protocols: The protocols used to exchange signaling messages.

e.g. the forwarding table in a VC network router:

When a new VC was established across a router, an entry was added to the forwarding table;

When a VCS terminates, the appropriate entries in each table along its path is removed.

Why a packet doesn ' t just keep the same VC number on each of the links along its route?

1) To reduce the length of the VCs field in the packet header;

2) to simplify VC setup (otherwise the routers has to exchange and process a substantial number of message to agree on a Common VC number).

Each router must maintain connection state information for the ongoing connections.

3 phases in a VC:

1) VC setup:

The sending Transport layer contacts the network layer, specifies the receiver ' s address; -

The network layer determines the path, and the VC number for each link along the path; -

The network adds an entry in the forwarding table with each router along the path.

(The network layer may also reserve resources along the path.)

2) Data Transfer:

Once The VC has been established, packets begin to flow along the VC.

3) VC teardown:

The sender or receiver informs the network layer of its desire to terminate the VC; -

The network layer informs the end system on the other side of the "call termination" and "Update the forwarding tables in EA Ch of the routers on the path to indicate that the VC no longer exists.

Distinction between the VC setup at the network layer and connection setup at the Transport layer:

Transport-layer connection setup involves only the 2 end systems, only the 2 end systems is aware of the Transport-layer Connection.

Network-layer VC Setup involves routers along the path, each router was aware of all the VCs passing through it.

Datagram Networks

In a datagram network, each time an end system wants to send a packet, it stamps the packet with the address of T He destination end system and then pops the packet into the network.

Each router has a forwarding table, maps destination address to link interfaces. When a packet arrives at a router, the router looks up the appropriate output link interface and forward the packet.

The router matches a prefix of the packet ' s destination address with the entries in the table.

When there is multiple matches, the router uses the longest prefix matching rule –to Choose the longest Matchin G entry in the table.

e.g. the forwarding table in a datagram network router

(meaning:)

Inside a router

4 Router Components

Input Ports:

Physical layer function –to terminate an incoming physical link at a router;

link-layer functions –to interoperate with the link layer at the other side of the incoming Link;

Lookup function –to Use the forwarding table to determine the output port, an arriving packet would be Forwar Ded via the switching fabric.

(Control Packets: Packets Carrying routing protocol information, is forwarded from a input port to the routing Processor.)

Switching fabric: through which that packets is switched from a input port to an output port.

Output Ports: stores packet received from the switching fabric and transmit them on the outgoing link (b Y performing Link-layer and physical layer functions).

When a link was bidirectional, an output port would typically be paired with the input port for that link in the same line C Ard.

Line Card: A printed circuit board containing one or more input ports, which are connected to the switching fabric .

Routing Processor :

Executes the routing protocols;

Maintains (updates) routing tables and attached link state information;

Computes the forwarding table for the router;

Performs the network management functions.

The router forwarding plane functions (i.e. the forwarding functions of a router) is always implemented in H Ardware, because they must operate at the nanosecond time Scale–far too fast for software implementation.

The router control plane functions (i.e. the control functions of a router) is always implemented in Softwar e, because they operate at the millisecond or second timescale.

Computer Networking:network Layer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.