Glen Turner (vk5tu) wrote,
Glen Turner

Cisco IOS and the "network" statement

This has to be the second-most misunderstood statement. Here's how it works.

Each routing process maintains its own routing table. So there is a table for BGP, a table for OSPF, a table for RIP, a table for static routes, a table for routes to connected interfaces and so on.

There is a forwarding table. This determines the next-hop of packets flowing through the router.

Entries in the routing table are placed into the forwarding table. If two routes clash then the routing protocol with the better "administrative distance" wins: connected > static > exterior routes > interior routes.

Entries in the forwarding table are placed in a routing table is there is an exactly matching "network" statement in the routing process's configuration and the entry in the forwarding table wasn't put there by this routing process.

Let's take the trivial case, a connected interface

interface Ethernet0
 ip address

router ospf 65000

You often see this

ip route

router ospf 65000
 redistribute static
Don't do that, do this:
ip route

router ospf 65000

Getting rid of the "redistribute" statement removes a common cause of routing loops. "Redistribute" should really be a hidden command, it's only useful for people who know what they are doing.

Tags: rant
  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.