0% found this document useful (0 votes)
23 views31 pages

CH 3 1 Routers

Uploaded by

nafyjabesa1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views31 pages

CH 3 1 Routers

Uploaded by

nafyjabesa1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Chapter 3

Routers
Configure Initial Router Settings
Basic Router Configuration Steps
• Configure the device name. Router(config)# hostname hostname

• Secure privileged EXEC mode. Router(config)# enable secret password

• Secure user EXEC mode. Router(config)# line console 0


Router(config-line)# password password
Router(config-line)# login
• Secure remote Telnet / SSH
access. Router(config)# line vty 0 4
Router(config-line)# password password
• Encrypt all plaintext passwords. Router(config-line)# login
Router(config-line)# transport input {ssh | telnet}
• Provide legal notification and
save the configuration. Router(config)# service password encryption

Router(config)# banner motd # message #


Router(config)# end
Router# copy running-config startup-config
Configure Initial Router Settings
Basic Router Configuration Example
• Commands for basic router R1(config)# hostname R1
R1(config)# enable secret class
configuration on R1. R1(config)# line console 0
R1(config-line)# password cisco
• Configuration is saved to R1(config-line)# login
NVRAM. R1(config-line)# line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# transport input ssh telnet
R1(config-line)# exit
R1(config)# service password encryption
R1(config)# banner motd #
Enter TEXT message. End with a new line and the #
***********************************************
WARNING: Unauthorized access is prohibited!
**********************************************
R1(config)# exit
R1# copy running-config startup-config
Configure Interfaces
Configure Router Interfaces
Configuring a router interface includes issuing the following commands:

Router(config)# interface type-and-number


Router(config-if)# description description-text
Router(config-if)# ip address ipv4-address subnet-mask
Router(config-if)# ipv6 address ipv6-address/prefix-length
Router(config-if)# no shutdown

• It is a good practice to use the description command to add


information about the network connected to the interface.
• The no shutdown command activates the interface.
Configure Interfaces
Configure Router Interfaces Example
The commands to configure interface G0/0/0 on R1 are shown here:

R1(config)# interface gigabitEthernet 0/0/0


R1(config-if)# description Link to LAN
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# ipv6 address 2001:db8:acad:10::1/64
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
*Aug 1 01:43:53.435: %LINK-3-UPDOWN: Interface GigabitEthernet0/0/0, changed state to down
*Aug 1 01:43:56.447: %LINK-3-UPDOWN: Interface GigabitEthernet0/0/0, changed state to up
*Aug 1 01:43:57.447: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/0, changed state
to up
Configure Interfaces
Configure Router Interfaces Example (Cont.)
The commands to configure interface G0/0/1 on R1 are shown here:

R1(config)# interface gigabitEthernet 0/0/1


R1(config-if)# description Link to R2
R1(config-if)# ip address 209.165.200.225 255.255.255.252
R1(config-if)# ipv6 address 2001:db8:feed:224::1/64
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#
*Aug 1 01:46:29.170: %LINK-3-UPDOWN: Interface GigabitEthernet0/0/1, changed state to down
*Aug 1 01:46:32.171: %LINK-3-UPDOWN: Interface GigabitEthernet0/0/1, changed state to up
*Aug 1 01:46:33.171: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1,
changed state to up
Configure Interfaces
Verify Interface Configuration
To verify interface configuration use the show ip interface brief and
show ipv6 interface brief commands shown here:

R1# show ip interface brief


Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0/0 192.168.10.1 YES manual up up
GigabitEthernet0/0/1 209.165.200.225 YES manual up up
Vlan1 unassigned YES unset administratively down down

R1# show ipv6 interface brief


GigabitEthernet0/0/0 [up/up]
FE80::201:C9FF:FE89:4501
2001:DB8:ACAD:10::1
GigabitEthernet0/0/1 [up/up]
FE80::201:C9FF:FE89:4502
2001:DB8:FEED:224::1
Vlan1 [administratively down/down]
unassigned
R1#
Configure Interfaces
Configure Verification Commands
The table summarizes show commands used to verify interface configuration.

Commands Description

show ip interface brief Displays all interfaces, their IP addresses, and their
show ipv6 interface brief current status.
show ip route Displays the contents of the IP routing tables stored in
show ipv6 route RAM.
show interfaces Displays statistics for all interfaces on the device. Only
displays the IPv4 addressing information.
show ip interfaces Displays the IPv4 statistics for all interfaces on a router.

show ipv6 interfaces Displays the IPv6 statistics for all interfaces on a router.
Configure Interfaces
Configure Verification Commands (Cont.)
View status of all interfaces with the show ip interface brief and show ipv6 interface
brief commands, shown here:

R1# show ip interface brief


Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0/0 192.168.10.1 YES manual up up
GigabitEthernet0/0/1 209.165.200.225 YES manual up up
Vlan1 unassigned YES unset administratively down down
R1#

