Monday, January 2, 2012

OSPF SUMMARIZATION

I also looked at ospf summarizaation
All devices in a ospf area must have the same lsa database this implies summarization
can only occur between areas
There is two places summarization can occur 
Area Border Router connecting areas we use the command
area "source area" range "address" "mask" - we are summarising the lsa type 3
addresses
 or on a
ASBR (Autonomous System Boundary Router) connecting an ospf area to another
autonomous system (whether it be static routes,eigrp,rip so on) another routing
domain- we are summarising our lsa type 5

to summarize these address we use
summary-address "address" " mask"

When you summarize it will automatically generate a discard route to null 0 this is
mostly desirable but if a specfic network goes down you may wish that a shorter match
matches possible a default route  you would no want this so disable with
no discard route "internal|external"

As of the longest match rule of routing  summarization can be used for traffic
enginering

We will see a new lsa types when we bring in the external routes this will mainly be
type 4 lsa which is your local abr describing the path to the asbr and type 5 lsa
which are external lsa

LAB
----
We will configure the following 3 areas with bb2 running eigrp and sw2 redistributing
the eigrp routes into ospf making sw2 and asbr
sw4 and r4 will be area 1 abrs and sw1 and sw3 will be area 2 abrs

Ok all is configured we will just take a quick look at the lsa types
we will look at it from bb3 perspective

bb3#sh 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, su - IS-IS summary, 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
     222.222.222.0/32 is subnetted, 1 subnets
O IA    222.222.222.222 [110/15] via 16.16.16.1, 00:03:27, Ethernet0
     16.0.0.0/24 is subnetted, 1 subnets
C       16.16.16.0 is directly connected, Ethernet0
     33.0.0.0/32 is subnetted, 1 subnets
O IA    33.33.33.33 [110/11] via 16.16.16.1, 00:05:11, Ethernet0
     3.0.0.0/32 is subnetted, 2 subnets
O IA    3.3.3.3 [110/78] via 16.16.16.1, 00:03:27, Ethernet0
C       3.33.3.3 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/13] via 16.16.16.1, 00:03:28, Ethernet0
     172.25.0.0/24 is subnetted, 1 subnets
O IA    172.25.13.0 [110/14] via 16.16.16.1, 00:03:28, Ethernet0
     22.0.0.0/32 is subnetted, 1 subnets
O E2    22.22.22.22 [110/20] via 16.16.16.1, 00:00:55, Ethernet0
     9.0.0.0/24 is subnetted, 1 subnets
O IA    9.9.9.0 [110/12] via 16.16.16.1, 00:04:00, Ethernet0
     10.0.0.0/24 is subnetted, 4 subnets
O IA    10.10.10.0 [110/13] via 16.16.16.1, 00:03:29, Ethernet0
O IA    10.228.254.0 [110/13] via 16.16.16.1, 00:03:29, Ethernet0
O IA    10.229.254.0 [110/77] via 16.16.16.1, 00:03:29, Ethernet0
O IA    10.164.49.0 [110/23] via 16.16.16.1, 00:03:29, Ethernet0
     11.0.0.0/24 is subnetted, 1 subnets
O IA    11.11.11.0 [110/77] via 16.16.16.1, 00:03:29, Ethernet0
     13.0.0.0/24 is subnetted, 1 subnets
O IA    13.13.13.0 [110/11] via 16.16.16.1, 00:03:29, Ethernet0
     44.0.0.0/32 is subnetted, 1 subnets
O IA    44.44.44.44 [110/14] via 16.16.16.1, 00:03:29, Ethernet0
     15.0.0.0/24 is subnetted, 1 subnets
O       15.15.15.0 [110/11] via 16.16.16.1, 00:05:14, Ethernet0
bb3#
we notice we now have new external ospf networ 22.22.22.22 which was redistributed by
sw2 into the ospf domain
bb3#sh ip ospf database
            OSPF Router with ID (3.33.3.3) (Process ID 1)
                Router Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum Link count
3.33.3.3        3.33.3.3        975         0x80000002 0x002015 2
15.15.15.1      15.15.15.1      374         0x80000004 0x000F64 1
33.33.33.33     33.33.33.33     974         0x80000005 0x0090B5 2
                Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
