Cisco Zero-Touch Network Provisioning

Cisco Network Related Certification

Public and Private IPv4 Addresses (8.5)–Cisco The Internet Protocol

In an effort to conserve the limited number of IPv4 addresses, in the mid-1990s the concept of public and private IPv4 addresses was introduced. The use of both types of IPv4 addresses has extended the lifespan of IPv4 for many years.

Private IPv4 Addressing (8.5.1)

Public IPv4 addresses are globally routed between Internet service provider (ISP) routers. However, not all available IPv4 addresses can be used on the Internet. Most organizations use blocks of addresses called private addresses to assign IPv4 addresses to internal hosts.

In the mid-1990s, private IPv4 addresses were introduced because of the depletion of the IPv4 address space. Private IPv4 addresses are not unique and can be used by an internal network.

Specifically, the private address blocks are

  • 10.0.0.0 /8 or 10.0.0.0 to 10.255.255.255
  • 172.16.0.0 /12 or 172.16.0.0 to 172.31.255.255
  • 192.168.0.0 /16 or 192.168.0.0 to 192.168.255.255

It is important to know that addresses within these address blocks are not allowed on the Internet and must be filtered (discarded) by Internet routers. For example, in Figure 8-8, users in networks 1, 2, and 3 are sending packets to remote destinations. The ISP routers would see that the source IPv4 addresses in the packets are from private addresses and would discard the packets.

   

Figure 8-8 Private IPv4 Address Translated to Public IPv4 Addresses

Note

Private addresses are defined in RFC 1918.

Most organizations use private IPv4 addresses for their internal hosts. However, these RFC 1918 addresses are not routable on the Internet and must be translated to a public IPv4 address. Network Address Translation (NAT) is used to translate between private IPv4 and public IPv4 addresses. This is usually done on the router that connects the internal network to the ISP‛s network.

Home routers provide the same capability. For instance, most home routers assign IPv4 addresses to their wired and wireless hosts from the private address of 192.168.1.0 /24. The home router interface that connects to the ISP network is assigned a public IPv4 address.

Assignment of IPv4 Addresses (8.5.2)

For a company or organization to support network hosts, such as web servers that are accessible from the Internet, that organization must have a block of public addresses assigned. Remember that public addresses must be unique, and use of these public addresses is regulated and allocated to each organization separately. This is true for IPv4 and IPv6 addresses.

Both IPv4 and IPv6 addresses are managed by the Internet Assigned Numbers Authority (IANA) (www.iana.org). The IANA manages and allocates blocks of IP addresses to the Regional Internet Registries (RIRs), as shown in Figure 8-9.

   

Figure 8-9 Regional Internet Registries

  • AfriNIC (African Network Information Centre)—Africa Region
  • APNIC (Asia Pacific Network Information Centre)—Asia/Pacific Region
  • ARIN (American Registry for Internet Numbers)—North America Region
  • LACNIC (Regional Latin-American and Caribbean IP Address Registry)—Latin America and some Caribbean Islands
  • RIPE NCC (Réseaux IP Européens Network Coordination Centre)—Europe, the Middle East, and Central Asia

RIRs are responsible for allocating IP addresses to ISPs, which, in turn, provide IPv4 address blocks to organizations and smaller ISPs. Organizations can get their addresses directly from an RIR subject to the policies of that RIR.

Unicast, Broadcast, and Multicast Addresses (8.6)

The three types of destination IPv4 addresses are unicast, broadcast, and multicast. The type of address determines if the packet is intended for a single device or multiple devices.

Video—IPv4 Unicast (8.6.1)

Refer to the online course to view this video.

Unicast Transmission (8.6.2)

Unicast communication is used for normal host-to-host communication in both a client/server and a peer-to-peer network. Unicast packets use the address of the destination device as the destination address and can be routed through a network, as shown in Figure 8-10.

   

Figure 8-10 Unicast Transmission

In an IPv4 network, the unicast address applied to an end device is referred to as the host address. For unicast communication, the addresses assigned to the two end devices are used as the source and destination IPv4 addresses. During the encapsulation process, the source host uses its IPv4 address as the source address and the IPv4 address of the destination host as the destination address. Regardless of whether the destination specified a packet as unicast, broadcast, or multicast, the source address of any packet is always the unicast address of the originating host.

Note

In this course, all communication between devices is unicast unless otherwise noted.

IPv4 unicast host addresses are in the address range of 0.0.0.0 to 223.255.255.255. However, within this range are many addresses that are reserved for special purposes.

Video—IPv4 Broadcast (8.6.3)

Refer to the online course to view this video.

Objectives–Cisco Dynamic Addressing with DHCP

Upon completion of this chapter, you will be able to complete the following objectives:

  • Compare static and dynamic IPv4 addressing.
  • Configure a DHCPv4 server to dynamically assign IPv4 addresses.

Key Term

This chapter uses the following key term. You can find the definition in the Glossary.

Dynamic Host Configuration Protocol (DHCP) page 183

Introduction (9.0.1)

Let‛s say you have three computers, a networked printer, and a wireless router. That‛s just a handful of devices that need an IP address, which you can assign yourself. But what if you had 100 computers. It might take more than a few hours to assign IP addresses and to verify connectivity for all of them. If you have an ISP, you can handle this task dynamically with DHCP. In fact, you can use DHCP to dynamically assign IP addresses to your devices in any network, including a small home network. This is definitely worth learning about.

Static and Dynamic Addressing (9.1)

It is important that devices have the correct IPv4 addressing information. This information includes the IPv4 address, subnet mask, default gateway address, and DNS server address.

