ip ospf cost (cost)
i cannot think of a good reason to ever do this... it might be instructive for a lab so that you could see something weird, or to illustrate why not to do this... use at your own risk...
onto something useful...
the summary of all summaries, as it were...
a default route is not automatically distributed to a neighbor...
however default-information originate will ship it next door...
light up ospf on r3 and r4 for area 1
r1#sh ip route
Gateway of last resort is not set
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback1
L 1.1.1.1/32 is directly connected, Loopback1
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet0/0
L 10.1.1.1/32 is directly connected, FastEthernet0/0
C 10.1.2.0/24 is directly connected, FastEthernet1/1
L 10.1.2.1/32 is directly connected, FastEthernet1/1
O IA 192.168.1.0/24 [110/782] via 10.1.1.2, 00:03:55, FastEthernet0/0
now set up a default route on r2...
r2#sh ip route
Gateway of last resort is 192.168.1.2 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.168.1.2
1.0.0.0/24 is subnetted, 1 subnets
O 1.1.1.0 [110/2] via 10.1.1.1, 00:05:29, FastEthernet0/0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet0/0
L 10.1.1.2/32 is directly connected, FastEthernet0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, Serial1/1
L 192.168.1.1/32 is directly connected, Serial1/1
r1#sh ip route
Gateway of last resort is not set
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback1
L 1.1.1.1/32 is directly connected, Loopback1
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet0/0
L 10.1.1.1/32 is directly connected, FastEthernet0/0
C 10.1.2.0/24 is directly connected, FastEthernet1/1
L 10.1.2.1/32 is directly connected, FastEthernet1/1
O IA 192.168.1.0/24 [110/782] via 10.1.1.2, 00:08:09, FastEthernet0/0
note that on r2 the gateway of last resort is locally significant only...
default-information originate will distribute it...
r2(config)#router ospf 1
r2(config-router)#default-info originate
r1#sh ip route
Gateway of last resort is 10.1.1.2 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 10.1.1.2, 00:00:24, FastEthernet0/0
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback1
L 1.1.1.1/32 is directly connected, Loopback1
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet0/0
L 10.1.1.1/32 is directly connected, FastEthernet0/0
C 10.1.2.0/24 is directly connected, FastEthernet1/1
L 10.1.2.1/32 is directly connected, FastEthernet1/1
O IA 192.168.1.0/24 [110/782] via 10.1.1.2, 00:10:36, FastEthernet0/0
it shows as external type 2 by default...
r4#sh ip route
Gateway of last resort is 192.168.1.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 192.168.1.1, 00:01:53, Serial1/1
1.0.0.0/24 is subnetted, 1 subnets
O IA 1.1.1.0 [110/783] via 192.168.1.1, 00:09:00, Serial1/1
10.0.0.0/24 is subnetted, 1 subnets
O IA 10.1.1.0 [110/782] via 192.168.1.1, 00:09:00, Serial1/1
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.0/24 is directly connected, FastEthernet0/0
L 172.16.1.2/32 is directly connected, FastEthernet0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, Serial1/1
L 192.168.1.2/32 is directly connected, Serial1/1
but you can change that...
r2(config-router)#default-info originate metric-type 1
Gateway of last resort is 10.1.1.2 to network 0.0.0.0
O*E1 0.0.0.0/0 [110/2] via 10.1.1.2, 00:00:35, FastEthernet0/0
1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback1
L 1.1.1.1/32 is directly connected, Loopback1
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet0/0
L 10.1.1.1/32 is directly connected, FastEthernet0/0
C 10.1.2.0/24 is directly connected, FastEthernet1/1
L 10.1.2.1/32 is directly connected, FastEthernet1/1
O IA 192.168.1.0/24 [110/782] via 10.1.1.2, 00:16:43, FastEthernet0/0
note the difference between type 1 and type 2... type 1 includes the internal cost...
No comments:
Post a Comment