No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 12

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Principles

Principles

This section describes the implementation of IPv4.

IPv4 Protocol Suite

Internet Protocol Version 4 (IPv4) is the core protocol in the TCP/IP protocol suite. IPv4 protocol suite includes Address Resolution Protocol (ARP), Reverse Address Resolution Protocol (RARP), Internet Control Message Protocol (ICMP), Transmission Control Protocol (TCP), and User Datagram Protocol (UDP).

Figure 6-1 IPv4 protocol suite

As shown in Figure 6-1, ARP and RARP work between the data link layer and the network layer for address resolution. ICMP works between the network layer and the transport layer to ensure correct forwarding of IP datagrams.

ARP

ARP maps an IP address to a MAC address. ARP can be implemented in dynamic or static mode. ARP provides some extended functions, such as proxy ARP, gratuitous ARP, ARP security, and ARP-Ping.

RARP

RARP maps a MAC address to an IP address.

ICMP

ICMP works at the network layer to ensure correct forwarding of IP datagrams. ICMP allows hosts and devices to report errors during packet transmission. An ICMP message is encapsulated in an IP datagram as the data, and a header is added to the ICMP message to form an IP datagram.

IPv4 Address

To connect a PC to the Internet, you need to apply an IP address from the Internet Service Provider (ISP).

An IP address is a numerical label assigned to each device on a computer network. An IPv4 address is a 32-bit binary number. IPv4 addresses are expressed in dotted decimal notation, which helps you memorize and identify them. In dotted decimal notation, an IPv4 address is written as four decimal numbers, one for each byte of the address. For example, the binary IPv4 address 00001010 00000001 00000001 00000010 is written as 10.1.1.2 in dotted decimal notation.

An IPv4 address consists of two parts:

  • Network ID (Net-id): The network ID identifies a network.

  • Host ID (Host-id): The host ID identifies different hosts on a network. Network devices with the same network ID are located on the same network, regardless of their physical locations.

Characteristics of IPv4 Addresses

IPv4 addresses have the following characteristics:

  • IP addresses do not show any geographical information. The network ID represents the network to which a host belongs.

  • When a host connects to two networks simultaneously, it must have two IP addresses with different network IDs. In this case, the host is called a multihomed host.

  • Networks allocated with the network ID are in the same class.

IPv4 Address Classification

As shown in Figure 6-2, IP addresses are classified into five classes to facilitate IP address management and networking.

Figure 6-2 Five classes of IP addresses

At present, most IP addresses in use belong to Class A, Class B, or Class C. Class D addresses are multicast addresses and Class E addresses are reserved. The easiest way to determine the class of an IP address is to check the first bits in its network ID. The class fields of Class A, Class B, Class C, Class D, and Class E are binary digits 0, 10, 110, 1110, and 1111 respectively. For details about IP address classification, see RFC 1166.

Certain IP addresses are reserved, and they cannot be allocated to users. Table 6-1 lists the ranges of IP addresses for the five classes.

Table 6-1 IP address classes and ranges

Class

Range

Description

A

0.0.0.0 to 127.255.255.255

IP addresses with all-0 host IDs are network addresses and are used for network routing. IP addresses with all-1 host IDs are broadcast addresses and are used for broadcasting packets to all hosts on the network.

B

128.0.0.0 to 191.255.255.255

IP addresses with all-0 host IDs are network addresses and are used for network routing. IP addresses with all-1 host IDs are broadcast addresses and are used for broadcasting packets to all hosts on the network.

C

192.0.0.0 to 223.255.255.255

IP addresses with all-0 host IDs are network addresses and are used for network routing. IP addresses with all-1 host IDs are broadcast addresses and are used for broadcasting packets to all hosts on the network.

D

224.0.0.0 to 239.255.255.255

Class D addresses are multicast addresses.

E

240.0.0.0 to 255.255.255.255

Reserved. The IP address 255.255.255.255 is used as a Local Area Network (LAN) broadcast address.

Special IPv4 Addresses
Table 6-2 Special IP addresses

Network ID

Host ID

Used as a Source Address

Used as a Destination Address

Description

All 0s

All 0s

Yes

No

Used by local hosts on a local network.

All 0s

Host ID

Yes

No

Used by specified hosts on a network.

127

Any value except all 0s or all 1s

Yes

Yes

Used as loopback addresses.

All 1s

All 1s

No

Yes

Limited broadcast address (packets with this IP address will never be forwarded).

Net-id

All 1s

No

Yes

Directed broadcast address (packets with this IP address is broadcast on the specified network).

NOTE:

Net-id is neither all 0s nor all 1s.

Private IPv4 Addresses

Private IP addresses are used to solve the problem of IP address shortage. Private addresses are used on internal networks or hosts, and cannot be used on the public network. RFC 1918 describes three IP address segments reserved for private networks.

Table 6-3 Private IP addresses

Class

Range

A

10.0.0.0 to 10.255.255.255

B

172.16.0.0 to 172.31.255.255

C

192.168.0.0 to 192.168.255.255

IPv4 Packet Format

Figure 6-3 shows the IPv4 packet format.

Figure 6-3 IPv4 packet format

An IPv4 datagram consists of a header and a data field. The first 20 bytes in the header are mandatory for all IPv4 datagrams. The Options field following the 20 bytes has a variable length.

Table 6-4 describes the meaning of each field in an IPv4 packet.

Table 6-4 Description of each field in an IPv4 packet

Field

Length

Description

Version

4 bits

Specifies the IP protocol version, IPv4 or IPv6.

Header Length

4 bits

Specifies the length of the IPv4 header.

Type of Service (ToS)

8 bits

Specifies the type of service. This field takes effect only in the differentiated service model.

Total Length

16 bits

Specifies the length of the header and data.

Identification

16 bits

IPv4 software maintains a counter in the storage device to record the number of IP datagrams. The counter value increases by 1 every time a datagram is sent, and is filled in the identification field.

Flags

3 bits

Only the rightmost two bits are valid. The rightmost bit indicates whether the datagram is not the last data fragment. The value 1 indicates the last fragment, and the value 0 indicates non-last fragment. The middle bit is the fragmentation flag. The value 1 indicates that the datagram cannot be fragmented, and the value 0 indicates that the datagram can be fragmented.

Fragment Offset

13 bits

Specifies the location of a fragment in a packet.

Time to Live (TTL)

8 bits

Specifies the life span of a datagram on a network. TTL is measured by the number of hops.

Protocol

8 bits

Specifies the type of the protocol carried in the datagram.

Header Checksum

16 bits

A device calculates the header checksum for each datagram received. If the checksum is 0, the device knows that the header remains unchanged and retains the datagram. This field checks only the header but not the data.

Source IP Address

32 bits

Specifies the IPv4 address of a sender.

Destination IP Address

32 bits

Specifies the IPv4 address of a receiver.

Options

0-40 bytes (variable length)

Allows IPv4 to support various options such as fault handling, measurement, and security. Pad bytes with a value of 0 are added if necessary.

Data

Variable

Pads an IP datagram .

Subnetting

A network can be divided into multiple subnets to conserve IP address space and support flexible IP addressing.

When many hosts are distributed on an internal network, the internal host IDs can be divided into multiple subnet IDs to facilitate management. Then the entire network contains multiple small networks.

Subnetting is implemented within the internal network. The internal network has only one network ID for the external network. When packets are transmitted from the external network to the internal network, the device on the internal network selects a route for the packets based on the subnet ID and finds the destination host.

Figure 6-4 shows subnetting of a Class B IP address. The subnet mask consists of a string of continuous 1s and 0s. 1s indicate the network ID and the subnet ID field, and 0s indicate the host ID.

Figure 6-4 Subnetting of IP addresses

As shown in Figure 6-4, the first 5 bits of the host ID is used as the subnet ID. The subnet ID ranges from 00000 to 11111, allowing a maximum of 32 (25) subnets. Each subnet ID has a subnet mask. For example, the subnet mask of the subnet ID 11111 is 255.255.248.0. After performing an AND operation on the IP address and the subnet mask, you can obtain the network address.

Subnetting reduces the available IP addresses. For example, a Class B IP address contains 65534 ((216 − 2)) host IDs. After 5 bits in the host ID are used as the subnet ID, there can be a maximum of 32 subnets, each having an 11-bit host ID. Each subnet has a maximum of 2046 host IDs (211 - 2, excluding the host IDs with all 1s and all 0s). Therefore, the IP address has a maximum of 65472 (32 x 2046) host IDs, 62 less than the maximum number of host IDs before subnetting.

To implement efficient network planning, subnetting and IP addressing should abide by the following rules.

Hierarchy

To divide a network into multiple layers, you need to consider geographic and service factors. Use a top-down subnetting mode to facilitate network management and simplify routing tables. In most cases:

  • A network consisting of a backbone network and a MAN is divided into hierarchical subnets.
  • An administrative network is divided into subnets based on administrative levels.
Consecutiveness

Consecutive addresses facilitate route summarization on a hierarchical network, which greatly reduces the number of routing entries and improves route search efficiency.

  • Allocate consecutive IP addresses to each area.
  • Allocate consecutive IP addresses to devices that have the same services and functions.
Scalability

When allocating addresses, reserve certain addresses on each layer to ensure consecutive address allocation in future network expansion.

A backbone network must have enough consecutive addresses for independent autonomous systems (ASs) and further network expansion.

Efficiency

When planning subnets, fully utilize address resources to ensure that the subnets are sufficient for hosts.

  • Allocate IP addresses by using variable-length subnet masking (VLSM) to fully use address resources.
  • Consider the routing mechanisms in IP address planning to improve address utilization efficiency in the allocated address spaces.

IP Address Resolution

To ensure that users can use the IP address normally, ensure that:

  • An IP address is a network layer address of a host. To transmit data packets to a destination host, the device must obtain the physical address of the host. Therefore, the IP address must be resolved to a physical address.

  • A host name is easier to remember than an IP address. Therefore, the host name needs to be resolved to the IP address.

On Ethernet, the physical address of a host is the MAC address. The DNS server resolves a host name to an IP address. ARP resolves an IP address to a MAC address. For details, see DNS Configuration and ARP Configuration.

Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 59636

Downloads: 3623

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next