songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905
http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 1/14 Lab_Cisco_H tng mng_CCNA_CCNSP Cho cc bn n vi Blog chia s trao i kinh nghim v hc tp 17-05-2012 CU LNH &THNG S CU HNH ROUTER _SWC BN CU LNH CU HNH ROUTER C BN Khi nim c bn Route > User EXEC mode Router # Privilege mode Router(config)# Global Config mode Cc bc khi ng R Thot (config)#exit (config)#end | 5/29/2014 6:00:53 PM Ch tch nc: 'Kt qu m phn Vit - Trung l tch cc' - Ngy 24 thng 6 nm 2013 - Hi Phng hng nhiu thit hi do bo Bebinca - Ngy 24 thng 6 nm 2013 - Cng cha xinh p nht chu u khng mng ngi bu - Ngy 24 thng 6 nm 2013 - N gip vic thnh 'i gia' khi trm tin ca ng b ch - Ngy 24 thng 6 nm 2013 - MC xinh p t quan chc gi la tnh - Ngy 24 thng 6 nm 2013 - TRANG CH - VNEXPRESS.NET Tm kim TM KIM BLOG NY Chia s 4
Lin kt khc
Blog tip theo To Blog
ng nhp Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 2/14 (config)#(nhn t hp phm Ctr+Z) show run //(hin th file cu hnh ang chy ) show ip interface brief //Xem trng thi cc cng show ip route show version IOS lu trn Flash &RAM show start up-config NVRAM show running-config RAM kim tra cu hnh Xo cu hnh c v khi ng li R1#erase startup-config R1#reload. Lu cu hnh t RAM ca router n NVRAM ca router Router#copy running-config startup-config Router#write memory Copy cu hnh t NVRAM n RAM, dng trong mc ch recovery password Router#copy startup-config running-config Khc phc li tm config file qua TFTP Router(config)#no service config Router(config)#wr Router(config)#reload Lnh Ping Router#ping 192.168.12.2 Router(config)#do ping 192.168.12.2 Ping host name R1(config)#ip host R2 192.168.12.2 R1#ping R2 t tn R1>en //vo ch Privilege mode R1#conf t //vo ch Config mode R1(config)#hostname TRAVINH //(t tn cho router) Password R1(config)#no ip domain-lookup //(tt chc nng phn gii tn min) R1(config)#enable password 123 //(kch hot password mode priviledge) R1(config)#enable secrec 456 //(pass c m ha MD5) R1(config)#service password-encryption //(m ha ton b password) R1(config)#security passwords min-length 10 // pas ti thiu 10 k t Thit lp banner khi ng nhp vo Router (config)#banner motd "CHAO MUNG ADMINISTRATOR " (config)# no banner login //(b banner) ===================================================================== Thit lp Password cho cc cng Line console (config)#line console 0 (config-lin )#password cisco1 (config-line)#login 2012 (16) thng nm (1) CU LNH &THNG S CU HNH ROUTER _SWC BN thng by (11) thng chn (2) thng mi (2) NHT K BLOG Nhc1 Nhac2 H TR TRC TUYN Admin LIN KT Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 3/14 (config-line)#exec time out {pht} {giy} // 0 0 th mn hnh console khng bao gi logout (config-line)#logging synchronous //Trn mn hnh console khng cn hin tng b mt con tr Aux (config)#line aux 0 (config)#password cisco2 (config)#login Telnet (config)#line vty 0 4 //16 ng trong cng 1 thi im (config-line) #password cisco3 (config-line)#login (config-line)#exec time out 0 0 (config-line)# login authentication default SSH {PC mun SSH phi dng thm phn mm Putty, PC l SSH server th dng OpenSSH} To User Pass R(config)# username Admin01 password Admin01 To domain kt hp RSA pht sinh key R(config)#ip domain-name ccnasecurity.com Dng thut ton RSA to cp key //(Mc nh 512 bit, ti a 2048 bit) R(config)#crypto key generate rsa 1024 p vo cng o vty (config-line)#transport input ssh R(config)#ip ssh authentication-retries 2 R(config)#ip ssh time-out 90 R(config)#ip ssh version 2 xem version ssh R# show ip ssh ==================================================================== M t kt ni ca cc cng vt l trn Router V d: cng Fast Ethernet 0/0 (config)#interface fa 0/0 (config-if)#description "ket noi toi mng Lan SaiGon " Lnh gn a ch ip cho cc cng vt l. Cng fa0/0 (config)#interface fa 0/0 (config-if)#ip add 192.168.1.254 255.255.255.0 (config-if)#no shutdown (config-if)#description "ket noi toi mng Lan 192.168.1.1 " Cng Serial 0/0 (config)#interface S0/0 (config-if)#ip add 192.168.1.254 255.255.255.252 (config-if)#no shutdown (config-if)#description "ket noi toi R2 " config-if)#clock rate 64000 Trng hp cu hnh sai a ch ip, xa b bng cu lnh (config-if)#no ip address Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 4/14 Lnh kim tra xem u kt ni serial l DTE ,DCE # show controller serial 0/0/0 # show run # show interface s0/0 Lnh cp xung clock (ch s dng cho DCE) (config)#interface s0/0 (config-if)#clock rate 64000 { 9600,19200,56000,64000,115200,nhng con s c nh sn lun l bi s ca 9600 bps. lnh clockrate, s lm thay i tc truyn d liu v xung nhp cao th d liu s c truyn vi tc cao hn.} Tt CDP trn int f0/0 ca R1 R1(config)#int f0/0 R1(config-if)#no cdp enable R1 h tr cu hnh bng giao din web (SDM) R1(config)#ip http server #ip http secure-server #ip http authentication local #username Admin01 privilege 15 password Admin01 Cho php cng Ethernet vn up khi khng kt ni vi bn ngoi R1(config-if)# no keepalive ===================================================================== DHCP Lnh cp pool DHCP cho mng LAN (config)#ip dhcp pool LAN1 //tn pool (dhcp-config)#network 192.168.1.0 255.255.255.0 //lp mang mun cp (dhcp-config)#defautl-router 192.168.1.1 //IP GW (dhcp-config)#dns-server 8.8.8.8 config)#ip dhcp excluded-address 192.168.3.1 192.168.3.9 //gii hn Lnh cp pool DHCP cho mng VLAN vd: Router(config)#in f0/0.100 Router(config-subif)#encapsulation dot1Q 100 Router(config-subif)#ip address 192.168.100.1 255.255.255.192 Router(config)#ip dhcp pool vlan100 Router(dhcp-config)#network 192.168.100.0 255.255.255.192 Router(dhcp-config)#default-router 192.168.100.1 Router(dhcp-config)#dns-server 8.8.8.8 DHCP relay (config)#interface fa 0/0 (config-if)#ip helper-address 192.168.1.1 // IP server Xa DHCP (config)#no ip dhcp pool ID (LAN1,LAN2) Kim tra vic cp IP RI#show ip dhcp binding Gii hn dy a ch IP khng cp Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 5/14 (config)#ip dhcp excluded-addresss 192.168.1.1 192.168.1.15 Cp ring cho 1 my (config)#client-address (a ch MAC ca my tinh) (config)#host 192.168.100.100 Xin ip t ng Router(config)#in f0/0 Router(config-if)#ip add dhcp ////////////////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ NH TUYN Qung b default router R(config-router)#default-information originate Router(config)#ip route 0.0.0.0 0.0.0.0 [interface/nexthop] Router(config)#redistribute static Router(config)#ip default-network network number Router(config-if)#ip summary-network eigrp AS number 0.0.0.0 0.0.0.0 Static router (config)#ip route ip mng ch subnet mask mng ch a ch nexthop ( interface ra). Router(config)#Ip route 192.168.1.0 255.255.255.0 192.168.0.1 Router(config)#Ip route 0.0.0.0 0.0.0.0 192.168.0.1 //default
Router(config)#ip route 0.0.0.0 0.0.0.0 s1/0 Ripv1 Router(config)#router rip Router(config)#network 192.168.1.0 Router(config)#network 192.168.2.0 Ripv2 Router(config)#router rip Router(config)#version 2 Router(config)#network 192.168.1.0 Router(config)#network 192.168.2.0 Router(config)#no auto-summary Xa no route rip //xa bng nh tuyn Clear ip route * //xa ht Clear ip route 192.168.2.0 //xa network Xem qu trnh gi nhn thng tin nh tuyn RIP R2#debug ip rip R2# debug ip routing R2# logging console debug Tt ch debug bng lnh undebug all R2# u all Khng cho gi thng tin nh tuyn RIP trn Serial0 passiveinterface Serial0 Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 6/14 RIP ch h tr classfull nn khng gi i thng tin v subnet mask trong cc routing update. R1 gi thng tin v mng 172.16.16.0 n R2, R1 s thc hin summary mng ny v dng classfull 172.16.0.0 . R2 kt ni trc tip vi mng 172.16.17.0 th s hiu mng ny l 172.16.0.0. Khi R2 nhn thng tin v mng 172.16.0.0, n s loi b bn tin update ny v mng ny c trong bng nh tuyn vi metric cao hn. gii quyt vn ny ta s dng a ch secondary trn cng kt ni gia R1 v R2 {a ch ny phi thuc mng ln trong mng discontiguous network v phi cng SM}. R1(config)# int s0 R1(config-if)# ip address 130.1.3.1 255.255.255.0 secondary R2(config)#int s0 R2(config-if)# ip address 130.1.3.2 255.255.255.0 secondary ====================================================================== EIGRP { Enhanced Internet Gateway Routing Protocol } Router(config)#route eigrp 100 //AS Number <1-65535>Autonomous system Router(config)#network 192.168.1.0 Router(config)#network 192.168.2.0 Router(config)#no auto-summary //(ko t ghp cc di a ch IP thnh 1 di ln) R(config)#no logging console // tt *Mar .................//ch lm trn lab Show Show ip route eigrp show ip eigrp neighbor show ip eigrp interface show ip eigrp topology show ip eigrp traffic debug eigrp fsm debug eigrp packet Thay i bandwidth ,delay Router(config)#in s0/0 Router(config)#ban (.2 n ) Router(config)#del 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 { Lnh bandwidth to mt tham s u vo tnh ra composite metric (ca IGRP). khi bandwidth cng ln th metric tnh ra cng nh, nh vy con ng s c tin cy cao hn, v s c u tin so vi cc con ng khc n cng mng ch router chn update vo bng nh tuyn. } 1. EIGRP l mt giao thc dng Distance vector c ci tin.khng s dng thut ton truyn thng Bellman Ford m s dng mt thut ton ring c pht trin bi J.J. Garcia Luna Aceves thut ton DUAL khin cho EIGRP c tc hi t rt nhanh. 2. Ch s AD ca EIGRP l 90 cho cc route internal v 170 cho cc route external. 3. ngay khi bt EIGRP trn mt cng, router s gi cc gi tin hello ra khi cng thit lp quan h lng ging vi router kt ni trc tip vi mnh.Gi tin hello c gi n a ch multicast l 224.0.0.10 vi gi tr hello timer l 5s/ln.( Hold timer 15s) 4. K kt ni neighbor Gi tr AS c cu hnh trn mi router. Cc a ch u ni gia hai router phi cng subnet. Tha mn cc iu kin xc thc. Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 7/14 Cng b tham s K. ( Metric = {10^7/Bandwidth min + Delay}*256) 5. FD Feasible Distance :gi tr metric t router ang xt i n mng ch. 6. AD Advertised Distance :gi tr metric t router lng ging (next hop) i n cng mng ch 7. Successor: ng i n mt ch c lu trong bng topology, ng no c FD nh nht 8. Feasible Successor: Trong tt c cc ng cn li c FD > FD ca Successor, ng no c AD < FD ca successor, ng s c chn lm d phng cho Successor. 9. Mt s gi tr mc nh c quy nh cho mt s loi cng thng s dng trn router: Ethernet: Bandwidth = 10Mbps; Delay = 1000 Micro second. Fast Ethernet: Bandwidth = 100Mbps; Delay = 100 Micro second. Serial: Bandwidth = 1,544Mbps; Delay = 20000 Micro second. Cn bng ti trn nhng ng khng u nhau (Unequal Cost Load balancing). R(config)#router eigrp AS number R(config-router)#variance 4 Xc thc MD5 vi EIGRP R(config-keychain)#key key-id R(config-keychain-key)#key-string password R(config-keychain-key)#accept-lifetime start-time {infinite | end-time | duration seconds} R(config-keychain-key)#send-lifetime start-time {infinite | end-time | duration seconds} bt xc thc trn cc cng u ni R(config-if)#ip authentication mode eigrp AS md5 R(config-if)#ip authentication key-chain eigrp AS tn-key-chain v d : R1(config)#key chain R1chain R1(config-keychain)#key 1 R1(config-keychain-key)#key-string R1R2KEY R1(config)#int s0/0/0 ///cng ni vi R2 R1(config-if)#ip authentication mode eigrp 100 md5 R1(config-if)#ip authentication key-chain eigrp 100 R1chain R2(config)#key chain R2R1chain R2(config-keychain)#key 1 R2(config-keychain-key)#key-string R1R2KEY R2(config)#int s0/0/0 ///cng ni vi R1 R2(config-if)#ip authentication mode eigrp 100 md5 R2(config-if)#ip authentication key-chain eigrp 100 R2R1chain Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 8/14 R2(config)#key chain R2R3chain R2(config-keychain)#key 1 R2(config-keychain-key)#key-string R2R3KEY R2(config)#int s0/0/1 ///cng ni vi R3 R2(config-if)#ip authentication mode eigrp 100 md5 R2(config-if)#ip authentication key-chain eigrp 100 R2R3chain R3(config)#key chain R3chain R3(config-keychain)#key 1 R3(config-keychain-key)#key-string R2R3KEY R3(config)#int s0/0/0 ///cng ni vi R2 R3(config-if)#ip authentication mode eigrp 100 md5 R3(config-if)#ip authentication key-chain eigrp 100 R3chain ==================================================================== OSPF {Open Shortest Path First} l mt giao thc link state,c AD = 110. 7 trng thi R(config)#router ospf process-id R(config-router)#network a ch IP wildcard-mask area area-id Router(config)#route ospf 1 Router(config)#network 192.168.1.0 0.0.0.255 area 0 // <1-65535> Process ID //IP ng mng ,Wildcard mask ,area ID Xa route No route ospf 1 clear ip route * Show Show ip ospf in f0/0 show ip ospf neighbor show ip route ospf show ip protocol show ip route show ip ospf show ip ospf interface show ip ospf database show ip ospf neighbor detail debug ip ospf events debug ip ospf adj Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 9/14 Cu hnh priority cc interface bu DR v BDR Router(config)#interface fastethernet 0/0 Router(config-int)#ip ospf priority 55 Kim tra bng lnh. Router# show ip ospf interface f0/0 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 Cu hnh authentication n gin Router(config-if)#ip ospf authentication-key password Router(config-router)#area area number authentication Cu hnh authentication theo dng m ho, bo mt . Router(config-if)ip ospf message-digest-key key ID md5 encryption-type key Router(config-router)#area area ID authentication message-digest Cu hnh OSPF timer trong cc interface Router(config-if)ip ospf hello-interval timer Router(config-if)ip ospf dead-interval timer Qung b mt tuyn khc (khng phi l default) Router(config-router)#redistribute protocols subnets Hot ng ca OSPF 1. Bu chn Router id.
2. Thit lp neighbor.Gi tin c gi n a ch multicast l 224.0.0.5 .Gi tr mc nh ca hello timer vdead timer l 10s v 40s. Khi cc router gi thng tin ln cho DR v BDR s s dng a ch multicast 224.0.0.6 cn khi DR forward li thng tin xung cc router khc th s dng a ch 224.0.0.5. cc DR Other khng trao i trc tip vi nhau.
Router no nm gi gi tr : {priority 0- 255} Priority cao nht s c bu chn lm DR, {or Router id cao nht +lookback} Priority cao nh lm BDR. Priority bng 0 s m nhn vai tr l DR Other. 3. Trao i LSDB.Link State Database 4. Tnh ton xy dng bng nh tuyn. Metric = cost = 10^8/Bandwidth (n v bps). R(config-if)#bandwidth 512 Gi tr cost default ca mt s loi cng: Ethernet (BW = 10Mbps) -> cost = 10. Fast Ethernet (BW = 100Mbps) -> cost = 1. Serial (BW = 1.544Mbps) -> cost = 64 Mng loopback khi hin th trong bng nh tuyn ca cc router u c OSPF chuyn thnh /32, cho cc subnet loopback c hin th ng gi tr prefix length ta thay i kiu network type trn interface loopback thnh kiu point to point bng cu lnh: R(config)#interface loopback 0 Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 10/14 R(config-if)#ip ospf network point-to-point Cch tnh Wildcard mask Local broadcast subnet mask = Wild card mask //Local broadcast 255.255.255.255 //subnet mask 255.255.255.0 //Wild card mask 0. 0. 0. 255 (2 n -1
)ca Host ID = Wild card mask //192.168.1.0 /24 Host ID =2 8 =256 Wild card mask =(2 n -1) =256 -1 =255 ==================================================================== Redistribution gia eigrp 100 & ospf 1 router eigrp 100 redistribute ospf 1 metric 1544 20000 255 1 1500 network 172.16.0.0 no auto-summary router ospf 1 log-adjacency-changes redistribute eigrp 100 metric 1 subnets network 78.78.78.0 0.0.0.255 area 0 network 79.79.79.0 0.0.0.255 area 0 Redistribution gia eigrp 100 & igrp 200 router igrp 200 redistribute eigrp 100 metric 2000 200 255 1 1500 router eigrp 100 redistribute igrp 200 metric 2000 200 255 1 1500 Redistribution gia eigrp 100 & ripv2 router eigrp 100 redistribute rip metric 1544 200 255 1 1500 network 192.168.1.0 network 192.168.30.0 no auto-summary ! router rip version 2 redistribute eigrp 100 metric 1 network 192.168.1.0 network 192.168.20.0 BW: bng thng ca ng truyn DLY: tr delay LOAD: lu lng ca ng truyn MTU: Kch thc ln nht ca mt gi tin ==================================================================== SNMP _ Gim st Phn 1 trn thit b GS: Services.msc \ SNMP service 1. Agen :check ht + tinh + HCM Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 11/14 2. Security : Add READ ONLY tinh-ro READ WRITE tinh-rw access SNMP...... //IP my GS 1. Traps:tinh-ro + IP Phn 2 :trn Router snmp-server community tinh-ro RO snmp-server community tinh-rw RW 60 access-list 60 permit 192.168.204.154 //IP may GS Solowin// snmp-server location HCM snmp-server contact tinh snmp-server enable traps config logging 192.168.204.154 snmp-server host 192.168.204.154 version 2c tinh-ro Cu hnh Netflow trn router: #ip flow-export destination A.B.D.C 5000 //IP may GS Solowin// # ip flow-export version 5 Xc nh cng v hng c theo di: #interface fa0/1 #ip flow ingress #interface fa0/0 #ip flow egress Kim tra : R1#show ip cache flow R1#show ip cache verbose flow R1#show ip flow export Tt netflow: R1(config)#no ip flow-export destination A.B.D.C R1(config)#in f0/0 R1(config-if)#no ip route-cache flow ===================================================================== Cu hnh NAT Access-list 1 permit any Ip nat inside source-list 1 int f0/0 overload Int f0/1.1 // nat cho tung sub interface mi ra mng c Ip nat inside Int f0/1.3 Ip nat inside Int f0/1.2 Ip nat inside Int f0/0 // f0/0 la interface ket noi internet Ip nat outside HA R (config )# in f0/0 R (config )#stanby group virtua IP Ex: R(config) #stanby 10 ip 192.168.1.40 R (config )#stanby 10 prio 200 R (config )#stanby 10 pre Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 12/14 ********************************************************************************************************** CU LNH CU HNH SWITCH C BN SWITCH LAYER 3 t IP cho cng Switch (config)#inter f0/1 Switch (config-if)#no switchport Switch (config)#ip address 192.168.0.2 255.255.255.0 t ip cho Vlan Switch(config)#in vlan 100 Switch(config-if)#ip address 192.168.100.1 255.255.255.224 Show VLAN Switch (config)#do show vlan t tn VLAN cch 1: Switch (config)#vlan2 Switch (config-vlan)#name TN Switch (config-vlan)#exit t tn VLAN cch 2: Switch1#vlan database Switch1(vlan)#vlan 100 name 100 Switch1(vlan)#vlan 200 name 200 Add 1 port Switch (config)#inter f0/2 Switch (config-)#sw mo acc Switch (config)#sw acc vlan4 Switch (config)#Exit Add nhm port Switch (config)#interface range f0/13-16 Switch (config-)#sw mo acc Switch (config-)# sw acc vlan4 Switch (config-)#exit Xo Vlan Switch#delete vlan.dat Switch (config)#vtp mode server //client ,transparent Switch (config)#vtp domain chanhtinh.com Switch (config)#vtp password cisco123 Switch (config)#in f0/0 //Cng ni vi Router Switch (config)#switchport mode trunk VTP ( VLAN TRUNKING PROTOCOL ) QUN L TT C CU HNH VLAN Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 13/14 R(config )#in f0/0 //Cng ni vi SW R(config )#no sh R(config )#exit R(config )#in f0/0.100 R(config )#encap dot1Q 100 R(config )#ip add 192.168.1.0 255.255.255.192 R(config )#exit Lp li cho cc cng f0/0.200 ,f0/0.300 Show Show in trunk Show vtp pass show vtp status Server: to sa xo VLAN v thay i min ca n. Tt c thng tin VTP u c qung b n cc switch trong min. Client: khng c to sa xo VLAN .gi v ng b cho server Transparent (trong sut): chuyn tip thng tin qung b VTP nhn c ra cng trunk ca n.khng ng b vi server,to sa xo VLAN local. Trunking : kt ni trunk truyn ti lung d liu ca nhiu VLAN trn 1 kt ni duy nht . tham kho SW(config-if)#switchport trunk encapsulation dot1q SW(config-if)#switch mode trunk Bu Root brige ca Switch, cng nh th li cng c bu,gim s priority xung thp hn s Priority ca root lm root bridge, ch s priority l bi s ca 4096 . Cu lnh cho vlan 1 lm root Sw(config)#spanning-tree vlan 1 root primary sw(config)#spanning-tree vlan 1 priority 4096 Cu hnh RootBridge secondary sw(config)#spanning-tree vlan 2 root secondary Cu hnh portfast sw(config-if)#spanning-tree portfast portfast multi port sw(config)#spanning-tree portfast default // bt portfast cho all port Non Trunking Switch(config)#spanning-tree uplink fast Switch(config-if)# spanning-tree bpduguard enable sw#show spanning-tree vlan [id] Cu hnh port-security f0/2 ca Sw ch nhn MAC (AAAA.BBBB.CCCC), gn my khc th port shutdown , sau 30s t phc hi li shutdown #int f0/2 #switchport mode access #switchport port-security #switchport port-security maximum 1 #switchport port-security mac-address AAAA.BBBB.CCCC #switchport port-security violation shutdown #errdisable recovery interval 30 #errdisable recovery cause psecure-violation Ngy 29 thng 5 nm 2014 Qun tr mng ! CISCO ! songnuochuutinh30 : CU LNH &THNG S CU HNH ROUTER _SWC BNchanhtinh0905 http://songnuochuutinh30.blogspot.com/2012/05/cau-lenh-cau-hinh-router-co-ban.html 14/14 Bi ng Mi hn Trang ch c ng bi chanhtinh0905 vo lc 20:48 Switch(config-if)# switchport port-security aging time 10 Switch(config-if)# switchport port-security aging type inactivity Restore default #default interface f0/2 S1(config)#in f0/2 S1(config-if)#switchport mode access S1(config-if)#switchport port-security S1(config-if)# spanning-tree portfast S1(config-if)# spanning-tree bpduguard enable S1(config-if)# switchport port-security mac-address sticky S1(config-if)#switchport port-security mac-address sticky 0001.42CB.A602 ///////////////////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ +4 xut url ny trn Google Xem Lin kt blogs---Chia s am m CU LNH &THNG S CU HNH ROUTER _SWC BN CU LNH CU HNH ROUTER C BN Khi nim c bn Route > User EXEC mode R... Lab H tng mng _cui mn M hnh trn GNS3 (Cc Ruoter gi lp SW, cc SW ny khng lu c cu hnh) M hnh trn Packet Cu hnh Phn hoch IP c... CC BI LAB XY DNG H THNG AN NINH FIREWALL LAB 9 : CCNAS_Chp9_PTActA_Secure-Network PC_A NTP_enable_key 1 _pass:ciscontppa55 ====================== Admin01 Admin01pa55 BI NG PH BIN 14,179 TRUY CP Chanhtinh0905.blogspot.com. Mu Picture Window. Hnh nh mu ca enjoynz. Cung cp bi Blogger.