Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 92

Chapter 6:

Routers and Basic Configuration

Fundamental of Computer Networking

By: Tigabu Dagne


Objectives

• Explain how routers enable end-to-end connectivity in a small to


medium-sized business network.
• Determine the appropriate device to route traffic in a small to
medium-sized business network.
• Configure a router with basic configurations.
Routers
Cisco Routers
Types of Routers
Branch Routers
• Designed for teleworkers, small business, and
medium-size branch sites.
• Includes Cisco 800, 1900, 2900, and 3900
Integrated Series Routers (ISR) G2.
Cisco 2901

WAN Routers
• Large businesses, organizations, and
enterprises.
7200 Series Router
• Includes the Cisco Aggregation Service
Router (ASR) 1000, 7200 Series Router, and
the Cisco Catalyst 6500 Series Switches.

Service Provider Routers • Large service providers.


• Includes Cisco CRS-3 Carrier Routing
CRS-1 Multishelf System
System, Cisco ASR 9000, Cisco ASR 1000,
Cisco XR 12000, and 7600 Series routers
• CRS-3 support s bandwidths of up to 322
Tb/s.

4
How Fast is 322 Tb/s?

5
Router Components
• Regardless of their function, size or complexity, all router
models are essentially computers and require:
– Operating systems (OS)
– Central processing units (CPU)
– Random-access memory (RAM)
– Read-only memory (ROM)

• Routers also have special memory that includes Flash


and nonvolatile random-access memory (NVRAM).
6
Router Memory
Volatile /
Memory Non-Volatile Stores

RAM • Running IOS


• Running configuration file
Volatile IP routing and ARP tables
(Random Access •
Memory)
• Packet buffer

• Bootup instructions
ROM Non-Volatile • Basic diagnostic software
(Read-Only Memory)
• Limited IOS

NVRAM Non-Volatile Startup configuration file


(Non-Volatile RAM)

Flash Non-Volatile • IOS


• Other system files

7
Router Front

System Power LED System Activity LED


Solid green indicates the
presence of power. Blinks when packets are transmitted or
received on any WAN or LAN interface.
Router Backplane

4-port EtherSwitch HWIC 2 port Smart Serial HWIC


High-speed WAN Interface Card

Compact Flash Module Integrated ports


Stores Cisco IOS Console, Auxiliary, and FastEthernet

9
Router Backplane
• The backplane of a router includes:
Double-wide eHWIC slots eHWIC 0 AUX LAN
port interfaces

Console
RJ45 USB
Ports
Two 4 GB flash card slots Console
USB Type B

10
Connecting to a Router
• Cisco router ports can be grouped into two
categories:
– Management ports – Includes console and auxiliary
ports used to configure,
Double-wide eHWIC slots manage, and
eHWIC 0
troubleshoot
AUX
port
LAN
interfaces

the router.
– Inband Router interfaces – Includes LAN and WAN
interfaces configured with IP addressing to carry user
traffic.

Console
RJ45
Console
USB Type B
11
Console and Ethernet Connections

12
Console Port

13
Auxiliary Ports

14
Router Interfaces
• A router interface is a physical connector that enables a
router to send or receive packets
– Each interface connects to a separate network
– Consist of socket or jack found on the outside of a router

• Types of router interfaces:


– Ethernet
– FastEthernet
– Gigabit Ethernet
– Serial
– DSL
– Cable
– ISDN
15
LAN and WAN Interfaces
• Router interfaces can be grouped into two categories:
– Ethernet LAN interfaces: Requires an IP address and enabled.
– Serial WAN interfaces – Requires an IP address and enabled.

Serial interfaces

LAN interfaces
16
Router Bootup
Cisco IOS

• The IOS file itself is several megabytes in size and similar to


Cisco IOS switches, is stored in flash memory.
– IOS stored in Flash can be upgraded to newer versions or to
have new features added.
• During bootup, the IOS is copied from slower flash
memory into faster RAM (DRAM). 18
Bootset Files
• During bootup, the router loads two files into RAM:
– IOS: Copied from flash into RAM.
– Startup configuration: Copied from NVRAM into RAM.

19
Router Bootup Process
1. Both POST and the
Bootstrap program are
located in ROM.

1. Load IOS from Flash.


2. None in Flash, then load
from TFTP server.

