You are on page 1of 58

Introduction to Routing and Switching Simulate with Packet Tracer

Nguyn Quc nh
Faculty of IT !o "hi #inh "ity $ni%er&ity of Indu&try Se't ()*(

Part * +egin with Packet Tracer

,ayer -''lication

"i&co Packet Tracer Su''orted Protocol& FTP S#TP P.P/ !TTP TFTP Telnet SS! 0NS 0!"P NTP SN#P --- ISR 1.IP S""P config and call& ISR command &u''ort "all #anager 23're&& T"P and $0P T"P Nagle -lgorithm 4 IP Fragmentation RTP BGP IP%5 I"#P -RP IP%6 I"#P%6 IPSec RIPv1/v2/ng Multi-Area OSPF 2I7RP Static Routing Route Redi&tri8ution #ultilayer Switching ,/ QoS N-T "+-, 9one:8a&ed 'olicy firewall and Intru&ion Protection Sy&tem on the ISR 7R2 1PN IPSec 1PN Ethernet (8 2!"# <)(=** !0," Frame Relay PPP PPPo2 STP RSTP 1TP 0TP "0P <)(=*> PagP ,( QoS S,-RP Sim'le ?2P ?P- 2-P

Tran&'ort Network

Network -cce&&; Interface

- &creen &hot of PT 'ro@ect

"onfigure IP -ddre&& of a P"

To configure IP &u8net ma&k and gateway addre&& of a P" go to 0e&kto' A IP "onfiguration window

"onfigure IP -ddre&& of a Router

!intB u&ing C DDhel'EE from command line

Router)Eena8le

;F to get into 'ri%ileged mode= Thi& gi%e you more o'tion& in configuring the router F; Router)Gconfig terminal ;F go to configuration menu F; Router)HconfigIGinterface Fa);) ;F configure Fa&t 2thernet );) F; Router)Hconfig:ifIGi' addre&& *=*=*=* (JJ=(JJ=(JJ=) ;F&et IP addre&& and &u8netma&k for Fa);) F; Router)Hconfig:ifIGno &hutdown ;F to o'en interface for 8u&&ine&& F; Router)Hconfig:ifIGe3it Router)HconfigIGe3it

.r you could u&e the non:command &tyle like that of P" addre&& configuration
6

To do

+uild a &imulation &cenario like the 'icture in 're%iou& &lide H/ router& / &witch JK P"I "onfigure &tatic IP for router& and P"&

No routing &etting=

Perform 'ing $

"an P"* 'ing P"5C ?hyC "an P") 'ing P"*C ?hyC
7

Part ( Playing -round with I.S "onfiguration

See
,a8 *:*B command line in "i&co IS. ,a8 *:(B &et 'a&&word for router ,a8 *:/B 8a&ic command in "i&co I.S in lecture note of #r= TL 0uy "Mng "hiNn

Part / Static routing

10

"ommand&

config t interface Fa);) i' addre&& Oi':addre&&P O&u8net:ma&kP &how i' routeB di&'lace routing ta8le in a router i' route Ode&tination:network:addre&&P O&u8net: ma&kP One3t:ho':IP:addre&&PB configure &tatic route &tatement $&e DCE for hel'ing
11

Ste' *B create a &imulation &cenario like 'icture 8elow with &tatic IP addre&&e& a& mentioned

12

