Configuration Guide
IPv4 Service Configuration Guide
5 min
introduction 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 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 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 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 configure the ipv4 address of the interface table 3 configure 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 display and maintenance table 4 ipv4 display and maintenance table 4 ipv4 display and maintenance purpose commands description display interfaces with ipv4 addresses show ip interfaces