Static IPv4 Address Assignment (9.1.1)

IPv4 addresses can be assigned either statically or dynamically.

With a static assignment, the network administrator must manually configure the network information for a host. At a minimum, this configuration includes the host IPv4 address, subnet mask, and default gateway, as shown in Figure 9-1.

   

Figure 9-1 Static IPv4 Addressing on a Windows PC

Static addresses have some advantages. For instance, they are useful for printers, servers, and other networking devices that need to be accessible to clients on the network. If hosts normally access a server at a particular IPv4 address, it would not be good if that address changed.

Static assignment of addressing information can provide increased control of network resources, but entering the information on each host can be time consuming. When IPv4 addresses are entered statically, the host only performs basic error checks on the IPv4 address. Therefore, errors are more likely to occur.

When static IPv4 addressing is used, it is important to maintain an accurate list of which IPv4 addresses are assigned to which devices. Additionally, these are permanent addresses and are not normally reused.

Dynamic IPv4 Address Assignment (9.1.2)

On local networks it is often the case that the user population changes frequently. New users arrive with laptops and need a connection. Others have new workstations that need to be connected. Rather than have the network administrator assign IPv4 addresses for each workstation, it is easier to have IPv4 addresses assigned automatically. This is done using a protocol known as Dynamic Host Configuration Protocol (DHCP).

DHCP automatically assigns addressing information such as IPv4 address, subnet mask, default gateway, and other configuration information, as shown in Figure 9-2.

   

Figure 9-2 Dynamic IPv4 Addressing on a Windows PC

DHCP is generally the preferred method of assigning IPv4 addresses to hosts on large networks because it reduces the burden on network support staff and virtually eliminates entry errors.

Another benefit of DHCP is that an address is not permanently assigned to a host but is only leased for a period of time. If the host is powered down or taken off the network, the address is returned to the pool for reuse. This is especially helpful with mobile users who come and go on a network.

Practice–Cisco The Internet Protocol

The following activities provide practice with the topics introduced in this chapter.

Labs

Lab—Use a Calculator for Binary Conversions (8.2.7)

Packet Tracer Activities

Packet Tracer—Connect to a Web Server (8.1.2)

Check Your Understanding Questions

Complete all the review questions listed here to test your understanding of the topics and concepts in this chapter. Appendix A, “Answers to the ‘Check Your Understanding‛ Questions,” lists the answers.

1. A network design engineer has been asked to design the IPv4 addressing scheme for a customer network. The network will use IPv4 addresses from the 192.168.30.0/24 network. The engineer allocates 254 IPv4 addresses for the hosts on the network but excludes 192.168.30.0/24 and 192.168.30.255/24 IPv4 addresses. Why must the engineer exclude these two IPv4 addresses?

  1. The IPv4 address reserved for the default gateway is 192.168.30.0/24 is, and the IPv4 address reserved for the DHCP server is 192.168.30.255/24.
  2. IPv4 addresses reserved for the email and DNS servers are 192.168.30.0/24 and 192.168.30.255/24.
  3. IPv4 addresses reserved for outside Internet connectivity are 192.168.30.0/24 and 192.168.30.255/24.
  4. The network IPv4 address is 192.168.30.0/24, and the IPv4 broadcast address is 192.168.30.255/24.

2. Which of the following are private IPv4 addresses? (Choose three.)

  1. 192.168.5.5
  2. 10.1.1.1
  3. 192.167.10.10
  4. 172.32.5.2
  5. 172.16.4.4
  6. 224.6.6.6

3. Which address prefix range is reserved for IPv4 multicast?

  1. 169.254.0.0 to 169.254.255.255
  2. 224.0.0.0 to 239.255.255.255
  3. 127.0.0.0 to 127.255.255.255
  4. 240.0.0.0 to 254.255.255.255

4. Why does a Layer 3 device perform the ANDing process on a destination IP address and subnet mask?

  1. To identify the network address of the destination network
  2. To identify the host address of the destination host
  3. To identify the broadcast address of the destination network
  4. To identify faulty frames

5. What are characteristics of a multicast transmission? (Choose three.)

  1. Computers use multicast transmission to request IPv4 addresses.
  2. Routers do not forward multicast addresses in the range of 224.0.0.0 to 224.0.0.255.
  3. Multicast messages map lower-layer addresses to upper-layer addresses.
  4. The source address of a multicast transmission is in the range of 224.0.0.0 to 224.0.0.255.
  5. A single packet can be sent to a group of hosts.
  6. Multicast transmissions can be used by routers to exchange routing information.

6. When IPv4 is configured for a computer on a network, what does the subnet mask identify?

  1. The dynamic subnetwork configuration
  2. The pool of addresses assigned within the network
  3. The part of the IPv4 address that identifies the network
  4. The device that the computer uses to access another network

7. Which network does a host with IPv4 address 172.32.65.13 reside on if it is using a classful, default subnet mask?

  1. 172.32.65.32
  2. 172.32.65.0
  3. 172.32.0.0
  4. 172.32.32.0

8. A technician is setting up equipment on a network. Which devices need IP addresses? (Choose three.)

  1. A printer with an integrated NIC
  2. A PDA that is attached to a network workstation
  3. A web camera that is attached directly to a host
  4. An IP phone
  5. A server with two NICs
  6. A wireless mouse

9. Which IP address type is intended for a specific host?

  1. Unicast
  2. Broadcast
  3. Simulcast
  4. Multicast

10. What is the equivalent decimal value given a binary number of 11001010?

  1. 212
  2. 240
  3. 202
  4. 196