R1# show ipv6 interface brief


GigabitEthernet0/0/0 [up/up]
FE80::201:C9FF:FE89:4501
2001:DB8:ACAD:10::1
GigabitEthernet0/0/1 [up/up]
FE80::201:C9FF:FE89:4502
2001:DB8:FEED:224::1
Vlan1 [administratively down/down]
unassigned
R1#
Configure Interfaces
Configure Verification Commands (Cont.)
Display the contents of the IP routing tables with the show ip route and show ipv6
route commands as shown here:
R1# show ip route
< output omitted>
Gateway of last resort is not set
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, GigabitEthernet0/0/0
L 192.168.10.1/32 is directly connected, GigabitEthernet0/0/0
209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks
C 209.165.200.224/30 is directly connected, GigabitEthernet0/0/1
L 209.165.200.225/32 is directly connected, GigabitEthernet0/0/1
R1#

R1# show ipv6 route


<output omitted>
C 2001:DB8:ACAD:10::/64 [0/0]
via GigabitEthernet0/0/0, directly connected
L 2001:DB8:ACAD:10::1/128 [0/0]
via GigabitEthernet0/0/0, receive
C 2001:DB8:FEED:224::/64 [0/0]
via GigabitEthernet0/0/1, directly connected
L 2001:DB8:FEED:224::1/128 [0/0]
via GigabitEthernet0/0/1, receive
L FF00::/8 [0/0]
via Null0, receive
R1#
Configure Interfaces
Configure Verification Commands (Cont.)
R1# show interfaces gig0/0/0
Display statistics for all GigabitEthernet0/0/0 is up, line protocol is up
Hardware is ISR4321-2x1GE, address is a0e0.af0d.e140 (bia a0e0.af0d.e140)
interfaces with the show Description: Link to LAN
interfaces command, as Internet address is 192.168.10.1/24
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
shown here: reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive not supported
Full Duplex, 100Mbps, link type is auto, media type is RJ45
output flow-control is off, input flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:01, output 00:00:35, output hang never
Last clearing of "show interface" counters never
Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1180 packets input, 109486 bytes, 0 no buffer
Received 84 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles

<output omitted>

R1#
Configure Interfaces
Configure Verification Commands (Cont.)
R1# show ip interface g0/0/0
Display IPv4 statistics for GigabitEthernet0/0/0 is up, line protocol is up
router interfaces with the Internet address is 192.168.10.1/24
Broadcast address is 255.255.255.255
show ip interface Address determined by setup command
command, as shown here: MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
Outgoing Common access list is not set
Outgoing access list is not set
Inbound Common access list is not set
Inbound access list is not set
Proxy ARP is enabled
Local Proxy ARP is disabled
Security level is default
Split horizon is enabled
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are never sent
IP fast switching is enabled
IP Flow switching is disabled

<output omitted>

R1#
Configure Interfaces
Configure Verification Commands (Cont.)
R1# show ipv6 interface g0/0/0
Display IPv6 statistics for GigabitEthernet0/0/0 is up, line protocol is up
router interfaces with the IPv6 is enabled, link-local address is
FE80::868A:8DFF:FE44:49B0
show ipv6 interface No Virtual link-local address(es):
command shown here: Description: Link to LAN
Global unicast address(es):
2001:DB8:ACAD:10::1, subnet is 2001:DB8:ACAD:10::/64
Joined group address(es):
FF02::1
FF02::1:FF00:1
FF02::1:FF44:49B0
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds (using 30000)
ND NS retransmit interval is 1000 milliseconds

R1#
Configure the Default Gateway
Default Gateway on a Host
• The default gateway is used when a host
sends a packet to a device on another
network.
• The default gateway address is generally
the router interface address attached to
the local network of the host.
• To reach PC3, PC1 addresses a packet
with the IPv4 address of PC3, but
forwards the packet to its default
gateway, the G0/0/0 interface of R1.

Note: The IP address of the host and the router


interface must be in the same network.
Configure the Default Gateway
Default Gateway on a Switch
MEDIA IS WORKING ON A
• A switch must have a
CORRECTED VERSION OF THE
default gateway address
GRAPHIC FROM 10.3.2.
configured to remotely
IT IS WRONG ON AR, AND ON THE
manage the switch from
GLOBAL BUG LIST
another network.
• To configure an IPv4
default gateway on a
switch, use the ip default-
gateway ip-address global
configuration command.
STOP
Static and Dynamic Routing
 Dynamic routing - information is learned from other
routers, and routing protocols adjust routes automatically.
 Static routing - network administrator configures
information about remote networks manually. They are used
to reduce overhead and for security.
 Static Routing is a simplistic approach

 Shortcomings

 Cumbersome to configure
 Cannot adapt to addition of new links or nodes
 Cannot adapt to link or node failures
 Cannot easily handle multiple paths to a destination
 Does not scale to large networks
 Solution is to use Dynamic Routing
