Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views72 pages

Topic 6 Router Fundamentals

The document outlines the fundamentals of routers, including their roles in WAN, hardware components, and bootup sequences. It covers types of routers, hardware interfaces, management commands, and configuration processes. Additionally, it discusses backup and recovery methods for router configurations and the significance of configuration register values.

Uploaded by

heavencraft.site
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)
10 views72 pages

Topic 6 Router Fundamentals

The document outlines the fundamentals of routers, including their roles in WAN, hardware components, and bootup sequences. It covers types of routers, hardware interfaces, management commands, and configuration processes. Additionally, it discusses backup and recovery methods for router configurations and the significance of configuration register values.

Uploaded by

heavencraft.site
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/ 72

ROUTER FUNDAMENTALS

EGE203 – Topic 6
Learning Outcomes 2

1 2 3

Describe role of router in Manage the router Implement static and default
WAN, purpose of its configurations, implement routing and able to
components and bootup backup and recovery understand routing and
sequence validate its configuration
Router Fundamentals 3

Application

Presentation

Session

Router Components Transport

Network

Data Link

Physical
Routers are Computers
4

• Bill Yeager wrote the 1st router OS at Stanford in 1981


• Len Bosack had the foresight to “see” the router created by Bill had commercial
possibilities
– Together with his wife, Sandy Lerner, they cofounded Cisco Systems in 1984
– Leo pioneered and commercialised using LAN technology to connect geographically
dispersed computers using a router system
– Cisco went public in 1990
– Leo & Sandy forced out of Cisco in 1990
• Routers have hardware & software
– CPU
– RAM
– ROM
– Operating System (OS)
Jim Isaak, Computer Society President congratulating Len & Sandy
(Joint Recipients for 2009 Computer Entrepreneur Award)
Types of Routers
5

• Home/Small Office routers


– provide connectivity for typical home and office networks
– optimized for low cost
• Enterprise routers (core routers)
– Interconnect ISPs or used in large enterprise networks

Cisco CRS-3
Router Hardware
7

HomeRouter#show running-config
Building configuration…
Current configuration : 984 bytes
version 12.2
hostname HomeRouter
!
interface FastEthernet0/1
Major hardware components include ip address 1.2.3.4 255.0.0.0
!
 RAM end Sample router config
 Temporary stores router (running) config
RAM content is lost during power down /restart

 NVRAM (Nonvolatile RAM)


 Stores router startup config, loaded into RAM during reboot
Content remains during power down/ restart
Router Hardware
8

• Flash Memory (solid state like USB)


– Store full IOS image
• IOS is copied to RAM during boot-up

• ROM
– Store bootstrap program which tells router how to boot-up (where to load IOS &
config file)
– Contains scaled-down IOS to boot from when cannot find any IOS

Step1: Find IOS in Flash.


Step2: Load IOS.
Step3: Find config file in NVRAM.
Step4: Load config file into RAM.
Step5: Set to go.
Sample Bootstrap program

• LAN and WAN Interfaces


– Network connections by which packets enter/exit

Interfaces may include Ethernet / Fast Ethernet Interfaces, Serial Interfaces and Gigabit Ethernet Interfaces
External Connections
9

• Routers need BOTH LAN (Ethernet/FastEthernet) and WAN (Serial) interfaces to


route traffic from a LAN to another LAN across WAN links
• Console port is used to access a near router (tell router what to do….)
• Auxiliary port is used for access router remotely using a modem

(WAN Connections)

(LAN Connections) (Management Port


Connections)
External Connections
10

• Routers LAN interfaces provides LAN exit (aka Default Gateway)


– LAN computers cannot access external devices (e.g. go to Twitter) if it does not know where the Default
Gateway is
• Router WAN (Serial) interfaces are like network highways that connect a LAN to another LAN

LAN interface WAN interface


LAN (Singapore) LAN (New York)
WAN (The Internet)

Ethernet frames are converted to HDLC/PPP frames for long distance transmission over WAN

For info only, Ethernet WAN and MPLS over Ethernet is getting popular due to its lower costs.
For exam and test, student just need to focus on Serial WAN in accordance to CCNA syllabus.
Computer -> Router (via Console)
11