11. How many usable IPv4 hosts are available given a subnet mask of 255.255.255.0?

  1. 255
  2. 256
  3. 252
  4. 254

12. What are differences between binary and decimal numbers? (Choose two.)

  1. Binary numbers are based on powers of 2.
  2. Decimal numbers include 0 through 9.
  3. Numbers typed on a keyboard are entered as binary and converted to decimal by the computer.
  4. Binary numbers consist of three states: on, off, null. Decimal numbers do not have states.
  5. Decimal numbers are based on powers of 1.

Broadcast Transmission (8.6.4)–Cisco The Internet Protocol

Broadcast packets are sent to all hosts in the network using a broadcast address. With a broadcast, the packet contains a destination IPv4 address with all ones (1s) in the host portion. This means that all hosts on that local network (broadcast domain) will receive and look at the packet. Many network protocols, such as DHCP, use broadcasts. When a host receives a packet sent to the network broadcast address, the host processes the packet as it would a packet addressed to its unicast address.

Broadcast may be directed or limited. A directed broadcast is sent to all hosts on a specific network. For example, in Figure 8-11 a host on the 172.16.4.0/24 network sends a packet to 172.16.4.255. A limited broadcast is sent to 255.255.255.255. By default, routers do not forward broadcasts.

   

Figure 8-11 Broadcast Transmission

When a packet is broadcast, it uses resources on the network and causes every receiving host on the network to process the packet. Therefore, broadcast traffic should be limited so that it does not adversely affect the performance of the network or devices. Because routers separate broadcast domains, subdividing networks can improve network performance by eliminating excessive broadcast traffic.

Video—IPv4 Multicast (8.6.5)

Refer to the online course to view this video.

Multicast Transmission (8.6.6)

Multicast transmission reduces traffic by allowing a host to send a single packet to a selected set of hosts that subscribe to a multicast group.

IPv4 has reserved the 224.0.0.0 to 239.255.255.255 addresses as a multicast range. The IPv4 multicast addresses 224.0.0.0 to 224.0.0.255 are reserved for multicasting on the local network only. These addresses are to be used for multicast groups on a local network. A router connected to the local network recognizes that these packets are addressed to a local network multicast group and never forwards them further. A typical use of a reserved local network multicast address is in routing protocols using multicast transmission to exchange routing information. For example, 224.0.0.9 is the multicast address used by Routing Information Protocol (RIP) version 2 to communicate with other RIPv2 routers.

Hosts that receive particular multicast data are called multicast clients. The multicast clients use services requested by a client program to subscribe to the multicast group.

Each multicast group is represented by a single IPv4 multicast destination address, as shown in Figure 8-12. When an IPv4 host subscribes to a multicast group, the host processes packets addressed to this multicast address, and packets addressed to its uniquely allocated unicast address.

   

Figure 8-12 Multicast Transmission 

Activity—Unicast, Broadcast, or Multicast (8.6.7)

Refer to the online course to complete this activity.

Summary (8.7)

The following is a summary of each topic in the chapter:

  • Purpose of an IPv4 Address—The IPv4 address is a logical network address that identifies a particular host. An IPv4 address is assigned to the network interface connection for a host. This connection is usually a NIC installed in the device. Every packet sent across the Internet has a source and destination IPv4 address.
  • Binary Conversion of an IPv4 Address—An IPv4 address is a series of 32 binary bits (ones and zeros). The 32 bits are grouped into four 8-bit bytes called octets. Each octet is presented as its decimal value, separated by a decimal point or period, called dotted-decimal notation. Each octet is made up of 8 bits, and each bit has a value. The value of each of the four octets can range from 0 to a maximum of 255. Determine the value of the octet by adding the values of positions wherever there is a binary 1 present:
    • If there is a zero in a position, do not add the value.
    • If all 8 bits are zeros, 00000000, the value of the octet is 0.
    • If all 8 bits are ones, 11111111, the value of the octet is 255 (128+64+32+16+8+4+2+1).
    • If the 8 bits are mixed, such as the example 00100111, the value of the octet is 39 (32+4+2+1).
  • The IPv4 Address Structure—The logical 32-bit IPv4 address is hierarchical and is made up of two parts. The first part identifies the network, and the second part identifies a host on that network. In hierarchical addressing, the network portion indicates the network on which each unique host address is located.

Logical AND is the comparison of two bits that produce results of either 0 or 1. In digital logic, 1 represents True and 0 represents False. When you‛re using an AND operation, both input values must be True (1) for the result to be True (1). Only a 1 AND 1 produce a 1. All other AND combinations produce a 0. To identify the network address of an IPv4 host, the IPv4 address is logically ANDed, bit by bit, with the subnet mask. ANDing between the address and the subnet mask yields the network address. The subnet mask is compared to the IPv4 address from left to right, bit for bit. The ones in the subnet mask represent the network portion; the zeros represent the host portion. A subnet mask of 255.255.255.0 (decimal) or 11111111.11111111.1111111.00000000 (binary) uses 24 bits to identify the network number, which leaves 8 bits to number the hosts on that network.

  • Classful IPv4 Addressing—In 1981, Internet IPv4 addresses were assigned using classful addressing, based on one of three classes—A, B, or C:
    • Class A (0.0.0.0/8 to 127.0.0.0/8)—Designed to support extremely large networks with more than 16 million host addresses.
    • Class B (128.0.0.0 /16 to 191.255.0.0 /16)—Designed to support the needs of moderate to large size networks with up to approximately 65,000 host addresses.
    • Class C (192.0.0.0 /24 to 223.255.255.0 /24)—Designed to support small networks with a maximum of 254 hosts.

