RE: Scott, Please help with DISTANCE command!!

From: Huan Pham (huan.pham@valuenet.com.au)
Date: Wed Dec 19 2007 - 02:03:31 ART


Sridhar,

Your config works OK on my lab. Maybe this is a bug with your IOS version,
or something else wrong in your config. I did have the similar problem due
to old IOS.

An alternative way, (which is a cleaner solution in my opinion) to achieve
your same goal is to use route-map when you redistribute from OSPF-TO-EIGRP,
and change metric for any routes you want.

Cheers,

R1#sh run | b router
router eigrp 100
 network 100.100.100.0 0.0.0.255
 network 192.168.1.0
 no auto-summary
!
router ospf 1
 router-id 1.1.1.1
 redistribute eigrp 100 subnets
 network 10.10.10.0 0.0.0.255 area 0
!

R3#sh run | b router
router eigrp 100
 network 100.100.100.0 0.0.0.255
 network 192.168.1.0
 no auto-summary
!
router ospf 1
 router-id 3.3.3.3
 redistribute eigrp 100 subnets route-map EIGRP-TO-OSPF
 network 10.10.10.0 0.0.0.255 area 0
!
!
!
access-list 1 permit 192.168.1.0 0.0.0.255
!
route-map EIGRP-TO-OSPF permit 10
 match ip address 1
 set metric 10
!
route-map EIGRP-TO-OSPF permit 20
! Default metric, just for clarity
 set metric 20

R2#sh ip route
Codes: C - connected, S - static, 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
       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

     2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0

     100.0.0.0/24 is subnetted, 1 subnets
! Load balance btw R1 & R3 by default
! for subnets not being tweaked by the Route-map
O E2 100.100.100.0 [110/20] via 10.10.10.6, 00:07:15, Serial0/3 <<<<<<<
                      [110/20] via 10.10.10.2, 00:07:15, Serial0/2 <<<<<<<

     10.0.0.0/30 is subnetted, 2 subnets
C 10.10.10.0 is directly connected, Serial0/2
C 10.10.10.4 is directly connected, Serial0/3

! Take R3 as the preferred route for 192.168.1.0/24
O E2 192.168.1.0/24 [110/10] via 10.10.10.6, 00:07:15, Serial0/3 <<<<<<<

R2#sh ip ospf database external

            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA
  LS age: 299
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 100.100.100.0 (External Network Number )
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xABC3
  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

  Routing Bit Set on this LSA
  LS age: 368
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 100.100.100.0 (External Network Number )
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000003
  Checksum: 0x6BF9
  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

  LS age: 314
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 192.168.1.0 (External Network Number )
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000004
  Checksum: 0x728
  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

  Routing Bit Set on this LSA
  LS age: 461
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 192.168.1.0 (External Network Number )
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000003
  Checksum: 0x68C9
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 10
        Forward Address: 0.0.0.0
        External Route Tag: 0

Cheers,
 
Huan

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Sridhar Vaidyanathan
Sent: Wednesday, 19 December 2007 11:02 AM
To: Tarun Pahuja
Cc: Cisco certification
Subject: Re: Scott, Please help with DISTANCE command!!

Hi Tarun,

But the problem is the the AD needs to be changed only for a particular
route and not all others. That route is learned through multiple paths
through the same routing protocol i.e. OSPF. I am using router-id of the
router R3 (as shown in my previous mail) for matching the source ip address.
The LSA database was checked and found that the route is learned from
Router-ID of both R1 and R3.

I lab'd it and found that the AD changes for the route learned from both the
paths. Is it that the distance command only works when you need to prefer
the route learned from one routing protocol over the other. If that is the
case, how can solve the problem mentioned?

I have seen scenarios in Internetwork expert labs, where redistributing
mutual redistribution between OSPF and EIGRP on multiple routers, distance
command effectively works to prefer EIGRP External routes to be preferred
over OSPF routes, in the routers doing the redistribution.

Regards,
Sridhar.

On Dec 17, 2007 3:05 AM, Tarun Pahuja <pahujat@gmail.com> wrote:

> Sridhar,
> Use the distance command without the access-list. If you have
> access to Jeff Doyle Volume 1 second edition, the concept is explained on
> page 723.
>
> Router ospf 1
> distance 80 3.3.3.3 0.0.0.0
>
> HTH,
> Tarun
>
>
>
>
> On 12/16/07, Sridhar Vaidyanathan <vsridhar83@gmail.com> wrote:
>
> > Hi Scott,
> >
> > Following is a scenario, which I have asked before but couldn't find a
> > suitable reply.
> >
> > EIGRP OSPF
> > ----------R1-----------R2
> > EIGRP OSPF |
> > ----------R3------------|
> >
> > Both R1 and R3 is redistributing EIGRP routes into OSPF. R3 would load
> > balance across the 2 routers to reach EIGRP routes assuming that R1 and
> > R3
> > are passing the EIGRP routes with metric-type of E2 and an equal metric.
> >
> > I am using DISTANCE command at R2 to match the route which should be
> > preferred via R3. The route is being learned from both R1 and R3 as
> > mutual
> > redistribution has been configured between OSPF and EIGRP on both R1 and
> > R3.
> > I am also using the source ip address as the router-id of the R3 in the
> > distance command. Below is the configuration on R2
> >
> > router ospf 1
> > distance 80 3.3.3.3 0.0.0.0 1 (Where 3.3.3.3 is the router-id of R3)
> >
> > access-list 1 permit 192.168.1.0 0.0.0.255
> >
> > This however, is not working. The above configuration changes the AD for
> > both the routes from both R1 and R3.
> >
> > Please help me in understanding and solving this.
> >
> >
> > Thanks,
> > Sridhar.
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Tue Jan 01 2008 - 12:04:31 ARST