• Routers do not have monitors, can “use” nearby PC’s monitor to configure router
• Need to use HyperTerminal to link up a PC’s monitor to a nearby (<100m) router
• Settings: Select COM port, 9600bps, 8 data bits, No parity, 1 stop bit, No flow control
• Use a rollover cable to connect the router to the PC
• Connect one end to router’s console port, other end to RJ-45 to DB-9 adapter
• Attach DB-9 adapter to a PC’s COM port
Router Start-up Sequence
12

• When a router starts up, it needs to know 2 things


– IOS (to operate)  usually kept in Flash memory
– Configuration file (to know what to do)  Kept in NVRAM

IOS + 1st step: copy IOS from Flash


Running config

2nd step: copy router config from


Running config
NVRAM

IOS
What happens when Router Boots
13

• When a router boots up, first go to ROM to load Bootstrap


– Bootstrap : tells router where to load IOS, is it from Flash or TFTP …
Router Booting

Check ROM’s Bootstrap (Configuration Register)


è find out where to look for IOS

Go to Flash to look Go to TFTP Server Go to ROM to


No No
for IOS? to look for IOS? load mini IOS

Getting Yes Yes

IOS
Go to ROM monitor mode
IOS loaded? No
to fix problem

Yes

Load Config file Load Config file Go to Setup mode


Getting in NVRAM?
No
in TFTP Server?
No
to fix problem
Config file Yes Yes

Bootup Done
Router Software
14

• For backup/restore purposes, IOS/config files can be stored in other locations


• ROM contains a bootstrap program which are simple instructions telling router
which location to get IOS during booting up
Setup Mode
15

 Router enters Setup Mode when it cannot find config file from
NVRAM/TFTP Server during start-up
 Router will ask a few basic questions to help config router e.g. router
name, IP address of the interfaces etc… type “no” to skip
ROM Monitor Mode
16

• Use this mode to


– Download IOS/config file from remote TFTP server or over console port for
recovery/upgrade purposes
– Recover lost password
– Change configuration register to control how router boots

• How to access mode?


– #1: reset configuration register value to 0x0 and reboot router
– #2: issue [Ctrl-Break] within 60 secs of router boot up when connected to the
console port
Cisco IOS Naming Conventions
17

 Cisco IOS is named according to

// to see this IOS file


#sh flash
Router Access Modes
18
Router Access Modes
19

Modes Description
User EXEC mode Show limited router config.
Router > • Type enable to move to privileged mode

Privileged EXEC mode Show ALL router config.


Router # • Type show run to show router config

• Type config t to move to privileged mode


Global Configuration mode Tell/configure router what to do using commands
Router (config) # • E.g. type int fa0/0 to config IP address

Other configuration modes For advance config.


Router (config-mode) #
Setup mode Interactive dialog at console to help new user
create a 1st time basic configuration
RXBoot mode Maintenance mode to recover from lost passwords
Router Software
20

Router> enable

Router# show run


Router> enable
Building configuration…
Router# config t Current configuration : 984 bytes
version 12.2
Router(config)# hostname Router
!
interface FastEthernet0/1
ip address 1.2.3.4 255.0.0.0
!
end
Router#
Router Software
21
• show version
– displays Cisco IOS software version running on router

• show run (show running-config)


– displays current config file in RAM
• copy run start (copy running-config startup-config )
– Update config to NVRAM
• show start (show startup-config)
– displays backup config in NVRAM
– This is loaded into RAM when router reboots

• show interfaces
– displays configurable parameters and real-time statistics for all router
interfaces
Router Commands
22

• Give router unique name with hostname command e.g.


• Router(config)# hostname Snoopy
Snoopy(config)#

• Set password to restrict/authenticate router access


– For console
• Router(config)# line console 0
Router(config-line)# password <password>
Router(config-line)# login

– For telnet remote logon


– Router(config)# line vty 0 4
Router(config-line)# password <password>
Router(config-line)# login
Router Commands
23

• Set password when accessing privileged mode