Classful addressing was abandoned in the late 1990s for the newer and current classless addressing system.

  • Public and Private IPv4 Addresses—Most internal networks, from large enterprises to home networks, use private IPv4 addresses for addressing all internal devices (intranet) including hosts and routers. However, private addresses are not globally routable. Specifically, the private address blocks are
    • 10.0.0.0 /8 or 10.0.0.0 to 10.255.255.255
    • 172.16.0.0 /12 or 172.16.0.0 to 172.31.255.255
    • 192.168.0.0 /16 or 192.168.0.0 to 192.168.255.255

These addresses are not routable on the Internet. Before an ISP can forward a packet with a private address out to the Internet, the address must be translated to a public IPv4 address using NAT.

Public addresses (both IPv4 and IPv6) must be unique, and their use is regulated and allocated to each organization separately. Public addresses are managed by the IANA. The IANA manages and allocates blocks of IP addresses to the RIRs. RIRs are responsible for allocating IP addresses to ISPs, which, in turn, provide IPv4 address blocks to organizations and smaller ISPs.

  • Unicast, Broadcast, and Multicast Addresses—For unicast communication, the addresses assigned to the two end devices are used as the source and destination IPv4 addresses. IPv4 unicast host addresses are in the address range of 0.0.0.0 to 223.255.255.255.

Broadcast traffic is used to send packets to all hosts on the network using the broadcast address for the network. With a broadcast, the packet contains a destination IPv4 address with all ones (1s) in the host portion. This means that all hosts on that local network (broadcast domain) will receive and look at the packet. Because routers separate broadcast domains, subdividing networks can improve network performance by eliminating excessive broadcast traffic.

Multicast transmission reduces traffic by allowing a host to send a single packet to a selected set of hosts that subscribe to a multicast group. The IPv4 multicast addresses 224.0.0.0 to 224.0.0.255 are reserved for multicasting on the local network only. Each multicast group is represented by a single IPv4 multicast destination address. When an IPv4 host subscribes to a multicast group, the host processes packets addressed to this multicast address and packets addressed to its uniquely allocated unicast address.

Calculate the Number of Hosts (8.3.7)–Cisco The Internet Protocol

The subnet masks seen most often with home and small business networking are 255.0.0.0 (8 bits), 255.255.0.0 (16 bits), and 255.255.255.0 (24 bits). A subnet mask of 255.255.255.0 (decimal) or 11111111.11111111.1111111.00000000 (binary) uses 24 bits to identify the network number, which leaves 8 bits to number the hosts on that network, as shown in Figure 8-6.

  

Figure 8-6 Calculating the Number of Hosts

To calculate the number of hosts that can be on that network, take the number 2 to the power of the number of host bits (28 = 256). From this number, you must subtract 2 (256–2). The reason you subtract 2 is that all ones within the host portion of an IPv4 address indicate a broadcast address for that network and cannot be assigned to a specific host. All zeros within the host portion indicate the network ID and, again, cannot be assigned to a specific host. Powers of 2 can be calculated easily with the calculator that comes with any Windows operating system.

Another way to determine the number of hosts available is to add up the values of the available host bits (128+64+32+16+8+4+2+1 = 255). From this number, subtract 1 (255–1 = 254), because the host bits cannot be all ones. It is not necessary to subtract 2 because the value of all zeros is 0 and is not included in the addition.

With a 16-bit mask, there are 16 bits (two octets) for host addresses, and a host address could have all ones (255) in one of the octets. This might appear to be a broadcast, but as long as the other octet is not all ones, it is a valid host address. Remember that the host looks at all host bits together, not at octet values.

Video—Network, Host, and Broadcast Addresses (8.3.8)

Refer to the online course to view this video.

Classful IPv4 Addressing (8.4)

Classful addressing is a legacy method of how IPv4 addresses were automatically assigned subnet masks based on the first several bits of the address. Although classful addressing has been made obsolete by classless addressing, it is important to understand the differences.

Classful and Classless Addressing (8.4.1)

In 1981, Internet IPv4 addresses were assigned using classful addressing. Customers were allocated a network address based on one of three classes—A, B, or C. The addresses were divided into the following ranges or classes:

  • Class A (0.0.0.0/8 to 127.0.0.0/8)—Designed to support extremely large networks with more than 16 million host addresses. It used a fixed /8 prefix (255.0.0.0) with the first octet to indicate the network address and the remaining three octets for host addresses.
  • Class B (128.0.0.0 /16 to 191.255.0.0 /16)—Designed to support the needs of moderate to large size networks with up to approximately 65,000 host addresses. It used a fixed /16 prefix (255.255.0.0) with the two high-order octets to indicate the network address and the remaining two octets for host addresses.
  • Class C (192.0.0.0 /24 to 223.255.255.0 /24)—Designed to support small networks with a maximum of 254 hosts. It used a fixed /24 prefix (255.255.255.0) with the first three octets to indicate the network and the remaining octet for the host addresses.

Note

A Class D multicast block consists of 224.0.0.0 to 239.0.0.0, and a Class E experimental address block consists of 240.0.0.0 to 255.0.0.0.

As shown in Figure 8-7, the classful system allocated 50 percent of the available IPv4 addresses to 128 Class A networks, 25 percent of the addresses to Class B, and then Class C shared the remaining 25 percent with Classes D and E. Although appropriate at the time, as the Internet grew, it became obvious that this method was wasting addresses and depleting the number of available IPv4 network addresses.

   

