bab 1. perencanaan desain jaringan komputer filerouting routing adalah suatu protokol yang digunakan...
TRANSCRIPT
IP Routing
Jaringan Komputer IE 3713
Program Studi Teknik Industri
Fakultas Rekayasa Industri IT Telkom
1 Computer Network - Industrial Engineering -
Faculty of Industrial Engineering
Routing
Routing adalah proses pengiriman informasi/data padanetwork dari pengirim ke penerima pada network yang berbeda (melalui internetworking)
Untuk dapat merutekan paket, diperlukan Router
Untuk dapat merutekan paket, Router setidaknya harusmengetahui Address (IP) Penerima
Router yang bertetangga,
Rute/track yang dapat di bypass (dilewati)
Rute terbaik dari masing-masing network
Informasi Routing
2
Routing
Routing adalah suatu protokol yang digunakan
untuk mendapatkan rute dari satu jaringan ke
jaringan yang lain.
Rute ini, disebut dengan route dan informasi
route secara dinamis dapat diberikan ke router
yang lain ataupun dapat diberikan secara statis
ke router lain
Routing adalah proses dimana suatu router
mem-forward paket ke jaringan yang dituju
3
Routing Proses
ping 172.16.100.15 dari 172.16.20.154
172.16.20.15
A
172.16.100.15
B
E0:172.16.20.1
E1:172.16.100.1
Routing Proses
Paket dibuat di kom A dan akan dikirim ke kom B
A membroadcast ARP ke network untuk mengetahui MAC address B
Ketika B berlokasi di network yang berbeda, Router memberirespon dengan menyediakan alamat fisik, jadi paket dikirim langsung ke router (sebagai default router)
A mengirim paket ke router melalui port E0
Alamat hardware yang sesuai dengan router HA, kemudianheader frame dibuang, tinggal paket IP. Router kemudianmengecek alamat penerima. Ketika router mengetahui bahwa penerima adalah 172.16.100.15,Router tahu (dari tabel routing) bahwa alamat 172.16.100.0 network dapat mencapai dan menyelesaikannya melalui port E1.
5
Routing Process
Router menyerahkan paket ke port E1.
Kemudian dari E1 dikirim ke B
Paket diterima oleh B dan kemudian
diproses untuk melihat kontennya
Karena paket adalah sebuah ping
(ICMP), B menjawab paket tersebut
(membalas) ke A. Prosesnya sama
dengan sebelumnya hanya arah saja
yang berbeda. 6
Tipe Routing
Static Routing, admin mengset secara manual
routing tabelnya.
Default Routing, digunakan untuk merutekan
paket dengan tujuan yang tidak sama dengan
routing yang ada dalam tabel routing.
Dynamic Routing, router-router m engikuti
aturan yang didefinisikan oleh protokol routing
untuk pertukaran informasi routing dan
pemilihan jalur terbaik
7
Routing on the network
8
2621A
2501A
2501B
2501C
F0/0
10.1
E0
10.2
S0
20.1
S0
20.2
30.1
E0
S1
40.1
S0
40.2 E0
50.1
Router NA Port HA
2621A 172.16.10.0 F0/0 172.16.10.1
2501A 172.16.10.0 E0 172.16.10.2
2501A 172.16.20.0 S0 172.16.20.1
2501B 172.16.20.0 S0 172.16.20.2
172.16.10.0
172.16.20.0
172.16.30.0
172.16.40.0 172.16.50.0
Router NA Port HA
2501B 172.16.30.0 E0 172.16.30.1
2501B 172.16.40.0 S1 172.16.40.1
2501C 172.16.40.0 S0 172.16.40.2
2501C 172.16.50.0 E0 172.16.50.1
Static Routing
Tidak ada beban di CPU
Tidak memerlukan komunikasi antar router
Ketika menggunakan routing statis, seorang network administrator mengkonfigurasi informasi tentangjaringan yang ingin dituju secara manual.
Jika routing yang digunakan adalah statis, makakonfigurasinya harus dilakukan secara manual, administrator jaringan harus memasukkan ataumenghapus rute statis jika terjadi perubahan topologi
Pada jaringan skala besar, jika tetap menggunakanrouting statis, maka akan sangat membuang waktuadministrator jaringan untuk melakukan update table routing 9
Static Routing
Router 2621A terkoneksi langsung hanya
dengan network 172.16.10.0. Dengan
network lain harus dikonfigurasi
Routing tabel untuk 2621A
10
C = connected, S = static
Network Number Next Hope/Port Keterangan
172.16.50.0 172.16.10.2 S
172.16.40.0 172.16.10.2 S
172.16.30.0 172.16.10.2 S
172.16.20.0 172.16.10.2 S
172.16.10.0 F0/0 C
Static Routing
2501A router terkoneksi langsung ke
network 172.16.10.0 dan 172.16.20.0. Dengan network lain harus di konfigurasi
Bagaimana routing tabel dari 2501A?
11
Jawaban
Network Number Next Hope/Port Keterangan
172.16.50.0 172.16.20.2 S
172.16.40.0 172.16.20.2 S
172.16.30.0 172.16.20.2 S
172.16.20.0 S0 C
172.16.10.0 E0 C
Static Routing
Dengan cara yang sama, bagaimanakonfigurasi dari router 2501B dan 2501C ?
13
Jawaban
2501B
NN NH/Port Ket
172.16.50.0 172.16.40.2 S
172.16.40.0 S1 C
172.16.30.0 E0 C
172.16.20.0 S0 C
172.16.10.0 172.16.20.1 S
2501C
NN NH/Port Ket
172.16.50.0 E0 C
172.16.40.0 S0 C
172.16.30.0 172.16.40.1 S
172.16.20.0 172.16.40.1 S
172.16.10.0 172.16.40.1 S
Static Routing
Cara kerja routing statis dapat dibagi
menjadi 3 bagian:
Administrator jaringan yang
mengkonfigurasi router
Router melakukan routing
berdasarkan informasi dalam tabel
routing
Routing statis digunakan untuk
melewatkan paket data
Kelebihan dan Kekurangan
Static Routing
Kekurangan Kelebihan
Konfigurasi perawatan
yang sangat tinggi
Overhead prosesor rendah
Tidak dapat disesuaikan. Tidak ada penggunaan
Bandwidth
Secure Operational
Terprediksi
Default Routing
Pada Routing tabel, default routing adalah
pada NN yang terhubung langsung ke Router
Contoh
17
2501B
NN NH/Port Ket
172.16.50.0 172.16.40.2 S
172.16.40.0 S1 C
172.16.30.0 E0 C
172.16.20.0 S0 C
172.16.10.0 172.16.20.1 S
Default
Routing
Default Routing
Bagiamana dengan Router 2501C
Jawaban
2501C
NN NH/Port Ket
172.16.50.0 E0 C
172.16.40.0 S0 C
172.16.30.0 172.16.40.2 S
172.16.20.0 172.16.40.2 S
172.16.10.0 172.16.40.2 S
Dynamic Routing
Routing protocol adalah komunikasi antararouter-router. Routing protocol mengijinkanrouter-router untuk sharing informasitentang jaringan dan koneksi antar router. Router menggunakan informasi ini untukmembangun dan memperbaiki tabelroutingnya.
Tipe dari Dynamic Routing RIP (Routing Information Protocol)
IGRP (Interior Gateway Routing Protocol)
EIGRP (Enhanced IGRP)
OSPF (Open Shortest Path First)20
Administrative Distance
Level digit dari informasi routing yang harus dapatdipercaya.
Nilainya antara 0 -255, 0 adalah angka yang dapatdipercaya, ketika 255 mengidentifikasikan bahwatidak akan ada lagi trafik yang dapat melewati route
Tabel Administrative Distance oleh Cisco
21
Route
Source
Default
Distance
Langsung 0
Static 1
EIGRP 90
IGRP 100
Route Source Default
Distance
OSPF 110
RIP 120
External EIGRP 170
Unknown 255
Routing Protocol
Sebagian besar algoritma routing
dapat diklasifikasikan menjadi dua
kategori berikut:
Distance Vector, using the distance
(Distance) to determine the best path
to a remote network
link state
Hybrid22
Distance Vector
Routing distance vector bertujuan untuk
menentukan arah atau vector dan jarak
ke link-link lain dalam suatu internetwork
Masing2 node(router) membuat vektor
(Destination, cost, Next Hope) untuk
semua node.
23
Distance Vector
24
A
Dest Cost Next
1.0 0 --
2.0 0 --
D
Dest Cost Next
3.0 0 --
5.0 0 --
6.0 0 --
C
Dest Cost Next
2.0 0 --
3.0 0 --
B
Dest Cost Next
4.0 0 --
5.0 0 --
A
Dest Cost Next
1.0 0 --
2.0 0 --
3.0 1 C=2.2
D
Dest Cost Next
3.0 0 --
5.0 0 --
6.0 0 --
2.0 1 C=3.1
4.0 1 B=5.2
C
Dest Cost Next
2.0 0 --
3.0 0 --
1.0 1 A=2.1
5.0 1 D=3.2
6.0 1 D=3.2
B
Dest Cost Next
4.0 0 --
5.0 0 --
3.0 1 D=5.1
6.0 1 D=5.1
5.12.2
4.1
5.2
1.1
2.1
3.1 3.26.1
DC
5.0
1.0
3.0
4.0
2.0
6.0C
BA
D
Distance Vector
25
A
Dest Cost Next
1.0 0 --
2.0 0 --
3.0 1 C=2.2
D
Dest Cost Next
3.0 0 --
5.0 0 --
6.0 0 --
2.0 1 C=3.1
4.0 1 B=5.2
C
Dest Cost Next
2.0 0 --
3.0 0 --
1.0 1 A=2.1
5.0 1 D=3.2
6.0 1 D=3.2
B
Dest Cost Next
4.0 0 --
5.0 0 --
3.0 1 D=5.1
6.0 1 D=5.1
A
Dest Cost Next
1.0 0 --
2.0 0 --
3.0 1 C=2.2
5.0 2 C=2.2
6.0 2 C=2.2
D
Dest Cost Next
3.0 0 --
5.0 0 --
6.0 0 --
2.0 1 C=3.1
4.0 1 B=5.2
1.0 2 C=3.1
C
Dest Cost Next
2.0 0 --
3.0 0 --
1.0 1 A=2.1
5.0 1 D=3.2
6.0 1 D=3.2
4.0 2 D=3.2
B
Dest Cost Next
4.0 0 --
5.0 0 --
3.0 1 D=5.1
6.0 1 D=5.1
2.0 2 D=5.1
Distance Vector
26
A
Dest Cost Next
1.0 0 --
2.0 0 --
3.0 1 C=2.2
5.0 2 C=2.2
6.0 2 C=2.2
4.0 3 C=2.2
D
Dest Cost Next
3.0 0 --
5.0 0 --
6.0 0 --
2.0 1 C=3.1
4.0 1 B=5.2
1.0 2 C=3.1
C
Dest Cost Next
2.0 0 --
3.0 0 --
1.0 1 A=2.1
5.0 1 D=3.2
6.0 1 D=3.2
4.0 2 D=3.2
B
Dest Cost Next
4.0 0 --
5.0 0 --
3.0 1 D=5.1
6.0 1 D=5.1
2.0 2 D=5.1
1.0 3 D=5.1
A
Dest Cost Next
1.0 0 --
2.0 0 --
3.0 1 C=2.2
5.0 2 C=2.2
6.0 2 C=2.2
D
Dest Cost Next
3.0 0 --
5.0 0 --
6.0 0 --
2.0 1 C=3.1
4.0 1 B=5.2
1.0 2 C=3.1
C
Dest Cost Next
2.0 0 --
3.0 0 --
1.0 1 A=2.1
5.0 1 D=3.2
6.0 1 D=3.2
4.0 2 D=3.2
B
Dest Cost Next
4.0 0 --
5.0 0 --
3.0 1 D=5.1
6.0 1 D=5.1
2.0 2 D=5.1
Distance Vector
Exchange updates directly
connected neighbors
periodically (on the order
of several seconds,
RIP:25-35 second)
other node is still
running
keep information
whenever table changes
(called triggered update)
27
C
Dest Cost Next
2.0 0 --
3.0 0 --
1.0 1 A=2.1
5.0 1 D=3.2
6.0 1 D=3.2
4.0 2 D=3.2
5.12.2
4.1
5.2
1.1
2.1
3.1 3.2
6.1
DC
5.0
1.0
3.0
4.0
2.0
6.0C
BA
D
Update Example 1
F detects that link to G has failed
F sets distance to G to infinity and sends update t o A
A sets distance to G to infinity since it uses F to reach G
A receives periodic update from C with 2-hop path to G
A sets distance to G to 3 and sends update to F
F decides it can reach G in 4 hops via A
28
D
G
A
F
E
B
C
Router
F
Dest Cost Next
x.0 1 G
F
Dest Cost Next
x.0 OO --
A
Dest Cost Next
x.0 OO --
A
Dest Cost Next
x.0 2 D
A
Dest Cost Next
x.0 00 C
C
Dest Cost Next
x.0 1 D
F
Dest Cost Next
x.0 3 A
x.0
Routing Loops Example 2
link from A to E fails
A advertises distance of infinity to E
B and C advertise a distance of 2 to E
B decides it can reach E in 3 hops; advertises this to A
A decides it can read E in 4 hops; advertises this to C
C decides that it can reach E in 5 hops…
29
A
Dest Cost Next
e.0 1 E
A
Dest Cost Next
e.0 OO --
B
Dest Cost Next
e.0 00 --
A
Dest Cost Next
e.0 4 B
B
Dest Cost Next
e.0 3 C
C
Dest Cost Next
e.0 2 A
C
Dest Cost Next
e.0 5 A
FAIL & UNSTABLE
B
Dest Cost Next
e.0 00 --
D
G
A
F
E
B
C
Router
e.0
Loop-Breaking Heuristics
Prevention:
Set infinity to 16 (to be problematic if the number of network enlarges and becomes more than 16 routers)
Split horizon (eg: B sends routing updates to A, B does not send tables (e.0, 2, A) to A because the routing is derived from A)
Split horizon with poison reverse (table (e.0, 2) remains sent by B to A with a certain sign that A does not use it).
Remains problematic: a long time convergency
30
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Routing Information Protocol (RIP)
Using the Principles of Distance Vector
Operates with UDP port 520
Destination is the Network, not router
31
B
D
A
C
5.0
1.0
3.0
4.0
2.0
6.0
A
C
B
D
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
RIPv1 Packet Format
32
Command Version Unused (= zero)
Address Family
Identifier
Unused (= zero)
IP Address 1
Metric
Address Family
Identifier IP Address 2
Metric
0 8 16 31
Unused (= zero)
Unused (= zero)
Up to a maximum of 25
Unused (= zero)
Unused (= zero)
Unused (= zero)
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
RIPv1 Packet Format
Command :Request value 1, response value 0
Version : value 1, RIP version 1
Address Family Identifier : value 2 for IP
IP Address : Address destination of the route.
Can be a mayor of the Network Address, subnet,
or host route
Metric : Cost, value between 1 and 16
33
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
RIPv2 Packet Format
34
Command Version Unused (= zero)
Address Family
Identifier
Route Tag
IP Address 1
Metric
Address Family
Identifier IP Address 2
Metric
0 8 16 31
Subnet Mask
Next Hop
Up to a maximum of 25
Subnet Mask
Next Hop
Route Tag
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
RIPv2 Packet Format
Command: Request value 1, Response value 0 Version : value 2, RIP versi 2
Address Family Identifier : value 2 for IP
Route Tag : for tagging an external route, atau route that has been in the redistribution into the process of RIPv2
IP Address : Address destination of the route. Can be a mayor of Network Address, subnet, or route host
Subnet mask : mask 32 bit identifying network and subnet network IP
Next Hop : identify the best next hop address Metric : Cost, value between 1 and 16 35
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Configuring and
testing Router
CCNA Exploration
Topics
The Internetwork Operating System
(IOS).
Devices that have the IOS embedded.
IOS commands available to a device.
IOS modes of operation.
Basic IOS commands.
Basic show commands.
Configuration files 37
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Internetwork Operating
System
Most Cisco devices use the Cisco
IOS.
Details vary with the device and
feature set.
Normal access through a command
line.
Stored in flash memory and can be
upgraded.
Usually copied into RAM when the
device is powered on, and run from
RAM.
38
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Access to the interface
Console port via serial connection
Initial configuration
Disaster recovery
When network access has failed
Password recovery
As well as general management
Console access does not require a
password. Configure a password.
Lock the door.39
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Telnet, SSH, Aux
Later management can be via Telnet
There must be an IP address on the
port
A password must be configured
Secure shell gives better security
AUX port can be used locally or via
modem but by default does not show
error messages 40
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Configuration files
Hold the commands that have been
configured on the router to customise
it.
Running configuration in RAM holds
commands that are in current use
Startup configuration in NVRAM holds
saved commands. These are kept
when the power is off and usually
copied back into RAM when the router
is re-started.
41
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Router storage areas
ROM
Permanent
Holds POST, boot
instructions, basic IOS
Flash
Keeps contents
Holds IOS image
NVRAM
Keeps contents
Holds startup
configuration file
RAM
Volatile
Holds runnning config,
tables, queues etc
42 Computer Network - Industrial Engineering -
Faculty of Industrial Engineering
Router IOS modes
User EXEC mode
Privileged EXEC mode
enable disable+ password
Global Configuration mode
Configure terminal Exit or Ctrl+z
Specific Configuration modes
Exit EndVarious commands
43
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Router prompts
User EXEC mode
Privileged EXEC mode
Global Configuration mode
Specific Configuration modes
Router>
Router#
Router(config)#
Router(config-if)#
and others 44
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
EXEC modes
You log in to User EXEC modeRouter>
You can give basic monitoring commands but cannot change the configuration
Enter enable to go to Privileged EXEC modeRouter#
Password may be used for security
You can give more commands and can go to configuration modes
45
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Configuration modes
Start in privileged EXEC mode and
enter the configure terminal (config
t) command
Router# config t
Router(config)#
The prompt changes
This is global configuration mode
Additional commands take you to
interface configuration, router
configuration etc.
46
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Leaving configuration modes
From interface configuration mode there are several ways of getting to privileged EXEC
Router(config-if)# exit Router(config)# exit Router#
Router(config-if)# endRouter#
Router(config-if)# Ctrl+zRouter#
47
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Command Structure
Followed by <Enter>48
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
? To get help
? Gives a list of commands available
from the current prompt.
Command followed by space then ?
Gives a list of keywords or arguments
that can be used.
Start of command followed by ? with
no space shows how the word can be
continued.49
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Shortened commands
Router#show running-config
Router#show run
Router#sh ru
It needs enough letters of each word
to be unambiguous. (Tab key shows
whole word)
Router#s ru
% Ambiguous command: „s‟ 50
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Other error messages
Switch#clock set
% Incomplete command
Switch#clock set 19:50:00 25 6
% Invalid input detected at „^‟ marker
Router#show runming-config
% Invalid input detected at „^‟ marker
^
^51
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Keyboard shortcuts
Tab completes a partial command
Backspace erases to left of cursor
Ctrl+D erases at cursor (Delete does
not)
Ctrl+Z returns from any config mode
to privileged exec mode
Ctrl+C leave Setup mode
52
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
At the ---More--- prompt
Enter shows the next line
Spacebar shows the next screenful
Needed with commands such as
show running-config that produce
more than one screen of text.
53
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Show commands
Show ? To get a list
Many different show commands to
give information about every aspect of
the router and its operation
We use some of the most common.
54
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
General show commands
Show running-config shows the
configuration file from RAM
Show startup-config shows the
saved configuration file from NVRAM
Show version gives information
about the IOS and the router itself. It
shows the configuration register,
which controls how the router starts
up.55
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Show interfaces
Gives statistics for all interfaces
In particular, says if the interface is up
and if the protocol is up – important in
troubleshooting.
Show interfaces serial 0/0 to show
one selected interface
You can shorten to show int s 0/0
Show ip interfaces gives IP statistics56
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Save configuration
Router#copy running-config startup-
config
Router#copy run start (shortened)
Router#wr (Old fashioned, short for write,
but it works and is safe.)
Beware! A typing error in the copy
command can delete the operating system.
If you get an odd message about Flash –
hands off – call for help. 57
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Hostname
Router>enable
Router#config t
Router(config)#hostname Paris
Paris(config)#
Configure a suitable hostname so that
you know which router you are
managing and so that you can identify
it in network documentation. 58
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Console password
Paris(config)#line con 0
Paris(config-line)#password cisco
Paris(config-line)#login
Paris(config-line)#exit
Restricts access via the console
Use cisco as the password in labs.
Use a proper strong password on
production networks 59
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Vty password for Telnet
Paris(config)#line vty 0 4
Paris(config-line)#password cisco
Paris(config-line)#login
Paris(config-line)#exit
Allows and restricts access via 5 vty
lines
Use cisco as the password in labs.
Use a proper strong, different
password on production networks
60
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Enable and enable secret
Paris(config)#enable secret class
The password class is needed when
you type enable to enter privileged
exec mode
This password is encrypted
Paris(config)#enable password
cisco
Not encrypted, used on older routers
If you configure both, then only the
enable secret is used.
61
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Message of the day
Paris(config)#banner motd # No
unauthorised access #
# is a delimiter to show where the
message starts and ends.
Any character can be used as long as
it does not appear in the message.
The message should make it clear
that unauthorised access is forbidden.62
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Reload
Shuts down the router and then starts
it again.
If the configuration has changed then
you are prompted to save it.
The running configuration in RAM is
lost.
The startup configuration from
NVRAM is (usually) loaded into RAM
on startup.63
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Back up to TFTP server
Start TFTP server software on host
Paris#copy running-config tftp
Remote host []? 172.16.1.1
Name of configuration file to write
[Paris-config]? Paris12Oct07
Write file Paris12Oct07 to 172.16.1.1?
[confirm] y
Writing Paris12Oct07 ! ! ! ! ! ! [OK] 64
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Back up as text file
Start text capture
Name file
show run
Stop text capture
Open saved file and “tidy up”.
Remove unwanted symbols at –More-
--
No shutdown command on interfaces
Passwords in plain text (ouch!)
65
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
TeraTerm text file
TeraTerm is an open source Telnet
client.
It can also act as a SSH client
It can capture text and save it as a
file.
66
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Erase startup configuration
Paris#erase NVRAM:startup-config
Paris#erase startup-config
Paris#erase start
If you reload, then the router starts up
with the default configuration. No
passwords, no IP addresses etc.
Caution if you get this command
wrong then you could erase
something else, e.g. IOS67
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Restore file from TFTP
server
Router#copy tftp running-config
You will be prompted for IP address
and file name.
Configuration is copied into RAM and
takes effect at once.
Save to NVRAM.
68
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Restore text file
Go to global configuration
mode
Hyperterminal Transfer
menu
Send text file…
Or
Copy text from text file
“Paste to host” into Hyperterminal session69
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Configure a router interface
Paris(config)#interface FastEthernet
0/0
Paris(config-if)#ip address 172.16.1.1
255.255.0.0
Paris(config-if)#no shutdown
Paris(config-if)#exit
Interface names vary, depending on
whether the router is modular and on
the bandwidth.
E.g. interface Ethernet 0 on an older
70
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Configure a router interface
Paris(config)#interface serial 0/0
Paris(config-if)#ip address
192.168.4.1 255.255.255.0
(Paris(config-if)#clock rate 64000)
Paris(config-if)#no shutdown
Paris(config-if)#exit
DCE only
71
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Description
Paris(config)#interface fa0/0
Paris(config-if)#description
Connects to Paris central switch
Can include circuit and contact
information
Not needed for the operation of the
router
Valuable for documentation as it is
included in the configuration listing72
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Switch interfaces
Switch physical interfaces do not have
IP addresses
They are active by default and do not
need the no shutdown command.
It can be useful to give them a
description.
73
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Switch IP address
The switch IP address goes on a
virtual interface, not a real one,
normally VLAN1.
SwA(config)#interface VLAN1
SwA(config-if)#ip address
172.16.255.1 255.255.0.0
SwA(config-if)#no shutdown
SwA(config-if)#exit 74
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Switch default gateway
SwA(config)#ip default gateway
172.16.255.254
Just like a workstation, a switch needs
a default gateway if it exchanges
messages with devices on a different
network.
The default gateway is the address of
the local router.75
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Interface – show commands
show interfaces states whether up or
down, gives some protocol
information and statistics about
interface use.
show ip interface gives IP addresses
and much more.
show ip interface brief gives
summary of IP addresses and
whether up/down. Very useful
command.
76
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Up or down
Interface status: Layer 1
Up
Down
Administratively down (no shutdown to
bring up)
Protocol: Layer 2
Up
Down (no keepalive signal received)77
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Ping – step by step
Ping 127.0.0.1 (loopback, is TCP/IP
OK?)
Ping own IP address (are NIC
hardware and software all right? Is IP
address bound?)
Ping local hosts (checks own
configuration and that of others)
Ping gateway
Ping other intermediate routers
Ping hosts on remote networks
78
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Network baseline
Measure and record performance
At different times
Under different conditions
Repeatedly over a period of time
Build up a record of network performance
Useful in troubleshooting and optimising the network
Helps predict future problems
Helps planning for change
79
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
Find out about nodes
Ping – used from workstation, router
or switch – shows if destination can
be reached
Traceroute – shows hops along the
path
Arp -a on workstation – shows list of
MAC and IP addresses
show mac-address-table on switch –
shows list of MAC addresses and
switch ports
80
Com
pute
r Netw
ork
-In
dustria
l Engin
eerin
g -
Faculty
of In
dustria
l Engin
eerin
g
The End