1. Load from NVRAM.


2. None in NVRAM, then
load from TFTP server.
3. No Server/file, then
enter Setup mode from
the console.

• Note:
– Setup mode is not used in this course to configure the router.
– When prompted to enter setup mode, always answer no.
– If you answer yes and enter setup mode, press Ctrl+C at any time to terminate the setup
process. 20
Show Versions Output
Version of the Cisco IOS software in RAM and that is being
used by the router.
Router# show version
Cisco IOS Software, C1900 Software (C1900-UNIVERSALK9-M), Version 15.2(4)M1, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Thu 26-Jul-12 19:34 by prod_rel_team
Displays the system bootstrap software version stored in
ROM: System Bootstrap, Version 15.0(1r)M15, RELEASE SOFTWARE (fc1) ROM that was initially used to boot up the router.

Router uptime is 10 hours, 9 minutes Displays the complete filename of the IOS image and
System returned to ROM by power-on where the it was loaded from.
System image file is "flash0:c1900-universalk9-mz.SPA.152-4.M1.bin"
Last reload type: Normal Reload
Last reload reason: power-on Identifies the type of router and the amount of DRAM.
Some routers, like the Cisco 1941 ISR, use a fraction of
<Output omitted> DRAM as packet memory for buffering packets. Add both
numbers to determine the total amount of DRAM.
Cisco CISCO1941/K9 (revision 1.0) with 446464K/77824K bytes of memory.
Processor board ID FTX1636848Z
2 Gigabit Ethernet interfaces
Displays the physical interfaces on the router. In this
2 Serial(sync/async) interfaces example, the Cisco 1941 ISR has two Gigabit Ethernet
1 terminal line interfaces and two low-speed serial interfaces.
DRAM configuration is 64 bits wide with parity disabled.
255K bytes of non-volatile configuration memory. Displays the amount of NVRAM and Flash.
250880K bytes of ATA System CompactFlash 0 (Read/Write)

<Output omitted>

Technology Package License Information for Module:'c1900' Displays the licensing information of the router. The IOS
can be upgraded to support additional features.
-----------------------------------------------------------------
Technology Technology-package Technology-package
Current Type Next reboot
------------------------------------------------------------------ Displays the software configuration register in
ipbase ipbasek9 Permanent ipbasek9 hexadecimal. A second value in parentheses denotes the
security None None None value that is used during the next reload.
data None None None For example, 0x2102 indicates that the router attempts
Configuration register is 0x2142 (will be 0x2102 at next reload)
to load a Cisco IOS software image from flash memory
and load the startup configuration file from NVRAM
Router#
21
Routing
Routing

Host Routing Tables


Host Routing Tables

IPv4 Host Routing Table


Host Can Send a Packet To Itself
• The IP address 127.0.0.1 is a loopback interface that is
automatically assigned to a TCP/IP host.
– Any IP address within the network 127.0.0.0/8 refers to the local host.
– Useful for testing purposes.

C:\Users\Admin> ping 127.0.0.1

Pinging 127.0.0.1 with 32 bytes of data:


Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\Admin>

25
Host Can Send a Packet To a Local Host
• Hosts on the same network, sending host and receiving host share
the same network address.

• PC1 (192.168.10.10 /24) sends a packet to PC2 (192.168.10.11 /24)


– Since they are both on the same network (192.168.10.x /24) the services
of a default gateway are not required.

.10
PC1 192.168.10.0/24
.1
.11 G0/0
PC2

R1
.10 G0/1
PC3 .1

.11 192.168.11.0/24
PC4

26
Host Can Send a Packet To a Remote Host
 When a host on a remote network, the hosts do not share the same
network address.
 A default gateway IP address is required.

 PC1 (192.168.10.10 /24) sends a packet to PC4 (192.168.11.11 /24)


 Since they are on different networks (192.168.10.x /24 and 192.168.11.x
/24) the services of a default gateway is required.

.10
PC1 192.168.10.0/24
.1
.11 G0/0
PC2

R1
.10 G0/1
PC3 .1

.11 192.168.11.0/24
PC4

27
Host Can Send a Packet To a Remote Host
• The default gateway is the device (i.e, router) that routes
traffic from the local network to remote networks.
– A host sending a packet to a remote host does not maintain
routing information beyond the local network.
– The default gateway maintains a routing table containing
directly connected and remote network route information.

