IPv4 Service Configuration Guide
此内容尚不支持你的语言。
Introduction
Section titled “Introduction”IPv4 (Internet Protocol Version 4), defined in RFC 791, is the core of the TCP/IP stack. It works at the network layer of the TCP/IP stack, which corresponds to the network layer in the seven-layer OSI network model. It provides connectionless, unreliable, unordered, best-effort delivery of services, and any service requiring reliability must be provided by an upper-layer protocol (e.g. TCP).
Classification of IPv4 address
Section titled “Classification of IPv4 address”The IP address is important, which used to uniquely identify an entity that accesses the Internet. An IPv4 address is 32-bit binary numbers, typically written in dotted decimal notation for easier human use. It is represented by four dotted decimal integers, each corresponding to a byte. For example, an IPv4 address represented in binary as 11000000 10101000 00000000 00000001 translates to 192.168.0.1 in dotted decimal notation. For management purposes, IPv4 addresses are categorized into five classes, namely Class A, Class B, Class C, Class D, and Class E addresses.
Table 1 Classification of IPv4 address
| Class of Address | Range | Description |
|---|---|---|
| A | 0.0.0.0-127.255.255.255 | The first bit of the first octet of the Class A address is always set to 0.The address 0.0.0.0 is a special address representing all network interfaces on the local machine.The addresses between 127.0.0.0 and 127.255.255.255 are reserved for local loopback testing.The addresses between 10.0.0.0 and 10.255.255.255 are reserved for private networks and must not be routed over the internet. |
| B | 128.0.0.0-191.255.255.255 | The first two bits of the first octet of the Class B address is always set to 10.The addresses between 169.254.0.0 and 169.254.255.255 are reserved for link-local address.The addresses between 172.16.0.0 and 172.31.255.255 are reserved for private networks and must not be routed over the internet. |
| C | 192.0.0.0-223.255.255.255 | The first three bits of the first octet of the Class C address is always set to 110.The addresses between 192.168.0.0 and 192.168.255.255 are reserved for private networks and must not be routed over the internet. |
| D | 224.0.0.0-239.255.255.255 | The first four bits of the first octet of the Class D address is always set to 1110.No subnet mask configuration, reserved for multicast |
| E | 240.0.0.0-255.255.255.255 | The first four bits of the first octet of the Class E address is always set to 1111.No subnet mask configuration, reserved address. |
Table 2 Special Address
| Net-id | Host-id | If allowed as source address | If allowed as destination address | Description |
|---|---|---|---|---|
| All bits are 0 | All bits are 0 | YES | NO | The address 0.0.0.0 is a special address representing all network interfaces on the local machine. |
| All bits are 0 | Host-id | YES | NO | The special address represents a specific host on the network. |
| All bits are 1 | All bits are 1 | NO | YES | The special address represents a restricted broadcast. |
| Net-id is 127 | Any value but not all bits are 0 or 1. | YES | YES | The special address represents loopback address for local testing |
| Net-id | All bits are 1 | NO | YES | The special address represents a broadcast to the network. |
Configure the IPv4 address of the interface
Section titled “Configure the IPv4 address of the interface”Table 3 Configure IPv4 address of the interface
| Purpose | Commands | Description |
|---|---|---|
| Enter global configuration view. | configure terminal | - |
| Create interface configuration view. | interface {ethernet interface-name[.subinterface-number] |link-aggregation lag-id[.subinterface-number]|vlan vlan-id|loopback loopback-id|mgmt 0} | - |
| Configure an IPv4 address of the interface. | ip address A.B.C.D/M | Unless the interface is loopback, IPv4 address with subnet mask /32 is not allowed to be configured. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed.The IPv4 address of Class D or E is not allowed. |
| Configure secondary IPv4 address of the interface. | ip address A.B.C.D/M secondary | An IPv4 address for the same net-id as the configured IP in this interface, but for a host-id different can be configured in this interface except loopback and mgmt. |
Display and Maintenance
Section titled “Display and Maintenance”Table 4 IPv4 display and maintenance
| Purpose | Commands | Description |
|---|---|---|
| Display interfaces with IPv4 addresses. | show ip interfaces | - |