IPv4 protocol NAT and CIDR protocol agreement

background:

  32-bit IPv4 addresses, each host and a router 32-bit globally unique identifier, i.e. the IPv4 address, such as 192.168.10.1.

  IPv4 addresses are the traditional classification, ABCDE divided into five categories, each IP address is divided into two parts, a network number and host number .

  A network ID uniquely identifies the network, host number identifies the host and the host ID is unique in the network to which it belongs, but the host may be the same number in multiple networks.

  IPv4 address salient features:

    1. IP address management means in the allocation of an IP address, just assigned network number and the host number is divided by the units themselves.

    2. The router forwards the packet is an IP address according to the network number (host ID is not considered), select a network, the routing table space.

    3. IP address is a host (router) and a link interface, connected to a plurality of network routers, each router has a port IP address, so that it has at least two IP addresses .

    4. The same network host IP address will be the same network number, host number will be different .

    

IPv4 address exhaustion solution to the problem:

  1. the NAT network address translation protocol , maps many relationship, i.e., a public IP address for multiple private IP address, logical extension number of IP addresses,

   While hiding internal network structure, reducing the risk of network attack.

 

  2. CIDR no inter-Domain Routing Protocol

    1. Elimination of the traditional type of network address ABC is divided , using the network prefix instead of the concept of subnets, IP address network prefix = {,} host number, such as: 201.10.20.3/20.

    2. The same continuous network prefix of IP addresses the CIDR address block , called route aggregation network or ultra configured such that a CIDR address block may represent a plurality of addresses,

     Reduce the routing table entry, improve network performance.

      Such as network 1: 201.1.0.0/17 and Network 2: 201.1.128.1/17 constituting the address blocks: 201.1.0.0/17, only this time an entry of the router.

       3. The longest prefix match principle , when searching the routing table, there may be a plurality of matching results (network prefix, the next address), then select the network entry with the longest prefix,

     It is the smallest block address, and therefore the most specific route.

  

    

 

Guess you like

Origin www.cnblogs.com/yangwu-183/p/12605859.html