IP Connectivity
IP Connectivity
IP Connectivity
Exam Topics
ARP Operation
Route Selection
Frame Rewrite
IPv4 Static Routing
IPv4 Default Routing
IPv4 Floating Static Route
IPv6 Static Routing
IPv6 Default Routing
www.cisconetsolutions.com
2
www.cisconetsolutions.com
The host endpoint first checks for an entry in the local ARP cache that
has the server MAC address. The host sends an ARP request to the
default gateway if there is no entry in the local ARP cache.
The default gateway then sends a proxy ARP broadcast toward the
server. It is an ARP request sent on behalf of the host. Each router hop
then broadcasts an ARP request on their local subnet until it arrives at the
server. The server sends an ARP reply with the MAC address assigned to
server Ethernet network interface. The default gateway receives the ARP
reply and updates its local ARP table. In fact, all Layer 3 network devices
between endpoints update their ARP table as well. Layer 2 switches in
the forwarding path also update their MAC address table.
No
Check Local ARP Default
Proxy ARP
Cache Gateway
3
www.cisconetsolutions.com
Answer
When a host endpoint initiates a session with a server on a different
subnet, the IP address is resolved first. The DNS request is first sent to
resolve or learn the server IP address. DNS server responds to host with
IP address of server in the DNS reply packet.
Host-1 then checks the local ARP cache to verify there is not an entry for
server-1. ARP entry is comprised of server IP address and associated
MAC address. The server is on a different subnet so host-1 sends an
ARP request to the default gateway (router-1).
4
www.cisconetsolutions.com
Router-1 checks the local ARP table first to verify if there is an entry for
server-1 . If there is no entry for server-1, then router-1 sends proxy ARP
request to router-2.
5
www.cisconetsolutions.com
6
www.cisconetsolutions.com
Network Address
This is the network address of a destination subnet for a routing entry. It
is referred to as a prefix in the routing table. Each IP packet has an
address field for source IP address and destination IP address. They do
not change between endpoints. They are host addresses assigned to
network interfaces. You cannot assign a network address to a network
interface. The router examines destination IP address field of an inbound
packet to learn the destination subnet. It then selects a route in the
routing table to forward packets.
Administrative Distance
This is the reliability of a route when compared with other route sources.
Each route type is assigned an administrative distance (AD). It is a value
used by the router for route selection. The route with lowest AD number is
installed when routes are advertised from multiple routing protocols .
7
www.cisconetsolutions.com
Metric
This is a value that is assigned to each route that is calculated based on
the route type. Metric is only considered for best path selection only when
multiple routes exist from the same routing protocol. Each routing protocol
calculated metric differently. OSPF is based on path cost or link
bandwidth. RIPv2 use hop count (number of hops) between endpoints.
Local Interface
Each route entry is associated with a local interface and next hop address
used for packet forwarding. The local exit interface associated with that
route is connected to next hop neighbor for packets that are destined to a
subnet. The router is only concerned with identifying local exit interface to
use for packet forwarding.
Age
The route entry has an associated age (min) that is based on the amount
of time in the routing table. The route entry starts at zero when first
learned and is reset if the table is flushed.
Example
This is an OSPF route entry from a routing table with each component
defined. For example, 192.168.12.9 is the destination IP address in the IP
header. It is a host address and not a network (subnet) address.
8
www.cisconetsolutions.com
Route Selection
The router selects routes to install in the routing table. Sometimes there
are multiple routes advertised from multiple routing protocols to the same
destination. The administrative distance of a route determines the route
installed in the routing table.
9
www.cisconetsolutions.com
Administrative Distance
The router builds a routing table with multiple routes (prefixes). Each
route type is assigned an administrative distance and calculates a metric.
The administrative distance (AD) is a value based on the routing protocol
or route source. It is used by routers to select what route is installed in the
routing table. The administrative distance and metric assigned to a route
will determine what route is installed in the routing table.
The router installs the route with the lowest administrative distance. It is
considered when multiple routes exist from multiple routing protocols to
the same destination. Administrative distance is configurable to influence
route selection.
The route with the lowest AD is considered the most reliable (trustworthy).
Directly connected routes have the lowest administrative distance (0) and
are the most reliable. The directly connected route is a subnet based on
the IP address assigned to a local interface. It is automatically added to
the routing table when the interface is enabled.
The following are the default administrative distances for each routing
protocol and/or route type. Each routing entry in the routing table includes
the administrative distance and metric in brackets [AD / Metric].
IS-IS 115
RIPv2 120
Unknown 255
10
www.cisconetsolutions.com
Example
What is the administrative distance of the route to destination network
192.168.3.0/24?
The command lists all network prefixes to subnet destinations. The router
would select the following route to destination subnet 192.168.3.0/24.
EIGRP, OSPF, and RIPv2 are advertising routes to the same destination.
What route is selected based on the following information?
EIGRP = [90/1252335]
OSPF = [110/10]
RIPv2 = [120/3]
11
www.cisconetsolutions.com
12
www.cisconetsolutions.com
Path Metric
The administrative distance and metric assigned to a route will determine
what route is installed in the routing table. Metric is a path cost assigned
to a specific route. Metric is only considered after administrative distance.
The route with the lowest metric is installed when there are multiple
routes from the same routing protocol to the same destination.
13
www.cisconetsolutions.com
Packet Forwarding
The longest match rule is used to select a route already installed in the
routing table as a forwarding decision. Each route has a specific prefix
(subnet mask) length. The route with the longest prefix is selected from
multiple routes within the same subnet range (destination). For example,
172.16.0.0/22 has a longer prefix than 172.16.0.0/18 and would be
selected to forward packets to 172.16.0.0 subnet destination.
The longest match rule is used to select a route already installed in the
routing table as a forwarding decision. Each route to a destination has a
specific network prefix (subnet mask) length. The route with the longest
subnet prefix is selected from multiple routes to the same destination. For
example, 172.16.1.0/27 has a longer route prefix than 172.16.1.0/26 and
172.16.1.0/25. As a result, that route prefix is selected for packets with
172.16.1.1 destination IP address.
A. 192.168.1.0/28
B. 192.168.1.0/26
C. 192.168.1.0/25
D. 192.168.1.0/27
Answer (A)
14
www.cisconetsolutions.com
15
www.cisconetsolutions.com
The longest match is in effect when there are multiple routes to the same
192.168.1.65 destination. 192.168.1.64/26 route is the correct prefix with
the longest match subnet (/26). It is a static route (S) with 192.168.2.2 as
next hop address. The destination IP address 192.168.1.65 is within
192.168.1.128/25 route range as well. The /26 subnet prefix however is
longer than the /25 route.
The longest match rule would select the following OSPF route with next
hop 192.168.3.2 IP address. In this example it is the only route available.
O 192.168.2.0/24 [110/11] via 192.168.3.2, Serial0/2
16
www.cisconetsolutions.com
Answer
The router selects the route with the longest prefix (subnet) where there
are multiple routes to the same destination. It is referred to as the longest
match rule. The following OSPF route has the longest prefix (/27) to the
destination 172.16.4.0 subnet. The next hop address to forward packets
destined for 172.16.4.0 is 172.16.200.2 via Serial0/0 local interface.
All routes that have a different prefix length are considered different
destinations by the router. The router will install multiple routes from
different routing protocols as a result. The administrative distance only
applies to routes that have the same destination (same prefix length).
Per-Hop IP Addressing
The source and destination IP address do not change between endpoints.
They are written to the IP header at an originating endpoint only. For
example, packets originating at host-1 would have source IP address of
the host. The same packets would have destination IP address of the
server. Conversely, packets in the reverse direction would have server as
source IP address and host as destination IP address. The same occurs
with Telnet session initiated from a router for example. The local router
and neighbor router are endpoints for IP addressing.
17
www.cisconetsolutions.com
There is a per hop forwarding path from host-1 to server-1. The source
and destination IP address do not change between host and server. The
source IP address is 192.168.1.1 (host) and destination IP address is
192.168.3.1 (server). MAC addressing is updated by each router hop.
Frame Rewrite
As packets traverse the network through each routing hop there is frame
rewrite. When a data message arrives, the router examines IP header to
select a route for forwarding. Once the route is selected from the routing
table, then frame rewrite occurs.
The router strips off the Ethernet frame header and rewrites a new frame
with source and destination MAC address. Source MAC address is the
local exit Ethernet interface of router. The next hop neighbor Ethernet
interface MAC address is written to the new frame as destination MAC
address.
18
www.cisconetsolutions.com
19
www.cisconetsolutions.com
It is the destination MAC address that is used for forwarding frames to the
destination server. Layer 3 devices rewrite source and destination MAC
address per hop. The source MAC address for this example is derived
from router-1 interface Gi1/1. The destination MAC address is derived
from router-2 interface Gi1/1 and obtained from an ARP table lookup.
20
www.cisconetsolutions.com
Answer
The output from show arp command lists the IP address and associated
hardware address. That includes all ARP requests performed by router-1.
Match the IP address from the network topology drawing with MAC
address in the ARP table.
There is an Aging field with (-) indicates the MAC address of interface
Gi0/1 on router-1. It does not age out from the table. The default ARP
entry aging timer is 240 minutes. At that point the entry is flushed and
new ARP request is required. The Interface field signifies where the MAC
address was learned.
The router will update (rewrite) the source and destination MAC address.
The router rewrites the source MAC address with the MAC address of
router-1 interface Gi0/1. The destination MAC address is rewritten with
interface Gi0/1 on router-2.
Serial interfaces do not have a MAC address. The router would assign
the MAC address of the Ethernet interface where frames arrived (were
learned) for source MAC address.
Frame Rewrite
source MAC address = 0000.000b.bbbb
destination MAC address = 0000.000d.dddd
21
www.cisconetsolutions.com
The source and destination MAC address are rewritten at each router
hop. The switch only examines the source and destination MAC address.
Host-1 sends a packet at P1 with MAC address of network interface as
source MAC address (0000.000a.aaaa). The destination MAC address at
P1 is router-1 interface Gi0/0 (0000.000b.bbbb). Layer 2 switches are
never the destination for a MAC address. They only forward frames and
must know the destination MAC address.
22
www.cisconetsolutions.com
3. There is a unicast packet sent from router-1 to host with the MAC
address assigned to default gateway interface.
4. ARP entry is added to the local ARP table of router-1 with the host IP
address and MAC address.
5. The host sends the first ICMP echo request to router-1 with
destination MAC address of the default gateway and destination IP
address of the server.
6. There is an ARP table lookup on router-1 for the server MAC address.
Since ARP table on router-1 has no entry for the server, first ICMP
echo request packet is dropped.
7. Proxy ARP request is sent from router-1 to the server for its MAC
address.
8. The server sends an ARP reply to router-1 with server MAC address
and router-1 updates the local ARP table.
23
www.cisconetsolutions.com
10. ARP table lookup is performed on router-1 for the server MAC
address. In addition there is a routing table lookup for server subnet.
The router then rewrites (updates) packet IP address field and frame
MAC address field. The packet is then forwarded to next hop address
of router-2.
11. The packet arrives at router-2 where there is an ARP table lookup for
the server MAC address. In addition there is a routing table lookup for
server subnet to forward packets. The router rewrites the packet and
frame, before it is forwarded out the router interface connected to
switch-2.
24
www.cisconetsolutions.com
12. The packet arrives at switch-2 where there is a MAC address table
lookup for the server MAC address. The packet is forwarded out of
the switch port assigned to the server.
13. The server receive the packet and all headers are stripped off before
payload is forwarded to the application.
14. The server sends TCP ACK to the host for the next TCP window
sequence of packets for TCP-based applications only.
25
www.cisconetsolutions.com
Connected Route
Connected routes are not manually configured or dynamic. They are
automatically added to a routing table. The route entry includes a local
network interface. Local router interfaces are configured with an IP
address that is within a particular subnet. Anytime routing services are
enabled, you will notice at least some connected routes in the routing
table. The router installs a corresponding local host route as well for each
connected interface. It is assigned a /32 subnet mask that indicates a
host route. For example, consider a local physical interface assigned
192.168.1.1/24 address. The connected route added to the routing table
is the following route entry. Connected routes have an administrative
distance of zero (0) and metric of zero (0).
26
www.cisconetsolutions.com
The static route is more specific than a default route and selected for a
route to the same destination.
The static route reads from left to right - to reach this destination
subnet, forward packets to this next hop address or exit this local
interface.
27
www.cisconetsolutions.com
The following example configures a static route with next hop as a local
exit interface. All packets destined for 192.168.1.0/24 are forwarded out
of local interface Gigabitethernet0/1. The local interface is connected to a
neighbor on the same subnet with a route to the destination.
Answer
The following two options would enable routing from 192.168.1.0/24
subnet to 192.168.3.0/24 subnet.
28
www.cisconetsolutions.com
The first command configures a static route on router-1 with next hop
address of 172.16.2.2. The optional IOS command configures next hop
as local exit interface Serial1/0 on router-1. Wildcard masks are not used
when configuring static routes.
When hosts send data to the server, router-1 will use the static route with
next hop address to reach the server subnet. Conversely, when the
server returns data, router-2 will use the static route with next hop to the
host subnet. The following describes router logic for all packets that are
originating at a host.
Source Path
The first IOS command reads - to reach server destination subnet
192.168.3.0 forward packets to next hop 192.168.2.2 address.
29
www.cisconetsolutions.com
Reverse Path
The second IOS command reads - to reach host destination subnet
192.168.1.0 forward packets to next hop 192.168.2.1 address.
ipv6 unicast-routing
ipv6 route 2001:DB8:3C4D:1::/64 2001:DB8:3C4D:2::1
30
www.cisconetsolutions.com
The following command configure an IPv6 static route with next hop as a
local interface. The router forwards all packets out local interface Gig0/0
destined for network address (subnet) 2001:DB8:3C4D:1::/64.
The other option for configuring an IPv6 static route include the next hop
IPv6 address that is fully specified. It applies only to a broadcast
(Ethernet) network. The local interface must be specified as well when the
next hop is an IPv6 link-local (FE80::2) address.
31
www.cisconetsolutions.com
Answer
The primary link has a direct route from router-1 to 192.168.3.0/24 via
next hop 172.16.1.2 address on router-3. The floating static route is
installed in the routing table when the primary link fails. Traffic destined
for subnet 192.168.3.0 is then forwarded to router-2 using next hop
192.168.2.2 address.
32
www.cisconetsolutions.com
The default route reads from left to right – forward all traffic to this next
hop address when there is no route in the routing table to the destination
network. The default route is often configured as an external route for
forwarding packets to the internet. They are used as well for some branch
offices that only have a single link.
There is only a single route to all remote destinations. That minimizes the
routing table size and router CPU utilization. The administrative distance
of default and static routes is 1. In addition, both have the same metric of
zero. The following configuration is a default route with next hop address
of 172.33.1.1 to the internet. The default route will forward all packets with
an unknown destination to the next hop address.
The router will discard packets when there is no destination route in the
routing table and no default route exists. ICMP destination unreachable
error message is then sent to the source. This is an example of a default
route installed in the routing table.
Cisco network devices also support default routing with interfaces that
have an IPv6 address. The following configuration is an IPv6 default route
with next hop 2001:DB8:3C4D:2::1 address. The next hop address is
assigned to the interface of an ISP router for an internet connection.
33
www.cisconetsolutions.com
Answer
The default route is used to forward packets when no specific route exists
in the routing table to a destination. The default route on router-1 forwards
all traffic to ISP next hop 172.16.2.2 when the destination is unknown.
34
www.cisconetsolutions.com
Answer
The easiest solution for connecting a branch office (router-1) to a data
center is with a default route. All packets with an external destination are
forwarded to the data center.
The following IOS global command configures a default route. All traffic is
forwarded to next hop 192.168.2.2 address. That is the IP address of the
data center router (DC-1) interface Gi1/1.
The use of static routes would require multiple configurations for each
destination. The default route will forward all packets arriving for any
destination address to the next hop IP address.
35