Anda di halaman 1dari 68

LOGO

Basic Routing
18-Feb-13

Jaringan Komputer_D3 TT

OSI layers 1, 2 and 3


Find destination network, check routing table for route,
direct packet to correct outgoing interface
Check layer 2
address,
decapsulate

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

Routing Table Principles


1. Every router makes its decision
alone, based on the information it has
in its own routing table.
2. The fact that one router has certain
information in its routing table does
not mean that other routers have the
same information.
3. Routing information about a path
from one network to another does not
provide routing information about the
reverse, or return, path.
18-Feb-13

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

OSPF uses cost based


on bandwidth. It picks
this route as the best.
18-Feb-13

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

Interface not up?


If the interface does not come up
check the cable, check link lights,
check the configuration at the other
end.
If the protocol does not come up for
Ethernet check that you have the
right cable (straight-through or
crossover) for serial check that the
clock rate is on the right end of the
cable, check that the same Layer 2
protocol is used.
18-Feb-13

Jaringan Komputer_D3 TT

25

Directly connected

Configure IP address on interface


It appears in routing table
Note subnetting information
18-Feb-13

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

Usual show commands


Check that interface and protocol are
up

 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

Cisco Discovery Protocol


Works at layer 2
Directly connected devices only
Cisco devices only
Devices send CDP advertisements to
neighbours at regular intervals
Use it to find out about networking
devices

18-Feb-13

Jaringan Komputer_D3 TT

31

Show cdp neighbors

Does not show IP address


You need show cdp neighbors detail
for that.

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

Configure a static route


R1(config)#ip route 172.16.1.0
255.255.255.0 172.16.2.2
Give the next hop address
R1(config)#ip route 172.16.1.0
255.255.255.0 Serial 0/0
Or give the exit interface

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

Find a route to 172.16.1.0/24


There it is, via
172.16.2.2

How do you get to


172.16.2.2?
There it is via serial 0/0.

Recursive lookup
18-Feb-13

Jaringan Komputer_D3 TT

39

Static route giving interface


R1(config)#ip route 192.168.2.0
255.255.255.0 serial 0/0

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

Delete a static route


R1(config)#no ip route 192.168.2.0
255.255.255.0 serial 0/0
Give the same command again with
no in front.
Most commands can be reversed like
this.

18-Feb-13

Jaringan Komputer_D3 TT

42

Next hop or exit interface?


For a point to point serial link,
configure the static route with the
exit interface.
 Only one look-up, less processing.
For an Ethernet link, configure the
static route with the next hop address
(or with both).
 This identifies the device that should receive
the packet next. The MAC address can be
found and used in the frame header.
18-Feb-13

Jaringan Komputer_D3 TT

43

Summarizing static routes

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

Configure a default route


Router(config)#ip route 0.0.0.0
0.0.0.0 serial 0/0
Using exit interface.
Router(config)#ip route 0.0.0.0
0.0.0.0 172.16.2.2
Using next hop address
0.0.0.0 network address and subnet
mask is called quad zero. It matches
anything.

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

Passwords for login


Set login password on console port
for security
Abingdon(config)# line con 0
Abingdon(config-line) password cisco
Abingdon(config-line) login
Abingdon(config-line) exit
You can also put a password on the
AUX port in a similar way

18-Feb-13

Jaringan Komputer_D3 TT

53

Passwords for Telnet login


Set login password on virtual lines to
allow you to Telnet to the router
Abingdon(config)# line vty 0 4
Abingdon(config-line) password cisco
Abingdon(config-line) login
Abingdon(config-line) exit

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

Interface DCE configuration


A DCE serial interface needs an extra
line:
Abingdon(config)# interface serial
0/0
Abingdon(config-if)# ip address
192.168.3.1 255.255.255.0
Abingdon(config-if)# clock rate
64000
Abingdon(config-if)# no shutdown
Abingdon(config-if)# exit
18-Feb-13

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

Message of the day


You can configure a message to be
shown before the user logs on
Cisco recommend that you show a
warning to unauthorised users (NOT
welcome)
Abingdon(config)# banner motd #
authorised users only #
# is a delimiter. Any character can be
used.

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

Routing protocol: RIP


You choose the routing protocol
Then you tell the router which directly
attached networks it should advertise
Abingdon(config) router rip
Abingdon(config-router) network
192.168.1.0
Abingdon(config-router) network
192.168.3.0 Abingdon(config-router)
exit

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

192.168.1.0/24 is directly connected, FastEthernet0/0


192.168.2.0/24 is directly connected, Serial0/0
192.168.3.0/24 [1/0] via 192.168.2.2
192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0

18-Feb-13

Jaringan Komputer_D3 TT

65

Routing table

Static route
C
C
S
R

Network and mask

192.168.1.0/24 is directly connected, FastEthernet0/0


192.168.2.0/24 is directly connected, Serial0/0
192.168.3.0/24 [1/0] via 192.168.2.2
192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0

Administrative
distance and metric

18-Feb-13

Address of next
hop router

Jaringan Komputer_D3 TT

66

Routing table

Dynamic route, RIP


C
C
S
R

Exit port
Network and mask

192.168.1.0/24 is directly connected, FastEthernet0/0


192.168.2.0/24 is directly connected, Serial0/0
192.168.3.0/24 [1/0] via 192.168.2.2
192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0

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

Anda mungkin juga menyukai