Figure 8-7 Classful Addressing

Classful addressing was abandoned in the late 1990s for the newer and current classless addressing system. The formal name is classless interdomain routing (CIDR, pronounced “cider”). With classless addressing, customers receive an IPv4 network address and any size subnet mask, appropriate to the number of hosts required. The subnet mask can be any length and is not limited to the three subnet masks used in classful addressing.

Video—Classful IPv4 Addressing (8.4.2)

Refer to the online course to view this video.

Practice–Cisco Routing Between Networks Layer

The following activities provide practice with the topics introduced in this chapter.

Labs

Lab—IPv4 Addresses and Network Communication (7.1.4)

Lab—Connect to a Wireless Router (7.3.4)

Packet Tracer Activities

Packet Tracer—Observe Data Flow in a LAN (7.3.3)

Check Your Understanding Questions

Complete all the review questions listed here to test your understanding of the topics and concepts in this chapter. Appendix A, “Answers to the ‘Check Your Understanding‛ Questions,” lists the answers.

1. Which information do routers use to forward a data packet toward its destination?

  1. Destination IP address
  2. Destination data-link address
  3. Source IP address
  4. Source data-link address

2. A router receives a packet from the GigabitEthernet 0/0 interface and determines that the packet needs to be forwarded out the GigabitEthernet 0/1 interface. What does the router do next?

  1. Create a new Layer 2 Ethernet frame to be sent to the destination
  2. Route the packet out the GigabitEthernet 0/1 interface
  3. Look into the routing table to determine whether the destination network is in the routing table
  4. Look into the ARP cache to determine the destination IP address

3. Refer to the exhibit. The IP address of which device interface should be used as the default gateway setting of host H1?

  1. R2: S0/0/1
  2. R1: G0/0
  3. R2: S0/0/0
  4. R1: S0/0/0

4. During the process of forwarding traffic, what does the router do immediately after matching the destination IP address to a network on a directly connected routing table entry?

  1. Switch the packet to the directly connected interface
  2. Look up the next-hop address of the packet
  3. Discard the traffic after consulting the routing table
  4. Analyze the destination IP address

5. What does a router do if it cannot determine where to forward an incoming packet?

  1. The router sends an incident message to the network administrator.
  2. The router saves it in the sending queue and tries to forward it again later.
  3. The router forwards it out all interfaces.
  4. The router drops it.

6. In implementing a LAN in a corporation, what are the advantages of dividing hosts between multiple networks connected by a distribution layer? (Choose three.)

  1. It provides increased security.
  2. Only LAN switches are needed.
  3. It reduces complexity and expense by using LAN switch devices.
  4. It increases traffic bandwidth between segments through distribution layer devices.
  5. It makes the hosts invisible to those on other local network segments.
  6. It splits up broadcast domains and decreases traffic.

7. What type of route is indicated by the code C in an IPv4 routing table on a Cisco router?

  1. Static route
  2. Directly connected route
  3. Dynamic route that is learned through EIGRP
  4. Default route

8. Which portion of the network layer address does a router use to forward packets?

  1. Gateway address
  2. Network portion
  3. Host portion
  4. Broadcast address

9. What role does a router play on a network?

  1. Forwarding frames based on a MAC address
  2. Selecting the path to destination networks
  3. Forwarding Layer 2 broadcasts
  4. Connecting smaller networks into a single broadcast domain

10. A router receives an incoming packet and determines that the destination host is located on a LAN directly attached to one of the router interfaces. Which destination address does the router use to encapsulate the Ethernet frame when forwarding the packet?

  1. MAC address of the SVI on the switch
  2. MAC address of the default gateway of the LAN
  3. MAC address of the destination host
  4. MAC address of the interface of the connected router

11. Which address should be configured as the default gateway address of a client device?

  1. The IPv4 address of the router interface that is connected to the Internet
  2. The IPv4 address of the router interface that is connected to the same LAN
  3. The Layer 2 address of the switch management interface
  4. The Layer 2 address of the switch port that is connected to the workstation

The IPv4 Address Structure (8.3)–Cisco The Internet Protocol

IPv4 addresses have a structure that makes the address unique as well as identifies the network the address belongs to.

Video—The IPv4 Address Structure (8.3.1)

Refer to the online course to view this video.

Networks and Hosts (8.3.2)

The logical 32-bit IPv4 address is hierarchical and is made up of two parts: the network and the host. In Figure 8-3, the network portion is the first three decimal numbers, and the host portion is the last decimal number. Both parts are required in an IPv4 address. Both networks have the subnet mask 255.255.255.0.

   

Figure 8-3 Network Number and Host Number

For example, in Figure 8-3 the host has an IPv4 address of 192.168.5.11 with a subnet mask of 255.255.255.0. The first three octets, (192.168.5), identify the network portion of the address, and the last octet, (11), identifies the host. This is known as hierarchical addressing because the network portion indicates the network on which each unique host address is located. Routers only need to know how to reach each network rather than the location of each individual host.

With IPv4 addressing, multiple logical networks can exist on one physical network, if the network portion of the logical network host addresses is different. For example, three hosts on a single, physical local network have the same network portion of their IPv4 address (192.168.18), and three other hosts have different network portions of their IPv4 addresses (192.168.5). The hosts with the same network number in their IPv4 addresses will be able to communicate with each other but will not be able to communicate with the other hosts without the use of routing. In this example, there is one physical network and two logical IPv4 networks.

Another example of a hierarchical network is the telephone system. With a telephone number, the country code, area code, and exchange represent the network address, and the remaining digits represent a local phone number.

