Tải bản đầy đủ (.doc) (6 trang)

Tài liệu CẤU HÌNH OSPFv3 CƠ BẢN ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (79.06 KB, 6 trang )

LAB 5: CẤU HÌNH OSPFv3 CƠ BẢN
OSPF là một giao thức định tuyến IP. Nó là một giao thức kiểu link-state, nghĩa là nó
định tuyến dựa trên trạng thái của đường link nối giữa nguồn và đích ( thông tin về
interface và mối quan hệ của nó với các thiết bị lân cận… ). Thông tin về interface gồm:
tiền tố IPv6 ( IPv6 prefix ), mask, loại mạng mà nó nối tới, các router kết nối đến mạng
đó,… Thông tin này sẽ được truyền đi trong các gói tin LSA khác nhau. Các gói tin LSA
sẽ được tập hợp lại và lưu trữ trong link-state database. Router sẽ dùng giải thuật Dijkstra
để tính toán và tạo ra bảng định tuyến OSPF
OSPFv3 cũng sử dụng các gói tin “Hello” để thiết lập quan hệ láng giềng như OSPF của
IPv4.
Trong môi trường broadcast hoặc NBMA, quá trình bình chọn DR/BDR giống như đối
với OSPF của IPv4 – nghĩa là dựa vào quyền ưu tiên. Router nào có mức ưu tiên cao nhất
sẽ được chọn làm DR, sau đó sẽ chọn BDR ( quy luật tương tự như chọn DR ). Nếu 2
router cùng mức ưu tiên, router nào có router-id cao hơn sẽ được chọn
Yêu cầu:
Router R1, R2 sử dụng OSPFv3 để định tuyến
Các PC ping được toàn bộ địa chỉ trong mạng
Các bước thực hiện:
Bước 1: Đặt địa chỉ IPv6 cho PC
Đặt IPv6 cho PC A
Kiểm tra lại địa chỉ IPv6 của PC bằng lệnh ipconfig
Thực hiện tương tự đối với PC B
Bước 2: Cấu hình địa chỉ IPv6 cho các interface của R1, R2
Trên R1:
R1(config)#interface F0/0
R1(config-if)#no shut
R1(config-if)#no keepalive
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address 2001::1/64 /* đặt địa chỉ IPv6 cho Fa0/0 */
R1(config)#interface F0/1
R1(config-if)#no shut


R1(config-if)#no keepalive
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address 2002::1/64 /* đặt địa chỉ IPv6 cho Fa0/1 */
R1(config-if)#end
Trên R2: cấu hình tương tự
Bước 3: Cho các interface tham gia vào quá trình định tuyến OSPFv3
Trên R1:
R1(config)#ipv6 router ospf 1 /* tạo ra OSPFv3 process-id 1 */
R1(config-rtr)#exit
R1(config)#interface F0/0
R1(config-if)#ipv6 ospf 1 area 100 /* cho interface F0/0 tham gia vào OSPFv3 */
R1(config-if)#exit
R1(config)#interface F0/1
R1(config-if)#ipv6 ospf 1 area 100 /* cho interface F0/1 tham gia vào OSPFv3 */
R1(config-if)#exit
R1(config)#interface L0
R1(config-if)#ipv6 ospf 1 area 100 /* cho interface L0 tham gia vào OSPFv3 */
R1(config-if)#exit
Trên R2: tương tự R1
Cấu hình tham khảo:
R1#show run
!
hostname R1
no ip domain-lookup
ipv6 unicast-routing
!
interface Loopback0
no ip address
ipv6 address 2007::1/64
ipv6 ospf 1 area 100

!
interface FastEthernet0/0
ip address 10.0.0.1 255.255.255.0
duplex auto
speed auto
ipv6 address 2001::1/64
ipv6 ospf 1 area 100
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
ipv6 address 2002::1/64
ipv6 ospf 1 area 100
!
ipv6 router ospf 1
log-adjacency-changes
!
end
R2#show run
!
hostname R2
no ip domain-lookup
!
ipv6 unicast-routing
!
interface Loopback0
no ip address
ipv6 address 2008::1/64
ipv6 ospf 1 area 100

!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address 2005::1/64
ipv6 ospf 1 area 100
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
ipv6 address 2002::2/64
ipv6 ospf 1 area 100
!
ipv6 router ospf 1
log-adjacency-changes
!
end
Bước 4: Kiểm tra thông số cấu hình và ping
Kiểm tra hoạt động của các cổng FastEthernet bằng lệnh show interface [type number],
show ipv6 interface brief
Kiểm tra bảng định tuyến bằng lệnh show ipv6 route
R1#show ipv6 route
IPv6 Routing Table - 10 entries
C 2001::/64 [0/0]
via ::, FastEthernet0/0
L 2001::1/128 [0/0]
via ::, FastEthernet0/0
C 2002::/64 [0/0]

via ::, FastEthernet0/1
L 2002::1/128 [0/0]
via ::, FastEthernet0/1
O 2005::/64 [110/2]
via FE80::218:18FF:FE9C:A7A1, FastEthernet0/1
C 2007::/64 [0/0]
via ::, Loopback1
L 2007::1/128 [0/0]
via ::, Loopback1
O 2008::1/128 [110/1]
via FE80::218:18FF:FE9C:A7A1, FastEthernet0/1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
Từ R1 hoặc R2 ping các địa chỉ trên mạng
R1#ping 2002::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2002::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/4 ms
R1#ping 2005::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2005::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/4 ms
R1#ping 2005::B
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2005::B, timeout is 2 seconds:
!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/4 ms
R1#ping 2008::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2008::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms
Xem thông số trên các interface:
R1#show ipv6 ospf interface f0/0
FastEthernet0/0 is up, line protocol is up
Link Local Address FE80::217:95FF:FEC1:6AE4, Interface ID 4
Area 100, Process ID 1, Instance ID 0, Router ID 10.0.0.1
Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.0.0.1, local address FE80::217:95FF:FEC1:6AE4
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:01
Index 1/1/1, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
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 ipv6 ospf interface f0/1
FastEthernet0/1 is up, line protocol is up
Link Local Address FE80::217:95FF:FEC1:6AE5, Interface ID 5
Area 100, Process ID 1, Instance ID 0, Router ID 10.0.0.1
Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.0.0.1, local address FE80::217:95FF:FEC1:6AE5

Backup Designated router (ID) 20.0.0.1, local address FE80::218:18FF:FE9C:A7A1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06
Index 1/2/2, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 4
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 20.0.0.1 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
Xem thông số về OSPFv3 của router láng giềng
R1#show ipv6 ospf neighbor detail
Neighbor 20.0.0.1
In the area 100 via interface FastEthernet0/1
Neighbor: interface-id 5, link-local address FE80::218:18FF:FE9C:A7A1
Neighbor priority is 1, State is FULL, 6 state changes
DR is 10.0.0.1 BDR is 20.0.0.1
Options is 0x65CB1F99
Dead timer due in 00:00:33
Neighbor is up for 00 14
Index 1/1/1, retransmission queue length 0, number of retransmission 1
First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
Last retransmission scan length is 2, maximum is 2
Last retransmission scan time is 0 msec, maximum is 0 msec
R1#show ipv6 ospf neighbor f0/1
Neighbor ID Pri State Dead Time Interface ID Interface
20.0.0.1 1 FULL/BDR 00:00:32 5 FastEthernet0/1
Lưu ý:
Khi có nhiều đường để đi đến đích với cùng chi phí trong cùng một quá trình định tuyến,
chúng ta sẽ có hiện tượng cân bằng tải, và các đường này cũng sẽ được đưa vào bảng

định tuyến. Ta có thể chỉnh số lượng tối đa các đường đi đến cùng một đích bằng lệnh
maximum-paths ở mode router. Khoảng giá trị của nó là từ 1 đến 64, mặc định cho OSPF
là 16.

×