Showing posts with label OSPF. Show all posts
Showing posts with label OSPF. Show all posts

Sunday, July 6, 2008

OSPF - Summarization

OSPF summarization can be configured on 2 types of routers:

ABR – Internal OSPF routes

ABSR – External OSPF routes

My topology:

R1 --- FR --- R2

|

R4 --- FR --- R3

Example 1 – Summarizing External routes

I have created several loopback interfaces on R4 (ABSR),

lo0: 4.4.0.4/24

lo1: 4.4.1.4/24

lo2: 4.4.2.4/24

lo3: 4.4.3.4/24

Now I will redistribute the directly connected loopback interfaces addresses to OSPF:

R4(config-if)#access-list 4 permit 4.4.0.0 0.0.3.255


R4(config)#route-map REDIS permit 10


R4(config-route-map)#match ip addr 4


R4(config-route-map)#router ospf 1


R4(config-router)#redistribute connected subnets route-map REDIS

on R3, we can see the redistributed routes as external routes:

image

To summarize the external routes, use the “summary-address” on R4
R4(config-router)#summary-address 4.4.0.0 255.255.252.0

You can see those redistributed external routes are summarized:

image

Example 2 – Summarizing Internal Routes

In this example I will try to summarize internal routes from area 1 on ABR (R2)

R1

lo0 – 1.1.0.1/24 (area 1)
lo1 – 1.1.1.1/24 (area 1)

lo2 – 1.1.2.1/24 (area 1)
lo3 – 1.1.3.1/24 (area 1)
s1/0.12 – area 1

R2
lo0 – area 0
s1/0.21 – area 1
fa0/0 – area 0

To summarize internal routes, use the “area X range” command:
R2(config-router)#area 1 range 1.1.0.0 255.255.252.0

on R3, you can see the summarized route 1.1.0.0/22:

image

Example 3 – Discard-route

The discard route is created automatically when you configure a summary route.

On R2 (ABR where Internal route summarization takes place):

image

O 1.1.0.0/22 is a summary, 00:08:54, Null0

On R4 (ASBR where External route summarization takes place)

image


O 4.4.0.0/22 is a summary, 00:15:05, Null0

The discard routes are created to stop forwarding loop.

Use the “no discard-route” command to remove the discard-route:

R2(config-router)#no discard-route internal

R4(config-router)#no discard-route external

On R2 and R4, the discard route is gone.

R2

image

R4

image

Friday, July 4, 2008

OSPF - Cost

OSPF Cost = Reference Bandwidth / Interface Bandwidth


The default reference bandwidth is 100Mbps, so for instance the OSPF cost for a T1 serial line is:

OSPF Cost 

= 100,000,000 / 1,544,000


= 64.7 (remove decimal)


~ 64

For loopback address, the cost is 1 because:

OSPF Cost


= 100,000,000 / 8,000,000,000


= 0.125 


~ round off to 1

If you want to override the formulated cost, you can use the interface command:

ip ospf cost <cost>

Let's see this example:

R1 is directed connected to R2 with a T1 serial link. R1 has its network 1.0.0.0/8 advertised to R2 and from R2 we can see that the metric (cost) is 65. 1.0.0.0/8 is on R1 loopback interface.

image

So loopback0 metric (1) + serial1/0 metric (64) = 65 on R2

Let's change R1 loopback0 cost so the configured value will override the formulated value:

image

Go back to R2 and see the output of show ip route:

image

The metric becomes 84 because:

loopback0 metric (20) + serial1/0 metric (64) = 84

Another way to influence the cost is changing the reference-bandwidth from default 100Mbps to some other numbers.

auto-cost reference-bandwidth <bandwidth in Mbps>

image

Let's change the reference bandwidth to 1000Mbps. Make sure you do it across all network.

image

Monday, February 18, 2008

OSPF over NBMA Networks

In general, there are 5 ways to deal with it.

1. Fully meshed topology. Drawback is you have to manage n(n-1)/2 PVCs
2. Estabish each PVC as an individual point-to-point network with its own subnet. Most easily managed, requires more processing power on routers.
3. Using the neighbor command. The oldest solution for pre-10.0 version IOS.

Example
Hub site router
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
neighbor 172.16.2.2 ! Default priority 0, means spoke router will never be DR
neighbor 172.16.2.3

Spoke site Router A
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
neighbor 172.16.2.1 priority 10 ! It makes the hub site router a DR

4. ip ospf network broadcast. Cause the NBMA cloud to view as broadcast multiaccess network.

Example
Hub site router
interface Serial0
ip ospf network broadcast
ip ospf priority 10 ! It makes the hub site router a DR

Spoke site Router A
interface Serial0
ip ospf network broadcast
ip ospf priority 0 ! means spoke router will never be DR

5. ip ospf network point-to-multipoint. Treat the PVCs as a collection of point-to-point links. Therefore no DR/BDR election takes place.

Example
Hub site router
interface Serial0
ip ospf network point-to-multipoint non-broadcast

Spoke site Router A
interface Serial0
ip ospf network point-to-multipoint non-broadcast