– For non-encrypted password
• Router(config)# enable password <password>

– For encrypted password


• Router(config)# enable secret <password>
• This will over-ride password set with enable password command

• DNS lookup
– May take long time when enabled
– To disable DNS lookup, use no ip domain-lookup command
Configure Ethernet Interfaces
24

• Specify interface to configure with “interface”


• Set IP address & subnet mask with “ip address” command
• Activate the interface with “no shut” command
• Quit with “exit” command

E.g. Router(config)# interface fast ethernet 0/0


Router(config-if)# ip address 1.2.3.4 255.0.0.0
Router(config-if)# no shut
Router(config-if)# exit
Router(config)#

– Fast Ethernet (100Mbps) is a faster version of Ethernet (10Mbps)


– By default interfaces are not activated (OFF) for security purposes
Configure Serial Interfaces
25

• Specify interface to configure with “interface”


• Set IP address & subnet mask with “ip address” command
• Set DCE interfaces clock rate with “clock rate” command
• Activate the interface with “no shut” command
• Quit with “exit” command

E.g. Router(config)# interface serial 0/0


Router(config-if)# ip address 1.2.3.4 255.0.0.0
Router(config-if)# clock rate 64000
Router(config-if)# no shut
Router(config-if)# exit
Router(config)#
Router Fundamentals 26

Application

Presentation

Session

Router Management Transport

Network

Data Link

Physical
Backup Configuration Files
27

• Config files can be saved to


– NVRAM (by default)
– TFTP Server
– Network Server
– Disk in a safe place
Backup Configuration Files
28

 #1: Backup the current config file locally on the router (NVRAM)
 Issue the “copy run start” command

 #2: Backup the current config file to a remote TFTP server


 Issue the “copy run tftp” command
Restore Configuration Files
29

 #1: Restore the config file from a remote TFTP server


 Issue the “copy tftp run” command

 #2: Restore the last saved config file from NVRAM


 Issue the “copy start run” command or “reload” to reboot router
Configuration Register Values
30

• Is a 4-digit hexadecimal value kept in NVRAM to


– control how router boots
• Boots IOS in flash memory (default setting, value = 0x2102)
• Force the router into the ROM monitor (bootstrap program) and waits for user to
specify IOS to boot (set value=0x2120)
• Boots limited OS in ROM (set value=0x2101)
– Enable or disable the Break function
– Recover a lost password (set value=0x2142)
• Boot from flash and bypass startup-config in NVRAM
– Change console data rate (default = 9600)
Note: 0x = represent hexadecimal no.

• Ref: https://networklessons.com/cisco/ccna-routing-switching-icnd1-100-105/configuration-register-cisco-ios
Configuration Register Values
31

IOS name (in Flash)

Default:
Boot IOS from Flash
Configuration Register Values
32

• Common values include


Configuration Router Behavior
Register Value
0x2102 (default) •Ignores break
•Boots into ROM if initial boot fails
•9600 console baud rate default value for most
platforms
0x2120 •Boots into ROMmon
•19200 console speed

0x2142 •Ignores break


(for Router •Boots into ROM if initial boot fails
password reset) •9600 console baud rate
•Ignores the contents of Non-Volatile RAM (NVRAM)
Changing Configuration Register
33

• There are 2 ways to change the configuration register


– #1: In Global Config mode  use config-register value command
– #2: Go to ROM monitor mode  use confreg command

If you want to do a password recovery then


we will have to tell the router to ignore the
content of the NVRAM (that’s where the
startup config is) i.e. 0x2142
NVRAM - boot system command
34

 If you need to specify IOS image that router loads at start-up


 Issue the “boot system” command
 IOS locations: flash/TFTP Server/ROM
ROM Monitor Mode – Disaster Recovery
35

• Method #1: Use tftpdnld to download IOS image from a TFTP server for
disaster recovery (this will erase ALL existing data in flash)
• Need to configure router with basic settings first
rommon 1 > tftpdnld
IP_ADDRESS: 10.0.0.1
IP_SUBNET_MASK: 255.255.0.0
DEFAULT_GATEWAY: 1.3.0.1
TFTP_SERVER: 223.255.254.254
TFTP_FILE: c1700-bnr2sy-mz.070298
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n: [n]: y
The router will begin to download the new file.