.10
PC1 192.168.10.0/24
.1
.11 G0/0
PC2

R1
.10 G0/1
PC3 .1

.11 192.168.11.0/24
PC4

28
Default Gateway

29
Configuring Default Gateway on Hosts
• The default gateway address can be configured on the host
manually or learned dynamically.

30
Default Gateway – ipconfig
C:\Users\Admin>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : cisco.com
Link-local IPv6 Address . . . . . : fe80::b572:c6c:f983:cadc%11
IPv4 Address. . . . . . . . . . . : 192.168.11.99
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.11.1

C:\Users\Admin>

31
C:\Users\Admin> ipconfig /all
Windows IP Configuration

Host Name . . . . . . . . . . . . : Admin-wxp


Primary Dns Suffix . . . . . . . : cisco.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : cisco.com

Ethernet adapter Local Area Connection:


Connection-specific DNS Suffix . : cisco.com
Description . . . . . . . . . . . : Intel(R) PRO/1000 PL
Network Connection
Physical Address. . . . . . . . . : 00-16-41-E4-82-43
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.11.99
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.11.1
DHCP Server . . . . . . . . . . . : 192.168.151.41
DNS Servers . . . . . . . . . . . : 10.0.0.36
10.0.0.16
<Output omitted>
C:\Users\Admin>
32
Host Packet Forwarding Decision

• So how does a host keep track of whether or not to forward


packets to the default gateway?
• Hosts must maintain their own, local, routing table to ensure
that network layer packets are directed to the correct
destination network. 33
Host Routing Table
C:\Users\PC1> netstat -r

<Output omitted>

IPv4 Route Table


===========================================================================
Active Routes:

• The local table of the host typically contains:


– Direct connection - A route to the loopback interface (127.0.0.1).
– Local network route - The host’s network IP address.
– Local default route - The default route which is the IP address of
the network interface of the router that is connected to the local
network.
• The route print or netstat -r command can be
used to display the host routing table on a Windows host.
– Both commands generate the same output.
• The commands displays interface information, IPv4 route in formation
and IPv6 route information 34
Lists reachable networks

netstat IPv4 Information Lists a subnet mask used by the host to


determine the network / host portions of the IP
address.
Lists the address to get to a remote network. A
directly reachable destination displays “On-link”.

Lists the address of the physical interface used to


send the packet to the gateway.
C:\Users\PC1> netstat -r
Lists the cost of each route and is used to
determine the best route to a destination.
<Output omitted>

IPv4 Route Table


===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.10.1 192.168.10.10 25
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.10.0 255.255.255.0 On-link 192.168.10.10 281
192.168.10.10 255.255.255.255 On-link 192.168.10.10 281
192.168.10.255 255.255.255.255 On-link 192.168.10.10 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.10.10 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.10.10 281
===========================================================================

<Output omitted>

35
0.0.0.0
• This is the local default route.
• Forwards all non-matching packets.
• All non-matching destination routes are sent to 192.168.10.1

netstat IPv4 Information (R1) exiting from the interface with IP address 192.168.10.10.

127.0.0.0 – 127.255.255.255
•These loopback addresses all relate to the direct connection and
provide services to the local host.

192.168.10.0 - 192.168.10.255
• These addresses all relate to the host and local network.
• 192.168.10.0 - The local network route address.
C:\Users\PC1> netstat -r • 192.168.10.10 - The address of the local host.
• 192.168.10.255 - The network broadcast address.
<Output omitted>
224.0.0.0
IPv4 Route Table • Special multicast addresses reserved for use through either
the loopback interface or the host IP address.
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.10.1 192.168.10.10 25
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.10.0 255.255.255.0 On-link 192.168.10.10 281
192.168.10.10 255.255.255.255 On-link 192.168.10.10 281
192.168.10.255 255.255.255.255 On-link 192.168.10.10 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.10.10 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.10.10 281
===========================================================================
255.255.255.255
<Output omitted> • Limited broadcast IP address values for use through either the
loopback interface or the host IP address.

36
PC1 wants to ping PC2.
Which route will be chosen?

C:\Users\PC1> netstat -r

<Output omitted>

IPv4 Route Table


