basic routing
Post on 02-Oct-2015
232 Views
Preview:
DESCRIPTION
TRANSCRIPT
-
LOGO
Basic Routing
18-Feb-13 Jaringan Komputer_D3 TT 1
-
OSI layers 1, 2 and 3
18-Feb-13 Jaringan Komputer_D3 TT
Receive signals from cable, convert to binary.
Check layer 2 address, decapsulate
Find destination network, check routing table for route, direct packet to correct outgoing interface
Encapsulate with frame for next link
Encode binary, place signals on cable
2
-
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 3
-
Static routes Dynamic routesEntered by administrator
Time consuming, different for each router
Must be updated if routes change
Little processing
No bandwidth used
Gives nothing away
Learned from other routers
Start the protocol then it runs by itself
Automatically updates when routes change
More processing
Uses bandwidth
Gives away information
18-Feb-13 Jaringan Komputer_D3 TT 4
-
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 5
-
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 6
-
Metrics
18-Feb-13 Jaringan Komputer_D3 TT
RIP uses hop count. It picks this route as the best.
7
-
Metrics
18-Feb-13 Jaringan Komputer_D3 TT
OSPF uses cost based on bandwidth. It picks this route as the best.
8
-
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 9
-
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
Flash
Keeps contents
Holds IOS image
18-Feb-13 Jaringan Komputer_D3 TT
NVRAM Keeps contents Holds startup
configuration file
RAM Volatile Holds runnning config,
tables, queues etc
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
-
18-Feb-13 Jaringan Komputer_D3 TT
Default condition
By default, interfaces have no IP addresses and are administratively shut down.
They need to be configured.
21
-
18-Feb-13 Jaringan Komputer_D3 TT
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-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 01:16:09.214: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
22
-
18-Feb-13 Jaringan Komputer_D3 TT
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
23
-
18-Feb-13 Jaringan Komputer_D3 TT
Check interfaces
R1#show run
interface FastEthernet0/0
ip address 172.16.3.1 255.255.255.0
(Does not say no shutdown)
24
-
18-Feb-13 Jaringan Komputer_D3 TT
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.
25
-
18-Feb-13 Jaringan Komputer_D3 TT
Directly connected
Configure IP address on interface
It appears in routing table
Note subnetting information
26
-
18-Feb-13 Jaringan Komputer_D3 TT
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
27
-
18-Feb-13 Jaringan Komputer_D3 TT
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
28
-
18-Feb-13 Jaringan Komputer_D3 TT
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
29
-
18-Feb-13 Jaringan Komputer_D3 TT
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.
30
-
18-Feb-13 Jaringan Komputer_D3 TT
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
31
-
18-Feb-13 Jaringan Komputer_D3 TT
Show cdp neighbors
Does not show IP address
You need show cdp neighbors detail for that.
32
-
18-Feb-13 Jaringan Komputer_D3 TT
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.
33
-
18-Feb-13 Jaringan Komputer_D3 TT
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.
34
-
18-Feb-13 Jaringan Komputer_D3 TT
Static routes
Use for stub networks: only one entry.
Stub networknetworks
Static route
Default route
35
-
18-Feb-13 Jaringan Komputer_D3 TT
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
36
-
18-Feb-13 Jaringan Komputer_D3 TT
Show ip route
Routing table now includes:
S 172.16.1.0 /24 [1/0] via 172.16.2.2
OrS 172.16.1.0 /24 is directly connected, serial 0/0
Administrative distance 1
Metric 0
37
-
18-Feb-13 Jaringan Komputer_D3 TT
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.
38
-
18-Feb-13 Jaringan Komputer_D3 TT
Find a route to 172.16.1.0/24
Recursive lookup
There it is, via 172.16.2.2
How do you get to 172.16.2.2?There it is via serial 0/0.
39
-
18-Feb-13 Jaringan Komputer_D3 TT
Static route giving interface
R1(config)#ip route 192.168.2.0 255.255.255.0 serial 0/0
40
-
18-Feb-13 Jaringan Komputer_D3 TT
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.
41
-
18-Feb-13 Jaringan Komputer_D3 TT
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.
42
-
18-Feb-13 Jaringan Komputer_D3 TT
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.
43
-
18-Feb-13 Jaringan Komputer_D3 TT
Summarizing static routes
44
-
18-Feb-13 Jaringan Komputer_D3 TT
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 networknetworks
Static route
Default route
45
-
18-Feb-13 Jaringan Komputer_D3 TT
Configure a default route
Router(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0Using exit interface.
Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.2Using next hop address
0.0.0.0 network address and subnet mask is called quad zero. It matches anything.
46
-
18-Feb-13 Jaringan Komputer_D3 TT
Routing table
S* 0.0.0.0/0 is directly connected, Serial0/0
The default route is shown with a *
47
-
18-Feb-13 Jaringan Komputer_D3 TT
Troubleshooting tools
ping
traceroute
show ip route
show ip interface brief
show cdp neighbors
show running-config
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 running-config
Show startup-config
Show ip route
Show ip interfaces
Show ip interface brief
18-Feb-13 Jaringan Komputer_D3 TT 63
-
Show ip route
18-Feb-13 Jaringan Komputer_D3 TT
List of codes
List of routes
64
-
Routing table
18-Feb-13 Jaringan Komputer_D3 TT
C 192.168.1.0/24 is directly connected, FastEthernet0/0C 192.168.2.0/24 is directly connected, Serial0/0S 192.168.3.0/24 [1/0] via 192.168.2.2R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0
Directly connectedNetwork and mask
Exit port
65
-
Routing table
18-Feb-13 Jaringan Komputer_D3 TT
C 192.168.1.0/24 is directly connected, FastEthernet0/0C 192.168.2.0/24 is directly connected, Serial0/0S 192.168.3.0/24 [1/0] via 192.168.2.2R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0
Static routeNetwork and mask
Administrative distance and metric Address of next
hop router
66
-
Routing table
18-Feb-13 Jaringan Komputer_D3 TT
C 192.168.1.0/24 is directly connected, FastEthernet0/0C 192.168.2.0/24 is directly connected, Serial0/0S 192.168.3.0/24 [1/0] via 192.168.2.2R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:20, Serial0/0
Dynamic route, RIPNetwork and mask
Administrative distance and metric Address of next
hop routerTime since last update
Exit port
67
-
LOGO
Thank YouRef: S Ward Abingdon and Witney College
18-Feb-13 Jaringan Komputer_D3 TT 68
top related