Variable Command
IP address of the router IP_ADDRESS= ip_address
Subnet mask of the router IP_SUBNET_MASK= ip_address
IP address of router’s default gateway DEFAULT_GATEWAY= ip_address
IP address of TFTP server to download IOS TFTP_SERVER= ip_address
Filename to be downloaded to the router TFTP_FILE= filename
ROM Monitor Mode – Disaster Recovery
36

 Method #2: Use xmodem command to download IOS image/config file


using console port from the attached PC to router’s flash memory
 Use console download ONLY when there is no TFTP server because this
method is slow
Chapter 1 to 5A 37

Revision
Assignment #1
38

Top 5 Common Mistakes

1. Not able to distinguish Class A, B and C

– Class A: 1 – 126 255.0.0.0 N.H.H.H | private: 10.x.x.x

– Class B: 128 – 191 255.255.0.0 N.N.H.H | private: 172.16.x.x – 172.31.x.x

– Class C: 192 – 223 255.225.255.0 N.N.N.H | private 192.168.x.x

2. Not able to distinguish public vs private range

3. Assigning PC and its default gateway to two different network

4. PC default gateway not assigned or assigned incorrectly (not correspond to


egress router interface IP)

5. Giving same network range IP to two different distinct LAN


Assignment #1 - Example
Item Wrong Answer Correct Answer
Cable1 Crossover Cable Serial
Cable2 Untwisted Pair Straight-through UTP
IP1 (PC1 IP) 194.197.18.211
E.g. 192.168.0.2
[This is not in private range]
IP2 (PC2 IP) 194.197.18.210
[It must be in different network E.g. 192.168.1.2
to PC1]
PC1 Gateway IP 194.197.18.212
E.g. 192.168.0.1
[Ok but not in private range]
IP3 (Fa0/0) 194.1.2.5
[It must be same value as PC1 <Same value as PC1 Gateway >
gateway]
IP4 (Server1 IP) 194.197.18.215
[Must be different network from E.g. 192.168.2.2
PC2]
Server1 Gateway IP 194.1.2.4
[If you use this, the above will be
E.g. 192.168.2.1
in 194.1.2.x network]

Router A S0 IP 172.17.5.2
Any Class C IP e.g. 200.1.1.1
[This is Class B]
Router B S0 IP 172.18.5.2
Any Class C IP e.g. 200.1.1.2
[This is Class B and furthermore
(same network as above)
not same network]
Common Mistakes – Choice of Cable
40
PC, Computer, Router uses MDI Interface

Switches, Hubs uses MDI-X Interface

• Use Straight-Through UTP to connect MDI port (e.g. PC, Router) to MDI-X port (e,g, Switch, Hub)
• Use Crossover UTP when connect MDI to MDI port (e.g. PC to PC), and MDIX to MDIX port (e.g. Switch to Hub)

• Use Serial WAN interfaces for long distance transmission over WAN [denote by acronym S interfaces]
// Other WAN interfaces not part of the course syllabus
Common Mistakes – Valid IP within Class A, B, C
41

 Class A - N.H.H.H where first octet range from 1 to 126


 Invalid IP for host IP issuance 10.0.0.0 [Use for Network Address Identification for 10.x.x.x network]
 Invalid IP for host IP issuance 10.255.255.255 [Use for Broadcast for 10.0.0.0 network]
 Usable for host IP issuance e.g. 10.225.0.255 , 10.1.1.1 , 10.0.0.1, 10.255.255.254 etc.

 Class B – N.N.H.H where first octet range from 128 to 191


 Invalid IP for host IP issuance e.g. 172.16.0.0 [Use to identify 172.16.x.x network]
 Invalid IP for host IP issuance e.g. 172.16.255.255 [Use for broadcast for 172.16.0.0 network]
 Usable for host IP issuance e.g. 172.16.0.1, 172.16.255.254, 172.16.0.255 etc.

 Class C – N.N.N.H where first octet range from 192 to 223


 Invalid IP for host IP issuance e.g. 192.168.1.0 [Use to identify 192.168.1.x network]
 Invalid IP for host IP issuance e.g. 192.168.1.255 [Use for broadcast for 192.168.1.0 network]
 Usable for host IP issuance e.g. 192.168.1.1, 192.168.1.254 etc.
