Thursday, February 16, 2012

Side Notes


1. Understanding the command:  spaning-tree vlan 68 root primary diameter 3 hello-time 1

Based just on diameter value, Cisco IOS may calculate all other timer values suitable for the particular STP topology. The idea is that all timers essentially depend on few fixed parameters (e.g. hello timer) and the network diameter. The command itself is a macro, which is expanded into a number of additional commands. If you want to read more on the relations between STP timers and network diameter check out the following link:
http://www.cisco.com/en/US/tech/tk389/tk621/technologies_tech_note09186a0080094954.shtml

2. There exist a command "set ip next-hop peer-address" which could be applied under a route-map. This command does the same as next-hop-self, BUT it allows you to do so on per-prefix basis. For example:

---
ip prefix-list TEST permit 150.1.1.0/24
!
route-map NEXT_HOP
match ip address prefix-list TEST
set ip next-hop peer-address
!
router bgp 100
neighbor 155.1.22 remote-as 100
...
neighbor 155.1.2.2 route-map NEXT_HOP out
---

You can also use the command "set ip next-hop 150.1.1.1" (explicit next-hop) in a route-map to change the next-hop to self. All three alternative are viable, just use the one that suits you better.