Lab 1.3 Redistribute sử dụng Route-map, tag - part 3

root

Leader IT/Architect
Dec 31, 2012
1,153
72
48
I. Mô hình và yêu cầu
1. Mô hình


2. Sơ đồ IP

R1f0/0
f0/1
14.14.14.1/24
13.13.13.1/24
R2f0/0
f0/1
24.24.24.2/24
23.23.23.2/24
R3f0/0
f0/1
f1/0
13.13.13.3/24
23.23.23.3/24
35.35.35.3/24
R4f0/0
f0/1
24.24.24.4/24
14.14.14.4/24
R5f0/035.35.35.5/24


3. Yêu cầu
- Cấu hình IP và các domain Routing như trong hình ở trên
- Cấu hình Redistribute sao cho
  • Cấu hình để R1 chỉ quảng bá domain Routing EIGRP
  • Cấu hình để R2 chỉ quáng bá domain Routing OSPF
  • Cấu hình để R3 chỉ quáng bá domain Routing EIGRP
    => Kết quả là R4 chỉ thấy vùng OSPF mà không nhìn thấy vùng RIP và tương tự R5 cũng chỉ nhìn thấy vùng EIGRP mà không nhìn thấy vùng RIP

II. Triển khai
1. Cấu hình IP và các domain routing
- Trên R1

R1(config-if)#interface f0/0
R1(config-if)#ip address 14.14.14.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int f0/1
R1(config-if)#ip address 13.13.13.1 255.255.255.0
R1(config-if)#no shutdown

R1(config)#router rip
R1(config-router)# version 2
R1(config-router)# network 13.13.13.0
R1(config-router)# no auto-summary

R1(config-router)# router eigrp 1
R1(config-router)# network 14.14.14.0
R1(config-router)# no auto-summary

- Trên R2

R2(config-if)#interface f0/0
R2(config-if)#ip address 24.24.24.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int f0/1
R2(config-if)#ip address 23.23.23.2 255.255.255.0
R2(config-if)#no shutdown

R2(config)#router rip
R2(config-router)# version 2
R2(config-router)# network 23.23.23.0
R2(config-router)# no auto-summary

R2(config-router)# router eigrp 1
R2(config-router)# network 24.24.24.0
R2(config-router)# no auto-summary

- Trên R3

R3(config-if)#interface f0/0
R3(config-if)#ip address 13.13.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#int f0/1
R3(config-if)#ip address 23.23.23.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#int f1/0
R3(config-if)#ip address 35.35.35.3 255.255.255.0
R3(config-if)#no shutdown

R3(config)#router rip
R3(config-router)# version 2
R3(config-router)# network 13.13.13.0
R3(config-router)# network 23.23.23.0
R3(config-router)# no auto-summary

R3(config-router)# router ospf 1
R3(config-router)# network 35.35.35.0 0.0.0.255 area 0

- Trên R4

R4(config-if)#interface f0/0
R4(config-if)#ip address 24.24.24.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#int f0/1
R4(config-if)#ip address 14.14.14.4 255.255.255.0
R4(config-if)#no shutdown

R4(config)#router eigrp 1
R4(config-router)# network 14.14.14.0
R4(config-router)# network 24.24.24.0
R4(config-router)# no auto-summary

- Trên R5

R5(config-if)#interface f0/0
R5(config-if)#ip address 35.35.35.5 255.255.255.0
R5(config-if)#no shutdown

R5(config)#router ospf 1
R5(config-router)# network 35.35.35.0 0.0.0.255 area 0

Kiểm tra trạng thái bảng định tuyến trên các Route
- Trên R1

Code:
R1#sh ip route | begin set
Gateway of last resort is not set


     35.0.0.0/24 is subnetted, 1 subnets
R       35.35.35.0 [120/5] via 13.13.13.3, 00:00:16, FastEthernet0/1
     23.0.0.0/24 is subnetted, 1 subnets
R       23.23.23.0 [120/1] via 13.13.13.3, 00:00:16, FastEthernet0/1
     24.0.0.0/24 is subnetted, 1 subnets
D       24.24.24.0 [90/307200] via 14.14.14.4, 01:24:05, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/1
     14.0.0.0/24 is subnetted, 1 subnets
C       14.14.14.0 is directly connected, FastEthernet0/0
- Trên R2

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


     35.0.0.0/24 is subnetted, 1 subnets
R       35.35.35.0 [120/5] via 23.23.23.3, 00:00:23, FastEthernet0/1
     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     24.0.0.0/24 is subnetted, 1 subnets
C       24.24.24.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
R       13.13.13.0 [120/1] via 23.23.23.3, 00:00:23, FastEthernet0/1
     14.0.0.0/24 is subnetted, 1 subnets
D       14.14.14.0 [90/307200] via 24.24.24.4, 01:24:39, FastEthernet0/0
- Trên R3

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


     35.0.0.0/24 is subnetted, 1 subnets
C       35.35.35.0 is directly connected, FastEthernet1/0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/0
- Trên R4

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


     24.0.0.0/24 is subnetted, 1 subnets
C       24.24.24.0 is directly connected, FastEthernet0/0
     14.0.0.0/24 is subnetted, 1 subnets
C       14.14.14.0 is directly connected, FastEthernet0/1
- Trên R5

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


     35.0.0.0/24 is subnetted, 1 subnets
C       35.35.35.0 is directly connected, FastEthernet0/0
 
2. Cấu hình Redistribute
- Trên R1: Tạo 1 route-map tên là TAG và gán tag nay là 50. Sau đó thực hiện redistribute kèm theo tham số route-map này

R1(config)#route-map TAG-1 permit 10
R1(config-route-map)#set tag 40

//redistribute EIGRP vào RIP với route-map
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#redistribute eigrp 1 metric 5 route-map TAG-1

- Bảng định tuyến của R3 đã có các lớp mạng của vùng EIGRP

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

     35.0.0.0/24 is subnetted, 1 subnets
C       35.35.35.0 is directly connected, FastEthernet1/0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     24.0.0.0/24 is subnetted, 1 subnets
R       24.24.24.0 [120/5] via 13.13.13.1, 00:00:17, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/0
     14.0.0.0/24 is subnetted, 1 subnets
R       14.14.14.0 [120/5] via 13.13.13.1, 00:00:17, FastEthernet0/0
- Các bạn thực hiện show route lớp mạng để thể tag trên subnet được redistribute
R3#sh ip route 14.14.14.0
Routing entry for 14.14.14.0/24
Known via "rip", distance 120, metric 5
Tag 40
Redistributing via rip, ospf 1
Advertised by ospf 1 subnets route-map TAG-1
Last update from 13.13.13.1 on FastEthernet0/0, 00:00:16 ago
Routing Descriptor Blocks:
* 13.13.13.1, from 13.13.13.1, 00:00:16 ago, via FastEthernet0/0
Route metric is 5, traffic share count is 1
Route tag 40

R3#sh ip route 24.24.24.0
Routing entry for 24.24.24.0/24
Known via "rip", distance 120, metric 5
Tag 40
Redistributing via rip, ospf 1
Advertised by ospf 1 subnets route-map TAG-1
Last update from 13.13.13.1 on FastEthernet0/0, 00:00:03 ago
Routing Descriptor Blocks:
* 13.13.13.1, from 13.13.13.1, 00:00:03 ago, via FastEthernet0/0
Route metric is 5, traffic share count is 1
Route tag 40
- Bây giờ trên R3 tạo 1 route-map và chỉ cho phép lớp mạng nào có tag là 40 thì mới được redistribute vào OSPF

R3(config)#route-map TAG-1 permit 10
R3(config-route-map)#match tag 40


R3(config)#router ospf 1
R3(config-router)#redistribute rip subnets route-map TAG-1

- Bây giờ bạn "show ip route" trên R5 các bạn sẽ thấy R5 chỉ nhận được các lớp mạng trong vùng EIGRP cùng vùng RIP thì không nhận được

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


     35.0.0.0/24 is subnetted, 1 subnets
C       35.35.35.0 is directly connected, FastEthernet0/0
     24.0.0.0/24 is subnetted, 1 subnets
O E2    24.24.24.0 [110/20] via 35.35.35.3, 00:02:09, FastEthernet0/0
     14.0.0.0/24 is subnetted, 1 subnets
O E2    14.14.14.0 [110/20] via 35.35.35.3, 00:02:09, FastEthernet0/0


Các bạn làm tương tự route-map cho R2 và R3 để R4 chỉ nhìn thấy các lớp mạng của OSPF
- Trên R3

R3(config)#route-map TAG-2 permit 20
R3(config-route-map)#set tag 50


R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#redistribute ospf 1 metric 5 route-map TAG-2

- Trên R2

R2(config)#route-map TAG-2 permit 20
R2(config-route-map)#match tag 50


R2(config)#router eigrp 1
R2(config-router)#redistribute rip metric 100000 100 255 1 1500 route-map TAG-2

- show ip route treen R4 các bạn thấy R4 cũng chỉ nhìn tháy 1 subnet trong vùng OSPF, các subnet vùng RIP nó không nhìn thấy

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


     35.0.0.0/24 is subnetted, 1 subnets
D EX    35.35.35.0 [170/307200] via 24.24.24.2, 00:04:56, FastEthernet0/0
     24.0.0.0/24 is subnetted, 1 subnets
C       24.24.24.0 is directly connected, FastEthernet0/0
     14.0.0.0/24 is subnetted, 1 subnets
C       14.14.14.0 is directly connected, FastEthernet0/1

- Subnet vùng OSPF mà R4 nhìn thấy có tag là 50

R4#sh ip route 35.35.35.0
Routing entry for 35.35.35.0/24
Known via "eigrp 1", distance 170, metric 307200
Tag 50, type external
Redistributing via eigrp 1
Last update from 24.24.24.2 on FastEthernet0/0, 00:05:47 ago
Routing Descriptor Blocks:
* 24.24.24.2, from 24.24.24.2, 00:05:47 ago, via FastEthernet0/0
Route metric is 307200, traffic share count is 1
Total delay is 2000 microseconds, minimum bandwidth is 10000 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
Route tag 50
 

About us

  • Securityzone.vn là một trang web chuyên về an ninh mạng và công nghệ thông tin. Trang web này cung cấp các bài viết, tin tức, video, diễn đàn và các dịch vụ liên quan đến lĩnh vực này. Securityzone.vn là một trong những cộng đồng IT lớn và uy tín tại Việt Nam, thu hút nhiều người quan tâm và tham gia. Securityzone.vn cũng là nơi để các chuyên gia, nhà nghiên cứu, sinh viên và người yêu thích an ninh mạng có thể trao đổi, học hỏi và chia sẻ kiến thức, kinh nghiệm và giải pháp về các vấn đề bảo mật trong thời đại số.

Quick Navigation

User Menu