===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.10.1 192.168.10.10 25
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.10.0 255.255.255.0 On-link 192.168.10.10 281
192.168.10.10 255.255.255.255 On-link 192.168.10.10 281
192.168.10.255 255.255.255.255 On-link 192.168.10.10 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.10.10 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.10.10 281
===========================================================================

<Output omitted>

37
PC1 wants to ping
10.10.10.10.
Which route will be chosen?

C:\Users\PC1> netstat -r

<Output omitted>

IPv4 Route Table


===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.10.1 192.168.10.10 25
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.10.0 255.255.255.0 On-link 192.168.10.10 281
192.168.10.10 255.255.255.255 On-link 192.168.10.10 281
192.168.10.255 255.255.255.255 On-link 192.168.10.10 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.10.10 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.10.10 281
===========================================================================

<Output omitted>

38
netstat IPv6 Information

C:\Users\PC1> netstat -r
<Output omitted>
IPv6 Route Table
=====================================================
Active Routes:
If Metric Network Destination Gateway Lists the address of the physical
16 58 ::/0 On-link interface used to send the packet to
1 306 ::1/128 On-link the gateway.
16 58 2001::/32 On-link
16 306 2001:0:9d38:953c:2c30:3071:e718:a926/128 Lists the cost of each route and is
On-link used to determine the best route to a
15 281 fe80::/64 On-link destination.
16 306 fe80::/64 On-link
Lists reachable networks
16 306 fe80::2c30:3071:e718:a926/128
On-link Lists the address to get to a remote
15 281 fe80::b1ee:c4ae:a117:271f/128 network. A directly reachable destination
On-link displays “On-link”.
1 306 ff00::/8 On-link
16 306 ff00::/8 On-link
15 281 ff00::/8 On-link
=====================================================
<Output omitted>

39
netstat IPv6 Information

::/0
• This is the IPv6 equivalent of the local
default route.
C:\Users\PC1> netstat -r
::1/128
<Output omitted>
• This is equivalent to the IPv4 loopback
IPv6 Route Table address and provides services to the local
===================================================== host.
Active Routes:
If Metric Network Destination Gateway 2001:: Global Unicast Addresses
16 58 ::/0 On-link •2001::/32 - This is the global unicast network
1 306 ::1/128 On-link prefix.
16 58 2001::/32 On-link ••2001:0:9d38:953c:2c30:3071:e718:a926/128 -
16 306 2001:0:9d38:953c:2c30:3071:e718:a926/128 This is the global unicast IPv6 address of the local
On-link computer.
15 281 fe80::/64 On-link
fe80:: Link Local Addresses
16 306 fe80::/64 On-link • fe80::/64 - This is the local link network
16 306 fe80::2c30:3071:e718:a926/128 route address and represents all computers
On-link on the local link IPv6 network.
15 281 fe80::b1ee:c4ae:a117:271f/128 • fe80::2c30:3071:e718:a926/128 - This is
On-link the link local IPv6 address of the local
1 306 ff00::/8 On-link computer.
16 306 ff00::/8 On-link
15 281 ff00::/8 On-link ff00::/8 Multicast Addresses
===================================================== • These are special reserved multicast class
D addresses equivalent to the IPv4
<Output omitted>
224.x.x.x addresses.

40
S1# show running-config
Building configuration...
!
<output omitted>
service password-encryption

Default Gateway on a Switch !


hostname S1
!
Interface Vlan1
ip address 192.168.10.5
!
ip default-gateway
192.168.10.1
<output omitted>

.10
PC1 192.168.10.0/24 192.168.11.0/24
.1 .1
G0/0 G0/1 S2
S1 R1
.11 .5
PC2

• A switch must (should) also be configured with a default gateway


address, because packets that originate from the switch are handled just
like packets that originate from a host device.
• This is not used by normal user frames!
• Use the ip default-gateway global config command.
41
Default Gateway on a Switch

• For example, the administrator wants to Telnet to the S1.


– Without the default gateway configured on S1, packets from S1 would not
be able to reach the administrator at 192.168.11.10.
S1# show running-config
Building configuration...
!
<output omitted>
service password-encryption
!
hostname S1
!
Interface Vlan1
ip address 192.168.10.5
!
ip default-gateway 192.168.10.1
<output omitted>

.10
PC1 192.168.10.0/24 192.168.11.0/24
.1 .1
S1 G0/0 G0/1 S2
.11 R1
PC2 .5

