Cau Hinh CCNA

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

OSPF. 1. Cu hnh c bn Router(config)#router ospf process ID Router(config-router)log-adjacency-change Router(config-router)#network Network_number Wildcard_mask area_ID 2.

Cu hnh priority cc interface bu DR v BDR Priority cng ln th kh nng c bu lm DR cng cao, ngc vi bu Root brige ca Switch, cng nh th li cng c bu. Router(config)#interface fastethernet 0/0 Router(config-int)#ip ospf priority 55 Sau khi cu hnh xong priority c th kim tra bng lnh. Router# show ip ospf interface f0/0 3. Chnh sa li OSPF cost metric trong mi interface Cost cng nh th tuyn cng c coi l best path Router(config-int)#ip ospf cost 1 4.Cu hnh OSPF Authentication cc interface v p dng vo router Authentication key c hiu nh l password cc router trong cng mt vng chia s vi nhau. R(config-router)#area 0 authen ---> clear text R(config-router)#area 0 anthen message-digest - md5 a.Cu hnh authentication n gin Router(config-if)#ip ospf authentication-key password Router(config-router)#area area number authentication b.Cu hnh authentication theo dng m ho, bo mt cao. Router(config-if)ip ospf message-digest-key key ID md5 encryption-type key Router(config-router)#area area ID authentication message-digest 5.Cu hnh OSPF timer trong cc interface Router(config-if)ip ospf hello-interval timer Router(config-if)ip ospf dead-interval timer 6.Cu hnh qung b mt tuyn mc nh trong OSPF Router(config-router)#default-information originate 7.Qung b mt tuyn khc (khng phi l default) Router(config-router)#redistribute protocols subnets 8.Cc lnh show dng kim tra cu hnh OSPF

show ip protocol show ip route show ip ospf show ip ospf interface show ip ospf database show ip ospf neighbor detail clear ip route * debug ip ospf events debug ip ospf adj

EIGRP 1.Cu hnh c bn. Router(config)#router eigrp autonomous number Router(config-router)#network network number Router(config-router)#eigpr log-neighbor-changes (Khng c cng c) Router(config-router)#no auto-summary 2.Thay i bng thng v t tng hp tuyn trong interface Router(config-if)#bandwidth kilobits Router(config-if)#ip summary-address protocol AS network number subnets mask 3.Cn bng ti trong EIGRP Router(config-router)#variance number 4.Qung b default route Cch 1: Router(config)#ip route 0.0.0.0 0.0.0.0 Router(config)#redistribute static Cch 2: Router(config)#ip default-network network number Cch 3: Router(config-if)#ip summary-network eigrp AS number 0.0.0.0 0.0.0.0 5.Qung b cc tuyn khc trong EIGRP (khng phi l default) Router(config-router)#redistribute protocol process ID metrics k1 k2 k3 k4 k5 Ex: Router(config-router)#redistribute ospf metrics 100 100 100 100 100 6.Chia s traffic trong EIGRP Router(config-router)#traffic share {balanced/min} 7.Cc lnh kim tra cu hnh EIGRP show ip eigrp neighbor

show ip eigrp interface show ip eigrp topology show ip eigrp traffic debug eigrp fsm debug eigrp packet

EIGRP OSPF : R(config)#router ospf 1 R(config-router)#resdistribute eigrp AS_number subnets R(config-router)#default-metric 2 OSPF EIGRP : R(config)#router eigrp AS_number R(config-router)#resdestribute ospf 1 R(config-router)#default metric 128 10 100 100 1000 OSPF RIPv.2 R(config)#router ospf 1 R(config-router)#resdistribute rip subnets R(config-router)#defaul-metric 2 RIPv.2 OSPF : R(config)#router rip R(config-router)#version 2 R(config-router)#resdestribute ospf 1 R(config-router)#default metric 2

Phn 2. Switching - Chuyn mch

1.Cu hnh c bn chung cho mt Switch Reset tt c cu hnh ca Switch v reload li. Switch#delete flash:vlan.dat Switch#erase startup-config Switch#reload 2.Cu hnh v Security v management Switch(config)#hostname <ten SW> Switch(config)#line console 0 Switch(config-line)#password <mt khu> Switch(config-line)#login Switch(config)#line vty 0 4 Switch(config-line)#pass <mt khu> Switch(config-line)#login 3.Thit lp a ch IP v default gateway cho Switch Switch(config)#interface vlan1 Switch(config-int)#ip address a ch subnetmask Switch(config)#ip default-gateway a ch

4.Thit lp tc v duplex ca cng

Switch(config-int)#speed tc Switch(config-int)#duplex full 5.Thit lp dch v HTTP v cng Switch(config)#ip http server Switch(config)#ip http port 80 6.Thit lp, qun l a ch MAC Switch(config)#mac-address-table static a ch MAC interface fastethernet s vlan Switch#show mac-address-table Switch#clear mac-address-table 7.Cu hnh bo mt cho cng Switch(config-if)#switchport mode acess Switch(config-if)#switchport port-security Cu hnh Static: Switch(config-if)#switchport port-security mac-address a ch Mac Cu hnh Sticky: Switch(config-if)#switchport port-security mac-address sticky [i](thng dng nht) Switch(config-if)#switchport port-security maximum value Switch(config-if)#switchport port-security violation shutdown 8.To Vlan Cch 1. Switch#vlan database Switch(vlan)#vlan number Cch 2. Khi gn cc cng vo vlan, d vlan cha tn ti nhng Switch vn t to. Switch(config)#interface fastethernet 0/0 Switch(config-int)#switchport access vlan vlan-id Mun xo vlan ta lm nh sau: Switch(config-if)#no switchport access vlan vlan-id Switch#clear vlan vlan_number (xo ton b vlan ) 9.Gn nhiu cng vo trong vlan cng mt lc, cu hnh Range i vi dy cng khng lin tc. Switch(config)#interface range cng 1 , cng 2 , cng 3 i vi mt dy lin tc. Switch(config)#interface range cng 1-n Switch(config-range)#switchport access vlan vlan-id

V d:

Switch(config)#interface range f0/0 , f0/2 , f0/4 Switch(config)#interface range f0/0-10 Switch(config-range)#switchport access vlan 10 10.Cu hnh Trunk Switch(config-if)#switchport mode trunk Switch(config-if)#switchpor trunk encapsulation encapsulation-type Switch#show trunk 11.Cu hnh VTP Switch#conf t Switch(config)#vtp v2 Switch(config)#vtp domain tn domain Switch(config)#vtp {server/client/transperant} Switch(config)#vtp password password (To pass cho domain) Switch#show vtp status 12.Cu hnh Inter-Vlan trn Router Router(config)#interface fastethernet 0/0.1 Router(config-subif)#encapsulation type Router(config-subif)#ip address a ch subnetmask

You might also like