Video—Local or Remote Network—Part 1 (8.3.3)

Refer to the online course to view this video.

Video—Local or Remote Network—Part 2 (8.3.4)

Refer to the online course to view this video.

Logical AND (8.3.5)

A logical AND is one of three basic binary operations used in digital logic. The other two are OR and NOT. Although all three are used in data networks, only AND is used in determining the network address. Therefore, the discussion here is limited to the logical AND operation.

Logical AND is the comparison of two bits that produce the results shown in the following. Note how only a 1 AND 1 produce a 1.

  • 1 AND 1 = 1
  • 0 AND 1 = 0
  • 1 AND 0 = 0
  • 0 AND 0 = 0

To identify the network address of an IPv4 host, the IPv4 address is logically ANDed, bit by bit, with the subnet mask. ANDing between the address and the subnet mask yields the network address.

To illustrate how AND is used to discover a network address, consider a host with IPv4 address 192.168.10.10 and subnet mask 255.255.255.0. Figure 8-4 displays the host IPv4 address and converted binary address. The host subnet mask binary address is ANDed.

   

Figure 8-4 ANDing an IPv4 Address and Subnet Mask

Calculate Whether the Destination Is Local or Remote (8.3.6)

How do hosts know which portion of an IPv4 address is the network and which is the host? This is the job of the subnet mask.

When an IPv4 host is configured, a subnet mask is assigned along with an IPv4 address. Like the IPv4 address, the subnet mask is 32 bits long. The subnet mask signifies which part of the IPv4 address is network and which part is host.

The subnet mask is compared to the IPv4 address from left to right, bit for bit. The ones in the subnet mask represent the network portion; the zeros represent the host portion. In Figure 8-5, the first three octets are network, and the last octet represents the host.

   

Figure 8-5 Host Using Subnet Mask to Determine Whether Destination Is on the Same Network

When a host sends a packet, it compares its subnet mask to its own IPv4 address and the destination IPv4 address. If the network bits match, both the source and destination host are on the same network, and the packet can be delivered locally. If they do not match, the sending host forwards the packet to the local router interface to be sent on to the other network.

In Figure 8-5, host H1 uses its subnet mask to determine whether host H2 is on the same network.

Objectives–Cisco The Internet Protocol

Upon completion of this chapter, you will be able to answer the following questions:

  • What is the purpose of an IPv4 address?
  • How do you convert between decimal and binary systems?
  • How are IPv4 addresses and subnets used together?
  • What are the different IPv4 address classes?
  • What is the difference between the public and private IPv4 address ranges?
  • What are unicast, multicast, and broadcast addresses?

Key Terms

This chapter uses the following key terms. You can find the definitions in the Glossary.

classless interdomain routing (CIDR) page 167

Network Address Translation (NAT) page 169

Introduction (8.0.1)

You know that you need a router to get outside of your local network. Routers alone can‛t do the job. You also need a proper IP address for the source and the destination addresses. There is a lot to know about IP addresses, including that each one has a network portion and a host portion. But, of course, there is more to IP addresses than that. This chapter explains the Internet Protocol, the structure of an IPv4 address, as well as how and when it is used.

You also learn how to convert a binary IPv4 address to decimal and vice versa. Believe me, it‛s more fun than it sounds, and knowing how to do this will put you ahead of the pack.

Purpose of the IPv4 Address (8.1)

Devices on the same network or different networks use IPv4 addresses to communicate. Messages are sent from the IPv4 address of the source to the IPv4 address of the destination.

The IPv4 Address (8.1.1)

A host needs an IPv4 address to participate on the Internet and almost all LANs today. The IPv4 address is a logical network address that identifies a particular host. It must be properly configured and unique within the LAN, for local communication. It must also be properly configured and unique in the world, for remote communication. This is how a host is able to communicate with other devices on the Internet.

An IPv4 address is assigned to the network interface connection for a host. This connection is usually a network interface card (NIC) installed in the device. Examples of end-user devices with network interfaces include workstations, servers, network printers, and IP phones. Some servers can have more than one NIC, and each of these has its own IPv4 address. Router interfaces that provide connections to an IP network also have an IPv4 address.

Every packet sent across the Internet has a source and destination IPv4 address. This information is required by networking devices to ensure the information gets to the destination and any replies are returned to the source.

Packet Tracer—Connect to a Web Server (8.1.2)

In this activity, you will observe how packets are sent across the Internet using IP addresses.

Binary Conversion of an IPv4 Address (8.2)

IPv4 addresses are 32-bit values written in base 10, or the decimal number system. To understand IPv4 addressing, you need to understand how to convert between the binary and decimal number system.

IPv4 Addressing (8.2.1)

An IPv4 address is simply a series of 32 binary bits (ones [1s] and zeros [0s]). There are over 4 billion possible IPv4 addresses using a 32-bit addressing scheme.

Humans find it very difficult to read a binary IPv4 address. For this reason, the 32 bits are grouped into four 8-bit bytes called octets. An IPv4 address in this format is hard for humans to read, write, and remember. To make the IPv4 address easier to understand, each octet is presented as its decimal value, separated by a decimal point, or period. This is referred to as dotted-decimal notation.

When a host is configured with an IPv4 address, it is entered as a dotted-decimal number such as 192.168.1.5, as shown in Figure 8-1. The 32-bit binary equivalent is 11000000101010000000000100000101. If you mistyped just one bit, the address would be different, and the host would not be able to communicate on the network.

   

Figure 8-1 Windows IPv4 Addressing   

Video—Binary to Decimal Conversion (8.2.2)

