+ Các chế độ cu hình:
Router> (chế độ user mode)
Router>enable (vào chế độ Privileged EXEC Mode)
Router#configure terminal (vào chế độ Configuration Mode)
+ Cu hình đặt tên và password cho router:
Router(config)#hostname tên_mun_đặt (đặt tên cho router)
Router(config)#enable password pass_mun đặt (cu hình pass ko mã hóa)
Router(config)#enable secret pass_mun_đặt (cu hình pass được mã hóa bng MD5)
+ Cu hình các đường truy cp (console, aux và vty)
- Cu hình cng console:
Router(config)#line console 0
Router(config-line)#password pass_cho_cng_console (có th khác pass ca router)
Router(config-line)#login (bt buc phi có để chế độ đt pass cho cng console có hiu lc)
- Cu hình cng aux:
Router(config)#line aux 0
Router(config-line)#password pass_cho_cng_aux (có th khác pass ca router)
Router(config-line)#login (bt buc phi có để chế độ đt pass cho cng console có hiu lc)
- Cu hình cng vty (cng telnet)
Router(config)#line vty 0 15 (ch cu hình 16 đường telnet trong 1 thi đim).
Router(config-line)#password pass_cho_cng_vty (có th khác pass ca router)
Router(config-line)#login (bt buc phi có để chế độ đt pass cho cng vty có hiu lc)
+ Câu lnh để mã hóa tt c mt khu:
Router(config)#service password-encryption
+ Cu hình địa ch ip cho interface:
Router(config)#interface tên_cng (vào interface)
Router(config-if)#no shutdown (cho phép interface hot động)
Router(config-if)#clock rate 64000 (đặt thi gian đồng b gia 2 router, ch dùng vi đường serial)
Router(config-if)#ip address địa_ch_ip subnet_mask (đặt địa ch ip cho interface)
+ Cu hình static route:
Có 2 cách cu hình Static Route, đó là cu hình theo "next hop"address và exit interface.
- Cu hình theo "next hop" address:
Router(config)#ip route địa_ch_mng_mun_qung_bá subnet_mask
địa_ch_ip_ca_interface_ni_vi_mng _mun_qung_bá.
- Cu hình theo exit interface:
Router(config)#ip route địa_ch_mng_mun_qung_bá subnet_mask
interface_ni_vi_mng_mun_qung_bá.
+ Cu hình đường default route:
Router(config)#ip route 0.0.0.0 0.0.0.0 [exit interface/ip address].
+ Cu hình RIP:
Router(config)#router rip (dùng giao thc định tuyến RIP)
Router(config-router)#network địa_ch_ip (địa ch mng mun qung bá bng giao thc RIP)
Router(config-router)#passive-interface tên_cng (thông tin định tuyến RIP ko đc gi ra cng này)
Router(config-router)#version 2 (dùng RIP version 2,mc định là version 1)
+ Cu hình EIGRP :
1.Cu hình cơ bn.
Router(config)#router eigrp eigrp_mun_đặt ( 1->65535)
Router(config-router)#network IP_mng_mun_qung_bá
Router(config-router)#no auto-summary (ko t ghép các di địa ch IP thành 1 di ln)
- Thay đổi băng thông và t tng hp tuyến trong interface
Router(config-if)#bandwidth kilobits
Router(config-if)#ip summary-address protocol AS network number subnets mask
- Cân bng ti trong EIGRP
Router(config-router)#variance number
- Qung bá default route
Cách 1:
Router(config)#ip route 0.0.0.0 0.0.0.0 [interface/nexthop]
Router(config)#redistribute static
Cách 2:
Router(config)#ip default-network network number
Cách 3:
Router(config-if)#ip summary-network eigrp AS number 0.0.0.0 0.0.0.0
- Qung bá các tuyến khác trong EIGRP (không phi là default)
Router(config-router)#redistribute giao_thc_mun_qung_bá ID_metrics k1 k2 k3 k4 k5
Ví d: Router(config-router)#redistribute ospf metrics 100 100 100 100 100
- Chia s traffic trong EIGRP
Router(config-router)#traffic share {balanced/min}
- Các lnh kim tra cu hình EIGRP
show ip eigrp neighbor
show ip eigrp interface
show ip eigrp topology
show ip eigrp traffic
debug eigrp fsm
debug eigrp packet
+ OSPF:
- Cu hình cơ bn
Router(config)#router ospf ospf_mun_chn ( 1->65535)
Router(config-router)#network di_đại_ch_mun_qung_bá Wildcard_mask area_ID (thường là
area 0)
- Cu hình priority các interface để bu DR và BDR
Priority càng ln thì kh năng được bu làm DR càng cao, ngược vi bu Root brige ca Switch,
càng nh thì li càng được bu.
Router(config)#interface fastethernet 0/0
Router(config-int)#ip ospf priority 55
Sau khi cu hình xong priority có th kim tra bng lnh.
Router# show ip ospf interface f0/0
- Chnh sa li OSPF cost metric trong mi interface
Cost càng nh thì tuyến đó càng được coi là best path
Router(config-int)#ip ospf cost 1
- Cu hình OSPF Authentication các interface và áp dùng vào router
Authentication key được hiu như là password để các router trong cùng mt vùng chia s vi
nhau.
a. Cu hình authentication đơn gin
Router(config-if)#ip ospf authentication-key password
Router(config-router)#area area number authentication
b. Cu hình 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
- Cu hình OSPF timer trong các interface
Router(config-if)ip ospf hello-interval timer
Router(config-if)ip ospf dead-interval timer
- Cu hình qung bá mt tuyến mc định trong OSPF
Router(config-router)#default-information originate
- Qung bà mt tuyến khác (không phi là default)
Router(config-router)#redistribute protocols subnets
- Các lnh show dùng để kim tra cu hình 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
(internet)
Xem các bài viết cùng chuyên mc:
Np ios cho switch
Khôi phc IOS cho Router bng Xmodem
Tìm hiu DHCP – Dynamic Host Configuration...
Chng minh dch v SSH an toàn khi s dng
Chng minh dch v Telnet không an toàn khi...
Cisco port fast Tech
Qun lý port switch và port security
Lab VLSM - ng Dng Summary - Định Tuyến...
Cu hình Summary dùng giao thc Routing ...
Cu hình Summary dùng giao thc Routing ...
Copy dòng bên dưới để gi bài viết: Mt s câu lnh cu hình cơ bn trên Router CISCO cho bn bè
____________________________