Network Devices and TCP/IP Layers Revision
42

 Hub – Layer 1 Device, Dumb simply repeat and broadcast messages


 Switch – Layer 2 Device – make use of MAC addresses (Layer 3 switch not part of the course syllabus)
 Router – Layer 3 Devices – make use of IP address, determine best network route . Device in the
network need to point to its default gateway (egress router interface) to route out to a different
network e.g. LAN to WAN

 DHCP is an application layer protocol (not Layer 2) to auto issue IP address, subnet mask, default
gateway, DNS setting
 DNS – computer need IP address to communicate – hence visit to websites, first thing is to find out its
IP address given website name (query DNS service)

 TCP – reliable connection oriented service using 3 way handshake. UDP – unreliable connection-less
service and no handshaking, no segmentation, no flow control, minimal error control

 ARP main purpose is to find out MAC address given IP address


Router Fundamentals 43

~~ Static and Default Routing ~~


(Part 1)
Internet Networks
• The Internet è Many interconnected LANs 44

– Schools, Business networks


– Each LAN has unique network address
• Each network is controlled internally
• Use routers to connect different LANs
together

Network B
(Twitter)
Network A 1
(NYP) 6 2 Network C
3
4 (Google)
5
Network D
(Facebook)
Routers Recap
45

 Routers connect networks


 Layer 3 device
 Use IP address
 Select best path for packet to travel to destination

A
R2 R4

B SW
R6
X

R1
R3 R5
Default Gateway Router
46

E0 E1

200.1.2.1 199.4.5.1

Switch Switch

