By Default, OSPF Will Redistribute Only Classful Routes
In above Router B is receiving six routes from Router C via EIGRP. Three of the EIGRP routes are classful (5.0.0.0/8, 145.5.0.0/16, 205.5.5.0/24) and three are classless (6.0.0.0/12, 146.6.0.0/20, 206.6.6.0/28). Before redistributing the EIGRP routes into OSPF on Router B, configure the routers as shown in the listing that follows.
Router A interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Serial0/1 ip address 10.1.1.1 255.255.255.252 clockrate 64000 ! router ospf 1 network 10.1.1.0 0.0.0.3 area 0 Router B interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial0 ip address 10.1.1.2 255.255.255.252 ! interface Serial 1 ip address 10.1.1.5 255.255.255.252 ! router eigrp 1 network 10.0.0.0 ! router ospf 1 network 10.1.1.0 0.0.0.3 area 0 Router C interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Loopback1 ip address 5.5.5.5 255.0.0.0 ! interface Loopback2 ip address 6.6.6.6 255.240.0.0 ! interface Loopback3 ip address 145.5.5.5 255.255.0.0 ! interface Loopback4 ip address 146.6.6.6 255.255.240.0 ! interface Loopback5 ip address 205.5.5.5 255.255.255.0 ! interface Loopback6 ip address 206.6.6.6 255.255.255.240 ! interface Serial0 ip address 10.1.1.6 255.255.255.252 ! router eigrp 1 network 5.0.0.0 network 6.0.0.0 network 10.0.0.0 network 145.5.0.0 network 146.6.0.0 network 205.5.5.0 network 206.6.6.0 no auto-summary
Verify that Routers A and B have established an OSPF neighbor relationship.
Router A interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Serial0/1 ip address 10.1.1.1 255.255.255.252 clockrate 64000 ! router ospf 1 network 10.1.1.0 0.0.0.3 area 0
Router B interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial0 ip address 10.1.1.2 255.255.255.252 ! interface Serial 1 ip address 10.1.1.5 255.255.255.252 ! router eigrp 1 network 10.0.0.0 ! router ospf 1 network 10.1.1.0 0.0.0.3 area 0
Router C interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Loopback1 ip address 5.5.5.5 255.0.0.0 ! interface Loopback2 ip address 6.6.6.6 255.240.0.0 ! interface Loopback3 ip address 145.5.5.5 255.255.0.0 ! interface Loopback4 ip address 146.6.6.6 255.255.240.0 ! interface Loopback5 ip address 205.5.5.5 255.255.255.0 ! interface Loopback6 ip address 206.6.6.6 255.255.255.240 ! interface Serial0 ip address 10.1.1.6 255.255.255.252 ! router eigrp 1 network 5.0.0.0 network 6.0.0.0 network 10.0.0.0 network 145.5.0.0 network 146.6.0.0 network 205.5.5.0 network 206.6.6.0 no auto-summary
Verify that Routers A and B have established an OSPF neighbor relationship.
rtrA#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/ - 00:00:36 10.1.1.2 Serial0/1
Verify that Routers B and C have formed an EIGRP neighbor relationship.
rtrB#show ip eigrp neighbors IP-EIGRP neighbors for process 1 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 10.1.1.6 Se1 11 00:25:42 308 2280 0 4
Verify that Router B is receiving the six EIGRP routes from Router C.
rtrB#show ip route Codes: C - connected, S - static, I - IGRP, 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, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is not set 2.0.0.0/32 is subnetted, 1 subnets C 2.2.2.2 is directly connected, Loopback0 D 205.5.5.0/24 [90/40640000] via 10.1.1.6, 00:26:25, Serial1 206.6.6.0/28 is subnetted, 1 subnets D 206.6.6.0 [90/40640000] via 10.1.1.6, 00:26:25, Serial1 D 5.0.0.0/8 [90/40640000] via 10.1.1.6, 00:26:25, Serial1 6.0.0.0/12 is subnetted, 1 subnets D 6.0.0.0 [90/40640000] via 10.1.1.6, 00:26:25, Serial1 D 145.5.0.0/16 [90/40640000] via 10.1.1.6, 00:26:25, Serial1 10.0.0.0/30 is subnetted, 2 subnets C 10.1.1.0 is directly connected, Serial0 C 10.1.1.4 is directly connected, Serial1 146.6.0.0/20 is subnetted, 1 subnets D 146.6.0.0 [90/40640000] via 10.1.1.6, 00:26:27, Serial1
Modify the configuration on Router B to redistribute the classful EIGRP routes into OSPF.
router ospf 1 redistribute eigrp 1
When the command redistribute eigrp 1 is entered, the router will give you the following friendly reminder:
rtrB(config-router)#redistribute eigrp 1 % Only classful networks will be redistributed
Verification
Determine the routes that have been redistributed by examining the IP routing table on Router A.rtrA#show ip route Codes: C - connected, S - static, I - IGRP, 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, E - EGP i - IS-IS, 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 1.0.0.0/32 is subnetted, 1 subnets C 1.1.1.1 is directly connected, Loopback0 O E2 205.5.5.0/24 [110/20] via 10.1.1.2, 00:33:23, Serial0/1 O E2 5.0.0.0/8 [110/20] via 10.1.1.2, 00:33:23, Serial0/1 O E2 145.5.0.0/16 [110/20] via 10.1.1.2, 00:33:23, Serial0/1 10.0.0.0/30 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Serial0/1
Only the EIGRP classful routes were redistributed into OSPF. As you can see in the routing table on Router A, EIGRP routes were redistributed as external type 2 with a cost or metric of 20. This information can also be found by inspecting the OSPF database on Router B.
rtrB#show ip ospf database external OSPF Router with ID (2.2.2.2) (Process ID 1) Type-5 AS External Link States LS age: 410 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 5.0.0.0 (External Network Number ) Advertising Router: 2.2.2.2 LS Seq Number: 80000004 Checksum: 0x642C Length: 36 Network Mask: /8 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 0.0.0.0 External Route Tag: 0 LS age: 419 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 145.5.0.0 (External Network Number ) Advertising Router: 2.2.2.2 LS Seq Number: 80000004 Checksum: 0x5F9 Length: 36 Network Mask: /16 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 0.0.0.0 External Route Tag: 0 LS age: 435 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 205.5.5.0 (External Network Number ) Advertising Router: 2.2.2.2 LS Seq Number: 80000004 Checksum: 0xBEFE Length: 36 Network Mask: /24 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 0.0.0.0 External Route Tag: 0
Thanks ,
Prakash G C
Source :- http://www.ciscopress.com/articles/article.asp?p=27573
No comments:
Post a Comment