-fter configure IP addre&&= ?e check the routing ta8le in each router= Take Router / for e3am'leB
RouterG%ho& i' route "ode&B " : connected S : &tatic I : I7RP R : RIP # : mo8ile + : +7P 0 : 2I7RP 2Q : 2I7RP e3ternal . : .SPF I- : .SPF inter area N* : .SPF NSS- e3ternal ty'e * N( : .SPF NSS- e3ternal ty'e ( 2* : .SPF e3ternal ty'e * 2( : .SPF e3ternal ty'e ( 2 : 27P i : IS:IS ,* : IS:IS le%el:* ,( : IS:IS le%el:( ia : IS:IS inter area F : candidate default $ : 'er:u&er &tatic route o : .0R P : 'eriodic downloaded &tatic route 7ateway of la&t re&ort i& not &et (=)=)=);(5 i& &u8netted * &u8net& " (=(=(=) i& directly connected Fa&t2thernet);) 5=)=)=);(5 i& &u8netted * &u8net& " 5=5=5=) i& directly connected Fa&t2thernet);* J=)=)=);(5 i& &u8netted * &u8net& " J=J=J=) i& directly connected Serial);) RouterG

?e cannot 'ing 8etween P"& from *=*=*=);(5 (=(=(=);(5 /=/=/=);(5= ?hyC

13

Ste' (B configure &tatic routing ta8le in each


RouterHconfigIGi' route (=(=(=) (JJ=(JJ=(JJ=) 5=5=5=( RouterHconfigIGi' route /=/=/=) (JJ=(JJ=(JJ=) 5=5=5=(

Router 2

Router "

RouterHconfigIGi' route *=*=*=) (JJ=(JJ=(JJ=) 5=5=5=* RouterHconfigIGi' route /=/=/=) (JJ=(JJ=(JJ=) J=J=J=(

Router (

RouterHconfigIGi' route *=*=*=) (JJ=(JJ=(JJ=) J=J=J=* RouterHconfigIGi' route (=(=(=) (JJ=(JJ=(JJ=) J=J=J=*

R Then with Sshow ip routeT we ha%e routing ta8e in the following &lide

14

" Router 2 S S " S " Router " S " " S Router ( S " "

*=)=)=);(5 i& &u8netted * &u8net& *=*=*=) i& directly connected Fa&t2thernet);) (=)=)=);(5 i& &u8netted * &u8net& (=(=(=) O*;)P %ia 5=5=5=( /=)=)=);(5 i& &u8netted * &u8net& /=/=/=) O*;)P %ia 5=5=5=( 5=)=)=);(5 i& &u8netted * &u8net& 5=5=5=) i& directly connected Fa&t2thernet);* *=)=)=);(5 i& &u8netted * &u8net& *=*=*=) O*;)P %ia 5=5=5=* (=)=)=);(5 i& &u8netted * &u8net& (=(=(=) i& directly connected Fa&t2thernet);) /=)=)=);(5 i& &u8netted * &u8net& /=/=/=) O*;)P %ia J=J=J=( 5=)=)=);(5 i& &u8netted * &u8net& 5=5=5=) i& directly connected Fa&t2thernet);* J=)=)=);(5 i& &u8netted * &u8net& J=J=J=) i& directly connected Serial);) *=)=)=);(5 i& &u8netted * &u8net& *=*=*=) O*;)P %ia J=J=J=* (=)=)=);(5 i& &u8netted * &u8net& (=(=(=) O*;)P %ia J=J=J=* /=)=)=);(5 i& &u8netted * &u8net& /=/=/=) i& directly connected Fa&t2thernet);) J=)=)=);(5 i& &u8netted * &u8net& J=J=J=) i& directly connected Serial);)

15

See more re&ult&


Performing 'ing Traceroute from router Tracert from P"

16

"heck your under&tanding 8y configure following network

17

Part 5 1,-N

18

