Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Interconnecting Cisco Networking

Devices Part 1
ICND1 100-105

Instructor
Paul A. Parker

1
Chapter 18

Configuring IPv4 Addresses and Static Routes

2
Chapter 18
Foundation Topics
v IP Routing
▼ IP routing delivers packets across TCP/IP networks from the
sending host to the destination host starting as follows:
➘  Step 1. If the destination is
local, send directly:
➘  A. Find the destination host’s
MAC address. Use the
already-known Address
Resolution Protocol (ARP)
table entry, or use ARP messages to learn the information.
➘  B. Encapsulate the IP packet in a data link frame, with the destination data
link address of the destination host.
➘  Step 2. If the destination is not local, send to the default gateway:
➘  A. Find the default gateway’s MAC address. Use the already-known ARP
table entry, or use ARP messages to learn the information.
➘  B. Encapsulate the IP packet in a data link frame, with the destination data
link address of the default gateway.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 3


Chapter 18
IP Routing
v IP Routing
▼ IP Routing continues at the router as follows:
➘  1. For each received data link frame, choose whether or not to
process the frame. Process it if:
➘  A. The frame has no errors (per the data link trailer Frame Check
Sequence, or FCS, field)
➘  B. The frame’s destination data link address is the router’s address (or
an appropriate multicast or broadcast address).
➘  2. If choosing to process the frame at Step 1, deencapsulate the
packet from inside the data link frame.
➘  3. Make a routing decision. To do so, compare the packet’s
destination IP address to the routing table and find the route that
matches the destination address. This route identifies the outgoing
interface of the router and possibly the next-hop router.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 4


Chapter 18
IP Routing
v IP Routing
➘  4. Encapsulate the packet into a data link frame appropriate for the
outgoing interface. When forwarding out LAN interfaces, use ARP as
needed to find the next device’s MAC address.
➘  5. Transmit the frame out the outgoing interface, as listed in the
matched IP route.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 5


Chapter 18
IP Routing
v An Example of IP Routing
▼  This example shows a typical IP addressing diagram with typical
IPv4 address abbreviations.
▼  When possible the diagram lists the subnet and then the last
octet or two for the individual IP addresses.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 6


Chapter 18
IP Routing
v Host Forwards Packet to Default Router (Gateway)
▼ The host compares the destination address with its own using the
mask to decide if the destination is on the local network or a
remote network.
▼ Determining the destination is remote the host then uses the
entry in its ARP table to encapsulate the IP packet in an Ethernet
header and trailer addressed to its default gateway.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 7


Chapter 18
IP Routing
v Routing Step 1: Forward or Filter?
▼ The router receives the frame and determines if it should filter
the frame or accept it. Since the destination MAC is its own it
decides to accept the frame.
▼ The router then examines the Frame Check Sequence (FCS) to
ensure the packet was not damaged during transmission.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 8


Chapter 18
IP Routing
v Routing Step 2: De-encapsulate the IP Packet
▼ After the router has checked the FCS it beings to process the
packet by de-encapsulating it from the Ethernet header and
trailer.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 9


Chapter 18
IP Routing
v Routing Step 3: Choose Where to Forward the Packet
▼ The routing table lists all the networks and subnets along with
their mask that are known to the router.
▼ The router it must compare the destination IP address for the
packet with the entries in the table to decide where to send the
packet.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 10


Chapter 18
IP Routing
v Routing Step 4: Encapsulate the IP Packet
▼ Now that the router had decided to forward the packet to the
next router across the S0/0/0 interface, it encapsulates it in the
appropriate header and trailer. In this case, HDLC.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 11


Chapter 18
IP Routing
v Routing Step 5: Transmitting the Frame
▼ Finally the router transmits the frame over the transmission
media. In some cases it may have to wait, particularly if other
frames are already waiting to be sent.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 12


Chapter 18
IP Routing
v Internal Processing on Cisco Routers
▼ Potential Routing Performance Issues
➘  The process of matching a packet’s destination address with the IP
routing table can take a lot of CPU time.
➘  IP Routers on the core Internet have hundreds of thousands of
entries.
➘  Imagine if subnetting math had to be performed for each address
and each entry in the routing table for each packet being routed.
➘  The Application Specific Integrated Circuit (ASIC) assists the
forwarding process by putting much of the logic into a highly
optimized hard-wired computer chip utilized by the Layer 3 switch.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 13


Chapter 18
IP Routing
v Internal Processing on Cisco Routers
▼ Cisco Router Fast Switching and CEF
➘  Historically Cisco has had three major variations of routing logic.
Early routers used logic similar to the steps described earlier without
any optimizations called process switching. In the early 1990s, Cisco
developed fast switching which made a couple of optimizations
including caching the data link headers. Later in the 1990s, Cisco
introduced Cisco Express Forwarding (CEF).

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 14