` `
`

200.1.2.2 200.1.2.3 199.4.5.2 199.4.5.3 199.4.5.4


200.1.2.4 200.1.2.5

AMK Computer Lab Yishun Computer Lab

 Are LAN exit points


 Is a IP address of a router interface
 Default gateways are E0 and E1 (E: Ethernet)
How Routers Work
47

 Send data from PC1  PCX


 Need to get out of LAN A?
 Must know where is the default gateway
 PC1’s message reach default gateway (R1’s E0 interface)
 Router calculates and compares network address
 Router checks its routing tables (similar to street directory)
 Forward packet out through correct interface (R1’s S1 interface)

S0
S1
R2

S0
S1

E0 E0
S0
S1
R1 R3

PC1 PC2 PCX

LAN A
Router Interfaces/Ports
48

Serial Ports

FastEthernet Console Auxiliary Power Power cord


Ports Port Port switch connection

 Serial ports (or Gigabit Ethernet WAN ports)


 To connect to other routers across WANs
 Ethernet / Fast Ethernet / Gigabit Ethernet ports
 To connect to computers in the LAN
 Console, AUX ports
 Connect to router for configuration ONLY

For this course, student just need to focus on Serial WAN. We will use Serial ports for WAN link in sync. with CCNA syllabus.
Routing Metrics
49

 Things router use to decide the best routes, include


 Hop count
 No. of routers to cross to reach destination
 Smaller no. is better; but is this always true?
 Bandwidth
 Speed of link; faster is better
 Think of expressways vs normal roads

 Load
 Think of amount of traffic; more load will slow down traffic

 Delay
 How long router take to process packet; shorter time is more efficient

 Reliability
 Think of link availability; always up is reliable
 Cost
 How much to pay to use the link? Think of ERP.
Path Selection
50

R2
5Mbps

10Mbps

1Mbps

R1 R5
1Mbps
1Mbps
1Mbps
3Mbps

PC1 PC2
WebSvr1
10Mbps
R3
R4

• Routers make forwarding decisions (from PC1 to WebSvr1)


– Hop Count (R1R5)
– Speed of link (bandwidth) (R1R2R5)
– Traffic density (R1R3R4R5)
– Reliability (R1R2R4R5) or R1R5
Routing Tables
51

 Think of street directory; which way to go


 Routers keep routing tables to know how to send packets

 Routing table entries can be either

 Static

 Dynamic
Dynamic Routing
52

 Without routing protocols


 Routers don’t know what is happening around them
 Cannot route packets efficiently

 Routers “talk” among themselves to update network topology


 “talk” using dynamic routing protocols e.g. RIP, OSPF
 Used between routers to update routing tables
 Automatically calculate best path. No human intervention needed!
 More Scalable

Note: Dynamic Routing will be covered more in depth in future


networking modules
Static Routes
53

• Are entered manually by administrator

• Conserve bandwidth

• More secure than dynamic routing

• Due to administrative maintenance overheads, it is only feasible for small


environments or used on needed basis e.g. backup routes
Static Routes - Example
54

(Singapore) (Hong Kong)


R1 R2
S0 S0
3.3.3.1/8 3.3.3.2/8
Fa0/0
WAN Fa0/0
1.1.1.1/8
2.2.2.1/8

Marketing LAN Sales LAN


PC2
PC1 IP:2.2.2.2/8
IP:1.1.1.2/8

 Can you see 3 networks? (2 LANs, 1 WAN)


 R1 & R2 need to know ALL 3 networks to route properly BUT
 By default, R1 only knows 2 connected networks (Marketing and WAN)
 By default, R2 only knows 2 connected networks (Sales and WAN)
 R1 needs to know 1 more network è Admin must tell R1 about Sales LAN
 R2 needs to know 1 more network è Admin must tell R2 about Marketing LAN
Static Routes – Cisco IOS Command
55

(Singapore) (Hong Kong)


R1 R2
S0 S0
3.3.3.1/8 3.3.3.2/8
Fa0/0
WAN Fa0/0
1.1.1.1/8
2.2.2.1/8

Marketing LAN Sales LAN


PC2
PC1 IP:2.2.2.2/8
IP:1.1.1.2/8

Static Route Command:


ip route network-address subnet-mask Next-hop-IP
 Admin tell Router R1 about Sales LAN
 R1(config)# ip route 2.0.0.0 255.0.0.0 3.3.3.2
 Admin tell Router R2 about Marketing LAN
 R2(config)# ip route 1.0.0.0 255.0.0.0 3.3.3.1
Default Routes
56

SEG Router
S0
5.5.5.1/8
3 LANs + 3 WANs
LAN1 : 20.0.0.0/8
= 6 networks

S0
SBM Router
5.5.5.2/8

LAN2 : 30.0.0.0/8 S0 S1
6.6.6.1/8 6.6.6.2/8 ISP Router

S2
7.7.7.2/8

SIT Router

LAN3 : 40.0.0.0/8 S0
7.7.7.1/8

• Routers do not need to know ALL networks (not realistic)


– Can ask a special router if router don’t know how to send
– This special router is called the default router
• ISP Router is the special router in the diagram
• Help manage network flow
Default Routes – Cisco IOS Command
57

Default Route Command:


ip route 0.0.0.0 0.0.0.0 Next-hop-IP
Default Routes - Example
58
• All Routers need to know ALL 6 networks to be able to go anywhere BUT
– SEG, SBM & SIT routers only know 2 connected networks, ISP Router knows 3 connected networks

• No need for SEG, SBM & SIT Routers to know ALL networks è only need to know who to ask for help
– Which router is in the best position to help? è ISP Router

– So configure SEG, SBM & SIT Router with ISP as the default router

• SEG Router(config)# ip route 0.0.0.0 0.0.0.0 5.5.5.2

• SBM Router(config)# ip route 0.0.0.0 0.0.0.0 6.6.6.2

• SIT Router(config)# ip route 0.0.0.0 0.0.0.0 7.7.7.2

• IMPT: Default router MUST know ALL networks, cannot ask SEG/SBM/SIT Routers (why?)
SEG Router
S0
5.5.5.1/8 3 LANs + 3 WANs
LAN1 : 20.0.0.0/8
= 6 networks
S0
SBM Router
5.5.5.2/8

LAN2 : 30.0.0.0/8 S0 S1
6.6.6.1/8 6.6.6.2/8 ISP Router

S2
7.7.7.2/8

SIT Router

LAN3 : 40.0.0.0/8 S0
7.7.7.1/8
Next Hop Router – do take note
59

• Question:
– Think of routers as MRT Stations.
– You are at YCK MRT.
– Which MRT station is your next hop if you want to
go to Bishan Junction 8?

– What if you want to go to Orchard Ion?

– How about going to Woodlands?


Next Hop Router – do take note
60

R4
(default router)
S0
3.1.1.2/8
S1
3.1.1.1/8
S0 S1 S2
1.1.1.1/8 2.1.1.1/8 4.1.1.1/8
S0 S0 S0
1.1.1.2/8 2.1.1.2/8 4.1.1.2/8
R1 R2 R3 R5

• Question:
– R4 is the default router in the network diagram
– What is the Next Hop IP for R1? Ans: 1.1.1.2
Ans: 2.1.1.2
– How about Next Hop IP for R2?
– What about R5? Ans: 4.1.1.1
Class Range Subnet Mask Slash Notation
A 1 - 126 255.0.0.0 /8 Route Example
B 128 - 191 255.255.0.0 /16 61
C 192 - 223 255.255.255.0 /24

No. of LANs No. of WANs


3 2
Router Type Network Next
Hop
Twitter C 6.0.0.0/8 NA
C 7.0.0.0/8 NA
Router Type Network Next Hop
ISP

Stomp
Class Range Subnet Mask Slash Notation
A 1 - 126 255.0.0.0 /8
B 128 - 191 255.255.0.0 /16 62
C 192 - 223 255.255.255.0 /24

Static/Default Routes
No. of LANs No. of WANs
3 2

Router Type Network Next


Hop
Twitter C 6.0.0.0/8 NA Router Type Network Next Hop
C 7.0.0.0/8 NA ISP C 5.0.0.0/8 NA
C 6.0.0.0/8 NA
Stomp C 8.0.0.0/8 NA C 8.0.0.0/8 NA
C 9.0.0.0/8 NA
Example-Solution All Static Routes
63
Router Type Network Next
Hop
Twitter C 6.0.0.0/8 NA
Static + Default Routes C 7.0.0.0/8 NA
Router Type Network Next Hop S 5.0.0.0/8 6.6.6.1
S 8.0.0.0/8 6.6.6.1
Twitter C 6.0.0.0/8 NA
S 9.0.0.0/8 6.6.6.1
C 7.0.0.0/8 NA
Stomp C 8.0.0.0/8 NA
S 0.0.0.0/0 6.6.6.1
C 9.0.0.0/8 NA
Stomp C 8.0.0.0/8 NA
S 5.0.0.0/8 8.8.8.1
C 9.0.0.0/8 NA
S 6.0.0.0/8 8.8.8.1
S 0.0.0.0/0 8.8.8.1
S 7.0.0.0/8 8.8.8.1
ISP C 5.0.0.0/8 NA
ISP C 5.0.0.0/8 NA
C 6.0.0.0/8 NA
C 6.0.0.0/8 NA
C 8.0.0.0/8 NA
C 8.0.0.0/8 NA
S 7.0.0.0/8 6.6.6.2
S 7.0.0.0/8 6.6.6.2
S 9.0.0.0/8 8.8.8.2
S 9.0.0.0/8 8.8.8.2
Cisco IOS command - show ip route
64

 Use “show ip route” to show only routing table info


(Singapore) (Hong Kong)
R1 R2
S0 S0
3.3.3.1/8 3.3.3.2/8
Fa0/0
WAN Fa0/0
1.1.1.1/8
2.2.2.1/8

Marketing LAN Sales LAN


PC2
PC1 IP:2.2.2.2/8
IP:1.1.1.2/8

R1# show ip route


Codes: C – connected, S – static, R – RIP, I – IGRP, B – BGP

C 1.0.0.0 is directly connected. FastEthernet0/0


C 3.0.0.0 is directly connected. Serial0
S 2.0.0.0 [1/0] via 3.3.3.2
Review Questions
65

1. Which of the following is not a routing metric?


a) Hop count
b) Reliability
c) Load
d) No. of PCs

2. Which is a Cisco IOS command for static route?


a) Router(config)# ip route 1.0.0.0 255.0.0.0
b) Router(config)# ip route 1.2.3.4 255.0.0.0
c) Router(config)# ip route 1.0.0.0 255.0.0.0 2.2.2.2
d) Router(config)# ip route 1.2.3.4 255.0.0.0 2.2.2.2
Router Fundamentals 66

~~ Static and Default Routing ~~


(Part 2)
67
Practice Router Commands (5 mins)
68
 Add hostname to router R1, R2 and R3
 Router> enable
 Router# config t
 Router(config) #hostname R1

 Configure R1 FastEthernet (fa0/0, fa0/1 and fa1/0)


interfaces. Example:
 R1> enable
 R1# config t
 R1(config) #int fa0/1
 R1(config-if)#ip address 10.0.1.1 255.255.255.0
 R1(config-if)#no shutdown

 Configure R2 FastEthernet (fa0/0, fa0/1,fa1/0)


 Configure R3 FastEthernet (fa0/0, fa0/1)

 Configure appropriate Default Gateway for PC1, PC2,


PC3 and Server 1

 Ensure PC1, PC2, PC3 ping gateway gets a reply


Connected Routes (C) and Local Routes (L)
69

 The immediate networks which the router


interfaces are connected are the Connected
Routes

 Example: R1 Connected Routes:


 R1 has 10.0.0.0/24 network on interface
fa0/0
 R1 has 10.0.1.0/24 network on interface
fa0/1
 R1 has 10.0.2.0/24 network on interface
 R1> enable fa1/0
 R1# show ip route

 R1 Local Routes (or Default Gateway)


 R1 has 10.0.0.1/32 as the Local Route
 R1 has 10.0.1.1/32 as the Local Route
 R1 has 10.0.2.1/32 as the Local Route
Static Routes (S) – PC1 <-> Server 1
70

 Q: PC1 wants to communicate with Server 1


network, can you create the static route?

Hint #1:
 PC1 ping Server1 will fail
 ip route <dest. n/w> <subnet mask> <next hop ip>

Hint #2:
 R1 (config)#ip route 10.2.1.0 255.255.255.0
10.0.0.2

 It still doesn’t work as R2 do not yet know


presence of 10.0.1.0 network

Answer:  R2(config)#ip route 10.0.1.0 255.255.255.0


10.0.0.1
 R1 know 10.2.1.0 network but R2 do not know 10.0.2.0
network for the ping reply
 R2(config)#ip route 10.0.2.0 255.255.255.0 10.0.0.1
 What if PC2 wants to communicate with
Server 1?
Static Routes (S) – PC1 <-> PC3
71

 What if PC1 want to talk to PC3 network?

Hint #1:
 PC1 ping PC3 will fail
 ip route <dest. n/w> <subnet mask> <next hop ip>

Hint #2:
 R1 (config)#ip route 10.1.2.0 255.255.255.0
10.0.0.2

 It still doesn’t work as R2 do not yet know


presence of 10.1.2.0 network

Hint #3:
 R2 (config)#ip route 10.1.2.0 255.255.255.0
Answer: 10.1.1.2
 R3 (config) #ip route 10.0.1.0 255.255.255.0 10.1.1.1
 It still doesn’t work as R3 do not yet know
presence of 10.0.1.0 network
Default Routes [Refer Tutorial Q6]
72

 ISP Router has routes to all networks


 Create default routes to ISP router on Dept, Corporate and Main Router.
 Router(config)#ip route 0.0.0.0 0.0.0.0 <next hop>
 Can PC1 talk to PC2 yet?

Hint #1: Answer:


 No. Main Router & ISP Router will talk
recursively to each other since Main Router
do not know how to push traffic to
172.17.x.x network

You might also like