42
Router Routing Tables
Routing Table Routes

44
Routing Table Routes

• The routing table of a router stores information about:


– Directly-connected routes:
• These routes come from the active router interfaces. Routers
• Add a directly connected route when an interface is configured with an IP
address and is activated.
– Remote routes:
• These routes come from remote networks connected to other routers.
• Routes to these networks can either be manually configured or dynamically
learned using a dynamic routing protocol.
45
Directly Connected Routing Table Entries

Route source – Identifies how the network was learned by the router.

Destina Destination n– Identifies the destination network and how it was learned.

Outgoing interface – Identifies the exit interface to use to forward a packet toward the final
destination.
Directly Connected Interfaces
192.168.10.0/24
.10 G0/0
PC1 209.165.200.224 /30
.1
.225
R1 S0/0/0
.10 .1
PC2 G0/1

192.168.11.0/24

• Two routing table entries are automatically created when an active router interface is
configured with an IP address and subnet mask.
– C:
• Identifies a directly connected network.
• Directly connected networks are automatically created when an interface is
configured with an IP address and activated.
– L:
• Identifies that this is a local route, the IP address of the interface.
• Local routes are automatically created when an interface is configured with an IP
address and activated.

47
Directly Connected Routing Table Entries
192.168.10.0/24 64.100.0.1 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

A B C
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0

A Identifies how the network was learned by the router.


B Identifies the destination network and how it is connected.
C Identifies the interface on the router connected to the destination network.

48
Remote Network Routing Table Entries
192.168.10.0/24 64.100.0.1 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0

A Identifies how the network was learned by the router.


B Identifies the destination network.
C Identifies the administrative distance (trustworthiness) of the route source.
D Identifies the metric to reach the remote network.
E Identifies the next hop IP address to reach the remote network.
F Identifies the amount of elapsed time since the network was discovered.
G Identifies the outgoing interface on the router to reach the destination network.

49
IPv4 Router Routing Table
192.168.10.0/24 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
D 10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0
L 209.165.200.225/32 is directly connected, Serial0/0/0
R1# 50
Destination Network
192.168.10.0/24 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
D 10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0
L 209.165.200.225/32 is directly connected, Serial0/0/0
R1# 51
Next-Hop Address
192.168.10.0/24 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
D 10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0
L 209.165.200.225/32 is directly connected, Serial0/0/0
R1# 52
Which Route? PC1 wants to ping another
host on the same network
192.168.10.0/24 64.100.0.1 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
D 10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0
L 209.165.200.225/32 is directly connected, Serial0/0/0
R1# 53
PC1 wants to ping PC2
Which Route?

192.168.10.0/24 64.100.0.1 10.1.1.0/24


.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
D 10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0
L 209.165.200.225/32 is directly connected, Serial0/0/0
R1# 54
PC1 wants to ping the R2 WAN
Which Route? Interface

192.168.10.0/24 64.100.0.1 10.1.1.0/24


.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
D 10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0
L 209.165.200.225/32 is directly connected, Serial0/0/0
R1# 55
PC1 wants to ping 10.1.1.10
Which Route?
192.168.10.0/24 64.100.0.1 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks


D 10.1.1.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
D 10.1.2.0/24 [90/2170112] via 209.165.200.226, 00:00:05, Serial0/0/0
192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0
L 209.165.200.225/32 is directly connected, Serial0/0/0
R1# 56
Configuring a Cisco Router
Configure Initial Router Settings
• Cisco routers and switches use the same CLI.
– They support similar command structures, and
commands.
• The following steps should be completed on a
router:
– Assign a device name using the hostname global config command.
– Secure privileged EXEC mode access using the enable secret command.
– Secure EXEC mode access using the login command on the console port, and the
password command to set the password.
– Secure virtual access similar to securing EXEC access mode, except on the Virtual Teletype
(VTY) port.
– Use the service password-encryption global configuration command to
prevent passwords from displaying as plain text in the configuration file.
– Provide legal notification using the banner motd (message of the day [MOTD]) global
configuration command.
– Save the configuration using the copy run start command. 58
Router Configuration Steps

192.168.10.0/24 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.1 .1
.10 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

Router> enable R1(config)# banner motd #