Refer to the online course to view this video.

Binary to Decimal (8.2.3)

When a host receives an IPv4 address, it looks at all 32 bits as they are received by the NIC. Humans, on the other hand, need to convert those 32 bits into their four-octet decimal equivalent. Each octet is made up of 8 bits, and each bit has a value. The four groups of 8 bits have the same set of values. The rightmost bit in an octet has a value of 1, and the values of the remaining bits, from right to left, are 2, 4, 8, 16, 32, 64, and 128.

As in Figure 8-2, you can determine the value of the octet by adding the values of positions wherever a binary 1 is present:

   

Figure 8-2 Calculating Binary Octets to Dotted-Decimal

  • If there is a zero in a position, do not add the value.
  • If all 8 bits are zeros, 00000000, the value of the octet is 0.
  • If all 8 bits are ones, 11111111, the value of the octet is 255 (128+64+32+16+8+4+2+1).
  • If the 8 bits are mixed, such as the example 00100111, the value of the octet is 39 (32+4+2+1).

So the value of each of the four octets can range from 0 to a maximum of 255.

Activity—Binary to Decimal Conversions (8.2.4)

Refer to the online course to complete this activity.

Activity—Decimal to Binary Conversions (8.2.5)

Refer to the online course to complete this activity.

Activity—Binary Game (8.2.6)

This is a fun way to learn binary numbers for networking.

Game Link: https://learningnetwork.cisco.com/docs/DOC-1803

You need to log in to cisco.com to use this link. You also need to create an account if you do not already have one.

The Binary Game presents problems that you must solve to gain points. When presented with a number on the right, click the appropriate squares to the left to represent that number. Yellow squares are counted, whereas red squares are not. Sometimes yellow squares are incorrect. Click them to turn them to red. When there is no number present to the right, click the empty box to bring up a number pad. Click the numbers to enter the correct answer represented by the yellow squares to the left. Click the Enter arrow at the bottom-right corner to enter the answer.

The first two problems have unlimited time. After you solve those two problems, the rest of the problems get harder and appear faster. When the screen fills up with unsolved problems, the game is over.

There are also various free mobile binary games. Search for “Binary Game” in your app store.

Lab—Use a Calculator for Binary Conversions (8.2.7)

In this lab, you will complete the following objectives:

  • Switch between Windows Calculator modes.
  • Use Windows Calculator to convert between decimal and binary.
  • Use Windows Calculator to determine the number of hosts in a network with powers of 2.

Routing Table Entries (7.2.7)–Cisco Routing Between Networks Layer

Routers move information between local and remote networks. To do this, routers must use routing tables to store information. Routing tables are not concerned with the addresses of individual hosts. Routing tables contain the addresses of networks and the best path to reach those networks. Entries can be made to a routing table in two ways: dynamically updated by information received from other routers in the network or manually entered by a network administrator. Routers use the routing tables to determine which interface to use to forward a message to its intended destination. In Figure 7-9 and Table 7-1, the router has a routing table with two entries for directly connected networks: 10.0.0.0/8 and 172.16.0.0/16.

   

Figure 7-9 A Router‛s Directly Connected Networks

  

Table 7-1 Routing Table with Directly Connected Routes

Type

Network

Port

C

10.0.0.0/8

FastEthernet0/0

C

172.16.0.0/16

FastEthernet0/1

  • Type—The connection type. C stands for directly connected.
  • Network—The network address.
  • Port—The interface used to forward packets to the network.

If the router cannot determine where to forward a message, it drops that message. Network administrators configure a static default route that is placed into the routing table so that a packet is not dropped due to the destination network not being in the routing table. A default route is the interface through which the router forwards a packet containing an unknown destination IP network address. This default route usually connects to another router that can forward the packet toward its final destination network.

The Default Gateway (7.2.8)

The method that a host uses to send messages to a destination on a remote network differs from the way a host sends messages on the same local network. When a host needs to send a message to another host located on the same network, it forwards the message directly. A host uses ARP to discover the MAC address of the destination host. The IPv4 packet contains the destination IPv4 address and encapsulates the packet into a frame containing the MAC address of the destination and forwards it out.

When a host needs to send a message to a remote network, it must use the router, known as the default gateway. The host includes the IP address of the destination host within the packet just like before. However, when it encapsulates the packet into a frame, it uses the MAC address of the router as the destination for the frame. In this way, the router receives and accepts the frame based on the MAC address.

How does the source host determine the MAC address of the router? A host is given the IPv4 address of the router through the default gateway address configured in its TCP/IP settings. The default gateway address is the address of the router interface connected to the same local network as the source host. All hosts on the local network use the default gateway address to send messages to the router. When the host knows the default gateway IPv4 address, it can use ARP to determine the MAC address. The MAC address of the router is then placed in the frame, destined for another network.

It is important that the correct default gateway be configured on each host on the local network, as shown in Figure 7-10 and Table 7-2. If no default gateway is configured in the host TCP/IP settings, or if the wrong default gateway is specified, messages addressed to hosts on remote networks cannot be delivered.

   

Figure 7-10 A Router as the Default Gateway

  

Table 7-2 Addressing Table for Hosts Including Default Gateway

PC

IPv4 Address

Subnet Mask

Default Gateway

H1

192.168.1.1

255.255.255.0

192.168.1.254

H2

192.168.1.2

255.255.255.0

192.168.1.254

H3

192.168.1.3

255.255.255.0

192.168.1.254

Create a LAN (7.3)–Cisco Routing Between Networks Layer

End devices, both clients and servers, are connected to LANs. The LAN is how users access the network and reach other networks.