Chapter 18
Configuring Connected Routes
v Routers can add routes to the routing tables through
three methods:
▼ Connected routes: Added because of the configuration of the
ip address interface subcommand on the local router
▼ Static routes: Added because of the configuration of the ip
route global command on the local router
▼ Routing protocols: Added as a function by configuration on all
routers, resulting in a process by which routers dynamically tell
each other about the network so that they all learn routes

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 15


Chapter 18
Configuring Connected Routes
v Connected Routes and the ip address Command
▼ Cisco routers automatically add a route to its routing table for the
subnet connected to each interface assuming the following:
➘  The interface is in a working state—in other words, the interface
status in the show interfaces command lists a line status of up
and a protocol status of up.
➘  The interface has an IP address assigned through the ip address
interface subcommand.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 16


Chapter 18
Configuring Connected Routes
v Routing between Subnets on VLANs
▼ Three options exist for connecting a router to each subnet on a
VLAN, however, the first option requires too many interfaces to
make it practical.
➘  Use a router, with one router LAN interface and cable connected to
the switch for each and every VLAN (typically not used).
➘  Use a router, with a VLAN trunk connecting to a LAN switch.
➘  Use a Layer 3 switch.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 17


Chapter 18
Configuring Connected Routes
v Configuring Routing to VLANs using 802.1Q on Routers
▼ Using a trunk link from a router to a switch has been given an
interesting name: Router on a Stick (ROAS).
▼ ROAS associates a VLAN ID
with a specific subinterface
that has its own IP address.
▼ The switch must use the
switchport mode trunk command to configure the interface
and the router it connects to must be configured as follows:
➘  Step 1. Create a unique subinterface for each VLAN that needs to be routed
(interface type number.subint).
➘  Step 2. Enable 802.1Q, and associate one specific VLAN with the
subinterface in subinterface config mode (encapsulation dot1q vlan_id).
➘  Step 3. Configure IP settings (address and mask) in subinterface config
mode (ip address address mask).

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 18


Chapter 18
Configuring Connected Routes
v Using the Native VLAN with 802.1Q
▼  Configure the ip address command on the physical interface,
but without an encapsulation command; the router considers
this physical interface to be using the native VLAN.
▼  Configure the ip address command on a subinterface, and use
the encapsulation...native subcommand.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 19


Chapter 18
Configuring Connected Routes
v Configuring Routing to VLANs Using a Layer 3 Switch
▼ Step 1. Enable hardware support for IPv4 routing. For example,
on 2960 switches, configure the sdm prefer lanbase-routing
global command and reload the switch.
▼ Step 2. Enable IPv4 routing globally (ip routing).
▼ Step 3. Create VLAN interfaces for each VLAN for which the
Layer 3 switch is routing packets (interface vlan vlan_id).
▼ Step 4. Configure an IP address and mask on the VLAN interface
(in interface configuration mode for that interface), enabling IPv4
on that VLAN interface (ip address address mask).
▼ Step 5. If the switch defaults to place the VLAN interface in a
disabled (shutdown) state, enable the interface (no shutdown).

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 20


Chapter 18
Configuring Connected Routes
v Secondary IP Addressing
▼ Imagine that you have planned your IP address scheme for a
network and sometime later a particular subnet grows and you
there are no more host addresses available for the subnet. What
do you do?
➘  Make the existing subnet larger, by choosing a mask with more host
bits. Existing hosts have to change their subnet mask settings, and
new hosts can use IP addresses from the expanded address range.
➘  Migrate to a completely new (larger) subnet. All existing devices
change their IP addresses.
➘  Add a second subnet in the same location, using secondary
addressing.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 21


Chapter 18
Configuring Connected Routes
v Supporting Connected Routes to Subnet Zero
▼ The ip subnet-zero command allows IOS to use the zero
subnet with no restrictions.
▼ The no ip subnet-zero command restricts the IOS so that it
rejects any ip address or ip route command that uses an
address/mask combination for subnet zero.
▼ This does not restrict the router from learning a route for a zero
subnet using a routing protocol.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 22


Chapter 18
Configuring Static Routes
v Static Route Configuration
▼ The ip route global configuration command defines a destination
that can be matched with a subnet ID and mask and lists the
forwarding instructions via next hop IP address or exit interface.
v Static Default Routes
▼ The ip route with 0.0.0.0 for the IP address and 0.0.0.0 for the
mask defines a default route for the router.

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 23


Chapter 18
Exam Preparation Tasks

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 24


Chapter 18
Command Reference
v Configuration Commands

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 25


Chapter 18
Command Reference
v Configuration Commands

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 26


Chapter 18
Command Reference
v EXEC Commands

CCENT/CCNA ICND1 Interconnecting Cisco Networking Devices Part 1 27


Questions?

28

You might also like