Router# configure terminal Enter TEXT message. End with the character '#'.
Enter configuration commands, one per line. ***********************************************
End with CNTL/Z. WARNING: Unauthorized access is prohibited!
Router(config)# hostname R1 ***********************************************
R1(config)# #
R1(config)# enable secret class
R1(config)# R1(config)# exit
R1(config)# line console 0 R1#
R1(config-line)# password cisco R1# copy running-config startup-config
R1(config-line)# login Destination filename [startup-config]?
R1(config-line)# exit Building configuration...
R1(config)# [OK]
R1(config)# line vty 0 4 R1#
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit
R1(config)#
R1(config)# service password-encryption
R1(config)#

59
Router Interfaces

• Router interfaces must be configured.


• Cisco routers support a wide range of
interfaces however, in our lab the routers
support.
– FastEthernet 0/0 (Fa0/0)
– FastEthernet 0/1 (Fa0/1)
– Serial 0/0/0 (S0/0/0)
– Serial 0/0/1 (S0/0/1)

60
Configuring Router Interfaces

• To enable a router interface, configure the


following:
– Enter interface config mode: interface type-and-number
– Add description (optional): description descriptive-text
– IPv4 address and subnet mask: ip address address subnet-mask
– Activate the interface: no shutdown

61
Configure LAN Interfaces
192.168.10.0/24 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.1 .1
.10 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#
R1(config)# interface gigabitethernet 0/0
(Note : Our routers use FastEthernet 0/0)
R1(config-if)# description Link to LAN-10
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to
up
%LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/0, changed state to up
R1(config-if)# exit
62
R1(config)#
Configure LAN Interfaces
192.168.10.0/24 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.1 .1
.10 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1(config)# int g0/1


(Note : Our routers use FastEthernet 0/1)
R1(config-if)# description Link to LAN-11
R1(config-if)# ip add 192.168.11.1 255.255.255.0
R1(config-if)# no shut
%LINK-5-CHANGED: Interface GigabitEthernet0/1,
changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/1, changed state to up
R1(config-if)# exit
R1(config)#
63
Configure WAN Interface
192.168.10.0/24 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.1 .1
.10 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1(config)# interface s0/0/0


R1(config-if)# description Link to R2
R1(config-if)# ip add 209.165.200.225 255.255.255.252
R1(config-if)# clock rate 128000
R1(config-if)# no shutdown
LINK-5-CHANGED: Interface Serial0/0/0, changed state
to up
R1(config-if)# exit
R1(config)#

64
Verify Basic Config
192.168.10.0/24 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.1 .1
.10 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1# show ip interface brief


Interface IP-Address OK? Method Status Protocol

GigabitEthernet0/0 192.168.10.1 YES manual up up


GigabitEthernet0/1 192.168.11.1 YES manual up up
Serial0/0/0 209.165.200.225 YES manual up up
Serial0/0/1 unassigned YES NVRAM administratively down
down

R1# ping 209.165.200.226


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.165.200.226, timeout is 2
seconds:
!!!!! 65
Verify the Routing Table
192.168.10.0/24 10.1.1.0/24
.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.1 .1
.10 .10
PC2 G0/1

192.168.11.0/24 10.1.2.0/24

R1# show ip route


Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

<Output omitted>
Gateway of last resort is not set

192.168.10.0/24 is variably subnetted, 2 subnets, 3 masks


C 192.168.10.0/24 is directly connected, GigabitEthernet0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0
192.168.11.0/24 is variably subnetted, 2 subnets, 3 masks
C 192.168.11.0/24 is directly connected, GigabitEthernet0/1
L 192.168.11.1/32 is directly connected, GigabitEthernet0/1
209.165.200.0/24 is variably subnetted, 2 subnets, 3 masks
C 209.165.200.224/30 is directly connected, Serial0/0/0
L 209.165.200.225/32 is directly connected, Serial0/0/0
R1#
66
Remember …
• As a packet travels from one networking device to
another
 The Source and Destination IP addresses NEVER change
 The Source (??) & Destination MAC addresses CHANGE
as packet is forwarded from one router to the next.
 TTL field decrement by one until a value of zero is
reached at which point router discards packet (prevents
packets from endlessly traversing the network)

67
A Day in the Life of a Packet

68
A Day in the Life of a Packet

69
A Day in the Life of a Packet

