Networking 2 Midterm Module Review
Networking 2 Midterm Module Review
Topics
1.1 IPv4 Network Address 1.4 IPv4 Unicast, Broadcast, and Multicast
1.2 IPv4 Address Structure 1.5 Connectivity Verification
1.3 IPv4 Subnet Mask
Learning Outcomes
At the end of the lesson, the students should be able to:
Binary Notation
Binary notation is a representation of information using only ones and zeros.
Computers communicate using binary data.
Binary data can be used to represent
many different forms of data.
For example, when typing letters on a
keyboard, those letters appear on screen in a form that you can read and understand;
however, the computer translates each letter to a series of binary digits for storage and
Figure 1. ASCII Digital Translator transport. To translate those letters, the computer
uses American Standard Code for Information Interchange (ASCII).
Using ASCII, the letter “A” is represented in bit form as: 01000001, while the lowercase
letter “a” is represented in bit form as 01100001. Use the ASCII translator in Figure 1
to convert ASCII characters to binary.
1
In IPv4 networks, this address is represented using a string of 32 bits (1s and 0s). At
the network layer, the packets then include this unique identification information for
both the source and destination systems. Therefore, in an IPv4 network, each packet
includes a 32-bit source address and a 32-bit destination address in the Layer 3
header.
For most individuals, a string of 32 bits is difficult to interpret and even more difficult to
remember. Therefore, we represent IPv4 addresses using dotted decimal format
instead of binary. This means that we look at each byte (octet) as a decimal number in
the range of 0 to 255. To understand how this works we need to have some skill in
binary to decimal conversion.
• Binary numbering system consists of the numbers 0 and 1 called bits.
• IPv4 addresses are expressed in 32 binary bits divided into 4 8-bit octets
Positional Notation
• Positional notation means that a digit
represents different values depending on the
position the digit occupies.
• In a positional notation system, the number
base is called the radix. In the base ten system,
the radix is 10.
• For the decimal number 192, the value that the 1
represents is 1*10^2 (1 times 10 to the power of 2).
The 1 is in what we commonly refer to as the "100s"
position. Positional notation refers to this position as
the base^2
position because the base, or radix, is 10 and the Figure 2. Shows the Positional
Notation power is 2. The 9 represents 9*10^1 (9 times 10 to the power of 1). Positional
notation for the decimal number 192 is shown in Figure 2.
2
In IPv4, addresses are 32-bit binary numbers. However, for ease of use by people,
binary patterns representing IPv4 addresses are expressed as dotted decimals. This is
first accomplished by separating each byte (8 bits) of the 32-bit binary pattern, called
an octet, with a dot. It is called an octet because each decimal number represents one
byte or 8 bits.
The binary address:
11000000 10101000 00001010 00001010 is expressed in dotted decimal as:
[Link]
Figure 5 illustrates the representation of the decimal number 192 in binary. A 1 in a certain
position means we add that value to the total. A 0 means we do not add that value. The
binary number 11000000 has a 1 in the 2^7 position (decimal value 128) and a 1 in the
2^6 position (decimal value 64). The remaining bits are all 0 so we do not add the
corresponding decimal values. The result of adding 128+64 is 192, the decimal equivalent
of 11000000.
A 1 in each position means that we add the value for that position to the total. All 1s
means that the values of every position are included in the total, therefore, the value of
all 1s in an octet is 255. 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
Example 2: An octet containing all 0s: 00000000
A 0 in each position indicates that the value for that position is not included in the total. A
0 in every position yields a total of 0.
3
0+0+0+0+0+0+0+0=0
A different combination of ones and zeros will yield a different decimal value.
4
Figure 8. Figure 9.
Figure 10. Figure 11.
Follow the conversion steps in the figures to see how an IP address is converted to
binary.
Figure 12: Convert 192 to binary. Figure 13: Convert 168 to binary.
Figure 16: Combine the converted octets beginning with the first octet.
IP address from left to right, bit for bit. The 1s in the subnet mask represent the network
portion; the 0s represent the host portion. As shown in Figure 17, the subnet mask is
created by placing a binary 1 in each bit position that represents the network portion and
placing a binary 0 in each bit position that represents the host portion. Note that the subnet
mask does not actually contain the network or host portion of an IPv4 address, it just tells
the computer where to look for these portions in a given IPv4 address.
The prefix length is another way of expressing the subnet mask. The prefix length is
the number of bits set to 1 in the subnet mask. It is written in “slash notation”, a “/”
followed by the number of bits set to 1. For example, if the subnet mask is
[Link], there are 24 bits set to 1 in the binary version of the subnet mask, so
the prefix length is 24 bits or /24. The prefix and the subnet mask are different ways of
representing the same thing - the network portion of an address.
Networks are not always assigned a /24 prefix. Depending on the number of hosts on
the network, the prefix assigned may be different. Having a different prefix number
changes the host range and broadcast address for each network.
The figures illustrate different prefixes using the same [Link] address. Figure 17
illustrates /24 to /26 prefixes. Figure 18 illustrates /27 to /28 prefixes.
6
Notice that the network address could remain the same, but the host range and the
broadcast address are different for the different prefix lengths. In the figures, you can
see that the number of hosts that can be addressed on the network also changes.
Figure 17. Illustrates /24 to /26 prefixes Figure 18. Illustrates /27
/28to
prefixes
Network Address
The network address is a standard way to refer
to a network. The subnet mask or the prefix length
might also be used when referring to network
address. For example, the network shown in Figure 19. Shows the [Link]/24
Figure 19 could be Network
referred to as the [Link] network, the [Link]
[Link] network or the [Link]/24 network. All hosts
in the [Link]/24 network will have the same network
portion bits.
7
Figure 20. Shows the Network Address
communicate on the network. In IPv4 addresses, the values between the network
address and the broadcast address can be assigned to end devices in a network.
As shown in Figure 21, this address has any
combination of 0 and 1 bits in the host portion of the address but cannot contain all 0
bits or all 1 bits.
The IPv4 broadcast address is a special address for each network that allows
communication to all the hosts in that network. To send data to all hosts in a network
at once, a host can send a single
Figure 19. Shows the [Link]/24
Network
packet that is addressed to the broadcast address of the network, and each host in
the network that receives this packet will process its contents.
The broadcast address uses the highest address in the network range. This is the
address in which the bits in the host portion are all 1s. All 1s in an octet in binary form,
is equal to the number 255 in decimal form. Therefore, as shown in Figure 22, for
the network [Link]/24, in which the last octet is used for the host portion, the
broadcast address would be [Link]. Note that the host portion will not always be
an entire octet. This address is also referred to as the directed broadcast.
First Host and Last Host Addresses
To ensure that all hosts within a network are assigned a unique IP address within that
network range, it is important to identify the first host address and the last host
address. Hosts within a network can be assigned IP addresses within this range.
First Host Address
As seen in Figure 23, the host portion of the first
host address will contain all 0 bits with a 1 bit for
the lowest order or right-most bit. This address is
always one greater than the network address. In
this example the first host address on the
[Link]/24 network is [Link]. It is common in
many addressing schemes to use the first host
address for the router or default gateway address.
The AND Operation ANDing is one of three basic binary operations used in digital
logic.
While all three are used in data networks, AND is used in determining the network
address.
Figure 26. Shows the 0 AND 1 = 0 Figure 25. Shows the 1 AND 1 =
9
Logical Figure 27. Shows the 0 AND 0 = 0
Figure 29. Shows the 1 bits in the subnet mask will result
in the network portion of the network address having the same
bits as the network portion of host.
AND is the comparison of two bits that yields the following results:
The IPv4 host address is logically ANDed, bit by bit, with its subnet mask to determine the
network address to which the host is associated. Figure 28. Shows the 1 AND 0 = 0
When this bitwise ANDing between the address and the subnet mask is performed, the
result yields the network address.
Importance of ANDing
Any address bit ANDed with a 1 bit value from the subnet mask will yield the original
bit value from the address. So, a 0 (from the IPv4 address) AND 1 (from the subnet
mask) is 0. 1 (from the IPv4 address) AND 1(from the subnet mask) is 1.
Consequently, anything ANDed with a 0 yields a 0. These properties of ANDing are
used with the subnet mask to "mask" the host bits of an IPv4 address. Each bit of the
address is ANDed with the corresponding bit of the subnet mask.
Because all the bits of the subnet mask that represent host bits are 0s, the host portion
of the resulting network address becomes all 0s. Recall that an IPv4 address with all
0s in the host portion represents the network address.
Likewise, all the bits of the subnet mask that indicate network portion are 1s. When
each of these 1s is ANDed with the corresponding bit of the address, the resulting bits
are identical to the original address bits.
As shown in the figure, the 1 bits in the subnet mask will result in the network portion of
the network address having the same bits as the network portion of the host. The host
portion of the network address will result in all 0s.
10
TOPIC 4: IPv4 Unicast, Broadcast, and Multicast
11
Assigning a Dynamic IPv4 Address to a Host
Dynamic Assignment
Most networks use Dynamic Host Configuration
Protocol (DHCP) to assign IPv4 addresses
dynamically.
The DHCP server provides an IPv4 address, subnet
mask, default gateway, and other configuration
information.
DHCP leases the addresses to hosts for a certain
length of time.
If the host is powered down or taken off the
network, the address is returned to the pool for reuse.
Unicast Transmission
In an IPv4 network, the hosts can communicate one of three ways:
• Unicast - The process of sending a packet from one host to an individual host
• Broadcast - The process of sending a packet from one host to all hosts in the
network
• Multicast - The process of sending a packet from one host to a selected group of
hosts, possibly in different networks
These three types of communication are used for different purposes in data networks. In
all three cases, the IPv4 address of the originating host is placed in the packet header as
the source address.
Unicast Traffic
• One to one communication.
• Use the address of the destination device as the destination address.
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 addresses of the
12
destination device as the destination address and can be routed through an
internetwork.
13
Multicast Transmission
• One to a select group.
• [Link] to [Link]
• Addresses reserved for multicast. Routing protocols use multicast transmission to
exchange routing information.
14
• Host confirmation
• Destination or Service Unreachable
• Time exceeded
• Route redirection
Host Confirmation
An ICMP Echo Message can be used to determine if a host is operational. The local
host sends an ICMP Echo Request to a host. If the host is available, the destination
host responds with an Echo Reply.
Destination or Service Unreachable
When a host or gateway receives a packet that it cannot deliver, it can use an ICMP
Destination Unreachable message to notify the source that the destination or service is
unreachable. The message will include a code that indicates why the packet could not
be delivered. Some of the Destination Unreachable codes for ICMPv4 are:
• 0 - net unreachable.
• 1 - Host unreachable.
• 2 - Protocol unreachable.
• 3 - Port unreachable.
Time Exceeded
An ICMPv4 Time Exceeded message is used by a router to indicate that a packet cannot
be forwarded because the Time to Live (TTL) field of the packet was decremented to 0. If
a router receives a packet and decrements the TTL field in the IPv4 packet to zero, it
discards the packet and sends a Time Exceeded message to the source host.
•
Figure 38. Shows the Testing IPv4
Connectivity to Local Network.
15
Route Redirection
A router may use the ICMP Redirect Message to notify the hosts on a network that a
better route is available for a particular destination. This message may only be used
when the source host is on the same physical network as both gateways. Figure 37.
Shows the Testing Local TCP/IP Stack
Topics
2.1 Subnetting an IPv4 2.2 Addressing Schemes
Network
16
2
Learning Outcomes
At the end of the lesson, the students should be able to:
Network Segmentation
Broadcast Domains
• Devices use broadcasts in an Ethernet LAN to locate:
o Other devices - Address Resolution
Protocol (ARP) which sends Layer 2
broadcasts to a known IPv4 address on the
local network to discover the associated
MAC address. o Services – Dynamic Host
Configuration Protocol (DHCP) which sends
broadcasts on the local network to locate a
DHCP server.
• Switches propagate broadcasts out all interfaces except the interface on which it
was received.
Problems with Large Broadcast Domains
• Hosts can generate excessive broadcasts and negatively affect the network.
o Slow network operations due to the significant amount of traffic it can cause.
o Slow device operations because a device must accept and process each
broadcast packet.
• Solution: Reduce the size of the network to create smaller broadcast domains.
These smaller network spaces are called subnets.
17
Reasons for Subnetting
• Reduces overall network traffic and improves
network performance.
• Enables an administrator
to implement security
policies such as which
subnets are allowed or
not allowed to
communicate together.
IP Subnetting is Fundamental
The Plan
18
As shown in the figure, planning network subnets
requires examination of both the needs of an
organization’s network usage, and how the subnets will
be structured.
The size of the subnet involves planning the number of hosts that will require IP host
addresses in each subnet of the subdivided private network. For example in a campus
network design you might consider how many hosts are needed in the Administrative
LAN, how many in the Faculty LAN and how many in the Student LAN. In a home
network, a consideration might be done by the number of hosts in the Main House
LAN and the number of hosts in the Home Office LAN.
In the upcoming examples you will see subnetting based on address blocks that have
subnet masks of [Link], [Link], and [Link].
Basic Subnetting
Every network address has a valid range of host addresses. All devices attached to the
same network will have an IPv4 host address for that network and a common subnet
mask or network prefix.
19
The prefix and the subnet mask are different ways of representing the same thing - the
network portion of an address.
IPv4 subnets are created by using one or more of the host bits as network bits. This is
done by extending the mask to borrow some of the bits from the host portion of the
address to create additional network bits. The more host bits borrowed, the more
subnets that can be defined. For each bit borrowed, the number of subnetworks
available is doubled. For example, if 1 bit is borrowed, 2 subnets can be created. If 2
bits, 4 subnets are created, if 3 bits are borrowed, 8 subnets are created, and so on.
However, with each bit borrowed, fewer host addresses are available per subnet.
Bits can only be borrowed from the host portion of the address. The network portion of
the address is allocated by the service provider and cannot be changed.
Note: In the examples in the figures, only the last octet is shown in binary because only
bits from the host portion can be borrowed.
As shown in Figure 44, the [Link]/24 network has 24 bits in the network portion
and 8 bits in the host
portion, which is
indicated with the
subnet mask
network supports a
single LAN interface.
If an additional LAN is
needed, the network
would need to be
subnetted.
As shown in Figure 45, when we convert the binary octet to decimal we see that the
first subnet address is [Link] and the second subnet address is [Link].
Because
a bit has been borrowed, the subnet mask for each subnet is [Link] or /25.
20
Subnets in Use
In the previous example, the [Link]/24 network was subnetted to create two
subnets:
[Link]/25
[Link]/25
In Figure 46, notice that router R1 has two LAN
segments attached to its GigabitEthernet
interfaces. The subnets will be used for the
segments attached to these interfaces. To serve as
the gateway for devices on the LAN, each of the
router interfaces must be assigned an IP address
within the range of valid addresses for the assigned
subnet. It is common practice to use the first or last
available address in a network range for the router interface address. Figure 46. Shows
the Router and
LAN segments. The first subnet, [Link]/25, is used for the network
attached to GigabitEthernet 0/0 and the second subnet,
[Link]/25, is used for the network attached to GigabitEthernet 0/1. To assign
an IP address for each of these interfaces, it is necessary to determine the range of
valid IP addresses for each subnet.
The following are guidelines for each of the subnets:
• Network address - All 0 bits in the host portion of the address.
• First host address - All 0 bits plus a right-most 1 bit in the host portion of the
address.
• Last host address - All 1 bits plus a right-most 0 bit in the host portion of the
address.
• Broadcast address - All 1 bits in the host portion of the address.
As shown in Figure 47, the first host address for the [Link]/25 network is
[Link], and the last host address is [Link]. Figure 48 shows that the first
host address for the [Link]/25 network is [Link], and the last host
address is [Link].
Figure 47. Shows the Range for Figure 48. Shows the Range for [Link]/26 Subnet.
[Link]/25 Subnet.
To assign the first host address in each subnet to the router interface for that subnet,
use the ip address command in interface configuration mode as shown in Figure 49.
Notice that each subnet uses the subnet mask of [Link] to indicate that the
network portion of the address is 25 bits.
A host configuration for the [Link]/25 network is shown in Figure 50. Notice
that the gateway IP address is the address configured on the G0/1 interface of R1,
[Link], and the subnet mask is [Link].
21
Figure 49. Shows the command
interface configuration mode. Figure 50. Shows the host configuration for the
[Link]/25
Subnetting Formulas
Calculating Subnets
Use this formula to calculate the number of
subnets:
2^n (where n = the number of bits
borrowed) As shown in Figure 51, for the
[Link]/25 example, the calculation
looks like this:
2^1 = 2 subnets
Calculating Hosts
Because hosts cannot use the network address or broadcast address from a subnet, 2
of these addresses are not valid for host assignment. This means that each of the
subnets has 126 (128-2) valid host addresses.
So in this example, borrowing 1 host bit toward the network results in creating 2 subnets,
and each subnet can have a total of 126 hosts assigned.
Creating 4 Subnets
22
create at least 3 subnets. Borrowing a single bit would only provide 2 subnets. To
provide more networks, more host bits must be borrowed. Calculate the number of
subnets created if 2 bits are borrowed using the formula 2^number of bits borrowed:
2^2 = 4 subnets
Borrowing 2 bits creates 4 subnets, as shown in Figure 53.
Recall that the subnet mask must change to reflect the borrowed bits. In this
example, when 2 bits are Figure 53. Shows the Borrowing 2 Bits borrowed, the mask is
extended 2 bits into the last
octet. In decimal, the mask is represented as [Link], because the last octet is
1100 0000
in binary.
Host Calculation
To calculate the number of hosts, examine the last octet. After borrowing 2 bits for the
subnet, there are 6 host bits remaining.
Apply the host calculation formula as shown in Figure 54.
2^6 = 64
But remember that all 0 bits in the host portion of the address is the network address, and
all 1s in the host portion is a broadcast address. Therefore, there are only 62 host
addresses that are actually available for each subnet.
Figure 55. Shows the Address Range for Figure 56. Shows the Address Ranges Nets-20
[Link]/26 Subnet.
In Figure 57 a sample configuration is shown. In this configuration, the
first
network
is
23
assigned to the GigabitEthernet 0/0 interface, the
second network is assigned to the
GigabitEthernet 0/1 interface, and the third
network is assigned to the Serial 0/0/0 network.
Again, using a common addressing plan, the first host address in the subnet is
assigned to the router interface. Hosts on each subnet will use the address of the
router interface as the default gateway address.
• PC1 ([Link]/26) will use [Link] (G0/0 interface address of R1) as
its default gateway
Figure 57. Shows the sample configuration. address
• PC2 ([Link]/26) will use [Link] (G0/1 interface address of R1)
as its default gateway address
Note: All devices on the same subnet will have a host IPv4 address from the range of
host addresses and will use the same subnet mask.
Creating 8 Subnets
Figure 59. Shows the borrowing 3 bits Figure 60. Shows the borrowing 3 bits
Figure 58. Shows the 5
creates 8 subnets. creates 8 subnets.
Subnets Required.
Next, consider an internetwork that requires five subnets as shown in Figure 58.
Using the same [Link]/24 address block, host bits must be borrowed to create at
least 5 subnets. Borrowing 3 bits would only provide 4 subnets as seen in the previous
example. To provide more networks, more host bits must be borrowed. Calculate the
number of subnets created if 3 bits are borrowed using the formula:
2^3 = 8 subnets
As shown in Figures 59 and 60, borrowing 3 bits creates 8 subnets. When 3 bits are
borrowed, the subnet mask is extended 3 bits into the last octet (/27), resulting in a
subnet mask of [Link]. All devices on these subnets will use the subnet mask
[Link] mask
(/27).
Host Calculation
To calculate the number of hosts, examine the last octet. After borrowing 3 bits for the
subnet, there are 5 host bits remaining. Apply the host calculation formula:
2^5 = 32, but subtract 2 for the all 0s in the host portion (network address) and all 1s in
the host portion (broadcast address).
24
Figure 61. Shows the Subnet Allocation Figure 62. Shows the Interface Address
Configuration
The subnets are assigned to the network segments required for the topology as shown in
Figure 61. Again, using a common addressing plan, the first host address in the subnet is
assigned to the router interface, as shown in Figure 5. Hosts on each subnet will use the
address of the router interface as the default gateway address.
• PC1 ([Link]/27) will use [Link] address as its default gateway address.
• PC2 ([Link]/27) will use [Link] address as its default gateway
address.
• PC3 ([Link]/27) will use [Link] address as its default gateway
address.
• PC4 ([Link]/27) will use [Link] address as its default gateway
address.
• PreventingDuplication of Addresses
- Each host in an internetwork must have a
unique address. Without the proper planning
and documentation, an address could be
25
3 assigned to more than one host, resulting in
access issues for
Figure 68. Shows the IPv4 Address Planning and both hosts.
Assignment. Providing and Controlling Access - Some hosts, such as servers,
•
provide resources to
internal hosts as well as to external hosts. The Layer 3 address assigned to a server
can be used to control access to that
server. If, however, the address is
randomly assigned and not well
documented, controlling access is more
difficult.
• Monitoring Security and
Performance - Similarly, the security and performance of network hosts and the
network as a whole must be monitored. As part of the monitoring process, network
traffic is examined for addresses that are generating or receiving excessive packets.
If there is proper planning and documentation of the network addressing,
problematic network devices can be easily found.
Topics
3.1 Router Initial Configuration 3.3 Router Operation
3.2 Routing Decisions
Learning Outcomes
26
At the end of the lesson, the students should be able to:
27
Routers Are Computers
A router is a specialized computer and requires the same components to operate as
computers including:
− Central Processing Unit (CPU)
− Operating System (OS)
− A desktop computer might use the
Windows Operating System, but a Cisco
Router uses the Cisco Internetwork
Operating System (IOS).
− Memory and storage (RAM, ROM,
NVRAM, Flash, hard drive)
− Non-volatile vs. volatile memory
− Which one requires constant power to
retain content?
− Routers have specialized ports and network interface cards to interconnect devices
to other networks
Routers Interconnect
− Router is responsible for forwarding
Networks
packets from network to network,
the source to the
from
Multiple networks on a router require
− destination
Routers use the routing table like a map to discover the best path to a given network.
Packet Forwarding Mechanisms
− Routers support three packet-forwarding mechanisms:
− Process switching –
Slower and older packet
forwarding mechanism
Packet arrives on an interface, it is
forwarded to the control plane where
the CPU matches the
destination address with an entry in
its routing table in order to
determine the exit interface
Slow because it does this for every
packet in a stream
− Fast Switching –
Common packet forwarding mechanism which uses a fast-switching cache to
store the next-hop information
Packet arrives on an interface, it is forwarded to the control plane where the
CPU searches for a match in the fast-switching cache
If no match, it is process-switched and forwarded to the exit interface
Packet flow information stored in the fast-switching cache for quick lookup
− Cisco Express Forwarding – CEF
− Fastest, most recent, and preferred
packetforwarding mechanism
− CEF builds a Forwarding Information Base
(FIB) and an adjacency table
− Table entries are not packet-triggered like
fast switching, but change-triggered when
something changes in the network
topology
− When a network has converged, the FIB and
adjacency tables contain all the
information a router would have to consider when forwarding a packet
− FIB contains pre-computed reverse lookups, next hop information for routes including
the interface and Layer 2 information
Tasks 1
DIRECTION: Provide the correct answer to the following questions. Write your
answer on the space provided. Identify Router Components.
Identify the ports/slots on this Cisco 1941 Series router. Match the port or slot
name to the letter that corresponds to the appropriate back panel location.
29
30
Connect Devices
Connect to a Network
router.
31
Routers are also usually configured with their own default gateway.
Enable IP on a Host
A host can be assigned IP address information either: Statically
− Manually configure the IP address, subnet mask, default gateway and probably the
DNS server IP address.
− Servers and printers commonly use static address assignment.
Dynamically
− IP address information is
obtained from a Dynamic Host
Configuration Protocol (DHCP)
server.
− DHCP server provides an IP
address, subnet mask, default
gateway and probably the DNS
server information.
− Most host devices uses DHCP.
Device LEDs
Host computers connect to a wired
network using a RJ-45 Ethernet cable.
32
Most network interface cards have one or two LED indicators next to the interface.
− Green LED indicates a good connection.
− A blinking green indicates network activity.
− No light indicates a problem with either the network cable or the network itself.
Network infrastructure devices also use LEDs to provide a quick status view. For
example, a Cisco Catalyst 2960 switch:
− Green LEDs indicate a switch is functioning normally.
− Amber LEDs indicate a malfunction.
Cisco routers also use various LED indicators to provide status information.
Console Access
− Devices including routers and switches are
commonly accessed using Secure Shell
(SSH) or HyperText Transfer Protocol
Secure (HTTPS).
− Console access is usually only required when
initially configuring a device, or if remote
access fails.
Console access requires:
− Console cable – RJ-45 to DB-9 serial cable or a
USB serial cable.
− Terminal emulation software – Tera Term, PuTTY, or HyperTerminal
− Cable is connected between the serial port of the host and the console port on the
device. − If a host does not have a serial port, use the USB port and a USB-to-RS-
232 adapter.
Enable IP on a Switch
− Network devices require IP
addresses in order for the
network administrator to
connect to the devices using
Telnet, SSH, HTTP, or
HTTPS. − A switch requires an
IP address to be configured on
a virtual interface, called the
switched virtual interface
(SVI). − Commands in the
figure to the left should be
used to configure the IP
address on vlan 1 and also
the default-gateway
information.
Tasks 2
DIRECTION: Provide the correct answer to the following questions. Write your
answer on the space provided.
Documenting Network Addressing
From the pool of addresses, provide select an address to the table and to the topology to
assign an address for each device.
33
Router Basic Settings
Configure Basic Router Settings
Cisco routers and Cisco switches have many similarities. They support a similar modal
operating system, similar command structures, and many of the same commands. In
addition, both devices have similar initial configuration steps.
When configuring a Cisco switch or router, the following basic tasks should be performed
first:
− Name the device - Distinguishes it from other routers.
− Secure management access - Secures privileged EXEC, user EXEC, and Telnet
access, and encrypts passwords to their highest level.
− Configure a banner - Provides legal notification of unauthorized access.
34
Always save your configuration changes and verify your settings: R1# copy
35
Configure an IPv4 Loopback Interface
An IPv4 loopback interface is typically configured on a router for testing and
management purposes.
A loopback interface is a logical interface internal to the router.
− It is not assigned to a physical port and can not be connected to any other device.
− It is a software interface that is automatically placed in an “up” state as long as the
router is functioning.
Some routing protocols such as OSPF require
an address for identification, the loopback
address can be used rather than an interface
address which might go down on occasion,
disrupting OSPF routing.
Enabling and assigning a loopback address
is simple:
Router(config)# interface loopback number
Router(config-if)# ip address ip-address
subnetmask
Router(config-if)# exit
36
TOPIC 2: Routing Decisions
When a router receives a packet from one network that is destined for another network,
the router performs the following three steps:
− Step 1. De-encapsulates the Layer 2 frame header and trailer to expose the Layer 3
packet.
− Step 2. Examines the destination IP address of the IP packet to find the best path in
the routing table.
− Step 3. If the router finds a path to the destination, it encapsulates the Layer 3 packet
into a new Layer 2 frame and forwards the frame out the exit interface.
As a packet travels from the source device to the destination device, the Layer 3 IP
addresses do not change. However, the Layer 2 data link addresses change at every
hop as it is de-encapsulated and re-encapsulated.
Send a Packet
For PC1 to send a packet to PC2, the following occurs:
− PC1 must determine if the destination IPv4
address is on the same network. If it is on
the same network, PC1 will obtain the
destination MAC address from its ARP
cache or use an ARP request.
− Because the destination network is on a
different network, PC1 forwards the
packet to its default gateway.
− To determine the MAC address of the default gateway, PC1 checks its ARP table for
the IPv4 address of the default gateway and its corresponding MAC address. An ARP
request is sent if it is not found.
− When PC1 has the MAC address of Router R1, it can forward the packet.
37
− R1 examines the destination MAC
address which matches the MAC
address of the receiving interface and
copies the frame into its buffer.
− R1 identifies the Ethernet Type field as
0x800 which indicates that the Ethernet frame
contains an IPv4 packet in the data
portion of the frame.
− R1 de-encapsulates the Ethernet frame.
− Because the destination IPv4 address of the packet, [Link], does not match
any of the directly connected networks on R1, R1 searches the routing table for a
corresponding route.
− R1’s Routing Table has a route for the [Link]/24 network.
When R1 receives the Ethernet frame from PC1, the following occurs:
− The route that R1 finds to the [Link]/24 network has a next-hop address of
[Link] and an exit interface of FastEthernet 0/1.
− This will require that the IPv4 packet be encapsulated in a new Ethernet frame with the
destination MAC address of the IPv4 address of the next-hop router, [Link]
− Because the exit interface is on an Ethernet network, R1 must resolve the next-hop
IPv4 address with a destination MAC address using ARP, assuming it is not in its
ARP cache.
− When R1 has the MAC address for the next-hop, the Ethernet frame is forwarded out
of the FastEthernet 0/1 interface of R1.
Packet Routing
− R2 examines the destination
MAC address. Because it
matches the MAC address of its
receiving interface, R2
copies the frame into its
buffer.
− R2 determines that that frame
contains an IPv4 packet in
the data portion of the frame.
− R2 de-encapsulates the Ethernet frame.
− Because the destination IP address is on a different network, the routing table is
searched to find a corresponding route for the destination IPv4 address.
− The process outlined to the right describes what happens when router R2 receives a
frame on its FA0/0 interface that needs to be forwarded to router R3.
− The routing table of R2 has a route to the [Link]/24 network with a next-hop IPv4
address of [Link] and an exit interface of Serial 0/0/0.
− Because the exit interface is not Ethernet, R2 does not have to resolve the next-hop
IP-v4 address with a destination MAC address.
− The IPv4 packet is encapsulated into a new data link frame used by the exit interface
and sent out the Serial 0/0/0 exit interface.
− Because there are no MAC addresses on serial interfaces, R2 sets the data link
destination address to an equivalent of a broadcast.
38
− R3 searches the routing table for the destination IPv4 address of the packet.
− Because the destination network is on R3’s directly connected network, the packet can
be sent directly and does not need to be sent to another router.
− Because the exit interface is a directly connected Ethernet network, R3 must resolve
the destination IPv4 address of the packet with a destination MAC address by either
finding it in its ARP cache or send out an ARP request.
− The process outlined on the right describes what takes place when R3 receives a
frame on its serial interface.
Path Determination
Routing Decisions
The primary function of a router is to determine the best
path to send packets.
A routing table search results in one of three path determinations:
− Directly connected network – If the destination IP
address belongs to a network that is directly
connected to the router, the packet is forwarded
out of that interface.
− Remote network – If the destination IP address of
the packet belongs to a remote network, the packet
is forwarded to another router.
− No route determined – If the destination IP address does not belong to a connected
network or is in the routing table, the packet is sent to Gateway of Last Resort.
Best Path
− Determining the best path to a destination network involves the evaluation of multiple
paths and selecting the optimum or shortest path to reach that network.
− The best path is selected based on the
metric or value that is used by the routing
protocol.
− The best path to a network is the path with the
lowest metric. A metric is a value that is used
to measure the distance to a given
network.
Each dynamic routing protocols has their own rules
and metrics to build and update routing tables. For
example: − Routing Information Protocol (RIP)
– Hop count
− Open Shortest Path First (OSPF) – Cisco’s cost based cumulative bandwidth from
source to destination
− Enhanced Interior Gateway Routing Protocol (EIGRP) – Bandwidth, delay, load,
reliability
Load Balancing
− If a router has two or more paths with
identical metrics to the same destination
network, the router will forward the
packets using both paths equally.
− The routing table contains a single
destination network, but has multiple exit
interfaces – one for each equal cost path. This
is referred to as equal cost load
balancing.
39
− If configured correctly, load balancing can increase the effectiveness and
performance of the network.
− Equal cost load balancing can be configured to use both dynamic routing protocols
and static routes.
− EIGRP supports unequal cost load balancing.
Administrative Distance
− If a router has multiple routing protocols
configured and static routes, it is
possible that the routing table might have
more than one route source for the same
destination network.
− Each routing protocol might prefer a
different path to reach the same
destination. How does the router know which
path to choose?
− The Cisco IOS uses what is known as the
administrative distance (AD) to determine which route to install in the routing table.
− The AD represents the “trustworthiness” of the route. The lower the AD, the more
trustworthy.
A routing table is a data file in RAM that is used to store information about directly
connected and remote networks.
The routing table contains next hop associations for remote networks. The association
tells the router what the next hop is for a destination network.
40
− S – Static routes
− D – Learned dynamically from another router using the EIGRP routing protocol.
− O – Learned dynamically from another router using the OSPF routing protocol.
41
− As each interface is added, the routing table automatically
adds the connected (‘C’) and local
(‘L’) entries.
Statically Learned Routes
Static Routes
− After directly connected interfaces are configured
and added to the routing table, then static or
dynamic routing can be configured.
− Static routes are manually configured and define an
explicit path between two networking devices.
− If the network topology changes, static routes must
manually be reconfigured.
Benefits of static routes include:
− Improved security
− Resource efficiency – less bandwidth usage and no CPU cycles are used to calculate
and communicate route
There are two main types of static routes in the routing table:
− Static route to a specific network
− Default static route
IPv4 static routes are configured using the following command:
− ip route network mask { next-hop-ip | exit-intf }
A static route appears in the routing table with the code ‘S’.
A default static route is similar to a default gateway on a PC or host. The default static
route specifies the exit point to use when the routing table does not have a path for
the destination network. Use the command:
− ip route [Link] [Link] { exit-intf | next-hop-ip }
Static Route Examples
The figure to the left shows the
configuration of an IPv4 default static route
on R1 to the Serial 0/0/0 interface.
− The ‘S’ indicates that it is a static route
− The asterisk (*) identifies this as a
possible candidate to be the
default route.
− Notice that this route was chosen to be
the Gateway of last resort (default
route). Here are two static route
configurations from R2 to reach the two LANs
on R1:
− ip route [Link] [Link] s0/0/0
− ip route [Link] [Link] [Link]
Which route was configured to use the exit interface?
Will they send packets for these networks to the same router?
ASSESSMENT: Quiz
Direction: Read each statement carefully. Choose the correct answer from the given
options and encircle the letter that best suits your answer.
1. A network administrator enters the command copy running-config startup-config.
Which type of memory will the startup configuration be placed into?
a. Flash b. NVRAM c. RAM d. ROM
2. Which packet-forwarding method does a router use to make switching decisions
when it is using a forwarding information base and an adjacency table?
a. Cisco Express Forwarding c. fast switching
b. process switching d. flow process
3. What are two functions of a router? (Choose two.)
a. A router connects multiple IP networks.
b. It determines the best path to send packets.
c. It controls the flow of data via the use of Layer 2 addresses.
d. It provides segmentation at Layer 2.
4. In order for packets to be sent to a remote destination, what three pieces of
information must be configured on a host? (Choose three.)
a. IP address c. subnet mask
b. default gateway d.
hostname
5. Refer to the exhibit. A network administrator has
configured R1 as shown. When the
administrator checks the status of the serial
interface, the interface is shown as being
administratively down. What additional
command must be entered on the serial interface of R1 to bring the interface up?
a. no shutdown b. IPv6 enable c. clockrate 128000 d. end
6. What is a characteristic of an IPv4 loopback interface on a Cisco IOS router?
a. It is a logical interface internal to the router.
b. The no shutdown command is required to place this interface in an UP state.
43
4
c. Only one loopback interface can be enabled on a router.
d. It is assigned to a physical port and can be connected to other devices.
7. What two pieces of information are displayed in the output of the show ip interface
brief command? (Choose two.)
a. IP addresses c. Layer 1 statuses
b. MAC addresses d. next-hop addresses
8. Which two items are used by a host device when performing an ANDing operation to
determine if a destination address is on the same local network? (Choose two.)
a. destination IP address c. subnet mask
b. destination MAC address d. source MAC address
9. A network administrator configures the interface fa0/0 on the router R1 with the
command ip address [Link] [Link]. However, when the administrator
issues the command show ip route, the routing table does not show the directly
connected network. What is the possible cause of the problem?
a. The configuration needs to be saved first.
b. No packets with a destination network of [Link] have been sent to R1.
c. The subnet mask is incorrect for the IPv4 address.
d. The interface fa0/0 has not been activated.
Topics
4.1 Implement Static Routes 4.3 CIDR and VSLM
4.2 Configure Static and Default 4.4 Troubleshoot Static and Default Route
Routes
Learning Outcomes
At the end of the lesson, the students should be able to:
44
TOPIC 1: Implement Static Routes
46
TOPIC 2: Configure Static and Default Routes
Next-Hop Options
In this example, each router only has entries for
directly connected network.
− R1 does not have an entry in its routing
table for the R3 LAN network
47
Configure a Next-Hop Static Route
In this example, only the next-hop IP address is specified
Before packet is forwarded the router must determine the exit interface to use (route
resolvability)
48
− When exit interface is an Ethernet network, fully specified static route is used
Note: With CEF, a next-hop address could be used instead
49
TOPIC 3: CIDR and VLSM
Introduction
− Prior to 1981, IP addresses used only the first 8 bits to specify the network portion of
the address
− In 1981, RFC 791 modified the IPv4 32-bit address to allow for three different classes
− IP address space was depleting rapidly o The Internet Engineering Task Force (IETF)
introduced Classless Inter-Domain Routing (CIDR)
CIDR uses Variable Length Subnet Masking (VLSM) to help conserve
address space
VLSM is simply subnetting a subnet
− Classes of IP addresses are identified by the decimal number of the 1st octet
o Class A address begin with a 0 bit
Range of class A addresses = [Link] to [Link]
o Class B address begin with a 1 bit and a 0 bit
Range of class B addresses = [Link] to [Link]
o Class C addresses begin with two 1 bits & a 0 bit
Range of class C addresses = [Link] to [Link]
50
− The IPv4 Classful Addressing
Structure (RFC
790) o An IP address has 2 parts:
The network portion
• Found on the left side
of an IP address
The
host
portion
o Recall that classful routing protocols (i.e. RIPv1) do not send subnet
masks in their routing updates
o The reason is that the Subnet mask is directly related to the network
address
− Classless Inter-domain Routing (CIDR – RFC 1517)
o Advantage of CIDR :
More efficient use of IPv4 address space
Route summarization
o Requires subnet mask to be included in routing update because address
class is meaningless
o Recall purpose of a subnet mask:
To determine the network and host portion of an IP address
− Classless IP Addressing
− CIDR & Route Summarization o Variable
Length Subnet Masking (VLSM)
o Allows a subnet to be further sub-netted according to individual needs o
Prefix Aggregation a.k.a. Route Summarization o CIDR allows for routes to
be summarized as a single route
− Classless IP Addressing
− CIDR & Route Summarization o
Variable Length Subnet
Masking
(VLSM) o Allows a subnet to be
further subnetted according to
individual needs o Prefix
Aggregation a.k.a. Route
51
Summarization o CIDR allows for routes to be summarized as a single
route Classless Routing Protocol
− Characteristics of classless routing protocols:
o Routing updates include the
subnet mask
o Supports VLSM o Supports Route
Summarization − Classless
Routing Protocol
52
Classless Inter-Domain
Routing (CIDR)
− Route summarization
done by CIDR o
Routes are
summarized with
masks that are less
than that of the
default classful
mask
o Example:
[Link] /
13 is the
summarized route for the
[Link] / 16 to [Link] /
16 classful networks
− Steps to calculate a route summary o List
networks in binary format o Count number
of left most matching bits to determine
summary route’s mask
o Copy the matching bits and add zero bits to determine the summarized
network address
VLSM Example
Careful consideration must be given to the
design of a network addressing scheme. For
example, the sample topology in Figure 1
requires seven subnets.
Fig. 1. Basic Topology
Using traditional subnetting, the first
seven address blocks are allocated for LANs
and WANs, as shown in Figure 2. This
scheme results in 8 subnets with 30
usable addresses each (/27). While this
scheme works for the LAN segments, there
are many wasted addresses in the WAN
segments.
.As shown in Figure 3, to use the address space more efficiently, /30 subnets are created
for WAN links. To keep the unused blocks of addresses together, the last /27 subnet is
53
further subnetted to create the /30 subnets. The first 3 subnets were assigned to WAN
links creating subnets [Link]/30, [Link]/30, and [Link]/30.
Designing the addressing scheme in this way leaves three unused /27 subnets and five
unused /30 subnets.
Fig. 3. Subnetting subnet [Link] /27 to [Link] /30
Figures 4
to 7
display
sample
In Part 1, you will examine the network requirements to develop a VLSM address
scheme for the network shown in the Topology diagram using the network address of
[Link]/17. Part 2: Design the VLSM Address Scheme Calculate the subnet
information.
Use the information that you obtained in Part 1 to fill in the table below
54
Number Network First Host Broadcast
Subnet Description of Hosts Address Address Address
HQ G0/0 16,000 /CIDR
HQ G0/1 8,000
BR1 G0/1 4,000
BR1 G0/0 2,000
BR2 G0/1 1,000
BR2 G0/0 500
HQ S0/0/0 – BR1 S0/0/0 2
HQ S0/0/1 – BR2 S0/0/1 2
BR1 S0/0/1 – BR2 S0/0/0 2
Complete the device interface address table.
Device Interface IP Address Subnet Mask Device Interface
G0/0 16,000 Host LAN
G0/1 8,000 Host LAN
HQ S0/0/0 BR1 S0/0/0
S0/0/1 BR2 S0/0/1
G0/0 2,000 Host LAN
G0/1 4,000 Host LAN
BR1 S0/0/0 HQ S0/0/0
S0/0/1 BR2 S0/0/0
G0/0 500 Host LAN
G0/1 1,000 Host LAN
BR2 S0/0/0 BR1 S0/0/1
S0/0/1 HQ S0/0/1
Part 3: Cable and Configure the IPv4 Network
In Part 3, you will cable the network topology and configure the three routers using the
VLSM address scheme that you developed in Part 2.
− Cable the network as shown in the topology.
− Configure basic settings on each router. −
Configure the interfaces on each router.
− Save the configuration on all devices.
− Test Connectivity.
55
Packet Processing with Static Routes
Static Routes and Packet Forwarding
− R3 encapsulates the packet in a new frame with the MAC address of the G0/0
interface as the source Layer 2 address and the MAC address of PC3 as the
destination MAC address
− Frame is forwarded out of G0/0 interface and packet arrives on the NIC
interface
of PC3
56
Troubleshoot IPv4 Static and Default Route
Configuration
Troubleshoot a Missing Route
Common IOS troubleshooting commands include:
− ping
− traceroute
− show ip route
− show ip interface brief
− show cdp neighbors detail
ASSESSMENT: Quiz
Direction: Read each statement carefully. Choose the correct answer from the given
options and encircle the letter that best suits your answer.
1. What are two advantages of static routing over dynamic routing? (Choose two.)
a. Static routing is more secure because it does not advertise over the network.
b. Static routing uses fewer router resources than dynamic routing.
c. Static routing scales well with expanding networks.
d. Static routing requires very little knowledge of the network for correct
implementation.
2. Refer to the exhibit. What routing solution will allow both PC A and PC B to access
the Internet with the minimum amount of router CPU and network bandwidth
utilization?
57
a. Configure a static default route from R1
to Edge, a default route from Edge to the
Internet, and a static route from Edge to
R1.
b. Configure a static route from R1 to
Edge and a dynamic route from Edge to
R1.
c. Configure a dynamic route from R1 to
Edge and a static route from Edge to R1.
d. Configure a dynamic routing protocol between R1 and Edge and advertise all
routes.
3. What is the correct syntax of a floating static route?
a. ip route [Link] [Link] [Link] 120
b. ip route [Link] [Link] serial 0/0/0
c. ip route [Link] [Link] serial 0/0/0
d. ip route [Link] [Link] [Link]
4. What is a characteristic of a static route that matches all packets?
a. It backs up a route already discovered by a dynamic routing protocol.
b. It identifies the gateway IP address to which the router sends all IP packets for
which it does not have a learned or static route.
c. It uses a single network address to send multiple static routes to one
destination address.
d. It is configured with a higher administrative distance than the original dynamic
routing protocol has.
5. What type of route allows a router to forward packets even though its routing table
contains no specific route to the destination network?
a. dynamic route c. default route
b. destination route d. generic route
6. Why would a floating static route be configured with an administrative distance that is
higher than the administrative distance of a dynamic routing protocol that is running
on the same router?
a. to be used as a backup route c. to load-balance the traffic
b. to act as a gateway of last resort d. to be the priority route in the routing
table
7. What happens to a static route entry in a routing table when the outgoing interface
associated with that route goes into the down state?
a. The router polls neighbors for a replacement route.
b. The static route remains in the table because it was defined as static.
c. The router automatically redirects the static route to use another interface.
d. The static route is removed from the routing table.
8. The network administrator configures the router with the ip route [Link]
[Link] [Link] command. How will this route appear in the routing table?
a. S [Link] [1/0] via [Link]
b. C [Link] is directly connected, Serial0/0
c. S [Link] is directly connected, Serial0/0
d. C [Link] [1/0] via [Link]
9. Which type of static route that is configured on a router uses only the exit interface?
a. directly connected static route c. recursive static route
b. fully specified static route d. default static route
10. Refer to the graphic. Which command would be
used on router A to configure a static route to
direct traffic from LAN A that is destined for
LAN C?
58
a. A(config)# ip route [Link] [Link]
59