Computer Network basic knowledge Note (i)

Source: Internet
Author: User

The network layer of TCP/IP architecture

Important elements of this chapter are:

1) Virtual internetwork Concept

2) The relationship between the IP address and the physical address

3) IP address classification and routing between non-categorical domains CIDR

4) How the routing protocol works

Question: What service does the network layer provide for the transport layer (connection-oriented or no connection)? Who should be responsible for the reliable delivery? Network or end system?

Telecommunications network (Virtual Circuit services: first establish a connection).

Internet design ideas: The network layer to provide simple and flexible, no connection, gold and large efforts to deliver the datagram service. Commitment not to provide quality of service. If the process between the hosts requires reliable communication, there is a transport layer in the network host (Error analysis, flow control).

Question: How does the network layer deliver IP datagrams?

Protocol for the Network layer (IP/ARP/RARP/ICMP/IGMP)

What is a virtual internetwork?

The advantage of using a virtual interconnect network is that when a host on the Internet communicates, it is as if it were communicating on a network, and the specific network heterogeneous details of the interconnect are not visible.

Connecting the network to each other requires the use of some intermediary equipment, according to the level of the intermediary equipment, can be divided into forwarders (physical layer), Network Bridge (data link layer), Router (IP layer), network card (above).

Network Interconnect network interconnection and routing for routers.

IP address (RFC791)/32-bit identifier

IP addresses are addressed through three stages:

1) IP address of the classification:: = {< network number;, < host number;}

2) Sub-network division

3) make up the super net
  

  

Better meet the needs of different users.

An IP address is a hierarchical address structure. The benefits of a two-tier rating are:

First, the IP Address management agency assigns only the network number when assigning the IP address, and the remaining host number is allocated by the unit that obtains the network number. This facilitates the management of IP addresses.

Second, routers only forward packets based on the network number that the destination host is connected to (regardless of the destination host number), so that the number of items in the routing table can be significantly reduced, thereby reducing the storage space occupied by the routing table.

The IP address is actually an interface that flags a host (or router) and a link.

When a host is connected to two networks at the same time, the host must have two corresponding IP addresses, and the network number Net-id must be different. This host is called a multi-homed host (multihomed host).

Because a router should be connected to at least two networks (so that it can forward IP datagrams from one network to another), a router should have at least two different IP addresses.

IP Address and hardware address
  

Looking at the flow of data from the level of the Protocol stack

Address Resolution Protocol (ARP) and Inverse Address Resolution protocol (RARP: included in the DHCP protocol, not discussed)

Regardless of the protocol used by the network layer, the hardware address must eventually be used when transferring data frames on the actual network link. Each host has an ARP cache (ARP cache), which has a map of the IP addresses of each host and router on the local area network to the hardware address. When host a wants to send an IP datagram to a host B on the local area network, it first looks at the IP address of Host B in its ARP cache. If so, you can find out its corresponding hardware address, then write this hardware address to Mac frame, and then send the Mac frame to this hardware address over the LAN.

It is also possible to not find the IP address of Host B:

The role of the ARP cache

To reduce traffic on the network, when host A sends its ARP request groupings, it writes its own IP address to the hardware address map to the ARP request group. When Host B receives a packet of ARP requests, the address mapping for host A is written to Host B's own ARP cache. This is more convenient for host B to send the data to A later.

ARP is a mapping problem that resolves the IP address and hardware address of a host or router on the same LAN. If the host you are looking for is not on the same LAN as the source host, it is necessary to find the hardware address of a router on the local area network through ARP, and then send the packet to this router so that the router forwards the packet to the next network. The rest of the work is done by the next network. the resolution from the IP address to the hardware address is automatic, and the user of the host is unaware of this address resolution process. The ARP protocol automatically resolves the IP address to the hardware address required by the link layer as long as the host or router communicates with the host or router of another known IP address on the network.

Four typical cases of using ARP (... )

Why don't we use the hardware address directly to communicate?

Because there are a wide variety of networks around the world, they use different hardware addresses. To enable these heterogeneous networks to communicate with each other requires very complex hardware address translation work, which is almost impossible. Hosts connected to the Internet have a unified IP address, and communication between them is as easy as connecting to the same network, because invoking ARP to find the hardware address of a router or host is done automatically by the computer software, which is invisible to the user.

Format of IP datagrams

  

Computer Network basic knowledge Note (i)

Related Article

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.