See ,a8 (=* U ,a8 (=J in lecture note of #r= TL 0uy "Mng "hiNn

19

Part / RIP

20

Recall

0i&tance %ector routing RIP RIP%( RIPng

21

Fir&t e3am'le

+uild a &y&tem with IP& of router& and P"& a& &hown at the figure

22

Setu' RIP%( a& routing algorithm

.n PT RIP%( &till u&e cla&&full addre&& H- + "I +y default the co&t of each link on RIP i& one=
RouterHconfig:ifIGrouter ri' RouterHconfig:routerIGver%ion 2 RouterHconfig:routerIGnetwork *=*=*=) RouterHconfig:routerIGnetwork 5=5=5=) RouterHconfig:ifIGrouter ri' RouterHconfig:routerIGver%ion 2 RouterHconfig:routerIGnetwork (=(=(=) RouterHconfig:routerIGnetwork 5=5=5=) RouterHconfig:routerIGnetwork J=J=J=) RouterHconfig:ifIGrouter ri' RouterHconfig:routerIGver%ion 2 RouterHconfig:routerIGnetwork /=/=/=) RouterHconfig:routerIGnetwork J=J=J=)

23

"hecking

"heck RIP with following command

Show ip route Show ip route protocols Show ip rip database Tracert Tracerouter Show ip protocol

24

23tend your &imulation

-nother link 8etween ( router


-ddre&& 1)*!2 !" !1 and 1)*!2 !" !2 Hcla&& "I 1ia a &witch Hor hu8I= Rea&onC

25

23tend your &imulation

-dd the new link to RIP

Now you ha%e ( way& to go from *=*=*=);(5 to /=/=/=);(5 network


"heck
Show ip route Show ip protocols Tracert

Teardown *VJ=()=/)=* : &witch link

See what ha''en

Teardown J=J=J=* U J=J=J=( link


26

Te&t your under&tanding with following network

27

Part 5 .SPF

28

Recall

?hat i& .SPFC #ulti'le area network

29

23am'le

30

23am'le

31

"ommand&

router ospf process-ID


'roce&&:I0 i& from * to 6JJ/J may defer from node to node

network IP-address wildcard-mask area area-#


wildcard:ma&k W not Hnetwork ma&kI area:G i& 're:defined num8er 8ack8one area named Sarea 0T

32

"ommand&
Router 0 network 10.0.0.0 0.0.0.255 area 0 network 11.0.0.0 0.0.0.255 area 1 Router 2 network 13.0.0.0 0.0.0.255 area 1 network 11.0.0.0 0.0.0.255 area 1 Router 2 network 10.0.0.0 0.0.0.255 area 0 network 12.0.0.0 0.0.0.255 area 2 Router 3 network 12.0.0.0 0.0.0.255 area 2 network 14.0.0.0 0.0.0.255 area 2
33

"onfiguration command of .SPF


%ho& i' 'rotocol %ho& i' route %ho& i' o%'+ %ho& i' o%'+ inter+ace %ho& i' o%'+ ,or-er-router% %ho& i' o%'+ neigh,or %ho& i' o%'+ neigh,or -etail clear i' route . clear i' route a!,!c!clear i' o'%+ counter% clear i' o%'+ -e,ug i' o%'+ event% 8etween ad@acent -e,ug i' o%'+ 'ac1et% 0i&'lay& .PSF 'acket&
34

0i&'lay& 'arameter& for all 'rotocol& running on the router 0i&'lay& a com'lete IP routing ta8le 0i&'lay& 8a&ic information a8out .SPF routing 'roce&&e& 0i&'lay& .SPF info a& it relate& to all interface& 0i&'lay& 8order and 8oundary router information 0i&'lay& a detailed li&t of neigh8or& ,i&t& all .SPF neigh8or& and their &tate& "lear& entire routing ta8le forcing it to re8uild "lear& &'ecific route to network a=8=c=d Re&et& .SPF counter& Re&et& entire .SPF 'roce&& forcing .SPF to re:create 0i&'lay& all .SPF e%ent&

neigh8or& 'roce&& data8a&e and routing ta8le -e,ug i' o%'+ a-/acenc0 router% 0i&'lay& %ariou& .SPF &tate& and 0R; +0R election

23am'le (

35

ugge&ted &tructure

36

37

Part J +7P

38

+7P in o%er%iew

multihomed transit
39

+7P in PT

0oe& no im'lement internal +7P in %er&ion J=/ and 8elow

"annot &imulate tran&it network 4 multihomed network ?e will work only with &tu8 network

0oe& not &u''ort 'olicy routing

.nly 'ath %ector routing


40

+7P command& in PT

0eclare your own -S num8er 8y


router bgp as-number

0efine neigh8or& with


neighbor Address remote-as as-number

0efine the network& you own 8y


network Address mask Mask

41

23am'le *

42

23am'le *

43

23am'le *
Router ) Router)HconfigIGrouter 8g' * Router)Hconfig:routerIGneigh8or 5=5=5=( remote:a& ( Router)Hconfig:routerIGnetwork *=*=*=) ma&k (JJ=(JJ=(JJ=) Router * Router*HconfigIGrouter 8g' ( Router*Hconfig:routerIGneigh8or 5=5=5=* remote:a& * Router*Hconfig:routerIGneigh8or J=J=J=/ remote:a& / Router*Hconfig:routerIGnetwork (=(=(=) ma&k (JJ=(JJ=(JJ=) Router / Router(HconfigIGrouter 8g' / Router(Hconfig:routerIGneigh8or J=J=J=( remote:a& ( Router(Hconfig:routerIGnetwork /=/=/=) ma&k (JJ=(JJ=(JJ=)

44

23am'le *

$&e following de8ugging command to check your &y&tem


Show i' 'rotocol& Show i' route Tracert Tracerouter

45

23tending e3am'le * network

46

The addre&&e& ha%e changed

khMng thX thYc hiZn [\]c %^i 'acket tracer

47

Inter -SB +7P


-S* Run multiarea .SPF

-S( Run RIP

-S/ Run RIP

48

OSPF area

RIPv2

OSPF area 2 OSPF area 1

RIPv2

49

Te&t your under&tanding with following network

50

Part 6 STP

51

.8@ecti%e

,earn how to identify which &witch i& elected a& the root 8ridge= ,earn how to determine the o'timum 8ridge 'lacement= ,earn to o'timi_e S'anning Tree con%ergence= ,earn to change connection co&t=

52

Network &cenario

Put the &witch in order a& &hown in the 'icture= In which the 0!T!6:"ore i& 'ut in the la&t

5
7iga:2th connection 7iga:2th connection

(
Fa&t:2th connection Fa&t:2th connection

* /
53

H*I Root 8ridge o'timi_ation

0!T!6:S?/ will 8e the root= +y default a Root +ridge i& elected i& 8a&ed on the lowe&t +ridge I0 determined 8y the +ridge Priority and The #-" addre&&=

?ant to

0!T!6:"ore to 8e the root 8ridge ?hyC

54

"hange the root 8ridge

+y default all 8ridge ha& 'riority of "2238 To change 'riority of one 8ridgeB
Switch (config)# spanning-tree vlan vlan-list Priority bridge-priority

To make one 8ridge 8e root:8ridge


Switch (config)# spanning-tree vlan vlan-list root primary

To make one 8ridge 8e &econdary root:8ridge for redundancy H'riority W *6/<5I


Switch (config)# spanning-tree vlan vlan-list root secondary
55

Then R

#ake 0!T!6:"ore 8ecome the RootB


DHTH6-Core(config)# spanning-tree vlan 1 root primary

#ake 0!T!6:S?/ ha& one 'ort to 8e 8locked Hwhy we ha& following &ettingCI
DHTH6-SW3(config)#spanning-tree vlan 1 priority 61440
56

H(I S'anning tree con%ergence

STP u&e& &e%eral timer& to reco%er from to'ology change& #odifying STP timer&

spanning-tree vlan vlan-list hello-time seconds spanning-tree vlan vlan-list forward-time seconds spanning-tree vlan vlan-list max-age seconds

khMng thX thYc hiZn [\]c %^i 'acket tracer

57

H/I "hange the co&t of each link

To change the co&t in each link


switch (config-if)# spanning-tree vlan vlanlist cost cost

?hat ha''en& when the 'ort of 0!T!6:"ore which link& to 0!T!6:S?* ha& the co&t of *JC

khMng thX thYc hiZn [\]c %^i 'acket tracer

58

You might also like