15.15.15.4      33.33.33.33     1872        0x80000001 0x000AC7
16.16.16.2      3.33.3.3        975         0x80000001 0x00CD61
                Summary Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         15.15.15.1      265         0x80000001 0x00308F
4.4.4.4         15.15.15.1      265         0x80000001 0x007587
9.9.9.0         15.15.15.1      296         0x80000005 0x00D618
10.10.10.0      15.15.15.1      265         0x80000001 0x00C42A
10.164.49.0     15.15.15.1      265         0x80000001 0x003BE7
10.228.254.0    15.15.15.1      266         0x80000001 0x00FB23
10.229.254.0    15.15.15.1      266         0x80000001 0x00726B
11.11.11.0      15.15.15.1      266         0x80000001 0x002388
13.13.13.0      15.15.15.1      266         0x80000001 0x00E4BF
13.13.13.0      33.33.33.33     1595        0x80000004 0x00D5B7
33.33.33.33     33.33.33.33     1918        0x80000001 0x00BD75
44.44.44.44     15.15.15.1      266         0x80000001 0x004813
172.25.13.0     15.15.15.1      266         0x80000001 0x00B682
222.222.222.222 15.15.15.1      266         0x80000001 0x003659
                Summary ASB Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
2.2.2.2         15.15.15.1      117         0x80000001 0x00C340
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
22.22.22.22     2.2.2.2         123         0x80000001 0x0075E8 0

we have new lsa type 5 External it was advertised by 2.2.2.2 it is advertising the
link state for bb2 loopback 22.22.22.22 coming from eigrp it advertising a metric of
20

bb3#sh ip ospf database external 22.22.22.22
            OSPF Router with ID (3.33.3.3) (Process ID 1)
                Type-5 AS External Link States
  Routing Bit Set on this LSA
  LS age: 235
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 22.22.22.22 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x75E8
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 10.164.49.2
        External Route Tag: 0
bb3#


we can see we are getting advertised the summary asbr from 15.15.15.1 our ABR it has
metric of 2 to the asbr which is 2.2.2.2

bb3#sh ip ospf database asbr-summary
            OSPF Router with ID (3.33.3.3) (Process ID 1)
                Summary ASB Link States (Area 2)
  Routing Bit Set on this LSA
  LS age: 370
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 2.2.2.2 (AS Boundary Router address)
  Advertising Router: 15.15.15.1
  LS Seq Number: 80000001
  Checksum: 0xC340
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 2
bb3#
this describes 15.15.15.1 our abr connection to the asbr
lets take a look at summarization

We will first look at summarising on abrs the internal ospf inter area routes lsa
type 3

ok we will look at summarisation particularly summarization as traffic engineering
tool
ok so currently r3 has 2 abrs to get to networks in area 1 we can go via r4 or we can
go via sw4 through s1 

we will take a look at 10.228.254.5 which is link connected to s2 in area 1 from r3
perspective

r3
---

O IA    10.228.254.0 [110/3] via 12.12.12.3, 00:00:47, FastEthernet0/0

so we are going out the fa0/0 inteface connecting to s1

if we do a traceroute we are going s1-s4-s2

r3#traceroute 10.228.254.5 ttl 0 5
Type escape sequence to abort.
Tracing the route to 10.228.254.5
  0 12.12.12.3 0 msec 0 msec 4 msec
  1 12.12.12.3 0 msec 0 msec 4 msec
  2 9.9.9.1 0 msec 0 msec 4 msec
  3 10.228.254.5 0 msec 0 msec *

r3#sh ip ospf database summary 10.228.254.0
            OSPF Router with ID (3.3.3.3) (Process ID 1)
                Summary Net Link States (Area 0)
  Routing Bit Set on this LSA
  LS age: 238
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 10.228.254.0 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0xE855
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 1
  Routing Bit Set on this LSA
  LS age: 1637
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 10.228.254.0 (summary Network Number)
  Advertising Router: 44.44.44.44
  LS Seq Number: 80000001
  Checksum: 0xC09B
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 66

