Can I prevent OSPF from advertising a specific network on aninterface

Discussion in 'Cisco' started by ve7eje, Mar 18, 2010.

  1. ve7eje

    ve7eje Guest

    Is there a way to tell OSPF to not advertise a specific network on a
    spefic interface without stopping the adverts of other networks?
    Example
    Router has 5 interfaces
    F1 is a link to another router
    F2 is a link to another router
    F3 = netB
    F4 = netC
    F5 = netD

    I need nets BCD to be advertised out F1 and F2 but not each other.
    Similarly I need nets learned on F1 and F2 to be advertised on F1, F2
    and F3 only.

    I've looked at the passive interface command but I don't think it will
    do what I want.

    Thanks -Rob-
     
    ve7eje, Mar 18, 2010
    #1
    1. Advertising

  2. ve7eje

    Thrill5 Guest

    Re: Can I prevent OSPF from advertising a specific network on an interface

    You need to use a distribute list on the interface.


    "ve7eje" <> wrote in message
    news:...
    > Is there a way to tell OSPF to not advertise a specific network on a
    > spefic interface without stopping the adverts of other networks?
    > Example
    > Router has 5 interfaces
    > F1 is a link to another router
    > F2 is a link to another router
    > F3 = netB
    > F4 = netC
    > F5 = netD
    >
    > I need nets BCD to be advertised out F1 and F2 but not each other.
    > Similarly I need nets learned on F1 and F2 to be advertised on F1, F2
    > and F3 only.
    >
    > I've looked at the passive interface command but I don't think it will
    > do what I want.
    >
    > Thanks -Rob-
     
    Thrill5, Mar 18, 2010
    #2
    1. Advertising

  3. ve7eje

    bod43 Guest

    On 18 Mar, 23:20, "Thrill5" <> wrote:
    > You need to use a distribute list on the interface.
    >
    > "ve7eje" <> wrote in message
    >
    > news:...
    >
    > > Is there a way to tell OSPF to not advertise a specific network on a
    > > spefic interface without stopping the adverts of other networks?
    > > Example
    > > Router has 5 interfaces
    > > F1 is a link to another router
    > > F2 is a link to another router
    > > F3 = netB
    > > F4 = netC
    > > F5 = netD

    >
    > > I need nets BCD to be advertised out F1 and F2 but not each other.
    > > Similarly I need nets learned on F1 and F2 to be advertised on F1, F2
    > > and F3 only.

    >
    > > I've looked at the passive interface command but I don't think it will
    > > do what I want.

    >


    Sorry Thrill5, but I suspect that is not the whole story.

    In a word - no. Due to the architecture of OSPF it is not
    possible to so restrict the advertisment of networks.

    Under some circumstances it is possible to filter routes,
    e.g. when re-distributing between OSPF processes,
    perhaps between OSPF Areas?, however
    in general this is not possible.

    OSPF works by every router sending out Link State
    Advertisments (LSA). These represent the network
    topology. All the routers in an area eventually receive
    all of the LSAs as sent by every router in the area.
    Each router then uses the LSAs to construct a
    topology database. The routing tables in each router
    are then calculated independently by each router
    from its own copy of the topology database.

    The key thing is that every router in a area *must*
    have the same topology database. Well maybe
    ends up with the same topology database is more
    accurate:)

    So if your "router" has knowledge of the topology it will send it
    to all of the other routers.

    You can use EIGRP since it works by sending routes
    which you can of course effectively filter.

    Perhaps you could find a solution with multiple OSPF
    processes and redistribution between them. You can
    apply filters to the redistribution process since they are
    simple routes. I may have a think about it later. Seems
    pretty likely at first glance.
     
    bod43, Mar 19, 2010
    #3
  4. ve7eje

    Stephen Guest

    Re: Can I prevent OSPF from advertising a specific network on an interface

    On Thu, 18 Mar 2010 07:47:44 -0700 (PDT), ve7eje <>
    wrote:

    >Is there a way to tell OSPF to not advertise a specific network on a
    >spefic interface without stopping the adverts of other networks?
    >Example
    >Router has 5 interfaces
    >F1 is a link to another router
    >F2 is a link to another router
    >F3 = netB
    >F4 = netC
    >F5 = netD
    >
    >I need nets BCD to be advertised out F1 and F2 but not each other.
    >Similarly I need nets learned on F1 and F2 to be advertised on F1, F2
    >and F3 only.


    as the other posters said - OSPF works by replicating the link state
    database to other OSPF routers within the area.

    However - advertising the OSPF topology (or not) only matters if there
    is another router on net BCD.

    so - dont run OSPF on those interfaces (or operate in passive). If
    this router doesnt have 2 way OSPF comms with another router it will
    not form an adjacency and cannot exchange routes.

    >
    >I've looked at the passive interface command but I don't think it will
    >do what I want.
    >

    it does sound like a different protocol may be the best way to do this
    - BGP?

    >Thanks -Rob-

    --
    Regards

    - replace xyz with ntl
     
    Stephen, Mar 19, 2010
    #4
  5. Re: Can I prevent OSPF from advertising a specific network on an ?interface

    Hello,

    bod43 <> wrote:
    > In a word - no. Due to the architecture of OSPF it is not
    > possible to so restrict the advertisment of networks.


    In general, this is true. With a slightly modified architecture
    that is used by all ISPs that I know personally, you can still
    achieve the desired effect.

    Short version: instead of e.g.

    router ospf 1
    network 217.29.32.0 0.0.15.255

    (which happens to be my RIPE allocation, AS16188)

    you use

    router ospf 1
    passive-interface default
    no passive-interface <int to neighbour 1>
    no passive-interface <int to neighbour 2>
    no passive-interface <int to neighbour 3>
    ...
    network <ip of int to neighbour 1> 0.0.0.0
    network <ip of int to neighbour 2> 0.0.0.0
    network <ip of int to neighbour 3> 0.0.0.0
    ...
    redistribute connected subnets route-map ospf-out
    redistribute static subnets route-map ospf-out

    This way all prefixes routed to customers are distributed
    accross my entire backbone as AS external. With the route
    map in place you can prevent prefixes from being redistributed
    into OSPF at the originating (i.e. directly connected) router.


    Best regards, HTH,
    Patrick
    --
    punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe
    Tel. 0721 9109 0 * Fax 0721 9109 100
    http://www.punkt.de
    Gf: J├╝rgen Egeling AG Mannheim 108285
     
    Patrick M. Hausen, Mar 22, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pete Mainwaring

    OSPF not advertising a network

    Pete Mainwaring, Jul 29, 2004, in forum: Cisco
    Replies:
    9
    Views:
    809
    Pete Mainwaring
    Aug 2, 2004
  2. mimiseh
    Replies:
    3
    Views:
    970
  3. Replies:
    3
    Views:
    891
  4. philbo30
    Replies:
    1
    Views:
    639
  5. Rick F
    Replies:
    9
    Views:
    595
    Sam Wilson
    Apr 27, 2009
Loading...

Share This Page