Top Banner
 1 Mc Lc
298

Lab Tong Hop CCNA

Oct 18, 2015

Download

Documents

Do Dang Hai
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 5/28/2018 Lab Tong Hop CCNA

    1/298

    1

    Mc Lc

  • 5/28/2018 Lab Tong Hop CCNA

    2/298

    2

    Lab 1- Cu hnh Switch c bn ................................................................................... Trang 4

    Lab 2- Cu hnh Router C bn ................................................................................. Trang 13

    Lab 3- Telnet v SSH .................................................................................................. Trang 20

    Lab 4- Hng dn sdng GNS3 .............................................................................. Trang 26

    Lab 5- Lab tng hp Switch, Router........................................................................... Trang 34

    Lab 6- Wireless Lab .................................................................................................... Trang 43

    Lab 7- Cisco Security Manager (SDM) ...................................................................... Trang 51

    Lab 8- DHCP, DHCP Relay ....................................................................................... Trang 64

    Lab 9- nh tuyn tnh (Static Route) ........................................................................ Trang 78

    Lab 10- RIPv2 (Routing Information Protocol).......................................................... Trang 88

    Lab 11- CDP (Cisco Discovery Protocol) .................................................................. Trang 105

    Lab 12- Sao lu IOS, cu hnh Router ........................................................................ Trang 123

    Lab 13- Khi phc mt khu cho Router .................................................................... Trang 125

    Lab 14- Khi phc mt khu cho Switch.................................................................... Trang 129

    Lab 15- Lab tng hp phn 1 ...................................................................................... Trang 133

    Lab 16- OSPF (Open Shortest Path First)................................................................... Trang 139Lab 17- EIGRP (Enhanced Interior Gateway Routing Protocol) ............................... Trang 155

    Lab 18- VTP, VLAN .................................................................................................. Trang 166

    Lab 19- PVST+, PVRST ............................................................................................ Trang 181

    Lab 20- nh tuyn VLAN sdng Switch Layer3 ................................................... Trang 215

    Lab 21- Standard ACL ................................................................................................ Trang 224

    Lab 22- Extend ACL ................................................................................................... Trang 232

    Lab 23- NAT, PAT ..................................................................................................... Trang 241

    Lab 24- IPv6 ....................................................................................................... Trang 256

    Lab 25- PPP PAP, CHAP ........................................................................................... Trang 265

  • 5/28/2018 Lab Tong Hop CCNA

    3/298

    3

    Lab 26- Frame Relay c bn ....................................................................................... Trang 278

    Lab 27- Frame Relay nng cao ................................................................................... Trang 289

  • 5/28/2018 Lab Tong Hop CCNA

    4/298

    4

    LAB 1: CU HNH SWITCH C BN

    I. Mc Tiu :- Gip hc vin bt u lm quen vi cc lnh c bn trn Cisco IOS- n tp li cc lnh lin quan n : t IP cho Switch, cc loi mt khu,Port-Security

    II. Lab cu hnh Switch c bn:

    Yu cu :-Sdng P

    acket Tracer kt ni m hnh nh trn-Xa ton bcu hnh hin ti ca Swicth-Cc lnh xem thng tin-Cu hnh hostname, a chIP-Cc loi mt khu-Tc v duplex-Tnh nng PortSecurity

    1. Kt ni cp v xa cu hnh cho Switch:

    - Sdng ng cpthng kt ni tPC n Switch- Sdng PC kt ni vo cng console ca Switch hoc vo tab CLI ca thit btin hnh cu hnh- Xa cu hnh Switch

  • 5/28/2018 Lab Tong Hop CCNA

    5/298

    5

    Switch> enable

    Switch# erase startup-config

    Switch# reload

    2. Cc lnh kim tra thng tin :

    - Xem cu hnh hin ti ca Switch cng vi tng slng interface Fastethernet,GigabitEthernet, sline vty cho telnet..

    Switch#show running-config

    - Trn tt cSW Cisco u c interface mc nh l VLA

    N1 dng qun l SWtxa thng qua vic t ip cho interface ny, xem t im interface vlan 1

    Switch#show interface vlan1

    Ghi li thng tin a chIp, MAC, trng thi up, down

    Switch#show interface fa0/1tnh trng interface fastethernet 0/1

    - Xem thng tin vphin bn hiu hnh, dung lng bnhRAM, NVRAM,Flash

    Switch#show version

    - Ni dung bnhFlash

    Switch#show flash:

    HocSwitch#dir flash:

    Switch#dir flash:6 drwx 4480 Mar 1 1993 00:04:42 +00:00 html

    618 -rwx 4671175 Mar 1 1993 00:06:06 +00:00 c2960-lanbase-mz.122-25.SEE3.bin

    32514048 bytes total (24804864 bytes free)

    - Xem cu hnh ang lu trn Switch

    Switch#show startup-configure

    startup-config is not present

    - L do hin thng bo trn l do hin ti chng ta cha lu cu hnh, by githt hostname cho thit bsau lu cu hnh

  • 5/28/2018 Lab Tong Hop CCNA

    6/298

    6

    Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.

    Switch(config)#hostname S1

    S1(config)#exitS1#copy running-config startup-configDestination filename [startup-config]? (enter)

    Building configuration...

    [OK]

    S1#show startup-configUsing 1170 out of 65536 bytes

    !

    version 12.2

    no service pad

    service timestamps debug uptime

    service timestamps log uptimeno service password-encryption

    !

    hostname S1

    !

    3. Cc loi mt khu :

    - Cu hnh mt kh

    u ciscocho cng Console

    S1(config)#line console 0S1(config-line)#password ciscoS1(config-line)#loginS1(config-line)#exit

    - Telnet l mt dch vgip ngi qun trc thqun l cc thit btxa thngqua cc line vty, trong trng hp ny mt khu line vty cho dch vTelnet lCisco

    S1(config)#line vty 0 4S1(config-line)#password cisco

    S1(config-line)#loginS1(config-line)#exit

    - t mt khu nhy tmode User ( > ) sang Privileged ( #) l class

    S1(config)#enable secret class

  • 5/28/2018 Lab Tong Hop CCNA

    7/298

    7

    Mode Privileged c th thay i tt ccu hnh ca thit bCisco nn rt quan trongnn vic t mt khu cho mode ny l cn thit

    4. t IP cho Switch :Switch l mt thit blp 2 nn cc cng ca Switch ta khngtht IP c c thqun l thit btxa, i vi Cisco Switch ta c thlmc iu ny bng cch t ip thng qua 1 interface t bit VLAN1 ( logicalinterface )

    S1(config)#interface vlan 1

    S1(config-if)#ip address 172.17.99.11 255.255.0.0S1(config-if)#no shutdownS1(config-if)#exitS1(config)#

    - tmng khc vn c thqun l c swit

    ch cn khai bo thm Gateway choSwitch :

    S1(config)#ip default-gateway 172.17.99.1

    Vi 172.27.99.1 l a chca gateway

    - Kim tra li cu hnh interface Vlan 1

    S1#show interface vlan 1

    Vlan1 is up, line protocol is up

    Hardware is EtherSVI, address is 001b.5302.4ec1(bia 001b.5302.4ec1)Internet address is 172.17.99.11/16MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,reliability 255/255, txload 1/255, rxload 1/255

    Encapsulation ARPA, loopback not set

    ARP type: ARPA, ARP Timeout 04:00:00

    Last input 00:00:06, output 00:03:23, output hang never

    Last clearing of "show interface" counters never

    Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops:0

    Queueing strategy: fifo

    Output queue: 0/40 (size/max)

    5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec

    4 packets input, 1368 bytes, 0 no buffer

    Received 0 broadcasts (0 IP multicast)

    0 runts, 0 giants, 0 throttles

    0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

  • 5/28/2018 Lab Tong Hop CCNA

    8/298

    8

    1 packets output, 64 bytes, 0 underruns

    0 output errors, 0 interface resets

    - Cu hnh a chIP cho PC1 vi thng tin trn bi lab, trn PC vo Desktop -> IP

    ConfigurationIP: 172.17.99.21SM: 255.255.0.0Gw: 172.17.99.1 hin ti cha c trong bi lab ny

    - Kim tra kt ni tPC n Switch :PC vo Desktop -> Command prompt -> ping 172.17.99.11

    - Thay i cu hnh duplex v tc trn cc cng ca Switch

    S1#configure terminal

    S1(config)#interface fastethernet 0/18S1(config-if)#speed 100S1(config-if)#duplex autoS1(config-if)#end

    - Kim tra li interface

    S1#show interface fastethernet 0/18FastEthernet0/18 is up, line protocol is up (connected)

    Hardware is FastEthernet, address is 001b.5302.4e92 (bia 001b.5302.4e92)

    MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,

    reliability 255/255, txload 1/255, rxload 1/255Encapsulation ARPA, loopback not set

    Keepalive set (10 sec)

    Full-duplex, 100Mb/s, media type is 10/100BaseTXinput flow-control is off, output flow-control is unsupported

    ARP type: ARPA, ARP Timeout 04:00:00

    Last input never, output 00:00:01, output hang never

    - Lu cu hnh

    S1#copy running-config startup-config

    Destination filename [startup-config]?[Enter] Building configuration...[OK]

    S1#

    5. Qun l bng MAC table :

  • 5/28/2018 Lab Tong Hop CCNA

    9/298

    9

    - Kim tra a chMAC ca c PC bng lnh ipconfig /all, ghi li a chMAC vkim tra li bng a chMAC trn Switch v so snh ni dung vi a chMACca PC

    S1#show mac-address-table

    6. Cu hnh tnh nngPort Security :

    - Tnh nng Port Security c thgip ta qun l vic truy cp v

    o tng cng caSwitch gm: PC c MAC no c lt ni n cng, tng sMAC c kt ni

    - Cc bc cu hnh nh sau

    S1#configure terminalS1(config)#interface fastethernet 0/18

    S1(config-if)#switchport mode access port hot ng mode accessS1(config-if)#switchport port-security bt tnh nng port securityS1(config-if)#switchport port-security maximum 2 ti a 2 MAC c kt ni ncng nyS1(config-if)#switchport port-security mac-address sticky cc a chMAC trn chc tng t2 PC u tin ni n cngS1(config-if)#switchport port-security violation shutdown Khi vt qu slng chophp cng stng shutdown

    -Xem li cu hnh bng 2 lnh

    Switch#show running-configureSwitch#show port-security interface fa0/18

    - Thkim tra li hot ng ca Port Security bng cch ln lt ni PC1, 2 vocng fa0/18 sau sdng lnh show port-security addresssthy chc PC1,2 mi c kt ni n cng fa0/18, by gita cm thm 1 PC th3 vo cngfa0/18 na sthy cng tng bshutdowndo vt qu gii hn cho phpca lnh switchport port-security maximum 2

    - Tin hnh lu cu hnh v kt thc bi Lab.III. Cc lnh lin quan n bi lab:

    - Cc cu lnh trgip- Cc cu lnh kim tra- Cu hnh tn switch- Cu hnh password- Cu hnh a chIP v default gateway

  • 5/28/2018 Lab Tong Hop CCNA

    10/298

    10

    - Lab cu hnh switch c bn

    1. Cc lnh trgip:

    Switch> ? Phm ? c dng lm phm trgipging nh router

    Switch> enable L chUserSwitch# L chPrivilegedSwitch# disable Thot khi chprivile

    gedSwitch> exit Thot khi chUserCu hnh Hostname

    2. Cc cu lnh kim tra :

    Switch# show running-config Hin thfile cu hnh ang chy trn RAMSwitch# show startup-config Hin thfile cu hnh ang chy trn

    NVRAMSwitch# show interfaces Hin ththng tin cu hnh vcc

    interface c trn switch v trng thi cacc interface .

    Switch# show interface vlan 1 Hin thcc thng scu hnh ca InterfaceVLAN 1, Vlan 1 l vlan mc nh trn tt ccc switch ca cisco.

    Switch# show version Hin ththng tin vphn cng v phn mmca switch

    Switch# show flash: Hin ththng tin vbnhflash

    Switch# show mac-address-table Hin thbng a chMAC hin ti ca switch

    3. Cu hnh Hostname :

    Switch# configure terminal Chuyn cu hnh vo chGlobalConfiguration

    Switch(config)# hostname 2960Switch t tn cho switch l 2960Switch. Cu lnh ttn ny thc thi ging trn router.

  • 5/28/2018 Lab Tong Hop CCNA

    11/298

    11

    4. Cc loi password

    2960Switch(config)#enable password cisco Cu hnh Password enable cho switch l Cisco

    2960Switch(config)#enable secret class Cu hnh Password enable c m ha lclass

    2960Switch(config)#line console 0 Vo chcu hnh line console

    2960Switch(config-line)#login Cho php switch kim tra pas

    sword khi ngidng login vo switch thng qua console

    2960Switch(config-line)#password cisco Cu hnh password cho console l Cisco

    2960Switch(config-line)#exit Thot khi chcu hnh line console

    2960Switch(config-line)#line vty 0 4 Vo chcu hnh line vty

    2960Switch(config-line)#login Cho php switch kim tra password khi ngidng login vo switch thng qua telnet

    2960Switch(config-line)#password cisco Cu hnh password cho php telnet l Cisco

    2960Switch(config-line)#exit Thot khi chcu hnh ca line vty

    5. Cu hnh a chIP v default gateway

    2960Switch(config)# Interface vlan 1 Vo chcu hnh ca interface vlan 1

    2960Switch(config-if)# ip address172.16.10.2 255.255.0.0

    Gn a chip v subnet mask cho php truycp switch txa.

    2960Switch(config)#ip default-gateway172.16.10.1

    Cu hnh a chdefault gateway choSwitch

    6. Cu hnh m tcho interface :

    2960Switch(config)# interface fastethernet fa0/1 Vo chcu hnh ca interface fa0/1

    2960Switch(config-if)# descriptionFinaceVLAN

    Thm mt on m tcho interface ny.

    * Ch :

    i vi dng switch 2960 c 12 hoc 24 Fast Ethernet port th tn ca cc port

  • 5/28/2018 Lab Tong Hop CCNA

    12/298

    12

    sbt u t: fa0/1, fa0/2. Fa0/24. Khng c port Fa0/0.

    7. Qun l bng a chMAC :

    Switch# show mac address-table Hin thni dung bng a chmac hinthi ca switch

  • 5/28/2018 Lab Tong Hop CCNA

    13/298

    13

    LAB 2: CU HNH ROUTER C BNI. Gii thiu:

    Bo mt l mt yu t rt quan trng trong network,v th n rt c quan tm v s dngmt khu l mt trong nhng cch bo mt rt hiu qu.S dng mt khu trong router c thgip ta trnh c nhng s tn cng router qua nhng phin Telnet hay nhng s truy cp trctip vo router thay i cu hnh m ta khng mong mun t ngi la.

    II. Mc ch:Ci t c mt khu cho router, khi ng nhp vo, router phi kim tr

    a cc loi mt khucn thit.

    III. M tbi lab v hnh :

    Trong hnh trn, PC c ni vi router bng cp console

    IV. Cc cp bo mt ca mt khu :Cp bo mt ca mt khu da vo cp chm ho ca mt khu .cc cp m ha

    ca mt khu: Cp 5 :m ha theo thut ton MD5, y l loi m ha 1 chiu,khng thgii m

    c(cp ny c dng m ho mc nh cho mt khu enable secret gn cho router) Cp 7 : m ha theo thut ton MD7, y l loi m ha 2 chiu,c th gii m

    c(cp ny c dng m ha cho cc loi password khc khi cn nh: enablepassword,line vty,line console)

    Cp 0:y l cp khng m ha.

    V. Qui tc t mt khu :Mt khu truy nhp phn bit ch hoa,ch thng,khng qu 25 k t bao gm cc k

    s,khong trng nhng khng c sdng khong trng cho k tu tin.

    Router(config)#enable password TTG-TTG-TTG-TTG-TTG-TTG-TTG

    % Overly long Password truncated after 25 characters mt khu c t vi 26 k

  • 5/28/2018 Lab Tong Hop CCNA

    14/298

    14

    tkhng c chp nhn

    VI. Cc loi mt khu cho Router : Enable secret : nu t loai mt khu ny cho Router,bn s cn phi khai bo khi ng

    nhp vo ch user mode ,y l loi mt khu c hiu lc cao nht trong Router,c m hamc nh o cp d 5. Enable password: y l loi mt khu c chc nng tng tnh enable secretnhng

    c hiu lc yu hn,loi password ny khng c m ha mc nh,nu yu c

    u m ha th sc m ha cp 7.

    Line Vty: y l dng mt khu dng gn cho ng line Vty,mt khu ny sckim tra khi bn ng nhp vo Router qua ng Telnet.

    Line console: y l loi mt khu c kim tra cho php bn sdng cng Consolecu hnh cho Router.

    Line aux: y l loi mt khu c kim tra khi bn sdng cng aux.

    VII. Cc bc t mt khu cho Router : Bc 1: khi ng Router , nhn entervo chuser mode.

    Tchuser modedng lnh enable vo chPrivileged mode

    Router con0 is now available

    Press RETURN to get started.

    Router>enable

    Router#

    Bc 2 : T du nhc ch Privileged mode vo mode cofigure cu hnh choRouter bng lnh configure terminalRouter#configure terminal

    Enter configuration commands, one per line. End with CNTL/Z.

    Router(config)#

    Bc 3: Cu hnh cho tng loi Password Cu hnh cho mt khu enable secret

    (Ch :mt khu c phn bit chhoa v chthng)

    Router(config)#enable secret TTG Mt khu l TTGRouter(config)#exit

    Cu hnh mt khu bng lnh enable passwordRouter(config)#enable passwordcisco Mt khu lcisco

  • 5/28/2018 Lab Tong Hop CCNA

    15/298

    15

    Router(config)#exit

    Lu : khi ta ci t cng lc 2 loi mt khu enable secretv enable passwordthRouter skim tra mt khu c hiu lc mnh hn l enable secret.Khi mt khu secretkhng

    cn th lc mt khuenable passwordsc kim tra, hy thkim tra li bng cch thotra li mode User ri vo li mode Privilegedbng lnh enable Router shi mt mu khai bobng lnh enable secret

    Cu hnh mt khu bng lnh Line Mt khu cho ng Telnet(Line vty)Router(config)#line vty 0 4

    Router(config-line)#password class passwor

    d lclass

    Router(config-line)#login mchci t password

    Router(config-line)#exit

    Mt khu cho cng console :Router(config)#line console 0 mng Line Console

    cng Console th0

    Router(config-line)#password cert password lcert

    Router(config-line)#login mchci t password

    Router(config-line)#exit

    Mt khu cho cng aux:

    Router(config)#line aux 0 S0 chsthtcng aux c dng

    Router(config-line)#password router password lrouter

    Router(config-line)#login

    Router(config-line)#exit

    Sau khi t xong mt khu,ta thot ra ngoi chPrivileged mode, dng lnh Show running-configxem li nhng password cu hnh :

    Router#show running-config

    Building configuration...

    Current configuration : 550 bytes

    version 12.1

    no service single-slot-reload-enable

  • 5/28/2018 Lab Tong Hop CCNA

    16/298

    16

    service timestamps debug uptime

    service timestamps log uptime

    no service password-encryption password ci t chkhng m ha

    hostname Router

    enable secret 5 $1$6bgK$prmkIPVMht7okiCQ5EQ2o passwordsecretc

    m ha mc nhcp 5

    enable password cisco

    !

    line con 0

    password cert password cho cng Consolelcert

    login

    line aux 0

    password router password cho cngauxlrouter

    login

    line vty 0 4

    password class password cho ng vtylclass

    login

    !

    End

    Dng lnh Show running-configta sthy c cc password c u hnh, nu mun m hatt ccc password ta dng lnh Service password-encryptiontrong mode config.

    Router(config)#service password-encryption

    Router(config)#exit

    Dng lnh show running-configkim tra li:

    Router#show run

  • 5/28/2018 Lab Tong Hop CCNA

    17/298

    17

    Building configuration...

    enable secret 5 $1$6bgK$prmkIPVMht7okiCQ5EQ2o/

    enable password 7 094F471A1A0A password c m ha cp 7

    line con 0

    password 7 15110E1E10 password c m ha cp 7

    login

    line aux 0

    password 7 071D2E595A0C0B password c m ha cp 7login

    line vty 0 4password 7 060503205F5D password c m ha cp 7

    login

    !

    End

    Ch : Ta khng thdng lnhno service password-encryptionbchm ha cho mtkhu,ta chc thbchm ha khi gn li mt khu khc

    Sau khi t mt khu xong, khi ng nhp vo Router li, mt khu sc kim tra:

    Router con0 is now available

    Press RETURN to get started. nhn enter

    User Access Verification mt khu line consolesc kim tra

    Password:cert khai bo mt khu console l :cert

    Router>ena enable dvomode Privileged

    Password:TTG V mt khusecretc hiu lc cao hn nn c kim traRouter#Cc loi mt khu khc nh Line Vty,Line auxsc kim tra khi sdng n chc nng

    VIII. Gbmt khu cho router :

  • 5/28/2018 Lab Tong Hop CCNA

    18/298

    18

    Nu mun gbmt khu truy cp cho loi mt khu no ta dng lnh notrc cu lnhgn cho loi mt khu .

    V d: Mun gbmt khu secret cho router

    Router(config)#no enable secret

    Router(config)#exit

    Bng cch tng t,ta c th g b mt khu cho cc loi mt khu khc.

    IX. Ph lc cc lnh lin quan n bi lab :1. Cc chcu hnh ca router

    Router> ChUser.

    Router# Ch Priv

    ileged (cng c gi l chEXEC)

    Router(config)# ChGlobal Configuration

    Router(config-if)# ChInterface Configuration

    Router(config-subif)# ChSubinterface Configuration

    Router(config-line)# Chcu hnh Line.

    Router(config-router)# ChRouter Configuration

    2. Cu hnh cc tham sc bn cho router :

    2.1Cu hnh Interface Serial :

    Router(config)# interface s0/0/0 Chuyn vo ch cu hnh ca

    Interface S0/0/0.

    Router(config-if)# descriptionLink to

    ISP

    Li m tcho Interface Serial ny. (y

    l ty chn).

    Router(config-if)# ip address

    192.168.10.1 255.255.255.0

    Gn mt a ch ip v subnet mask cho

    interface Serial ny.

  • 5/28/2018 Lab Tong Hop CCNA

    19/298

    19

    Router(config-if)# clock rate 56000 Cu hnh gi trClock rate cho Interface

    (Chcu hnh cu lnh ny Khi interface

    l DCE).

    Router(config-if)# no shutdown Bt Interface.

    2.2Cu hnh Interface Fast Ethernet

    Router(config)# interface Fastethernet

    0/0

    Chuyn vo ch cu hnh ca

    Interface Fast Ethernet 0/0

    Router(config-if)# description

    Accounting LAN

    Cu hnh li m tcho Interface. (y l

    ty chn)

    Router(config-if)# ip address

    192.168.20.1 255.255.255.0

    Gn mt a ch ip v subnet mask cho

    Interface

    Router(config-if)# no shutdown Bt Interface

    2.3Cu lnh logging synchronous :

    Router(config)# line console 0 Chuyn cu hnh vo chline.

    Router(config-line)# logging

    Synchronous

    Bt tnh nng synchronous logging.

    Nhng thng tin hin th trn mn hnh

    console skhng ngt cu lnh m bn

    ang g.

  • 5/28/2018 Lab Tong Hop CCNA

    20/298

    20

    LAB 3: TELNET, SSHI. Gii thiu :

    Telnet l mt giao thc u cui o( Vitural terminal),l mt phn ca chng giao thcTCP/IP.Giao thc ny cho php to kt ni vi mt thit b t xa v thng qua kt ni ny, ngis dng c th cu hnh thit b m mnh kt ni vo.

    II. Mc ch :Bi thc hnh ny gip bn hiu v thc hin c nhng cu hnh cn thit

    c th thchin cc phin Telnet t host vo Router hay t Router vo Router.

    III. M t bi lab v hnh :

    hnh bi lab nh hnh trn, Host1 ni vi router TTG1 bng cp cho.

    IV. Cc bc thc hin :- Cc bn cn ch thm STT c gio vin phnvo a ch IP trnh vic trng a chgia cc nhm, trong bi Lab s dng X= 0. Cu hnh cho cc router TTG1, Host 1 nh sau:

    Host 1 :IP:10.0.0.2

    Subnetmask:255.0.0.0Gateway:10.0.0.1 Router TTG1:

    Router> enableRouter# configure terminalRouter(config)# hostname TTG1

  • 5/28/2018 Lab Tong Hop CCNA

    21/298

    21

    TTG1(config)# interface fa0/1TTG1(config-if)# ip address 10.0.0.1 255.0.0.0TTG1(config-if)#no shutdown

    Phi chn chn rng cc kt ni vt l thnh cng (kim tra bng lnh Ping t PC nTTG1)

    Kim tra kt ni Telnet:T Host ta th telnet vo Router TTG1 :C:\Documentsand settings\Administrator>Telnet 10.0.0.1Password required, but none seti hi mt khu nhng khng c ci dtConnection to host lost Kt ni tht biThc hin Telnet khng thnh cng v chcnng Telnet i hi bn phi m ng lineVty v ci t mt khu cho n.

    t mt khu Vty cho Router TTG1 :

    TTG1#configure terminalEnter configuration commands, one per line. End with CNTL/Z.TTG1(config)#line vty 0 4TTG1(config-line)#pass TTG1TTG1(config-line)#loginTTG1(config-line)#exit

    Lc ny thc hin Telnet: T Host bn thc hin Telnet vo Router TTG1C:\Documentsand settings\Administrator>Telnet 10.0.0.1User Access VerificationPassword:

    TTG1>ena% No password setTTG1>Lu : i vi thit b ca Cisco, bn ch cn nh a ch ca ni cn Telnet n, thit

    b s t hiu v thc hin kt ni Telnet.Khi Telnet vo, bn ang Mode User v giao thc ny i hi bn phi c ci t mt

    khu vo Privileged Mode.Thc hin vic ci t mt khu:

    Router TTG1:

    TTG1(config)#enable password cisco

    TTG1(config)#exit

    Bn thc hin li vic kt ni Telnet, t Host vo Router TTG1:C:\Documentsand settings\Administrator>Telnet 10.0.0.1User Access VerificationPassword: TTG1

  • 5/28/2018 Lab Tong Hop CCNA

    22/298

    22

    TTG1>enaPassword: ciscoTTG1#

    T y bn c th thc hin vic thay i cu hnh cho cc thit b m khng cn phi thngqua cng Console.

    Kim tra vic Telnet bng lnh Show lineTTG1#show line

    Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int* 0 CTY - - - - - 5 0 0/0 -

    1 AUX 9600/9600 - - - - 0 0 0/0 -* 2 VTY - - - - - 1 0 0/0 -* 3 VTY - - - - - 7 0 0/0 -* 4 VTY - - - - - 4 0 0/0 -

    5 VTY - - - - - 1 0 0/0 -6 VTY - - - - - 0 0 0/0 -

    Du * biu th nhng line bn ang s dng Telnet,theo nh bng trn,bng ang s dng 3dng line Telnet qua li gia 2 Router TTG1 qua cc port 2,3,4.Ct Uses ch s ln bn s dng ng line .

    Thot khi cc phin Telnet : chng ta s dng lnh Exithay lnh Disconnect Ngt mt kt ni Telnet: chng ta s dng lnh clear line

    - Mc d Telnet gip mnh c thqun l thit btxa nhng c khnng lmt khuqun trthit bdo Telnet khng m ha dliu khi truyn ra bn ngoi, cc bn c ththam

    kho thm video TelnetvsSsh ti a chhttp://www.mediafire.com/download.php?y2z4ghm0wmwthy r hnVy an ton hn ta nn sdng dch vSSH thay cho Telnet khi mun cu hnh thit btxa,cch cu hnh nh sau :

    Cu hnh SSH :

    - To username/password chng thc trong phin SSH, trong trng hp ny lTTG/123TTG1(config)# username TTGpassword 123- Khai bo domain name tham gia vo qu trnh to kha m ha dliu trong phin

    SSHTTG1(config)# ip domain-name truongtan.edu.vn- To kha m ha dliuTTG1(config)#crypto key generate rsa- Chuyn sang sdng SSH version 2TTG1(config)#ip ssh version 2

    http://www.mediafire.com/download.php?y2z4ghm0wmwhttp://www.mediafire.com/download.php?y2z4ghm0wmwhttp://www.mediafire.com/download.php?y2z4ghm0wmw
  • 5/28/2018 Lab Tong Hop CCNA

    23/298

    23

    - Chuyn qua sdng SSH thay cho TelnetTTG1(config)#line vty 0 4TTG1(config-line)#login local chuyn qua chng thc bng username/passwordTTG1(config-line)#transport input ssh

    - TPC tin hnh SSH ln router sdng phn mm putty

    - Lu cu hnh ca router v kt thc bi lab

    TTG1#copy run start

    V. Phlc cc lnh lin quan bi lab :1. Cc cu lnh Telnet :

  • 5/28/2018 Lab Tong Hop CCNA

    24/298

    24

    1.1 Cu hnh line vty thc hin telnet

    Router(config)# line vty 0 4

    Router(config-line)# passwordtelnet

    Router(config-line)# login

    Vo chline vty cho php telnet

    Cu hnh password cho php telnet

    Cho php kim tra password khi ngi

    dng telnet vo router

    Thc hin phin telnet

    TTG1>telnet TTG2 Thc thi vic kt ni txa n m

    t router tnl TTG2 c a chIP l: 172.16.20.1

    TTG1>telnet 172.16.20.1

    TTG1>TTG2

    TTG1>connect TTG2

    TTG1>172.16.20.1

    TTG2>exit Kt thc phin telnet v trvdu nhc

    ca router TTG1TTG2>logout

    TTG1>resume Phc hi li kt ni n router TTG2

    TTG1>disconnect Kt thc phin telnet n router TTG2

    Qun l cc phin telnetTTG1#show sessions Hin th nhng kt ni m bn m

    n cc router khc.

    TTG1#show users Hin thnhng ngi ang kt ni txa

    n router ca bn.

    TTG1 (config)#line vty 0 4 Gii hn slng kt ni ng thi trn

    mt line vty vo router ca bn.

    TTG1 (config-line)#no password Cc ngi dng truy cp txa skhng

    phi yu cu nhp mt khu khi thc

    hin telnet n thit b.

  • 5/28/2018 Lab Tong Hop CCNA

    25/298

    25

    TTG1 (config-line)#no login Ngi dng truy cp t xa s c

    chuyn thng vo chuser

    2. Cu hnh SSH

    TTG1(config)# username TTGpassword123

    To username/password chng thc trongphin SSH, trong trng hp ny l

    TTG/123

    TTG1(config)# ip domain-nametruongtan.edu.vn

    Khai bo domain name tham gia vo qutrnh to kha m ha dliu trong phin

    SSH

    TTG1(config)#crypto key generate rsa To kha m ha dliu

    TTG1(config)#ip ssh version 2 Chuyn sang sdng SSH version 2

    TTG1(config)#line vty 0 4 Chuyn qua sdng SSH thay cho Telnet

    TTG1(config-line)#login local

    TTG1(config-line)#transport input ssh

  • 5/28/2018 Lab Tong Hop CCNA

    26/298

    26

    LAB 4: HNG DN SDNG GNS3

    GNS3 l 1 chng trnh gilp mng c giao din ha cho php bn c thgilp cc Ciscorouter sdng IOS tht ,ngoi ra cn c ATM/Frame Relay/Ethernet Switch ,Pix Firewall thmch kt ni vo hthng mng thtGNS3 c pht trin da trn Dynamips v Dynagen m phng cc dng router1700,2600,3600,3700,7200 c thstrin khai cc bi lab ca CCNA,CCNP,CCIE nhnghin ti vn cha m phng c Catalyst Switch (mc d c thgilp NM-16ESW)

    1.Ci t GNS3 :

    - Video tham kho :http://www.mediafire.com/download.php?lqnj2nbuuhz- GNS3 c thchy trn Windows,Linux v Mac OSX.ci t phn mm trn Window ddng chng ta c thsdng bci t all-in-one cung cp mi thbn cn chy c GNS3

    Cc bn c thdownload GNS3-0.5-win32-all-in-one.exe ti yhttp://www.gns3.net/download

    http://www.mediafire.com/download.php?lqnj2nbuuhzhttp://www.mediafire.com/download.php?lqnj2nbuuhzhttp://www.mediafire.com/download.php?lqnj2nbuuhzhttp://www.gns3.net/downloadhttp://www.gns3.net/downloadhttp://www.gns3.net/downloadhttp://www.mediafire.com/download.php?lqnj2nbuuhz
  • 5/28/2018 Lab Tong Hop CCNA

    27/298

    27

  • 5/28/2018 Lab Tong Hop CCNA

    28/298

    28

    - Giao din GNS3 sau khi ci t xong

    2.Cu hnh ln u tin cho GNS3 :

    - Vo Edit > Add IOS images and hypervisors chng dn n cc file IOS trong mcSetting

  • 5/28/2018 Lab Tong Hop CCNA

    29/298

    29

    - Vo Edit > Preferences > Dynamips > Trong mc Excutable Path chn ng dn n tp tindynamip-wxp.exe trong th mc ci t GNS3 , sau bm vo nt Test kim tra li hot

    ng ca Dynamip

    - Ko thcc router c IOS vo trin khai 1 m hnh n gin

  • 5/28/2018 Lab Tong Hop CCNA

    30/298

    30

    - Nhn vo biu tng Play bt u gilp :

    3.Bt u cu hnh :

    Nhn phi chut ln thit bchon Console bt u cu hnh

  • 5/28/2018 Lab Tong Hop CCNA

    31/298

    31

    4.Giao tip vi mng tht :

    - GNS3 thng qua vic sdng Dynamips c tht

    o cu ni gia interface trn router ovi interface trn my tht ,cho php mng o giao tip c vi mng tht, Trn hthng Windows, th vin Wincap c sdng to kt ni ny .

    -kt ni cc router o trong GNS3 vi hthng mng tht ta dng thit bCloud,gista cn kt ni trouter o n card mng tn l Internal Lan c a chl192.168.1.2

  • 5/28/2018 Lab Tong Hop CCNA

    32/298

    32

    - Click vo Cloud,ti Generic Ethernet NIO chn card mng router cn kt ni n,nukhng r card no c thdng Network device list.cmd pht hin,

    - Sau khi chn ng card mng th phi nhn vo Add bt u sdng

  • 5/28/2018 Lab Tong Hop CCNA

    33/298

    33

    - Kt ni Fastethernet router o n Cloud ,trong trng hp no l Fa0/0 .Cu hnha chip cho interface fa0/0 sao cho cung lp mng vi card mn Internal LanRouter>enableRouter#config terminalRouter(config)#interface fa0/0Router(config-if)#ip address 192.168.1.10 255.255.255.0Router(config-if)#no shutdown

    - Sau trouter thping n PC v gateway ca hthng mng tht

  • 5/28/2018 Lab Tong Hop CCNA

    34/298

    34

    LAB 5: LAB TNG HP SWITCH, ROUTER

    I. YU CU1. Sdng Packet Tracer cu hnh bi Lab bn2. t mt khu Console l Cisco, dch vTelnet,Enable Secret cho Center Router,SW1,SW2 lclass3. Sdng lnh service password-encryption m ha cc loi mt khu khng c m ha4. Cu hnh a chIP nh m hnh bn5. Tcc PC thtelnet n SW1,SW2,Router6. Chuyn sang sdng SSH thay cho Telnet trn CenterRouter vi username: TTG ,password:cisco

    7. Tcc PC thssh n cc router8. Video tham kho cu hnh :http://www.mediafire.com/download.php?zx2xmdeitmw

    II. CC BC THC HIN:

    http://www.mediafire.com/download.php?zx2xmdeitmwhttp://www.mediafire.com/download.php?zx2xmdeitmwhttp://www.mediafire.com/download.php?zx2xmdeitmwhttp://www.mediafire.com/download.php?zx2xmdeitmw
  • 5/28/2018 Lab Tong Hop CCNA

    35/298

    35

    1. Sdng Packet Tracer cu hnh bi Lab bn :Kt ni theo ng m hnh trn sdng Switch 2960 v router 2811

    2. t mt khu Console l cisco, dch vTelnet,Enable Secret cho Center Router,SW1,SW2 l

    class- Center Router :Router>enableRouter#configure terminalRouter(config)#hostname CenterRouter- t mt khu cho cng consoleCenterRouter(config)#line console 0CenterRouter(config-line)#loginCenterRouter(config-line)#password ciscoCenterRouter(config-line)#exit- t mt khu cho dch vTelnet

    CenterRouter(config)#line vty 0 4CenterRouter(config-line)#loginCenterRouter(config-line)#password classCenterRouter(config-line)#exit- t mt khu khi chuyn tmode User sang Pr

    ivilegeCenterRouter(config)#enable secrect class

    *Ch : t mt khu chuyn tmode User sang Privilegeta c thsdng 2 lnh lenable passwordv enable secretnhng mt khu ca enable secretth c m ha trong cuhnh cn enable passwordth khng, ta c thkim tra li iu ny bng cch cu hnh cnhc2 lnh ny v kim tra li bng lnh show running- configure

    - SW1:Switch>enableSwitch#configure terminalSwitch(config)#hostname SW1- t mt khu cho cng consoleSW1(config)#line console 0SW1(config-line)#loginSW1(config-line)#password ciscoSW1(config-line)#exit- t mt khu cho dch vTelnet

    SW1(config)#line vty 0 4SW1(config-line)#loginSW1(config-line)#password classSW1(config-line)#exit- t mt khu khi chuyn tmode User sang PrivilegeSW1(config)#enable secrect class

  • 5/28/2018 Lab Tong Hop CCNA

    36/298

    36

    - SW2:Switch>enableSwitch#configure terminal

    Switch(config)#hostname SW2- t mt khu cho cng consoleSW2(config)#line console 0SW2(config-line)#loginSW2(config-line)#password ciscoSW2(config-line)#exit- t mt khu cho dch vTelnetSW2(config)#line vty 0 4SW2(config-line)#loginSW2(config-line)#password classSW2(config-line)#exit

    - t mt khu khi chuyn tmode User sang PrivilegeSW2(config)#enable secrect class

    3. Sdng lnh service password-encryption m ha cc loi mt khu khng c m ha :

    - Sdng lnh show running-configure xem li thng tin cc mt khu hin ti- m ha cc mt khu khng c m ha mc nh, ta c thsdng lnh servicepassword-encryptionchuyn sang Type-7 password. Ln lt trn Center Router, SW1,SW2 di chuyn sang mode config v nhp lnh service password-encryptionCenterRouter(configure)#service password-encryptionSW1(configure)#service password-encryption

    SW2(configure)#service password-encryption

    - Sdng li lnh show running-configure v so snh tnh trng cc mt khu so vi trc lcnh lnh

    CenterRouter#show running-configBuilding configuration...

    Current configuration : 766 bytes!version 12.4

    service password-encryption!hostname CenterRouter!!!

  • 5/28/2018 Lab Tong Hop CCNA

    37/298

    37

    enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0!!!

    !interface FastEthernet0/0duplex autospeed auto!interface FastEthernet0/1duplex autospeed auto!interface Vlan1no ip address

    shutdown!ip classless!line con 0password 7 0822404F1A0Alogin*Ch : Mt khu m ha bi service password-encryption vn c thbgii m vi cng cCain

  • 5/28/2018 Lab Tong Hop CCNA

    38/298

    38

    4. Cu hnh a chIP nh m hnh bn :- CenterRouter:

    CenterRouter(config)#interface fa0

    /1

    CenterRouter (config-if)#ip address 192.168.1.1 255.255.255.0

    CenterRouter (config-if)#no shutdownCenterRouter (config)#interface fa0/0

    CenterRouter (config-if)#ip address 192.168.2.1 255.255.255.0

    CenterRouter (config-if)#no shutdown

    - SW1:

    SW1(config)#interface vlan 1

    SW1(config-if)#ip address 192.168.1.5 255.255.255.0

    SW1(config-if)#exit

    SW1(config)#ip default-gateway 192.168.1.1

    - SW2:

  • 5/28/2018 Lab Tong Hop CCNA

    39/298

    39

    SW2(config)#interface vlan 1

    SW2(config-if)#ip address 192.168.2.5 255.255.255.0

    SW1(config-if)#exit

    SW2(config)#ip default-gateway 192.168.2.1

    - Cc PC trn SW2 snhn IP ng tDHCP Server li a ch192.168.2.10

    + Cu hnh a chcho DHCP Server : DesktopIP Configuration

    + Tip tc vo ConfigDHCP cu hnh dy IP cp pht cho mng 192.168.2.0/24 vi IPbt u cp pht l 192.168.2.100

  • 5/28/2018 Lab Tong Hop CCNA

    40/298

    40

    5.Tcc PC thtelnet n SW1,SW2,Router :-TPC1 tin hnh Telnet n CenterRouter bng cch vo DesktopCommand Prompt

    + PC1>telnet 192.168.1.1

    - PC1 thtelnet n SW2+ PC1>telnet 192.168.2.5

  • 5/28/2018 Lab Tong Hop CCNA

    41/298

    41

    - Tng ttPC3 thTelnet n CenterRouter v SW26. Chuyn sang sdng SSH thay cho Telnet trn CenterRouter vi username: TTG ,password:cisco:*Ch : Cn phi i tn ca Router v trong phin SSH sdng hostname ca Router v ipdomain-name to ra kha m ha cho phin SSH

    - To username v passworld cho CenterRouter dung chng thc trong phin SSH

    CenterRouter(config)#username TTG password cisco

    - Cu hnh ip domain-name vi tn domain cng ty ca mnh

    CenterRouter (config)#ip domain-name truongtan.edu.vn

    - To ra kha (key) bng cch kt hp hostname v tn domain to ra key m ha

    CenterRouter (config)#crypto key generate rsa

    The name for the keys will be: Centerrouter.truongtan.edu.vn

    Choose the size of the key modulus in the range of 360 to 2048 for your

    General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes.

    How many bits in the modulus [512]: 768

  • 5/28/2018 Lab Tong Hop CCNA

    42/298

    42

    - Key mc nh c to ra bi lnh ny m ha dliu c chiu di l 512 bit, nu cc bnsdng SSH version2 th chiu di key ti thiu l 768 bit, trong trng hp ny ta sdngSSHv2 cho an ton nn cc bn nhp vo l 768 v Enter

    CenterRouter (config)#ip ssh version 2CenterRouter (config)#line vty 0 4

    - ng nhp bng username v password to ra trn

    CenterRouter (config-line)#login local

    - Chuyn qua chchng thc chsdng SSH thay cho telnet

    CenterRouter (config-line)#transport input ssh

    7.Tcc PC thssh n cc CenterRouter :

    -thSSH tPC n CenterRouter trn cc PC cc bn sdng lnh sau :Ssh L

    PC1>ssh L TTG 192.168.1.1

    8. Video demo skhc nhau gia SSH v Telnet

    - Telnet VS SSH :http://www.mediafire.com/download.php?zx2xmdeitmw

    http://www.mediafire.com/download.php?zx2xmdeitmwhttp://www.mediafire.com/download.php?zx2xmdeitmwhttp://www.mediafire.com/download.php?zx2xmdeitmwhttp://www.mediafire.com/download.php?zx2xmdeitmw
  • 5/28/2018 Lab Tong Hop CCNA

    43/298

    43

    LAB 6: WIRELESS

    I. Yu cu :

    -Kt ni AP v bi BasicLab hon chnh theo 2 cch :

    +Sdng cng Ethernet

    +Sdng cng Internet

    - Video tham kho :http://www.mediafire.com/download.php?n2zzz0vrwn5

    II. Cc bc tin hnh :

    1.Kt ni theo cc sdng cng Ethernet :

    -Chy file basiclab_completed.pkt bt cu hnh bi lab Wireless

    -Kt ni thm AP Linksys v 1 PC wireless vo hthng

    http://www.mediafire.com/download.php?n2zzz0vrwn5http://www.mediafire.com/download.php?n2zzz0vrwn5http://www.mediafire.com/download.php?n2zzz0vrwn5http://www.mediafire.com/download.php?n2zzz0vrwn5
  • 5/28/2018 Lab Tong Hop CCNA

    44/298

    44

    -Sdng cp cho kt ni t1 trong 4 cng Ethernet trn AP n SW2. Nhvy do m hnh l tSW n SW nn cc Wireless PC v mng LAN scng 1a chmng 192.168.2.0/24

    - iu chnh mt stham sc bn trn AP :

  • 5/28/2018 Lab Tong Hop CCNA

    45/298

    45

    + Network Mode : do AP chun G shtrngc chun B nn y chngta c cc la chn

    o Mix Mode : l chmc nh htrcclient chun B v Go B-Only : chhtrclient chun Bo G-Only : chhtrclient chun G

    + SSID : tn ca mng wireless

    + Knh hot ng nm trong khong 1 n 11 v phi m bo khng trngvi cc AP xung quanh, kim tra knh hot ng ca cc AP cc bn c ths

    dng 1 sphn mm nh : NetStumbler , InSSIDer.

  • 5/28/2018 Lab Tong Hop CCNA

    46/298

    46

    -V hiu ha dch vDHCP trn AP v c DHCP trong LAN cp pht

    -Kim tra li IP cp pht cho Wireless PC

  • 5/28/2018 Lab Tong Hop CCNA

    47/298

    47

    -Thkt ni tPC Wireless n mng LAN bn trong

    2.Kt ni theo cc sdng cng Internet :

  • 5/28/2018 Lab Tong Hop CCNA

    48/298

    48

    -Bkt ni tAP n SW trong lab 1, sdng cp thng kt ni tcng Internetca AP n SW2, cng Internet snhn Ip thDHCP trong LAN

    -Bt li DHCP trn AP v m bo lp mng cp pht khng c trng vi mngLAN trong trng hp ny AP scp pht IP trong mng 192.168.0.0/24 khc vimng LAN l 192.168.2.0/24

  • 5/28/2018 Lab Tong Hop CCNA

    49/298

    49

    -Kim tra li IP cp pht trn Wireless PC

    -Ping tWirless PC vo mng LAN

  • 5/28/2018 Lab Tong Hop CCNA

    50/298

    50

  • 5/28/2018 Lab Tong Hop CCNA

    51/298

    51

    LAB 7: SECURITY DEVICE MANAGER (SDM)I. Gii thiu :

    SDM( Cisco Rotuer and Device Manager) l 1 cng cqun l thit bRouter thng qua cngnghJava, giao din ca SDM rt dsdng, gip chng ta c thcu hnh LAN, WAN v cctnh nng bo mt khc ca router. SDM c thit kcho ngi qun trmng hay resellerSMB m khng yu cu ngi sdng c kinh nghim nhiu trong vic cu hnh r

    outer.

    II. M tbi lab:

    Trong bi lab ny, chng ta cn phi c 2 PC v 2 Router, Trn PC phi c phn mm ci tSDM cho Router v hiu hnh ca Router phi htrvic ci t v cu hnh bng SDM. kim tra hiu hnh ta nh lnh show version hay show flash kim tra tn ca hiu hnhv phn cng, sau tham kho link sau:

    http://www.cisco.com/en/US/products/sw/secursw/ps5318/prod_installation_guide09186a00803e4727.html

    Nu hiu hnh khng htrta phi ci t hiu hnh khc cho router.

    Trong bi lab c sdng cc interface loopback ,l cc interface logic , gilp cc mng ktvo 2 router

  • 5/28/2018 Lab Tong Hop CCNA

    52/298

    52

    III. Cu hnh :

    Ta cu hnh cc bc nh sau trn 2 router DN v HCM:

    Bc 1 : Cu hnh cho php truy cp http v https

    Router# configure terminal

    Enter configuration commands, one per line. End with CNTL/Z.

    -Bt 1 trong 2 dch vHTTP hoc HTTPSHTTP :

    Router(config)# ip http server

    Hoc HTTPS :

  • 5/28/2018 Lab Tong Hop CCNA

    53/298

    53

    Router(config)# ip http secure-server

    -Sau cu hnh chng thc cho dch vHTTP hoc HTTPS bng lnh

    Router(config)# ip http authentication local

    Bc 2 : To username v password vi quyn hn privilege 15 login v router

    Router(config)# username TTG privilege 15 password cisco.

    Bc 3 : Cu hnh cho php telnet v ssh thng qua cc line

    Router(config)# line vty 0 4

    Router(config-line)# login local

    Router(config-line)# transport input telnet ssh

    Router(config-line)# exit

    Bc 4 : Ln lt cu hnh ip address cho interface Fa0/1 ( Interface kt ni n PC ) ca routerDN v HCM

    N:

    Router#conf terminal

    Enter configuration commands, one per line. End with CNTL/Z.

    Router(config)#hostname DN

    DN(config)#interface fa0/1

    DN(config-if)#ip address 172.16.1.1255.255.255.0

    DN (config-if)#no shutdown

    HCM :

    Router(config)#hostname HCM

    HCM(config)#interface fa0/1

    HCM(config-if)#ip address 172.16.3.1255.255.255.0

    HCM(config-if)#no shutdown

    - Sau khi hon thnh xong vic cu hnh Router, ta tin hnh thay i a chIP v kim tra ktni tPC n router

  • 5/28/2018 Lab Tong Hop CCNA

    54/298

    54

    Bc 5 : By gita sdng phn mm ci t SDM ti PC.

  • 5/28/2018 Lab Tong Hop CCNA

    55/298

    55

    - Click v next. Chn Cisco Router ci t vo Router.

    - Nhp a chca Router v username, password va c cu hnh ti bc 2 v nhn vo

    Next.Chn Install SDM v SDM express cho Router cn ci t.

  • 5/28/2018 Lab Tong Hop CCNA

    56/298

    56

    - Sau nu phn mm ci t bo Finish l qu trnh ci t xong.

    - Tm thi tt chc nng chn Pop-up Blocker trn trnh duyt bng cch vo Tool Pop-upBlockerTurn-Off Pop-Up Blocker

    - By gitrn PC ta truy cp vo Webhttps://172.16.1.1 login vo giao din Web caRouter. Ta nhp username v password ca bc 2 chng thc,sau khi chng thc thnh cngta c giao din ca SDM nh sau :

    https://172.16.1.1/https://172.16.1.1/https://172.16.1.1/
  • 5/28/2018 Lab Tong Hop CCNA

    57/298

    57

    - Tip theo ta vo Edit > Preferences > chn Preview commands before delivering to router nhvy ta c thxem trc cc lnh SDM sp chuyn xung router cu hnh

    Bc 6: Tao cc interface loopback trn router DN

    Interface Loopback trn Router l cc interface logic .Trong bi lab sdng cc interface ny gilp cc mng kt ni vo router HCM v N

    Configure > Interfaces and Connections >EditInterface/Connection

  • 5/28/2018 Lab Tong Hop CCNA

    58/298

    58

    - Sau nhp thng tin vIp > OK

    - Lp li bc 6 i vi interface loopback cn li trn router DN v HCM

    Bc 7 : Thit lp kt ni gia interface Fa0/0 tDN n HCM

    Interfaces and Connections > Create Connection > Ethernet LAN > Create New Connection

  • 5/28/2018 Lab Tong Hop CCNA

    59/298

    59

    Next

    Nhp thng tin vIp cho interface Fa0/0

  • 5/28/2018 Lab Tong Hop CCNA

    60/298

    60

  • 5/28/2018 Lab Tong Hop CCNA

    61/298

    61

    Bc 8 : Cu hnh RIPv2 nh tuyn gia 2 router-Mc ch cu hnh giao thc nh tuyn RIP l 2 router qung b nhng mng mnh bit chocc router hng xm ,v ngc li (ch cc mng c qung b trong RIP phi l cc mngClassfull theo lp A,B,C) .Trong bi lab cth

    +Router N cn qung b 3 mng: 192.168.3.0,192.168.4.0 v 172.(15+X).0.0

  • 5/28/2018 Lab Tong Hop CCNA

    62/298

    62

    +Router HCM cn qung b 3 mng: 192.168.1.0,192.168.2.0 v 172.(15+X).0.0

    Vo Routing > RIP > Edit ,sau add cc network cn qung b trn mi router vo :

    (Chn interface fa0/1 l Passive v trnh qung b thng tin nh tuyn nhm sang nhmkhc)

    Sau lp li bc 8 trn router HCM

    III. Bi tp lm thm :

    - Cc bn c ththc hnh thm bi lab ny nh bng phn mm GNS3

    - Video hng dn cc setup SDM trn GNS3 :http://www.mediafire.com/?dmqwlmfjywi

    IV. Phlc cc lnh lin quan n bi lab :

    Router(config)# ip http server Bt dch vHTTP trn Router

    http://www.mediafire.com/?dmqwlmfjywihttp://www.mediafire.com/?dmqwlmfjywihttp://www.mediafire.com/?dmqwlmfjywihttp://www.mediafire.com/?dmqwlmfjywi
  • 5/28/2018 Lab Tong Hop CCNA

    63/298

    63

    Router(config)# ip http secure-server Bt dch vHTTPS trn Router

    Router(config)# ip http authentication local Cu hnh chng thc cho dch vHTTP hocHTTPS

    Router(config)# username TTGprivilege 15passwordcisco

    To username v password vi quyn hnprivilege 15 login v router

  • 5/28/2018 Lab Tong Hop CCNA

    64/298

    64

    LAB 8: DHCP, DHCP RELAYI. Gii thiu giao thc DHCP:

    Dch vDHCP lm gim bt cng vic qun trmng thng qua vic hn chbt cng vic gnhoc thay i a chIP cho cc clients. DHCP cng ly li nhng a chIP khng cn c sdng nu thi hn thu bao IP ca cc clients ht hn v khng c ng k m

    i trli.Nhng a chny sau c thcp pht cho cc clients khc. DHCP cng ddng nh slinu ISP c sthay i.-Qu trnh cp pht IP cho client c thc hin qua cc bc sau:1.Client phi c cu hnh chnhn ip ng tDHCP server, u tin Client sgi giDHCPDISCOVER di dng broadcast trn mng ca mnh yu cu DHCP server cp phtIP2.DHCP server khi nhn c gi DHCPDISCOVER stm 1 ip cha c sdng trong rangeIP cp pht ca mnh cp pht cho Client thng qua gi DHCPOFFER gi unicast3.Client khi nhn c DHCPOFFER snh gi tt ccc DHCPOFFER nhn c trongtrng hp c nhiu DHCP Server v syu cu mt trong nhng DHCP cp pht IP ny chomnh thng qua gi DHCPREQUEST (thng thng Client sgi yu cu ny n DHCPServer nhn c DHCPOFFER u tin)4.DHCP server ng cp IP cho client thng qua gi unicast DHCPACK-Bn yu tc bn m 1 DHCP thng thng cp pht cho Client IP address Gateway Subnet mask DNS server

    II. DHCP Lab :

  • 5/28/2018 Lab Tong Hop CCNA

    65/298

    65

    1. Cu hnh DNS server :

    -DNS l dch vdng phn gii ttn min sang a chIP v ngc li, DHCP c khnngcp pht a chIP ca DNS server tng cho tt cclient trong hthng, trong trng hp ny

    ta scu hnh trrn DNS 2 domain sau :+ Cisco.com c IP l 1.1.1.1

    + Truongtan.edu.vnc Ip l 2.2.2.2

    Cu hnh trn PacketTracer nh sau : click vo ServerConfigDNS v nhp vo thng tincho 2 domain trn vi loi Record l A Record

    + Cisco.com c IP l 1.1.1.1

    + Truongtan.edu.vnc Ip l 2.2.2.2

  • 5/28/2018 Lab Tong Hop CCNA

    66/298

    66

    2.Cu hnh DHCP trn Cisco Router :

    Router>enable

    Router#configure terminal

    Router(config)#hostname DHCPServer

    DHCPServer(config)#interface fa0/1

    DHCPServer(config-if)#ip address 192.168.1.1 255.255.255.0

    DHCPServer(config-if)#no shutdown

    DHCPServer(config-if)#exit

    -Cu hnh DHCP Pool cp pht Ip cho mng 192.168.1.0/24

    DHCPServer(config)#ip dhcp pool mang192

    DHCPServer (dhcp-config)#network 192.168.1.0 255.255.255.0 *a chmng

    DHCPServer(dhcp-config)#default-router 192.168.1.1 *Gateway

    DHCPServer(dhcp-config)#dns-server 192.168.1.5 *DNS Server

    DHCPServer(dhcp-config)#exit

  • 5/28/2018 Lab Tong Hop CCNA

    67/298

    67

    -Thng thng khi cp pht IP ng ta thng dnh ring khong 10 IP u tin khng cp phttrong DHCP dnh cho cc thit b, Server cn IP tnh, trong trng hp ny ta sloi khng cppht cc IP t192.168.1.1 n 192.168.1.10

    DHCPServer(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.103.Kim tra li cu hnh DHCP trn PC :

    -DHCP client scu hnh chnhn IP ng nu thy thng tin IP ang

    c cp pht nhbn di chng tDHCP hot ng tt

    -Kim tra li cc IP c cp pht trn DHCP server bng lnh show ip dhcp binding

    DHCPServer# show ip dhcp binding

    IP address Client-ID/ Lease expiration Type

    Hardware address

    192.168.1.11 0060.5C66.56B6 -- Automatic

  • 5/28/2018 Lab Tong Hop CCNA

    68/298

    68

    -Nh chng ta thy ngoi vic cp pht tng IP, DHCP cn c thcp pht a chDNSserver, domain name kim tra nh sau :

    + DNS bng lnh nslookup

    +Thng tin DNS, DHCP, Domain name : ipconfig /all

    ( hin ti PacketTracer cha htrtt nhng lnh ny )

    DHCP RELAYI. Gii thiu :

    -Giao thc DHCP l 1 giao thc c s dng rt

    ph bin trong vic cp pht IP ngcho cc my client, cc bn c th xem li cch cu hnh trn router Cisco ti y-Nh chng ta bit nhn c Ip t DHCP Server cc my tnh phi gi broadcast

    gi tin DHCP Discovery trn mng ca mnh, vy iu g xy ra khi DHCP Server vClient khng nm cng mng v mc nh router chn d liu dng broadcast. Trongtrng hp ny ta sc 2 cch gii quyt:+Mi mng s c t mt DHCP server : cch ny khng hiu qu v s c qu nhiuDHCP server khi cng ty trin khai nhiu mng gy kh khn trong vic qun l v trinkhai+S dng mt DHCP Server cp pht Ip ng cho tt c cc mng thng qua k thutDHCP Relay: cch ny c nhiu u im hn ch cn trin khai mt DHCP cng 1 lccp pht ip cho nhiu mng kt hp vi lnh ip helper-address bt dch v DHCPRelay, khi cu hnh lnh ny Router khi nhn c d liu UDP broadcast trn cng camnh s unicast n mt Ip nh trc (IP cu DHCP Server trong trng hp ny)

    Cch hot ng ca DHCP Relay:

    1.Client Broadcasts gi tin DHCP Discover trong ni b mng

    http://img36.imageshack.us/img36/5905/dhcprelayagent1.jpg
  • 5/28/2018 Lab Tong Hop CCNA

    69/298

    69

    2.DHCP Relay Agent trn cng mng vi Client s nhn gi tin v chuyn n DHCP serverbng tn hiu Unicast.

    3.DHCP server dng tn hiu Unicast gi tr DHCP Relay Agent mt gi DHCP Offer

    4.DHCP Relay Agent Broadcasts gi tin DHCP Offer n cc Client

    http://img36.imageshack.us/img36/2893/dhcprelayagent3.jpghttp://img36.imageshack.us/img36/7491/dhcprelayagent2.jpg
  • 5/28/2018 Lab Tong Hop CCNA

    70/298

    70

    5.Sau khi nhn c gi tin DHCP Offer, client Broadcasts tip gi tin DHCP Request.

    6.DHCP Relay Agent nhn gi tin DHCP Request t Client v chuyn n DHCP servercng bng tn hiu Unicast.

    http://img17.imageshack.us/img17/139/dhcprelayagent5.jpghttp://img19.imageshack.us/img19/747/dhcprelayagent4.jpg
  • 5/28/2018 Lab Tong Hop CCNA

    71/298

    71

    7.DHCP server dng tn hiu Unicast gi tr li cho DHCP RelayAgent mt gi DHCP ACK.

    8.DHCP Relay Agent Broadcasts gi tin DHCP ACK n Client. n y l hon tt quy trnhtip nhn x l v chuyn tip thng tin ca DHCP Relay Agent.

    http://img11.imageshack.us/img11/8820/dhcprelayagent7.jpghttp://img19.imageshack.us/img19/1329/dhcprelayagent6.jpg
  • 5/28/2018 Lab Tong Hop CCNA

    72/298

    72

    II. M hnh bi lab :

    1. Cu hnh a chIP cho TTG v DHCP Router :

    http://img11.imageshack.us/img11/139/dhcprelayagent8.jpg
  • 5/28/2018 Lab Tong Hop CCNA

    73/298

    73

    -Trn 2 router lu cu hnh bng lnh copy run start sau tin hnh tt router v gn themmodule WIC-2T bsung thm cng Serial cho router, sau sdng cp Serial kt nitheo ng m hnh

    DHCP Router :

    DHCPServer(config)#interface s0/0/0

    DHCPServer(config-if)#ip address 192.168.2.1 255.255.255.0

    DHCPServer(config-if)#no shutdown

    DHCPServer(config-if)#clock rate 64000 *Cp xung ng hcho DCE

    DHCPServer(config-if)#exit

    DHCPServer(config)#

    TTG Router :

    Router>

    Router>enable

    Router#configure terminal

    Router(config)#hostname TTGRouter

    TTGRouter(config)#interface s0/0/0

  • 5/28/2018 Lab Tong Hop CCNA

    74/298

    74

    TTGRouter(config-if)#ip address 192.168.2.2 255.255.255.0

    TTGRouter(config-if)#no shutdown

    TTGRouter(config-if)#clock rate 64000

    TTGRouter(config-if)#exit

    TTGRouter(config)#interface fa0/1

    TTGRouter(config-if)#ip address 192.168.3.1 255.255.255.0

    TTGRouter(config-if)#no shutdown

    TTGRouter(config-if)#exit

    TTGRouter(config)#

    2. nh tuyn cho TTG v DHCP Router :

    -Mc nh bng nh tuyn ca router chcha cc m

    ng kt ni trc tip cn bit cc mngkhng kt ni trc tip cc router phi c cu hnh cc giao thc nh tuyn qung b ccmng bit cho nhau, trong trng hp ny l RIP

    DHCPServer :

    DHCPServer(config)#router rip

    DHCPServer(config-router)#network 192.168.1.0

    DHCPServer(config-router)#network 192.168.2.0

    DHCPServer(config-router)#exit

    DHCPServer(config)#

    TTGRouter :

    TTGRouter (config)#router rip

    TTGRouter (config-router)#network 192.168.2.0

    TTGRouter (config-router)#network 192.168.3.0

    TTGRouter (config-router)#exit

    TTGRouter (config)#

    -Trn 2 Router kim tra bng nh tuyn bng lnhshow ip route, cc mng mi hc c scnh du R u

  • 5/28/2018 Lab Tong Hop CCNA

    75/298

    75

    3. Cu hnh DHCP Relay :

    DHCPServer :

    -Cu hnh thm 1 DHCP pool cp pht cho mng 192.168.3.0 bn TTG router

    DHCPServer(config)#ip dhcp pool mang193

    DHCPServer (dhcp-config)#network 192.168.3.0 255.255.255.0 *a chmng

    DHCPServer(dhcp-config)#default-router 192.168.3.1 *Gatew

    ay

    DHCPServer(dhcp-config)#dns-server 192.168.1.5 *DNS Server

    DHCPServer(dhcp-config)#exit

    -Loi 10 IP u tin khng cp pht

    DHCPServer(config)#ip dhcp excluded-address 192.168.3.1 192.168.3.10

    -Cu hnh DHCP Relay trn interface fa0/1 ca router TTG

    TTGRouter(config)#interface fa0/1

    TTGRouter(config-if)#ip helper-address 192.168.2.1 *IP ca DHCPServer

    -Kim tra li vic nhn IP trn PC mng 192.168.3.0

  • 5/28/2018 Lab Tong Hop CCNA

    76/298

    76

    III. Thc hnh thm :

    -Lp thc hnh thm 2 bi lab n

    y bng cch cu hnh thng qua SDM trn phn mm GNS3,

    tham kho thm video ti a ch

    IV. Phlc lnh lin quan n bi lab :1. Cu hnh DHCP :

    DHCPServer(config)#ip dhcp poolmang192 Cu hnh DHCP Pool cp pht IP ng chomng

    DHCPServer (dhcp-config)#network192.168.1.0 255.255.255.0

    Khai bo a chmng cn cp pht a chIP

    DHCPServer(dhcp-config)#default-router192.168.1.1 Cu hnh Gateway ca DHCP Server

    DHCPServer(dhcp-config)#dns-server192.168.1.5

    Khai bo DNS

  • 5/28/2018 Lab Tong Hop CCNA

    77/298

    77

    DHCPServer(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.10

    Khai bo di IP khng c cp pht ng

    2. Cu hnh DHCP RELAY :

    TTGRouter(config)#interface fa0/1 Cu hnh DHCP Relay trn interface fa0/1 carouter TTG 192.168.2.1 l a chca DHCPServerTTGRouter(config-if)#ip helper-address

    192.168.2.1

    3. Kim tra cu hnh DHCP :

    DHCPServer#show ip dhcp Cung cp thng tin vtt ccc a chc

    cp tDHCPDHCPServer#show ip dhcp pool Hin ththng tin trn tt ccc cu hnh hin

    ti DHCP pool trn router

  • 5/28/2018 Lab Tong Hop CCNA

    78/298

    78

    LAB 9: NH TUYN TNH(STATIC ROUTE)I. Gii thiu :nh tuyn(Routing) l 1 qu trnh m Router thc thi v schuyn mt gi tin(Packet)

    tmt a chngun (soucre)n mt a chch(destination) trong mng.Trong qu trnh nyRouter phI da vo nhng thng tin nh tuyn a ra nhng quyt nh nhm chuyn gi tinn nhng a chch nh trc.C hai loI nh tuyn c bn l nh tuy

    n tnh (StaticRoute) vnh tuyn ng(Dynamic Route)

    nh tuyn tnh (Static Route) l 1 qu trnh nh tuyn m thc hin bn phI cuhnh bng tay(manually) tng a chch cthcho Router.

    Mt dng mc nh ca nh tuyn tnh l Default Routes, dng ny c sdngcho cc mng ct (Stub Network)

    nh tuyn ng(Dynamic Route) y m mt dng nh tuyn m khi c cu hnh

    dng ny, Router s s dng nhng giao thc nh tuyn nh RIP(Routing InformationProtocol),OSPF(Open Shortest Path Frist),IGRP(Interior Gateway Routing Protocol) thcthi vic nh tuyn mt cch tng (Automatically) m bn khng phi cu hnh trc tip bngtay.

    II. M tbi lab v hnh :

    - hnh bi lab nh hnh, PC n i vi router bng cp cho. Hai router ni vi nhau bng cpserial. a chIP ca cc interface v PC nh hnh v.

    - Bi lab ny gip bn thc hin cu hnh nh tuyn tnh cho 2 router, lm cho 2 router c khnng nhn thy c nhau v ccc mng con trong n.

    2. Cu hnh nh tuyn tnh(Static Route)Chng ta cu hnh cho cc router v PC nh sau :

    Router TTG1 :Router>enable

    Router#configure terminal

    Router(config)#hostname TTG1

  • 5/28/2018 Lab Tong Hop CCNA

    79/298

    79

    TTG1(config)#interface fa0/0

    TTG1(config-if)#ip address 10.0.0.1 255.255.255.0

    TTG1(config-if)#no shutdown

    TTG1(config-if)#exit

    TTG1(config)#interface s0/0/0

    TTG1(config-if)#ip address 192.168.0.1 255.255.255.0

    TTG1(config-if)#no shutdown

    TTG1(config-if)#exit

    Router TTG2 :Router>enable

    Router#configure terminal

    Router(config)#hostname TTG1

    TTG2(config)#interface fa0/0

    TTG2(config-if)#ip address 11.1.0.1 255.255.255.0

    TTG2(config-if)#no shutdown

    TTG2(config-if)#exit

    TTG2(config)#interface s0/0/0

    TTG2(config-if)#ip address 192.168.0.2 255.255.255.0

    TTG2(config-if)#no shutdown

    TTG2(config-if)#exit

    Host 1 :

    IP 10.0.0.2

    Subnetmask: 255.255.255.0Gateway: 10.0.0.1

    Host 2 :

    IP: 10.0.1.2

  • 5/28/2018 Lab Tong Hop CCNA

    80/298

    80

    Subnetmask: 255.255.255.0

    Gateway:10.0.1.1

    - Chng ta tin hnh kim tra cc kt ni bng cch :

    Ping tHost1sang a ch10.0.0.1

    Ping tHost 1sang a ch192.168.0.1

    Ping tHost 1sang a ch192.168.0.2

    - MchdebugtiRouter TTG2

    TTG2#debug ip packet

    IP packet debugging is on

    - Thc hin li lnh ping trn ta thy

  • 5/28/2018 Lab Tong Hop CCNA

    81/298

    81

    TTG2#

    00:33:59: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3

    00:33:59: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable

    00:34:04: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3

    00:34:04: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable

    00:34:09: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3

    00:34:09: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable

    00:34:14: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3

    00:34:14: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable

    - Ping tHost 1sang a ch10.0.1.1

    - MchdebugtiRouter TTG1

    TTG1#debug ip packet

    IP packet debugging is on

    - Thc hin li lnh Ping:

    TTG1#

    00:36:41: IP: s=10.0.0.2 (Ethernet0), d=10.0.1.1, len 60, unroutable

    00:36:41: IP: s=10.0.0.1 (local), d=10.0.0.2 (Ethernet0), len 56, sending00:36:42: IP: s=10.0.0.2 (Ethernet0), d=10.0.1.1, len 60, unroutable

    00:36:42: IP: s=10.0.0.1 (local), d=10.0.0.2 (Ethernet0), len 56, sending

    00:36:43: IP: s=10.0.0.2 (Ethernet0), d=10.0.1.1, len 60, unroutable

  • 5/28/2018 Lab Tong Hop CCNA

    82/298

    82

    00:36:43: IP: s=10.0.0.1 (local), d=10.0.0.2 (Ethernet0), len 56, sending

    00:36:44: IP: s=10.0.0.2 (Ethernet0), d=10.0.1.1, len 60, unroutable

    00:36:44: IP: s=10.0.0.1 (local), d=10.0.0.2 (Ethernet0), len 56, sending

    - Lnh Ping trng hp ny khng thc hin thnh cng, ta dng lnh debug ip packetmchdebug ti 2 Router, ta thy Router TTG 2 vn nhn c gi packet thost1 khi ta pinga ch 192.168.0.2, tuy nhin do host 1 khng lin kt trc tip vi Router TTG 2 nn giPacket ICMP trvlnh ping khng c a chch,do vy gi Packet ny bhy,iu ny dnn lnh Ping khng thnh cng. trng hp ta ping tHost1 sang a ch10.0.1.1 gi packetbmt ngay ti router TTG1 v Router TTG1 khng xc nh c a chch cn n trongbng nh tuyn(a ch ny khng lin kt trc tip vi Router TTG1).Ta so snh v trUnroutabletrong kt qudebug packet 2 cu lnh ping trn thy c skhc nhau.

    - thc hin thnh cng kt ni ny,ta phi thc hin cu hnh Static Route cho Router TTG1

    v Router TTG2 nh sau:TTG1(config)#ip route 10.0.1.0 255.255.255.0 192.168.0.2

    TTG1(config)#exit

    - Bn thc hin lnh Ping tHost1sang Host 2

    - Bn thc hin lnh Ping tRouter TTG2sang Host1

    TTG2#ping 10.0.0.2

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:

    .....Success rate is 0 percent (0/5)

    - thc hin thnh cng lnh Ping ny bn phi thc hin cu hnh Static route cho RouterTTG 2 nh sau

  • 5/28/2018 Lab Tong Hop CCNA

    83/298

    83

    TTG2(config)#ip route 10.0.0.0 255.255.255.0 192.168.0.1

    - Lc ny tHost2 bn c thPing thy cc a chTrn Router TTG 1 v Host1

    - Chng ta kim tra bng nh tuyn ca cc router bng lnhshow ip route

    TTG1#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static route

    Gateway of last resort is not set

    10.0.0.0/24 is subnetted, 2 subnets

    C 10.0.0.0 is directly connected, Ethernet0

  • 5/28/2018 Lab Tong Hop CCNA

    84/298

    84

    S 10.0.1.0 is directly connected, Serial0/0/0

    C 192.168.0.0/24 is directly connected, Serial0/0/0

    Sbiu thnhng kt ni thng qua nh tuyn tnh

    Cbiu thnhng kt ni trc tip

    TTG2#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static route

    Gateway of last resort is not set

    10.0.0.0/24 is subnetted, 2 subnets

    S 10.0.0.0 is directly connected, Serial0/0/0

    C 10.0.1.0 is directly connected, Ethernet0C 192.168.0.0/24 is directly connected, Serial0/0/0

    - Thc hin lnh Show runti Router xem li cu hnh nh tuyn:

    TTG1#show run

    Building configuration...

    ip kerberos source-interface any

    ip classless

    ip route 10.0.1.0 255.255.255.0 Serial0/0/0

    ip http server

    !

  • 5/28/2018 Lab Tong Hop CCNA

    85/298

    85

    end

    TTG2#show run

    Building configuration...

    ip classless

    ip route 10.0.0.0 255.255.255.0 Serial0/0/0

    ip http server

    - Bn thc hin thnh cng vic nh tuyn cho 2 Router kt ni c vi nhau ccc mngcon ca chng, bn cng c thmrng hnh ra thm vi 3, 4 hay 5 hop thc hnh viccu hnh nh tuyn tnh tuy nhin bn thy r vic cu hnh ny tng i rc ri v di dng

    nht l i vi mi trng Internet bn ngoi,v vy bn sphi thc hin vic cu hnh nhtuyn ng cho Router bi sau.

    III. Phlc cc lnh lin quan n bi lab :

    1. Cu hnh Static route trn Router :

    Router(config)# ip route 172.16.20.0

    255.255.255.0 172.16.10.2

    Trong :

    172.16.20.0 = mng ch.

    255.255.255.0 = subnet mask ca mng

    ch.

    Cc bn c thhiu cu lnh nh sau:

    c th n c mng ch l

    172.16.20.0, vi subnet mask ca mng

    l 255.255.255.0, th gi tt cd

    liu ra 172.16.10.2.

    Router(config)# ip route 172.16.20.0

    255.255.255.0 serial 0/0/0

    Trong :

    172.16.20.0 = mng ch.

  • 5/28/2018 Lab Tong Hop CCNA

    86/298

    86

    255.255.255.0 = subnet mask ca mng

    ch.

    Cc bn c thhiu cu lnh nh sau:

    c th n c mng ch l

    172.16.20.0, vi subnet mask ca mng

    l 255.255.255.0, th gi tt cd

    liu ra ngoi interface s0/0/0.

    2. Cu hnh Default Route trn Router :

    Router(config)# ip route 0.0.0.0

    0.0.0.0 172.16.10.2

    Khi router nhn c mt gi dliu m

    ch ca gi d liu ny khng c trong

    bng nh tuyn th sgi gi dliu

    ra 172.16.10.2

    Router(config)# ip route 0.0.0.0

    0.0.0.0 Serial 0/0/0

    Khi router nhn c mt gi dliu m

    ch ca gi d liu ny khng c trong

    bng nh tuyn th sgi gi dliu

    ra interface s0/0/0

    3. Kim tra static route :

    Router# show ip route Hin thni dung ca bng nh tuyn

    Router #debug ip packet Mchdebug ti Router

    Router #Show running-config Xem li cu hnh nh tuyn

  • 5/28/2018 Lab Tong Hop CCNA

    87/298

    87

    STATIC ROUTE TNG HP

    YU CU1)Sdng mng 172.(15+X).0.0/16 chia subnet vi X l sthtca nhm2)Sdng Static Route nh tuyn3)Cc PC phi i c internet4)Kim tra li thng tin nh tuyn bng cc lnh

    + Show ip route+ Ping ra internet+ TPC dng lnh tracertra internet lit k ng i

  • 5/28/2018 Lab Tong Hop CCNA

    88/298

    88

    LAB 10 : RIPv2I. Gii thiu :

    RIP (Routing Information Protocol) l mt giao thc nh tuyn dng qung b thng tin va

    chm mnh mun qung b ra bn ngoi v thu thp thng tin hnh thnh bng nh tuyn (RoutingTable)cho Router. y l loi giao thc Distance Vector sdng tiu ch chn ng chyu l da voshop (hop count) v cc a chm Rip mun qung b c gi i dng Classful (i vi RIP verion1) v Classless (i vi RIP version 2).

    V sdng tiu ch nh tuyn l hop count v bgii hn shop l 15 nn giao t

    hc ny chc sdng trong cc mng nh(di 15 hop).

    II. M t bi lab v hnh :

    - Cc PC ni vi Switch bng cp thng, hai router ni vi nhau bng cp serial. a ch IP cacc interface v PC nh trn hnh.

    - Bi thc hnh ny gip bn thc hin c vic cu hnh cho mng c th ien lc c vinhau bng giao thc RIP

    III. Mc tiu :

  • 5/28/2018 Lab Tong Hop CCNA

    89/298

    89

    -Trc khi cu hnh nh tuyn bng RIPv2 cho 2 router chng ta sthy ngi tPC1 khng thpingc n router TTG2 v l do Router TTG2 thng tin vmng 10.0.0.0/24 ( LAN1) nm u- Sauk hi cu hnh RIPv2 th PC1 phi ping c n TTG2

    IV. Cc bc cu hnh :-

    Trc tin bn cu hnh cho cc thit bnh sau:Router TTG1Router>enable

    Router#configure terminal

    Router(config)#hostname TTG1

    TTG1(config)#interface serial 0/0/0

    TTG1(config-if)#ip address 192.168.1.1 255.255.255.0

    TTG1(config-if)#no shutdown

    TTG1(config-if)#clock rate 64000

    TTG1(config-if)#exit

    TTG1(config)#interface fastethernet 0/0

    TTG1(config-if)#ip address 10.0.0.1 255.255.0.0

    TTG1(config-if)#no shutdown

    TTG1(config-if)#exit

    Router TTG2Router>enable

    Router#configure terminal

    Router(config)#hostname TTG2

    TTG2(config)#interface serial 0/0/0

    TTG2(config-if)#ip address 192.168.1.2 255.255.255.0

    TTG2(config-if)#no shutdown

    TTG2(config-if)#clock rate 64000TTG2(config-if)#exit

    TTG2(config)#interfacae fastethernet 0/0

    TTG2(config-if)#ip address 11.0.0.1 255.255.255.0

  • 5/28/2018 Lab Tong Hop CCNA

    90/298

    90

    TTG2(config-if)#no shutdown

    TTG2(config-if)#exit

    Host1 :

    IP 10.0.0.2

    Subnet mask:255.255.255.0

    Gateway:10.0.0.1

    Host2 :IP: 11.0.0.2

    Subnet mask:255.255.255.0

    Gateway:11.0.0.1

    - Bn thc hin vic kim tra cc kt ni bng lnh Ping

    Ping tHost1sang a ch10.0.0.1

    Ping tHost 1sang a ch192.168.0.1

    Ping tHost1sang a ch192.168.0.2

  • 5/28/2018 Lab Tong Hop CCNA

    91/298

    91

    - i vi Host 1 bn khng thPing thy a ch192.168.0.2

    Bn thc hin vic kim tra tng tHost 2

    Ping a ch11.0.0.1

    Ping a ch192.168.0.2

    Ping a ch192.168.0.1

  • 5/28/2018 Lab Tong Hop CCNA

    92/298

    92

    - Thc hin cc lnh Ping tRouter TTG1:

    TTG1#ping 192.168.0.2

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds:

    !!!!!

    Success rate is 100 percent (5/5), round-trip min/avg/max = 32/35/36 ms

    TTG1#ping 11.0.0.1

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 11.0.0.1, timeout is 2 seconds:

    .....

    Success rate is 0 percent (0/5)

    - Thc hin cc lnh Ping tRouter TTG2

    TTG2#ping 192.168.0.1

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds:

    !!!!!

    Success rate is 100 percent (5/5), round-trip min/avg/max = 32/35/36 ms

    TTG2#ping 10.0.0.1

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 10.0.0.1, timeout is 2 seconds:

    .....

  • 5/28/2018 Lab Tong Hop CCNA

    93/298

    93

    Success rate is 0 percent (0/5)

    - Bn xem bng thng tin nh tuyn ca tng Router

    TTG1#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static routeGateway of last resort is not set

    10.0.0.0/24 is subnetted, 1 subnets

    C 10.0.0.0 is directly connected, Ethernet0

    C 192.168.0.0/24 is directly connected, Serial0/0/0

    TTG2#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static route

    Gateway of last resort is not set

    11.0.0.0/24 is subnetted, 1 subnets

    C 11.0.0.0 is directly connected, Ethernet0

    C 192.168.0.0/24 is directly connected, Serial0/0/0

  • 5/28/2018 Lab Tong Hop CCNA

    94/298

    94

    Nhn xt: Bn thy rng thng tin a ch ca cc mng m bn thc hin lnh Ping khng thnhcng khng c lu trn bng nh tuyn

    Bn thc hin vic cu hnh RIP cho cc Router nh sau:

    TTG1(config)#router rip

    TTG1(config-router)#network 192.168.0.0

    TTG1(config-router)#network 10.0.0.0

    TTG1(config-router)#exit

    TTG2(config)#router rip

    TTG2(config-router)#network 11.0.0.0

    TTG2(config-router)#network 192.168.0.0

    TTG2(config-router)#exit

    - Bn xem li bng thng tin nh tuyn:

    TTG1#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static route

    Gateway of last resort is not set

    10.0.0.0/24 is subnetted, 1 subnets

    C 10.0.0.0 is directly connected, Ethernet0

    R 11.0.0.0/8 [120/1] via 192.168.0.2, 00:00:00, Serial0/0/0

    C 192.168.0.0/24 is directly connected, Serial0/0/0

    TTG2#show ip route

  • 5/28/2018 Lab Tong Hop CCNA

    95/298

    95

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static route

    Gateway of last resort is not set

    R 10.0.0.0/8 [120/1] via 192.168.0.1, 00:00:23, Serial0/0/011.0.0.0/24 is subnetted, 1 subnets

    C 11.0.0.0 is directly connected, Ethernet0

    C 192.168.0.0/24 is directly connected, Serial0/0/0

    Nhn xt : Bn thy rng trn bng thng tin nh tuyn, Router TTG1 lin kt RIP vi mng11.0.0.0/8 qua cng Serial 0(192.168.0.2) v Router TTG2 lin kt vi mng 10.0.0.0/8 qua cngSerial 0(192.168.0.1)

    Ch : V Rip gi ichtheo dng classfull nn subnet mask sc sdng defaul i vi cc lpmng.

    - Lc ny bn thc hin li lnh Ping gia cc Router v cc Host:

    THost1bn thc hin lnh Ping:

  • 5/28/2018 Lab Tong Hop CCNA

    96/298

    96

    THost 2bn thc hin lnh Ping:

  • 5/28/2018 Lab Tong Hop CCNA

    97/298

    97

    - Bn thy rng cc kt ni thnh cng. n y bn hon tt vic cu hnh RIP cho mngtrn c th trao i thng tin vi nhau.Nhng tm hiu r hn v RIP bn thc hin tip tccc bc cu hnh nh sau:

    - Bn gi nguyn cu hnh ca Router TTG 1 v thay i cu hnh ca Router TTG 2 t RIPversion 1 sang RIP version 2 v kim tra :

    TTG2(config)#router rip

    TTG2(config-router)#version2

    - Bn mchdebugtrn 2 Router kim tra gi tin:

    TTG1#debug ip packet

    IP packet debugging is on

    TTG2#debug ip packet

    IP packet debugging is on

    - Lc ny bn thc hin lnh Ping tHost 1vo cc a chkhng lin kt trc tip vi n c chyRIP

    TTG2#

    01:49:58: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3

  • 5/28/2018 Lab Tong Hop CCNA

    98/298

    98

    01:49:58: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable

    01:50:03: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3

    01:50:03: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable

    01:50:08: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3

    01:50:08: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable

    01:50:13: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3

    01:50:13: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable

    TTG2#

    01:55:30: IP: s=10.0.0.2 (Serial0/0/0), d=11.0.0.1, len 60, rcvd 4

    01:55:30: IP: s=11.0.0.1 (local), d=10.0.0.2, len 60, unroutable

    01:55:35: IP: s=10.0.0.2 (Serial0/0/0), d=11.0.0.1, len 60, rcvd 4

    01:55:35: IP: s=11.0.0.1 (local), d=10.0.0.2, len 60, unroutable

    01:55:40: IP: s=10.0.0.2 (Serial0/0/0), d=11.0.0.1, len 60, rcvd 4

    01:55:40: IP: s=11.0.0.1 (local), d=10.0.0.2, len 60, unroutable

    - Nhng dliu khi bn mchdebugcho thy khi bn thc hin lnh Ping tHost1n cc a chnh:192.168.0.2v 11.0.0.1gi tin u nhn c ti im ch,tuy nhin gi tin trvti a chny khng tm c a ch10.0.0.2(Host1) tbng nh tuyn ca Router TTG 2(unroutable) do Router

    ny c cu hnh RIP version 2

    TTG2#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

  • 5/28/2018 Lab Tong Hop CCNA

    99/298

    99

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

    P - periodic downloaded static route

    Gateway of last resort is not set

    11.0.0.0/24 is subnetted, 1 subnets

    C 11.0.0.0 is directly connected, Ethernet0

    C 192.168.0.0/24 is directly connected, Serial0/0/0

    Nhn xt: Mng 10.0.0.0 khng cn tn ti trong bng nh tuyn

    Bn thc hin lnh Ping tRouter TTG2sang cc a chca Router TTG1

    TTG2#ping 10.0.0.2

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:

    .....

    Success rate is 0 percent (0/5)

    - Bn thc hin vic kim tra bng lnh Show ip route

    TTG1#show ip route

    01:46:50: IP: s=192.168.0.2 (Serial0/0/0), d=224.0.0.9, len 52, rcvd 2route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

    E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

    i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

    * - candidate default, U - per-user static route, o - ODR

  • 5/28/2018 Lab Tong Hop CCNA

    100/298

    100

    P - periodic downloaded static route

    Gateway of last resort is not set

    10.0.0.0/24 is subnetted, 1 subnets

    C 10.0.0.0 is directly connected, Ethernet0

    R 11.0.0.0/8 [120/1] via 192.168.0.2, 00:00:05, Serial0/0/0

    C 192.168.0.0/24 is directly connected, Serial0

    - Bn thy tuy ti bng nh tuyn ca Router TTG1 vn cn lu li a chca mng 11.0.0.0nhng vRouter TTG2 khng tm thy a chca mng 10.0.0.0nn gi tin khng thc hin gi c. iu nycho bn thy giao thc RIP Version 2 khng htrtng thch ngc cho giao thc RIP Version 1.

    - Nh vy trao i thng tin nh tuyn thnh cng bng RIP th i hi cc Router phi cu hnh cngversion RIP, trong trng hp nay ta tip tc cu hnh cho TTG1 chuyn qua sdng RIPv2

    TTG1(config)#router rip

    TTG1(config-router)#version2

    - Thkim tra li kt ni gia 2 PC sau khi chuyn RIP version trn TTG1 bng lnh Ping v ktqulnh phi thnh cng

    V. Phlc cc lnh lin quan n bi lab :

    1. Cu lnh ip classless :

    Router(config)# ip classess Router khi nhn c gi dliu m chca gi dliu khng c trong bng nh

    tuyn th gi d liu s c nh

    tuyn n default route.

    Router(config)# no ip classess Tt tnh nng ca cu lnh ip classess

    2. Giao thc nh tuyn RIP: Cc cu lnh bt buc :

    Router(config)# router rip Cho php router sdng giao thc nh

    tuyn rip.

  • 5/28/2018 Lab Tong Hop CCNA

    101/298

    101

    Router(config-router)# network w.x.y.z Trong w.x.y.z l mng ang kt ni

    trc tip vo router ca bn m bn

    ang mun qung b.

    3. Giao thc nh tuyn RIP: Cc cu lnh ty chn :

    Router(config)# no router rip Tt giao thc nh tuyn hot ng trn

    router.

    Router(config-router)# no network

    w.x.y.z

    Xa bmng w.x.y.z khi qu trnh nh

    tuyn ca RIP.Router(config-router)# version 2 Giao thc nh tuyn c sdng

    nhn v gi cc gi tin Ripv2

    Router(config-router)# version 1 Giao thc nh tuyn c sdng

    nhn v gi cc gi tin Ripv1 duy nht.

    Router(config-if)# ip rip send version 1 Router s chgi duy nht cc gi tin

    Ripv1 qua interface ny.

    Router(config-if)# ip rip send version 2 Router s chgi duy nht cc gi tin

    Ripv2 qua interface ny.

    Router(config-if)# ip rip send version 1 2 Router s chgi cc gi tin Ripv1 vRipv2 qua interface ny.

    Router(config-if)#ip rip receive

    version 1

    Router s chnhn duy nht cc gi tin

    Ripv1 qua interface ny.

    Router(config-if)#ip rip receiveversion 2

    Router s chnhn duy nht cc gi tinRipv2 qua interface ny.

    Router(config-if)#ip rip receive Router s nhn cc gi tin Ripv1 v

  • 5/28/2018 Lab Tong Hop CCNA

    102/298

    102

    version 1 2 Ripv2 qua interface ny.

    Router(config-router)# no auto-

    summary

    Tt tnh nng t ng tng hp a ch

    ca cc mng classful (ch c tc dng

    vi Ripv2).

    Router(config-router)# passive-

    interface s0/0/0

    Router s khng gi cc thng tin nh

    tuyn ca rip ra ngoi interface ny.

    Router(config-router)# neighbor

    a.b.c.d

    Chra mt neighbor trao i thng tin

    nh tuyn

    Router(config-router)# no ip split-

    horizon

    Tt tnh nng split horizon trn router

    Router(config-router)# ip split-horizon Enable tnh nng split horizon trn

    router.

    Router(config-router)# timers basic 30

    90 180 270 360

    Thay i cc tham sthi gian vi RIP:

    30 = thi gian Update

    90 = Thi gian Invalid

    180 = Thi gian hold-down

    270 = Thi gian Flush

    360 = Thi gian Sleep

    Router(config-router)# maximum-

    paths x

    Gii hn sng i cho cn bng ti l

    x (4 l mc nh, cn 6 sl ti a).

    Router(config-router)# default-

    information orginate

    Cu hnh default route trong rip.

    4. Xl li vi RIP :

  • 5/28/2018 Lab Tong Hop CCNA

    103/298

    103

    Router#show ip route Hin thni dung ca bng nh tuyn

    Router# debug ip rip Hin thtt c cc thng tin vrip ang

    xl bi router.

    Router# show ip rip database Hin thni dung ca RIP database.

  • 5/28/2018 Lab Tong Hop CCNA

    104/298

    104

    RIPv2 Lab Tng Hp

    YU CU1) Hc vin sthc hnh trn thit bCisco 28012) Sdng mng 172.(15+X).0.0/16 chia subnet vi X l sthtca nhm3)Sdng RIPv2 nh tuyn4)Cc PC phi i c internet5)Sauk khi nh tuyn xong, kim tra li thng tin nh tuyn bng cc lnh :

    + Show ip route+ Ping ra internet tPC v router+ TPC dng lnh tracertra internet lit k ng i tngun n ch

  • 5/28/2018 Lab Tong Hop CCNA

    105/298

    105

    LAB 11: CISCO DISCOVERY PROTOCOL (CDP)I. Gii thiu

    CDP(Cisco Discovery Protocol) l 1 giao thc ca Cisco, giao thc ny hot ng lp

    2(data link layer) trong m hnh OSI, n c khnng thu thp v ch ra cc thng tin ca ccthit ln cn c kt ni trc tip, nhng thng tin ny rt cn thit v hu ch cho bn trongqu trnh xl scmng.

    II. Mc chBi thc hnh ny gip bn hiu r vgiao thc CDP v cc thng sli

    n quan, nm cchc nng ca cc lnh trong giao thc ny.

    Ch : CDP chcung cp thng tin ca thit bkt ni trc tip vi n, tri vi cc giao thcnh tuyn. Giao thc nh tuyn c thcung cp thng tin ca cc mng xa, hay kt ni gintip qua nhiu router.

    III. M tbi lab v hnh

    hnh bi lab nh hnh v, cc router c ni vi nhau bng cp serial.IV. Cc bc thc hin

    Trc tin cu hnh cho cc Router nh sau Router TTG1 :Router> enableRouter#configure terminalRouter#hostname TTG1TTG1#interface serial 0/0/0TTG1#ip address 192.168.1.2 255.255.255.0

  • 5/28/2018 Lab Tong Hop CCNA

    106/298

    106

    TTG1#no shutdownTTG1#clock rate 64000TTG1#exitTTG1#interface serial 0/0/1

    TTG1#ip address 192.168.2.2 255.255.255.0TTG1#no shutdownTTG1#clock rate 64000TTG1#exitTTG1#

    Router TTG2 :Router> enableRouter#configure terminalRouter#hostname TTG2TTG2#interface serial 0/0/0

    TTG2#ip address 192.168.1.1 255.255.255.0TTG2#no shutdownTTG2#clock rate 64000TTG2#exitTTG2#

    Router TTG3 :Router> enableRouter#configure terminalRouter#hostname TTG2TTG2#interface serial 0/0/0

    TTG2#ip address 192.168.2.1 255.255.255.0TTG1#no shutdownTTG1#clock rate 64000TTG1#exitTTG1#

    Lu : V CDP l 1 giao thc ring ca Cisco nn n c mc nh khi ng, v vy khita dng lnh Show run,nhng thng tin vgiao thc ny skhng c hin th.Giao thc nyc thhot ng trn cRouterv Switch

    V. Cc lnh trong giao thc CDP

    LnhShow CDP neighbors: dng xem thng tin ca cc thit bxung quanh clin kt trc tip(lnh ny sdng trong mode Privileged)TTG1#show cdp neighborsCapability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

    S - Switch, H - Host, I - IGMP, r - RepeaterDevice ID Local Intrfce Holdtme Capability Platform Port ID

  • 5/28/2018 Lab Tong Hop CCNA

    107/298

    107

    TTG3 Ser 0/0/1 149 R 2523 Ser 0/0/1TTG2 Ser 0/0/0 134 R 2500 Ser 0/0/0

    Lnh Show CDP neighbors detail : dng xem chi tit thng tin ca cc thit blin

    kt trc tip.TTG1#show cdp neighbors detail

    -------------------------Device ID: TTG3(thit blin kt trc tip l TTG3)Entry address(es): IP address: 192.168.2.1(a chcng lin kt trc tip)Platform: cisco 2523, Capabilities: Router (loi thit blin kt: Cisco Router 2523)Interface: Serial0/0/1, Port ID (outgoing port): Serial0/0/1 (lin kt trc tip qua cngSerial0/0/1)Holdtime : 124 secVersion :

    Cisco Internetwork Operating System SoftwareIOS (tm) 2500 Software (C2500-I-L), Version 12.1(26), RELEASE SOFTWARE (fc1)Copyright (c) 1986-2004 by cisco Systems, Inc.Compiled Sat 16-Oct-04 02:44 by cmong (Thng tin vhiu hnh ca thit blin kt)advertisement version: 2-------------------------Device ID: TTG2(thit blin kt trc tip l TTG2)Entry address(es): IP address: 192.168.1.1(a chcng lin kt)Platform: cisco 2500, Capabilities: Router(loi thit blin kt l Cisco Router 2500)Interface: Serial0/0/0, Port ID (outgoing port): Serial0/0/0 (lin kt qua cng Serial0/0/0)Holdtime : 168 sec (thi gian gigi tin l 168 sec)

    Version :Cisco Internetwork Operating System SoftwareIOS (tm) 2500 Software (C2500-I-L), Version 12.1(26), RELEASE SOFTWARE (fc1)Copyright (c) 1986-2004 by cisco Systems, Inc.Compiled Sat 16-Oct-04 02:44 by cmong(Thng tin chi tit vphin bn v hiuhnh ca thit b)advertisement version: 2

    LnhShow CDP: hin ththng tin CDP vtimer v hold-time.TTG1#show cdpGlobal CDP information:

    Sending CDP packets every 60 seconds(gi cdp c gi mi 60 second)Sending a holdtime value of 180 seconds (thi gian gigi tin l 180 second)Sending CDPv2 advertisements is enabled

    Lnh Show CDP interface : hin ththng tin CDP v tng cng,cch ng gi v ctimer,hold-time.

  • 5/28/2018 Lab Tong Hop CCNA

    108/298

    108

    TTG1#show cdp intEthernet0 is administratively down, line protocol is down (cng Ethernet0 down dokhng c thit blin kt trc tip)Encapsulation ARPA (cch ng gi packet)

    Sending CDP packets every 60 secondsHoldtime is 180 secondsSerial0/0/0 is up, line protocol is up(cng Serial0/0/0 up do co thit blin kt trc tip)Encapsulation HDLC (cch ng gi packet)Sending CDP packets every 60 secondsHoldtime is 180 seconds

    Serial0/0/1 is up, line protocol is up (cng Serial0/0/1 up do c thit blin kt trc tip)Encapsulation HDLC(cch ng gi packet)Sending CDP packets every 60 secondsHoldtime is 180 seconds

    Lu :ta c thdng lnhno cdp enablett chCDP trn cc interface,v lc nylnh show CDP interface skhng hin ththng tin CDP trn interface .Nu mun bt li chCDP trn interface no ta dng lnh CDP enabletrn interface .TTG1(config)#interface serial 0/0/0TTG1(config-if)#no cdp enable (tt chCDP trn interface Serial0/0/0)TTG1(config-if)#^ZTTG1#show cdp inter01:32:44: %SYS-5-CONFIG_I: Configured from console by consoleEthernet0 is administratively down, line protocol is downEncapsulation ARPASending CDP packets every 60 seconds

    Holdtime is 180 secondsSerial0/0/1 is up, line protocol is upEncapsulation HDLCSending CDP packets every 60 secondsHoldtime is 180 seconds (thng tin vcng Seria0/0/0 khng hin thsau khi tt ch cdp

    trn n)

    Nu mun bt li chCDP trn interface no ta dng lnh CDP enabletrn interface .TTG1(config)#interface serial 0/0/0TTG1(config-if)#cdp enableTTG1(config-if)#exit

    LnhShow CDP traffic : hin thbm CDP bao gm slng gi packet gi, nhnv bli.TTG1#show cdp trafficCDP counters :

    Total packets output: 128, Input: 115

  • 5/28/2018 Lab Tong Hop CCNA

    109/298

    109

    Hdr syntax: 0, Chksum error: 0, Encaps failed: 9No memory: 0, Invalid packet: 0, Fragmented: 0CDP version 1 advertisements output: 0, Input: 0CDP version 2 advertisements output: 128, Input: 115

    LnhClear CDP counter :dng reset lai bm CDP. Lnh No CDP run :tt hon ton chCDP trn RouterTTG1(config)#no cdp runTTG1(config)#^ZTTG1#show cdp (lnh show cdp khng hp lkhi tt chcdp)% CDP is not enabled Lnh CDP run:dng mli chCDP trn RouterTTG1(config)#cdp runTTG1(config)#exitTTG1#show cdp

    Global CDP information:Sending CDP packets every 60 secondsSending a holdtime value of 180 secondsSending CDPv2 advertisements is enabled

    Lu :Giao thc CDP chcho ta bit c thng tin ca nhng thit bc lin kt trc tip.TTG3#show cdp neighbors detail-------------------------Device ID: TTG1Entry address(es):IP address: 192.168.2.2

    Platform: cisco 2500, Capabilities: Router

    Interface: Serial0/0/1, Port ID (outgoing port): Serial0/0/1Holdtime : 138 secVersion :Cisco Internetwork Operating System SoftwareIOS (tm) 2500 Software (C2500-JK8OS-L), Version 12.2(1d), RELEASE SOFTWARE (fc1)Copyright (c) 1986-2002 by cisco Systems, Inc.Compiled Sun 03-Feb-02 22:01 by sraniadvertisement version: 2

    - T Router TTG3 ch xem c thng tin ca thit b ni trc tip l Router TTG1. Gi s tathay ia ch IP ca cng Serial0/0/1 router TTG3

    TTG3(config)#interface serial 0/0/0TTG3(c