we now about 10.228.254.0 from the two abrs r4 and s4
s4 is advertising to us a lower metric in it path to 10.228.254.0 we also have to add
on our cost to get to s4 but it is working lower as it is selected as the path
Now imagine we want to influence the path selection using summarisation
we know that if we summarise 10.228.254.0 + 10.229.254.0 to say 10.228.0.0/15 on s4
that r3 should not recieve 10.228.254.0/24 adverisement from s4 it will only recieve
10.228.0.0/15 and it will still recieve 10.228.254.0/24 from r4 so irregardless of
metric as r4 has a longer match it should take this path
so on s4
------------
As is an internal summary we are summarising the lsa type 3 we use the area range
command

switch4(config-router)#router ospf 1
switch4(config-router)#area 1 range 10.228.0.0 255.254.0.0
switch4(config-router)#

r3
---

O IA    10.228.254.0/24 [110/68] via 11.11.11.1, 00:01:11, Serial1/0.1
so it is now going to the r4
if we look at the trace route
r3#traceroute 10.228.254.5 ttl 0 5
Type escape sequence to abort.
Tracing the route to 10.228.254.5
  0 11.11.11.1 32 msec 32 msec 33 msec
  1 11.11.11.1 36 msec 32 msec 32 msec
  2 10.229.254.6 25 msec 24 msec 28 msec
  3 172.25.13.2 24 msec 24 msec *

it is going the path r4,r2,s2 so we have successfully changed the path


r3#sh ip ospf database summary 10.228.254.0
            OSPF Router with ID (3.3.3.3) (Process ID 1)
                Summary Net Link States (Area 0)
  Routing Bit Set on this LSA
  LS age: 195
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 10.228.254.0 (summary Network Number)
  Advertising Router: 44.44.44.44
  LS Seq Number: 80000002
  Checksum: 0xBE9C
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 66

we can see 10.228.254.0/24 is only known via r4

sw4 is advertising the summary

r3#sh ip ospf database summary 10.228.0.0
            OSPF Router with ID (3.3.3.3) (Process ID 1)
                Summary Net Link States (Area 0)
  Routing Bit Set on this LSA
  LS age: 327
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 10.228.0.0 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0xD964
  Length: 28
  Network Mask: /15
        TOS: 0  Metric: 1

10.228.0.0/15

ok for the final part of the lab i will create a few more loopbacks on bb2
so for loopbacks it will 22.22.22.22 + 22.22.23.23 + 22.22.24.24 all /24
these will be advertised in eigrp to s2


so on s2
--------

D       22.22.22.0 [90/409600] via 10.164.49.2, 00:00:36, FastEthernet0/24
D       22.22.23.0 [90/409600] via 10.164.49.2, 00:03:13, FastEthernet0/24
D       22.22.24.0 [90/409600] via 10.164.49.2, 00:03:19, FastEthernet0/24

since s2 is redistributing eigrp into ospf
if we look at r3
-----------------

O E2    22.22.22.0 [110/20] via 12.12.12.3, 00:01:56, FastEthernet0/0
O E2    22.22.23.0 [110/20] via 12.12.12.3, 00:04:33, FastEthernet0/0
O E2    22.22.24.0 [110/20] via 12.12.12.3, 00:04:38, FastEthernet0/0

they are coming as the default E2 (external) routes


r3#sh ip ospf database external
            OSPF Router with ID (3.3.3.3) (Process ID 1)
                Type-5 AS External Link States
  Routing Bit Set on this LSA
  LS age: 170
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 22.22.22.0 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x5222
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 10.164.49.2
        External Route Tag: 0
we can see we are getting type lsa advertised by r2 we have one of this each for
22.22.22.0 and 22.22.23.0 and 22.22.24.0 i just showed one to cut down on output

ok so we want to cut down these routes to 1 route for all 3. So r3 should only
recieve one route for it
we will summarise to 22.22.16.0/20


SO on the ASBR S2
------------------
switch2(config)#router ospf 1
switch2(config-router)#summary-address 22.22.16.0 255.255.240.0
switch2(config-router)#

r3
---
O E2    22.22.16.0 [110/20] via 12.12.12.3, 00:02:55, FastEthernet0/0

we only the 1 external route 22.22.16.0 instead of 3
and we only recieve 1 type 5 lsa instead of 3
r3#sh ip ospf database external
            OSPF Router with ID (3.3.3.3) (Process ID 1)
                Type-5 AS External Link States
  Routing Bit Set on this LSA
  LS age: 247
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 22.22.16.0 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x87E3
  Length: 36
  Network Mask: /20
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0

No comments:

Post a Comment