Basic Routing
18-Feb-13
Jaringan Komputer_D3 TT
Encapsulate with
frame for next link
Receive signals
from cable, convert
to binary.
18-Feb-13
Encode binary,
place signals on
cable
Jaringan Komputer_D3 TT
Routing tables
A router uses the routing table to
select the best path to a network
Directly connected networks are
taken from the interface configuration
Static routes can be added by
administrator
Routes can be learned dynamically
from other routers by using a routing
protocol
18-Feb-13
Jaringan Komputer_D3 TT
Static routes
routes
Entered by
administrator
Time consuming,
different for each
router
Must be updated if
routes change
Little processing
No bandwidth
used
Gives nothing
away
18-Feb-13
Dynamic
Learned from
other routers
Start the protocol
then it runs by
itself
Automatically
updates when
routes change
More processing
Uses bandwidth
Gives away
information
Jaringan Komputer_D3 TT
Jaringan Komputer_D3 TT
Metrics
A routing protocol may learn of
several possible routes to a
destination.
It uses metrics to pick the best route.
RIP uses hop count as its only metric.
OSPF uses cost based on
bandwidth.
EIGRP uses bandwidth and delay and
can use load and reliability as well.
18-Feb-13
Jaringan Komputer_D3 TT
Metrics
RIP uses hop count. It
picks this route as the
best.
18-Feb-13
Jaringan Komputer_D3 TT
Metrics
Jaringan Komputer_D3 TT
Administrative distance
There may be more than one routing
protocol running. There may also be
static routes.
Static routes have administrative
distance 1 or 0 by default.
RIP routes have administrative
distance 120
OSPF routes have administrative
distance 110
The route with the lowest
administrative distance goes in the
routing table
18-Feb-13
Jaringan Komputer_D3 TT
Router as a computer
CPU: control unit handles
instructions, ALU for calculations
RAM: volatile working storage
ROM: permanent storage for POST
and start-up instructions
Operating System: software that runs
the computer
System bus, Power supply
18-Feb-13
Jaringan Komputer_D3 TT
10
Router differences
Long term storage is Flash and
NVRAM,
not hard disk
Range of different interfaces all on
different networks
No input/output peripherals. Connect
via a console PC and use PCs
keyboard and screen
18-Feb-13
Jaringan Komputer_D3 TT
11
Router functions
Connect networks together
Find best routes
Switch packets from one network to
another
Do this efficiently 24/7
Provide security by permitting or
denying specified types of packet
Provide quality of service by prioritising
packets
18-Feb-13
Jaringan Komputer_D3 TT
12
RAM
Dynamic random access memory: as
in a PC
Temporary memory while the router
is on
Loses content when the router loses
power or is restarted
Holds running configuration
Holds routing tables
Holds ARP cache
Holds fast-switching cache etc.
18-Feb-13
Jaringan Komputer_D3 TT
13
NVRAM
Non-volatile RAM: keeps its contents
when the router is off
Stores the startup configuration file
When you have configured a router,
you must save your configuration to
NVRAM if you want to keep it
18-Feb-13
Jaringan Komputer_D3 TT
14
Flash
Electronically erasable,
programmable ROM (EEPROM)
Keeps its contents when the router is
off
Holds the operating system image
(IOS)
Allows the IOS to be updated
Can store multiple versions of IOS
software if it has enough capacity
Can be upgraded by adding SIMMs
18-Feb-13
Jaringan Komputer_D3 TT
15
ROM
Permanent memory: cannot be
upgraded without replacing the chip
Holds power-on self test (POST)
instructions
Stores bootstrap program
Stores ROM monitor software (for
emergency download of IOS, for
password recovery)
May store basic IOS for emergency
use (less common than it was)
18-Feb-13
Jaringan Komputer_D3 TT
16
Router storage
ROM
Permanent
Holds POST, boot
instructions, basic IOS
NVRAM
Keeps contents
Holds startup
configuration file
18-Feb-13
Flash
Keeps contents
Holds IOS image
RAM
Volatile
Holds runnning config,
tables, queues etc
Jaringan Komputer_D3 TT
17
Router startup
18-Feb-13
Jaringan Komputer_D3 TT
18
Normal start up
1. Run POST and bootup instructions
from ROM
2. Load IOS file from flash
3. Load configuration from NVRAM
4. Fully operational
18-Feb-13
Jaringan Komputer_D3 TT
19
Show version
IOS version
Bootstrap version
Router model and CPU
Amount of RAM
Number and type of interfaces
Amount of NVRAM
Amount of Flash
Configuration register
18-Feb-13
Jaringan Komputer_D3 TT
20
Default condition
By default, interfaces have no IP
addresses and are administratively
shut down.
They need to be configured.
18-Feb-13
Jaringan Komputer_D3 TT
21
Configure interface
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 172.16.3.1
255.255.255.0
R1(config-if)#no shutdown
*Mar 1 01:16:08.212: %LINK-3UPDOWN: Interface FastEthernet0/0,
changed state to up
*Mar 1 01:16:09.214: %LINEPROTO-5UPDOWN: Line protocol on Interface
FastEthernet0/0, changed state to up
18-Feb-13
Jaringan Komputer_D3 TT
22
Check interfaces
R1#show interfaces fastethernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is
000c.3010.9260
Internet address is 172.16.3.1/24
etc.
Note MAC address of Ethernet interface
Interface takes part in ARP with its network
and keeps an ARP table
18-Feb-13
Jaringan Komputer_D3 TT
23
Check interfaces
R1#show run
interface FastEthernet0/0
ip address 172.16.3.1 255.255.255.0
(Does not say no shutdown)
18-Feb-13
Jaringan Komputer_D3 TT
24
Jaringan Komputer_D3 TT
25
Directly connected
Jaringan Komputer_D3 TT
26
Serial interface
R2(config)#interface serial 0/0
R2(config-if)#ip address 172.16.2.2
255.255.255.0
R2(config-if)#no shutdown
This is DTE end
DCE end needs an additional
command
R3(config-if)#clock rate 64000
18-Feb-13
Jaringan Komputer_D3 TT
27
show interfaces
show ip interface brief
show running-config
Check that network is in routing table
show ip route
18-Feb-13
Jaringan Komputer_D3 TT
28
Show controllers
R1#show controllers serial 0/0
Interface Serial0/0
Hardware is PowerQUICC MPC860
DCE V.35, no clock
etc.
Shows if a cable is connected
Shows the type of cable
Shows if clock rate set
18-Feb-13
Jaringan Komputer_D3 TT
29
debug ip routing
R2#debug ip routing
If you give this command before
configuring the interfaces then you
see a report of the networks being
added to the routing table.
R2#no debug ip routing
or
R2#no debug all
Switch off debugging as soon as
possible after use it takes up
resources.
18-Feb-13
Jaringan Komputer_D3 TT
30
18-Feb-13
Jaringan Komputer_D3 TT
31
18-Feb-13
Jaringan Komputer_D3 TT
32
Going further
CDP only shows immediate
neighbours, but it does tell you their
IP addresses.
Telnet to the neighbour and then use
CDP to find out about its neighbours
and so on.
18-Feb-13
Jaringan Komputer_D3 TT
33
Disable CDP
Disable CDP for the entire device:
Router(config)#no cdp run
Stop CDP advertisements on one
interface:
Router(config-if)#no cdp enable
Do this for security.
18-Feb-13
Jaringan Komputer_D3 TT
34
Static routes
Use for stub networks: only one
entry.
Stub network
Static route
networks
Default route
18-Feb-13
Jaringan Komputer_D3 TT
35
18-Feb-13
Jaringan Komputer_D3 TT
36
Show ip route
Routing table now includes:
S 172.16.1.0 /24 [1/0] via 172.16.2.2
Or
S 172.16.1.0 /24 is directly
connected, serial 0/0
Administrative distance 1
Metric 0
18-Feb-13
Jaringan Komputer_D3 TT
37
Return route
If you use static routing, you need to
configure static routes in both
directions.
A route in one direction does not
ensure that there is a route in the
other direction.
18-Feb-13
Jaringan Komputer_D3 TT
38
Recursive lookup
18-Feb-13
Jaringan Komputer_D3 TT
39
18-Feb-13
Jaringan Komputer_D3 TT
40
Interface down
If the interface used by a static route
goes down, then the static route is
removed from the routing table.
The static route remains in the
configuration.
If the interface comes up again then
the static route goes back in the
routing table.
18-Feb-13
Jaringan Komputer_D3 TT
41
18-Feb-13
Jaringan Komputer_D3 TT
42
Jaringan Komputer_D3 TT
43
18-Feb-13
Jaringan Komputer_D3 TT
44
Default route
All packets from the stub network
need to go on the same route to the
right hand router.
Configure a static default route.
Stub network
Static route
networks
Default route
18-Feb-13
Jaringan Komputer_D3 TT
45
18-Feb-13
Jaringan Komputer_D3 TT
46
Routing table
S* 0.0.0.0/0 is directly connected,
Serial0/0
The default route is shown with a *
18-Feb-13
Jaringan Komputer_D3 TT
47
Troubleshooting tools
ping
traceroute
show ip route
show ip interface brief
show cdp neighbors
show running-config
18-Feb-13
Jaringan Komputer_D3 TT
48
Basic Configuration
(revision)
Name
Passwords
Interfaces
Routing
Banner (Message of the day)
Save configuration
Check configuration
18-Feb-13
Jaringan Komputer_D3 TT
49
Global configuration
Router>enable
Router#configure terminal (config t)
Router(config)#
Start in user exec mode
Go to privileged exec mode (no
configuration so no password)
Go to global configuration mode
18-Feb-13
Jaringan Komputer_D3 TT
50
Hostname
Give the router a name to show at its
prompt
Do this in global configuration mode
Router(config)# hostname Abingdon
Abingdon(config)#
18-Feb-13
Jaringan Komputer_D3 TT
51
Enable secret
Protect privileged exec mode with an
encrypted password.
Abingdon(config)# enable secret
class
You could set an enable password but
this is not encrypted
There is no need to set both, but if
you do then the enable secret will be
used
18-Feb-13
Jaringan Komputer_D3 TT
52
18-Feb-13
Jaringan Komputer_D3 TT
53
18-Feb-13
Jaringan Komputer_D3 TT
54
Interface configuration
Abingdon(config)# interface serial
0/0
Abingdon(config-if)# ip address
192.168.3.1 255.255.255.0
Abingdon(config-if)# no shutdown
Abingdon(config-if)# exit
This is for a DTE serial interface
Ethernet interfaces are configured the
same way
18-Feb-13
Jaringan Komputer_D3 TT
55
Jaringan Komputer_D3 TT
56
Interface description
You can give an interface a
description
This does not affect the operation of
the router but it is useful
documentation
Do it in interface configuration mode
for the required interface
Abingdon(config-if) description Serial
line to Witney 01993 876543
18-Feb-13
Jaringan Komputer_D3 TT
57
18-Feb-13
Jaringan Komputer_D3 TT
58
Routing
The router knows its directly attached
networks because you have put IP
addresses on its interfaces
It can put these networks in its
routing table
It needs to find routes to networks
that are not directly attached
You can give it static routes
You can enable a routing protocol
18-Feb-13
Jaringan Komputer_D3 TT
59
18-Feb-13
Jaringan Komputer_D3 TT
60
Save configuration
Your configuration is held in RAM as
the running configuration
If you want to keep this configuration
then you must save it to NVRAM into
the startup configuration file
Abingdon# copy running-config
startup-config
18-Feb-13
Jaringan Komputer_D3 TT
61
Shortened commands
The Cisco IOS accepts shortened
forms of commands
You need to type enough to
distinguish the command from other
commands
copy run start can be used instead of
copy running-config startup-config
int s 0/0 can be used instead of
interface serial 0/0
18-Feb-13
Jaringan Komputer_D3 TT
62
Show commands
Show
Show
Show
Show
Show
18-Feb-13
running-config
startup-config
ip route
ip interfaces
ip interface brief
Jaringan Komputer_D3 TT
63
Show ip route
List of codes
List of routes
18-Feb-13
Jaringan Komputer_D3 TT
64
Routing table
Directly connected
C
C
S
R
Exit port
Network and mask
18-Feb-13
Jaringan Komputer_D3 TT
65
Routing table
Static route
C
C
S
R
Administrative
distance and metric
18-Feb-13
Address of next
hop router
Jaringan Komputer_D3 TT
66
Routing table
Exit port
Network and mask
Administrative
distance and metric
18-Feb-13
Address of next
hop router
Jaringan Komputer_D3 TT
Time since
last update
67
LOGO
Thank You
Ref: S Ward Abingdon and Witney College
18-Feb-13
Jaringan Komputer_D3 TT
68