Local-Area Networks (7.3.1)

The term local-area network (LAN) refers to a local network or a group of interconnected local networks that are under the same administrative control, as shown in Figure 7-11. In the early days of networking, LANs were defined as small networks that existed in a single physical location. Although LANs can be a single local network installed in a home or small office, the definition of LAN has evolved to include interconnected local networks consisting of many hundreds of hosts, installed in multiple buildings and locations.

   

Figure 7-11 Collection of Local Networks Under the Same Administrative Control

The important thing to remember is that all the local networks within a LAN are under one administrative control. Other common characteristics of LANs are that they typically use Ethernet or wireless protocols, and they support high data rates.

The term intranet is often used to refer to a private LAN that belongs to an organization and is designed to be accessible only by the members of the organization, employees, or others with authorization.

Local and Remote Network Segments (7.3.2)

Within a LAN, it is possible to place all hosts on a single local network or divide them between multiple networks connected by a distribution layer device. How this placement is determined depends on the desired results.

All Hosts in One Local Segment

Placing all hosts on a single local network allows them to be seen by all other hosts, as shown in Figure 7-12. The reason is that there is one broadcast domain and hosts use ARP to find each other.

   

Figure 7-12 A Local Segment

In a simple network design, it may be beneficial to keep all hosts within a single local network. However, as networks grow in size, increased traffic decreases network performance and speed. In this case, it may be beneficial to move some hosts onto a remote network.

Advantages of a single local segment:

  • Appropriate for simple networks
  • Less complexity and lower network administrative cost
  • The capability of devices to be “seen” by other devices
  • Faster data transfer—more direct communication
  • Ease of device access

Disadvantages of a single local segment:

  • All hosts are in one broadcast domain, which causes more traffic on the segment and may slow network performance.
  • Implementing quality of service (QoS) is harder; QoS gives priority to certain types of messages during times of network congestion.
  • Implementing security is harder.
Hosts on a Remote Segment

Placing additional hosts on a remote network decreases the impact of traffic demands, as shown in Figure 7-13. However, hosts on one network are not able to communicate with hosts on the other without the use of routing. Routers increase the complexity of the network configuration and can introduce latency, or time delay, on packets sent from one local network to the other.

   

Figure 7-13 Router Segmenting the Local Network

Advantages:

  • Is more appropriate for larger, more complex networks
  • Splits up broadcast domains and decreases traffic
  • Can improve performance on each segment
  • Makes the devices invisible to those on other local network segments
  • Can provide increased security
  • Can improve network organization

Disadvantages:

  • The use of routing is required (at the distribution layer).
  • The router can slow traffic between segments.
  • It is more complex and expensive (because a router is required).

Packet Tracer—Observe Data Flow in a LAN (7.3.3)

In this activity, you will complete the following objectives:

  • Develop an understanding of the basic functions of Packet Tracer.
  • Create/model a simple Ethernet network using three hosts and a switch.
  • Observe traffic behavior on the network.
  • Observe data flow of ARP broadcasts and pings.

Lab—Connect to a Wireless Router (7.3.4)

In this lab, you will complete the following objectives:

  • Connect a PC to a wireless router using an Ethernet cable.
  • Configure the PC with an appropriate IP address.
  • Verify the PC configuration using a command prompt.

Summary (7.4)

The following is a summary of each topic in the chapter:

  • The Need for Routing—As networks grow, you may need to divide one access layer network into multiple access layer networks. The distribution layer connects these independent local networks and controls the traffic flowing between them. It is responsible for ensuring that traffic between hosts on the local network stays local. Networking devices that make up the distribution layer are designed to interconnect networks, not individual hosts.

Devices that are beyond the local network segment are known as remote hosts. When a source device sends a packet to a remote destination device, routing is needed. Routing is the process of identifying the path to a destination. A router is a networking device that connects multiple Layer 3 IP networks. At the distribution layer of the network, routers direct traffic and perform other functions critical to efficient network operation. Routers, like switches, are able to decode and read the messages that are sent to them. Unlike switches, which make their forwarding decision based on the Layer 2 MAC address, routers make their forwarding decision based on the destination Layer 3 IP address.

  • The Routing Table—Each port, or interface, on a router connects to a different local network. Every router contains a table of all locally connected networks and the interfaces that connect to them. These routing tables can also contain information about the routes that the router uses to reach other remote networks. A router forwards a packet to one of two places: a directly connected network containing the destination host or to another router on the path to reach the destination host. When a router encapsulates the frame to forward it out of an Ethernet interface, it must include a destination MAC address. This is the MAC address of the destination host, if the destination host is part of a network locally connected to the router. If the router must forward the packet to another router through an Ethernet interface, it uses the MAC address of the connected router. Routers obtain these MAC addresses from ARP tables.

Routing tables contain the addresses of networks and the path to reach those networks. Entries can be made to the routing table in two ways: dynamically updated by information received from other routers in the network or manually entered by a network administrator.

How does the source host determine the MAC address of the router? A host is given the IPv4 address of the router through the default gateway address configured in its TCP/IP settings. The default gateway address is the address of the router interface connected to the same local network as the source host.

  • Create a LAN—The LAN refers to a local network or a group of interconnected local networks that are under the same administrative control. Other common characteristics of LANs are that they typically use Ethernet or wireless protocols, and they support high data rates.

In a simple network design, it may be beneficial to keep all hosts within a single local network. Placing some hosts on a remote network decreases the impact of traffic demands. However, hosts on one network are not able to communicate with hosts on the other without the use of routing.