70
A Day in the Life of a Packet

71
A Day in the Life of a Packet

72
A Day in the Life of a Packet

73
A Day in the Life of a Packet

74
A Day in the Life of a Packet

75
A Day in the Life of a Packet

76
A Day in the Life of a Packet

77
A Day in the Life of a Packet

78
A Day in the Life of a Packet

79
A Day in the Life of a Packet

80
A Day in the Life of a Packet

81
A Day in the Life of a Packet

82
A Day in the Life of a Packet

83
Testing the Network
IP

• IP is a best effort delivery system.


– No mechanism to ensure that the data is delivered
• So how do we know if a packet encountered a problem along the way?
• Internet Control Message Protocol (ICMP)
Internet Control
Message Protocol
(ICMP)

• ICMP is available for both IPv4 and IPv6.


– ICMPv4 is the messaging protocol for IPv4.
– ICMPv6 provides these same services for IPv6 but includes additional
functionality.
• ICMP messages common to ICMPv4 and ICMPv6 include:
– Host confirmation
– Destination or Service Unreachable
– Route redirection
– Time exceeded
• ICMPv6 includes additional functionality.
ICMP

• ICMP is used for:


– Informational messages (ping, traceroute)
– Error messages (network unreachable)
• ICMP is a layer 3 protocol directly encapsulated in another
layer 3 protocol IP.
– No transport header
• Knowledge of ICMP control messages is an essential part of
network troubleshooting.
Host Confirmation (PING)

• Ping is a utility used to verify connectivity to an IP host.


– It measures the round-trip time for messages sent from the originating host
to a destination computer.
• Ping uses an ICMP Echo Message to determine if a host is reachable.
– A host initiates a ping (ICMP Echo Request) and the destination replies (ICMP
Echo Reply).
– ICMP only reports on the status of the delivered packet to the source device.
Traceroute

• Ping is used to indicate the connectivity between two hosts.


• Traceroute (tracert) is used to observe the path between these hosts.
– The trace lists hops successfully reached along the way providing us with important
verification and troubleshooting information.
– If the data fails at some hop along the way, we have the address of the last router that
responded to the trace indicating where the problem or security restrictions are.
TTL 1
Traceroute
TTL 1 – 1 =0

ICMP Time
Exceeded

TTL 2 TTL 1

TTL 2 – 1 =1 TTL 1 – 1 =0

ICMP Time
Exceeded

TTL 3 TTL 2 TTL 1

TTL 3 – 1 =2 TTL 2 – 1 =1 TTL 2 – 1 =0

ICMP Time
Exceeded
Traceroute Example
C:\Users\Bob> tracert www.eurocom.fr

Tracing route to eurocom.fr [92.243.13.96]


over a maximum of 30 hops:
Three delay measurements.
1 11 ms 2 ms 6 ms Home-Net [192.168.1.1]
2 19 ms 18 ms 17 ms 24-139-15-1.eastlink.ca [24.139.15.1]
3 22 ms 19 ms 17 ms 10.250.35.1
4 13 ms * 13 ms on-sdbr-dr001.on.eastlink.ca [24.139.7.66]
5 16 ms 19 ms 19 ms 24-139-15-26.eastlink.ca [24.139.15.26]
6 22 ms 27 ms 29 ms 24-139-7-138.eastlink.ca [24.139.7.138]
7 24 ms 27 ms 38 ms xe-1-0-1.mpr2.tor1.ca.above.net [208.185.21.193]
8 43 ms 48 ms 48 ms xe-7-2-0.cr1.lga5.us.above.net [64.125.22.222]
9 55 ms 58 ms 49 ms xe-3-2-0.cr1.dca2.us.above.net [64.125.26.101]
10 49 ms 57 ms 58 ms xe-0-0-0.mpr1.bwi9.us.above.net [64.125.28.137]
11 43 ms 48 ms 49 ms 64.125.192.86.t00709-01.above.net [64.125.192.86]
12 133 ms 129 ms 137 ms xe2-6-core1-d.paris.gandi.net [217.70.176.229]
13 132 ms 128 ms 125 ms xe1-5-5-dist1-d.paris.gandi.net [217.70.176.238]
14 129 ms 129 ms 127 ms 92.243.13.96

Trace complete.

C:\Users\Bob>
Chapter 6

END

You might also like