3/27/2024 16
Desirable Characteristics of Dynamic Routing
 Automatically detect and adapt to topology changes
 Provide optimal routing
 Scalability
 Robustness
 Simplicity
 Rapid convergence
 Some control of routing choices
 E.g. which links we prefer to use

3/27/2024 17
Convergence – why do I care?
 Convergence is when all the routers have the same routing
information
 When a network is not converged there is network downtime
 Packets don’t get to where they are supposed to go
 Black holes (packets “disappear”)
 Routing Loops (packets go back and fore between the same devices)
 Occurs when there is a change in status of router or the links

3/27/2024 18
Interior Gateway Protocols
 Four well known IGPs today
 RIP
 EIGRP
 ISIS
 OSPF

3/27/2024 19
RIP
 Stands for “Routing Information Protocol”
 Some call it “Rest In Peace” 
 Lots of scaling problems
 RIPv1 is classful, and officially obsolete
 RIPv2 is classless
 has improvements over RIPv1
 is not widely used in the Internet industry
 Only use is at the internet edge, between dial aggregation devices which can
only speak RIPv2 and the next layer of the network

3/27/2024 20
Why not use RIP?
 RIP is a Distance Vector Algorithm
 Listen to neighbouring routes
 Install all routes in routing table
 Lowest hop count wins
 Advertise all routes in table
 Very simple, very stupid
 Only metric is hop count
 Network is max 16 hops (not large enough)
 Slow convergence (routing loops)
 Poor robustness
3/27/2024 21
IGRP/EIGRP
 “Enhanced Interior Gateway Routing Protocol”
 Predecessor was IGRP which was classful
 IGRP developed by Cisco in mid 1980s to overcome scalability problems with RIP
 Cisco proprietary routing protocol
 Distance Vector Routing Protocol
 Has very good metric control
 Widely used in many enterprise networks and in some ISP networks
 Multiprotocol (supports more than IP)
 Exhibits good scalability and rapid convergence
 Supports unequal cost load balancing

3/27/2024 22
IS-IS
 “Intermediate System to Intermediate System”
 Selected in 1987 by ANSI as OSI intradomain routing
protocol (CLNP – connectionless network protocol)
 Based on work by DEC for DECnet/OSI (DECnet Phase V)
 Extensions for IP developed in 1988
 NSFnet deployed, its IGP based on early ISIS-IP draft

3/27/2024 23
IS-IS (cont)
 Adopted as ISO proposed standard in 1989
 Integrated ISIS supports IP and CLNP
 Debate between benefits of ISIS and OSPF
 Several ISPs chose ISIS over OSPF due to superior Cisco
implementation
 1994-date: deployed by several larger ISPs
 Developments continuing in IETF in parallel with OSPF

3/27/2024 24
OSPF
 Open Shortest Path First
 “Open” means it is public domain
 Uses “Shortest Path First” algorithm – sometimes called “the Dijkstra
algorithm”
 IETF Working Group formed in 1988 to design an IGP for IP
 OSPF v1 published in 1989 – RFC1131
 OSPF v2 published in 1991 – RFC1247
 Developments continued through the 90s and today
 OSPFv3 includes extensions to support IPv6

3/27/2024 25
Why use OSPF?
 Dynamic IGP, Link State Protocol
 IETF standard – RFC2328
 many implementations
 Encourages good network design
 Areas naturally follow typical ISP network layouts
 Relatively easy to learn
 Has fast convergence
 Scales well

3/27/2024 26
Link State Algorithm
 Each router contains a database containing a map of the
whole topology
 Links
 Their state (including cost)
 All routers have the same information
 All routers calculate the best path to every destination
 Any link state changes are flooded across the network
 “Global spread of local knowledge”

3/27/2024 27
Routing versus Forwarding

 Routing = building maps and


giving directions
 Forwarding = moving packets

between interfaces according to


the “directions”

3/27/2024 28
IP Routing – finding the path
 Path is derived from information received from the routing
protocol
 Several alternative paths may exist
 best next hop stored in forwarding table
 Decisions are updated periodically or as topology changes
(event driven)
 Decisions are based on:
 topology, policies and metrics (hop count, filtering, delay, bandwidth,
etc.)

3/27/2024 29
IP Forwarding
 Router makes decision on which interface a packet is sent to
 Forwarding table populated by routing process
 Forwarding decisions:
 Destination address
 class of service (fair queuing, precedence, others)
 local requirements (packet filtering)

3/27/2024 30
Routing Tables Feed the
Forwarding Table
Forwarding Information Base (FIB)

Routing Information Base (RIB)


BGP 4 Routing Table

OSPF – Link State Database

Static Routes

3/27/2024 31

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy