finally onto ospf... can you smell me now...
add only the serial link on r2, on r3 add everything... are you scared yet? i always get nervous when the directions are to avoid things that you would naturally do, LIKE INCLUDE THE GODDAMN NETWORKS...
r2#sh run | begin ospf
router ospf 1
network 172.16.23.0 0.0.0.255 area 0
router ospf 1
network 172.16.23.0 0.0.0.255 area 0
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
network 192.168.0.0 0.0.255.255 area 0
and now the dreaded point-to-point statements on r3's lo's so that they are represented as networks and not hosts... arrrrgh...
r3
interface Loopback0
ip address 172.16.3.1 255.255.255.0
ip ospf network point-to-point
!
interface Loopback20
ip address 192.168.20.1 255.255.255.0
ip ospf network point-to-point
!
interface Loopback25
ip address 192.168.25.1 255.255.255.0
ip ospf network point-to-point
!
interface Loopback30
ip address 192.168.30.1 255.255.255.0
ip ospf network point-to-point
!
interface Loopback35
ip address 192.168.35.1 255.255.255.0
!
interface Loopback40
ip address 192.168.40.1 255.255.255.0
ip ospf network point-to-point
r2#sh ip ospf neigh
Neighbor ID Pri State Dead Time Address Interface
192.168.40.1 0 FULL/ - 00:00:33 172.16.23.3 Serial1/2
Neighbor ID Pri State Dead Time Address Interface
192.168.40.1 0 FULL/ - 00:00:33 172.16.23.3 Serial1/2
r3#sh ip ospf neigh
Neighbor ID Pri State Dead Time Address Interface
172.16.2.1 0 FULL/ - 00:00:30 172.16.23.2 Serial1/2
Neighbor ID Pri State Dead Time Address Interface
172.16.2.1 0 FULL/ - 00:00:30 172.16.23.2 Serial1/2
r2#sh ip route ospf
omitted
omitted
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 8 subnets, 2 masks
O 172.16.3.0/24 [110/1563] via 172.16.23.3, 00:00:38, Serial1/2
O 192.168.20.0/24 [110/1563] via 172.16.23.3, 00:19:22, Serial1/2
O 192.168.25.0/24 [110/1563] via 172.16.23.3, 00:19:12, Serial1/2
O 192.168.30.0/24 [110/1563] via 172.16.23.3, 00:19:12, Serial1/2
192.168.35.0/32 is subnetted, 1 subnets
O 192.168.35.1 [110/1563] via 172.16.23.3, 00:28:01, Serial1/2
O 192.168.40.0/24 [110/1563] via 172.16.23.3, 00:18:39, Serial1/2
172.16.0.0/16 is variably subnetted, 8 subnets, 2 masks
O 172.16.3.0/24 [110/1563] via 172.16.23.3, 00:00:38, Serial1/2
O 192.168.20.0/24 [110/1563] via 172.16.23.3, 00:19:22, Serial1/2
O 192.168.25.0/24 [110/1563] via 172.16.23.3, 00:19:12, Serial1/2
O 192.168.30.0/24 [110/1563] via 172.16.23.3, 00:19:12, Serial1/2
192.168.35.0/32 is subnetted, 1 subnets
O 192.168.35.1 [110/1563] via 172.16.23.3, 00:28:01, Serial1/2
O 192.168.40.0/24 [110/1563] via 172.16.23.3, 00:18:39, Serial1/2
go ahead and configure some passive interfaces... i'm going on to redistribution... passive interfaces are very important for saving cpu cycles, link bandwidth and router memory (last i checked this stuff is friggin cheap there, mr. cisco)
i'm not sure what the fuss is with redistribution... odom puts it this way, redistribute from, to... like copy from, to, in most every operating system...
redistribute from ospf to rip...
r1#sh ip route rip
omitted
omitted
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
R 172.16.2.0/24 [120/1] via 172.16.12.2, 00:00:04, Serial1/0
R 172.16.23.0/24 [120/1] via 172.16.12.2, 00:00:04, Serial1/0
172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
R 172.16.2.0/24 [120/1] via 172.16.12.2, 00:00:04, Serial1/0
R 172.16.23.0/24 [120/1] via 172.16.12.2, 00:00:04, Serial1/0
if a default metric is not specified, routes will have an infinite metric and won't be advertised...
r2(config)#router rip
r2(config-router)#redistribute ospf 1 metric 4
r2(config-router)#redistribute ospf 1 metric 4
omitted
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 7 subnets, 2 masks
R 172.16.2.0/24 [120/1] via 172.16.12.2, 00:00:13, Serial1/0
R 172.16.3.0/24 [120/4] via 172.16.12.2, 00:00:13, Serial1/0
R 172.16.23.0/24 [120/1] via 172.16.12.2, 00:00:13, Serial1/0
R 192.168.20.0/24 [120/4] via 172.16.12.2, 00:00:13, Serial1/0
R 192.168.25.0/24 [120/4] via 172.16.12.2, 00:00:13, Serial1/0
R 192.168.30.0/24 [120/4] via 172.16.12.2, 00:00:13, Serial1/0
192.168.35.0/32 is subnetted, 1 subnets
R 192.168.35.1 [120/4] via 172.16.12.2, 00:00:13, Serial1/0
R 192.168.40.0/24 [120/4] via 172.16.12.2, 00:00:13, Serial1/0
the moment we've all been waiting for... you can't ping the loopbacks from r1 to r3... there is no route back... the routes show up in the route table but...
r3#sh ip route ospf
omitted
Gateway of last resort is not setomitted
r3#
this is monumental and worth all the pain to get here...
r2(config-router)#router ospf 1
r2(config-router)#default-inform originate always
r2(config-router)#end
r2(config-router)#default-inform originate always
r2(config-router)#end
omitted
Gateway of last resort is 172.16.23.2 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 172.16.23.2, 00:00:06, Serial1/2
now you can ping the loopbacks... the alternative; redistribute both ways, always...
r2(config)#router ospf 1
r2(config-router)#no default-info origin always
r2(config-router)#redistribute rip
% Only classful networks will be redistributed
r2(config-router)#redistribute rip subnets
r2(config-router)#no default-info origin always
r2(config-router)#redistribute rip
% Only classful networks will be redistributed
r2(config-router)#redistribute rip subnets
omitted
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 7 subnets, 2 masks
O E2 172.16.1.0/24 [110/20] via 172.16.23.2, 00:00:44, Serial1/2
O E2 172.16.2.0/24 [110/20] via 172.16.23.2, 00:00:44, Serial1/2
O E2 172.16.12.0/24 [110/20] via 172.16.23.2, 00:00:44, Serial1/2
O E2 192.168.48.0/24 [110/20] via 172.16.23.2, 00:01:37, Serial1/2
O E2 192.168.49.0/24 [110/20] via 172.16.23.2, 00:01:37, Serial1/2
O E2 192.168.50.0/24 [110/20] via 172.16.23.2, 00:01:37, Serial1/2
O E2 192.168.51.0/24 [110/20] via 172.16.23.2, 00:01:37, Serial1/2
O E2 192.168.70.0/24 [110/20] via 172.16.23.2, 00:01:37, Serial1/2
much better... i killed the summary garbage from earlier so the loopbacks are represented individually...
you don't get the gateway, but you do get the all the externals... i prefer that...
screw around with the default metrics and witness the output in the ip route... it's very exciting...
actually, what is exciting is changing the metric-type...
r2(config)#router ospf 1
r2(config-router)#redistribute rip subnets metric-type 1
r2(config-router)#end
r2(config-router)#redistribute rip subnets metric-type 1
r2(config-router)#end
r3#sh ip route ospf
omitted
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 7 subnets, 2 masks
O E1 172.16.1.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 172.16.2.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 172.16.12.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 192.168.48.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 192.168.49.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 192.168.50.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 192.168.51.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 192.168.70.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
omitted
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 7 subnets, 2 masks
O E1 172.16.1.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 172.16.2.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 172.16.12.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 192.168.48.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 192.168.49.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 192.168.50.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 192.168.51.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
O E1 192.168.70.0/24 [110/1582] via 172.16.23.2, 00:00:32, Serial1/2
that's pretty...
the difference is cumulative cost, including that to the asbr, not just the asbr to the destination...big difference... i'll let this guy explain it...
http://ciscotips.wordpress.com/2007/10/24/e1e2-routes-in-ospf/
In OSPF we have 2 types of external routes. E1 and E2
For example
R1#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
Route redistribution is the process of taking routes learned via one routing protocol and injecting those routes into another routing domain. (Static and connected routes can also be redistributed.) When a router running OSPF takes routes learned by another routing protocol and makes them available to the other OSPF-enabled routers it’s communicating with, that router becomes an Autonomous System Border Router (ASBR). Let’s say R1 is running both OSPF and RIP. R4 is in the same OSPF domain as R1, and we want R4 to learn the routes that R1 is learning via RIP. This means we have to perform route redistribution on the ASBR. The routes that are being redistributed from RIP into OSPF will appear as E2 routes on R4:R4#show ip route ospfO E2 5.1.1.1 [110/20] via 172.34.34.3, 00:33:21, Ethernet06.0.0.0/32 is subnetted, 1 subnets
E2 is the default route type for routes learned via redistribution.
The key with E2 routes is that the cost of these routes reflects only
the cost of the path from the ASBR to the final destination. It will
not reflect the correct “Cost” or path.
Now if we want the cost of the routes to reflect the entire path,
not just the path between the ASBR and the destination network. The routes must be redistributed into OSPF as E1 routes on the ASBR, as shown here.
.R1(config)#router ospf 1
R1(config-router)#redistribute rip subnets metric-type 1 Now on R4, the routes appear as E1 routes and have a larger metric, since the entire path cost is now reflected in the routing table.O E1 5.1.1.1 [110/94] via 172.34.34.3, 00:33:21, Ethernet06.0.0.0/32 is subnetted, 1 subnets
No comments:
Post a Comment