Thứ Sáu, 25 tháng 4, 2008

Các lệnh dùng trong thi thực hành

Cấu hình 1 Router :

Router>enable
Router#erase startup-config
Would you like to enter the initial configuration dialog? [yes/no]: no
Would you like to terminate autoinstall? [yes]:
Press Enter to accept default.
Router#Reload
Router#config ter
Router(config)#hostname R1

No IP domain lookup:
R1(config)#no ip domain-lookup
R1(config)#

Password Enable
R1(config)#enable secret class

Đặt Banner
R1(config)#banner motd & Nguy Hiểm

Password Line console
R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#

Password telnet
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#

Cấu hình địa chỉ cho các Interface :
FastEthernet :
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
Serial:
R1(config-if)#interface serial 0/0/0
R1(config-if)#ip address 192.168.2.1 255.255.255.
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown

Cấu hình cổng xong save lại:
R1(config-if)#end
R1#copy running-config startup-config
Building configuration...

Xong dung các lệnh Show xem lại 1 lần nữa các thong số đã cài đặt:
R1#show ip interface brief
R1#show run
R1#show inter Fa0
….
Các lệnh Rip:

R1(config)#router rip
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.2.0
R1(config-router)#end
R1#debug ip rip
R1#undebug all
R1(config)#no router rip
Passive cổng
R1(config-router)#passive-interface fastethernet 0/0
R1(config-router)#end

Cấu hình tỉnh để R2 ra net tới R3
R3(config)#ip route 172.30.0.0 255.255.252.0 serial0/0/1
R2(config)# ip route 0.0.0.0 0.0.0.0 serial 0/0/1
R2(config)#router rip
R2(config-router)#default-information originate
R2(config-router)#

Các lệnh dùng trong EIGRP
I
Cấu hình
R3(config)#router eigrp 1
R3(config-router)#network 192.168.1.0
R3(config-router)#network 192.168.10.4 0.0.0.3

Đặt BW
R2(config)#interface serial0/0/0
R2(config-if)#bandwidth 64
R2(config)#interface serial0/0/1
R2(config-if)#bandwidth 1024

Nếu chia IP ko thể Sumary thì nên set lại:
R1(config)#router eigrp 1
R1(config-router)#no auto-summary

Khi no auto summary thì vẫn có thể auto 1 nhánh mạng nào đó bằng tay:
R3(config)#interface serial0/0/0
R3(config-if)#ip summary-address eigrp 1 192.168.0.0 255.255.252.0
R3(config-if)#interface serial0/0/1
R3(config-if)#ip summary-address eigrp 1 192.168.0.0 255.255.252.0
R3(config-if)#

Cấu hình vạch đường tỉnh:
R2(config)#ip route 0.0.0.0 0.0.0.0 loopback1
R2(config)#router eigrp 1
R2(config-router)#redistribute static
R2(config-router)#

Các lệnh dùng trong OSPF

Cấu hình

R3(config)#router ospf 1
R3(config-router)#network 172.16.1.32 0.0.0.7 area 0
R3(config-router)#network 192.168.10.4 0.0.0.3 area 0

Kiểm tra

R3#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.10.10
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4

R3#show ip ospf
Routing Process "ospf 1" with ID 192.168.10.10
Supports only single TOS(TOS0) routes
Supports opaque LSA
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
R3#show ip ospf interface
FastEthernet0/0 is up, line protocol is up
Internet address is 172.16.1.33/29, Area 0
Process ID 1, Router ID 192.168.10.10, Network Type BROADCAST, Cost:
1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 192.168.10.10, Interface address 172.16.1.33
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:00
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)

R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address
Interface
10.3.3.3 0 FULL/ - 00:00:30 192.168.10.6
Serial0/0/1
10.2.2.2 0 FULL/ - 00:00:33 192.168.10.2
Serial0/0/0
Đặt lại địa chỉ Loopback và Reload Router để thay đổi Ruoter ID
R1(config)#interface loopback 0
R1(config-if)#ip address 10.1.1.1 255.255.255.255

Đặt thẳng Router ID
R1(config)#router ospf 1
R1(config-router)#router-id 10.4.4.4

Reload or use “clear ip ospf process” command, for this to take effect
R1#(config-router)#end
R1# clear ip ospf process
Reset ALL OSPF processes? [no]:yes

Xem Cost OSPF
R1#show interfaces serial0/0/0
Serial0/0/0 is up, line protocol is up (connected)
Hardware is HD64570
Internet address is 192.168.10.1/30
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load

Đặt lại BW:
R2(config)#interface serial0/0/0
R2(config-if)#bandwidth 64

Đặt thẳng Cost:
R3(config)#interface serial0/0/0
R3(config-if)#ip ospf cost 1562

Configure a static default route on the R1 router.
R1(config)#ip route 0.0.0.0 0.0.0.0 loopback1

Use the default-information originate command to include the static route
in the OSPF updates that are sent from the R1 router.
R1(config)#router ospf 1
R1(config-router)#default-information originate

Cấu hình Hello và Dead time: Lưu ý thay đổi giá trị này Router mất lien lạc ngay
R1(config)#interface serial0/0/0
R1(config-if)#ip ospf hello-interval 5
R1(config-if)#ip ospf dead-interval 20

Đặt priority: lớn sẽ là DR kế đến là BDR và tiếp là DROther.
R1(config)#interface fastEthernet0/0
R1(config-if)#ip ospf priority 255
R1(config-if)#end

Không có nhận xét nào: