Lab 4.2 Redistribute giữa OSPF và ISIS

  • Thread starter Thread starter root
  • Ngày gửi Ngày gửi

root

Well-Known Member
I. Sơ đồ và yêu cầu
1. Sơ đồ



2. Yêu cầu:
- Thiết lập thiết bị như sơ đồ
- Cấu hình IP và các domain Routing trên các Router
- Cấu hình để các Router vùng ISIS và OSPF có thể nhìn thấy nhau

II. Triển khai
1. Cấu hình IP và Domain Routing
- Trên R1
[TABLE="class: outer_border, width: 500"]
[TR]
[TD]R1(config)#int f0/0
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config-if)#ip router isis
R1(config-if)#no shutdown
R1(config-if)#int s1/0
R1(config-if)#ip address 172.16.2.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router isis
R1(config-router)#net 49.0001.1111.1111.1111.00

R1(config)#router ospf 1
R1(config-router)#network 172.16.2.0 0.0.0.3 area 0
R1(config-router)#exit[/TD]
[/TR]
[/TABLE]

- Trên R2

[TABLE="class: outer_border, width: 500"]
[TR]
[TD]R2(config-if)#int s1/0
R2(config-if)#ip address 172.16.2.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#int f0/0
R2(config-if)#ip address 192.168.4.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit

R2(config)#router ospf 1
R2(config-router)#network 192.168.4.0 0.0.0.255 area 0
R2(config-router)#network 172.16.2.0 0.0.0.3 area 0
R2(config-router)#exit[/TD]
[/TR]
[/TABLE]

- Trên R3

[TABLE="class: outer_border, width: 500"]
[TR]
[TD]R3(config-if)#int f0/0
R3(config-if)#ip address 192.168.4.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#int f0/1
R3(config-if)#ip address 192.168.1.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit

R3(config)#router ospf 1
R3(config-router)#network 192.168.4.0 0.0.0.255 area 0
R3(config-router)#network 192.168.1.0 0.0.0.255 area 0
R3(config-router)#exit[/TD]
[/TR]
[/TABLE]

- Trên R4

[TABLE="class: outer_border, width: 500"]
[TR]
[TD]R4(config-if)#int f0/0
R4(config-if)#ip address 172.16.1.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#int f0/1
R4(config-if)#ip address 192.168.1.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config-if)#int s1/0
R4(config-if)#ip address 192.168.2.1 255.255.255.252
R4(config-if)#ip router isis
R4(config-if)#no shutdown
R4(config-if)#exit

R4(config)#router ospf 1
R4(config-router)#network 192.168.1.0 0.0.0.255 area 0
R4(config-router)#exit

R4(config)#clns routing
R4(config)#router isis
R4(config-router)#net 49.0001.4444.4444.4444.00[/TD]
[/TR]
[/TABLE]

- Trên R5

[TABLE="class: outer_border, width: 500"]
[TR]
[TD]R5(config-if)#int s1/0
R5(config-if)#ip address 192.168.2.2 255.255.255.252
R5(config-if)#ip router isis
R5(config-if)#no shutdown
R4(config-if)#int f0/0
R4(config-if)#ip address 172.16.1.5 255.255.255.0
R5(config-if)#ip router isis
R4(config-if)#no shutdown
R5(config-if)#int loopback 0
R4(config-if)#ip address 5.5.5.5 255.255.255.0
R5(config-if)#ip router isis
R5(config-if)#exit

R5(config)#clns routing
R5(config)#router isis
R5(config-router)#net 49.0001.5555.5555.5555.00[/TD]
[/TR]
[/TABLE]

2. Kiểm tra bảng định tuyến các Router
- Trên R1

Mã:
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route


Gateway of last resort is not set


     5.0.0.0/24 is subnetted, 1 subnets
i L1    5.5.5.0 [115/20] via 172.16.1.5, FastEthernet0/0
     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C       172.16.1.0/24 is directly connected, FastEthernet0/0
C       172.16.2.0/30 is directly connected, Serial1/0
O    192.168.4.0/24 [110/74] via 172.16.2.2, 00:30:18, Serial1/0
O    192.168.1.0/24 [110/84] via 172.16.2.2, 00:28:08, Serial1/0
     192.168.2.0/30 is subnetted, 1 subnets
i L1    192.168.2.0 [115/20] via 172.16.1.5, FastEthernet0/0
- Trên R2

Mã:
R2#sh ip route | begin set
Gateway of last resort is not set


     172.16.0.0/30 is subnetted, 1 subnets
C       172.16.2.0 is directly connected, Serial1/0
C    192.168.4.0/24 is directly connected, FastEthernet0/0
O    192.168.1.0/24 [110/20] via 192.168.4.3, 00:31:28, FastEthernet0/0
- Trên R3

Mã:
R3#sh ip route | begin
R3#sh ip route | begin set
Gateway of last resort is not set


     172.16.0.0/30 is subnetted, 1 subnets
O       172.16.2.0 [110/74] via 192.168.4.2, 00:31:56, FastEthernet0/0
C    192.168.4.0/24 is directly connected, FastEthernet0/0
C    192.168.1.0/24 is directly connected, FastEthernet0/1
- Trên R4

Mã:
R4#sh ip route | begin set
Gateway of last resort is not set


     5.0.0.0/24 is subnetted, 1 subnets
i L1    5.5.5.0 [115/20] via 192.168.2.2, Serial1/0
     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
i L1    172.16.1.0/24 [115/20] via 192.168.2.2, Serial1/0
O       172.16.2.0/30 [110/84] via 192.168.1.3, 00:28:01, FastEthernet0/1
O    192.168.4.0/24 [110/20] via 192.168.1.3, 00:28:01, FastEthernet0/1
C    192.168.1.0/24 is directly connected, FastEthernet0/1
     192.168.2.0/30 is subnetted, 1 subnets
C       192.168.2.0 is directly connected, Serial1/0
- Trên R5

Mã:
R5#sh ip route | begin set
Gateway of last resort is not set


     5.0.0.0/24 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, Loopback0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, FastEthernet0/0
     192.168.2.0/30 is subnetted, 1 subnets
C       192.168.2.0 is directly connected, Serial1/0
 
4. Redistribute
- Trong bài này các router chạy ISIS để mặc định là L1/L2 router và các router đang chạy level – 1 routing nên có kí hiệu là L1 .
- Đối với metric của ISIS thì loại metric có chiều dài là 1 byte.
  • Bit 8 chỉ ra sự hiện diện của loại metric trong TLV.
  • Bit 7 được dùng để phân loại metric là internal hay là external .
    • Internal metric đề cập đến các route được tạo ra trong miền ISIS ,
    • external route đề cập đến các route bên ngoài miền ISIS hoặc là từ các giao thức định tuyến khác.
  • 6 bit còn lại dành cho việc tính toán thực sự giá trị của metric.
=> Do đó ta có giá trị cost cực đại của default metric là 63 trên một link .

- Đối với Cisco router cost của một link được quyết định bởi giá trị được đăng kí đến interface ngõ ra . Cisco đăng kí default metric là 10 cho mỗi interface mà không quan tâm interface đó thuộc loại nào.
- Lúc này mỗi subnetwork được xem là bằng nhau và ISIS metric được tính toán đơn giản bằng cách tính tổng các hop-count nó phải đi qua để đến đích , mỗi hop có cost là 10.
- Ví dụ trong bảng định tuyến của R1 ta thấy ,
  • route 192.168.2.0 có metric là 20 vì nó đi qua R5,R1. Cost của các route học được từ OSPF được tính tương tự như bài redistribute giữa classfull và classless.
  • Cost của 192.168.1.0/24 là 138 vì nó phải đi qua 2 serial interface (mỗi interface có cost là 64) và một ethernet interface (có cost là 10).
- Cách tính cost của OSPF là không đổi khi thực hiện redistribute .

- R2 ping tới 192.168.2.1 không thành công vì R2 chạy OSPF còn mạng 192.168.2.0/30 chạy giao thức IS-IS

R2#ping 192.168.2.1


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
- Muốn thực hiện ping thành công ta phải redistribute giữa hai giao thức . Cấu hình redistribute được thực hiện trên cả hai router R1 và R4 được gọi là multiple redistribute points Cấu hình như sau:
- Trên R1:
  • các route được redistribute vào ISIS có thể là internal route hoặc external route (internal là default) hoặc là level 1 hoặc là level 2 (level 2 là default ).
  • Trong cấu hình trên các OSPF route được redistribute như là external route với default metric là 10 .
[TABLE="class: outer_border, width: 500"]
[TR]
[TD]R1(config)#router ospf 1
R1(config-router)#redistribute isis level-1 metric 20 subnets
R1(config-router)#router isis
R1(config-router)#redistribute ospf 1 metric 10[/TD]
[/TR]
[/TABLE]

- Trên R4: cấu hình tương tự R1

[TABLE="class: outer_border, width: 500"]
[TR]
[TD]R4(config)#router ospf 1
R4(config-router)#redistribute isis level-1 metric 20 subnets
R4(config-router)#router isis
R4(config-router)#redistribute ospf 1 metric 10[/TD]
[/TR]
[/TABLE]

- Kiểm tra bảng định tuyến R2

Mã:
R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route


Gateway of last resort is not set


     5.0.0.0/24 is subnetted, 1 subnets
O E2    5.5.5.0 [110/20] via 192.168.4.3, 00:34:14, FastEthernet0/0
     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
O E2    172.16.1.0/24 [110/20] via 192.168.4.3, 00:34:14, FastEthernet0/0
C       172.16.2.0/30 is directly connected, Serial1/0
C    192.168.4.0/24 is directly connected, FastEthernet0/0
O    192.168.1.0/24 [110/20] via 192.168.4.3, 01:00:11, FastEthernet0/0
     192.168.2.0/30 is subnetted, 1 subnets
O E2    192.168.2.0 [110/20] via 172.16.2.1, 00:29:42, Serial1/0
- R2 ping 192.168.2.1 thành công

Mã:
R2#ping 192.168.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/48/88 ms


R2#traceroute 192.168.2.1

Type escape sequence to abort.
Tracing the route to 192.168.2.1

  1 172.16.2.1 20 msec 40 msec 20 msec
  2 172.16.1.5 40 msec 64 msec 40 msec
  3 192.168.2.1 68 msec 48 msec 40 msec
 
Back
Top