ospf cost and route selection (openospfd)
Josef Pojsl
jp at tns.cz
Thu Feb 7 04:07:26 PST 2008
Hi Eygene,
Thanks a lot for your remarks. I absolutely agree with you
that all columns are correct except the Nexthop.
On Wed, Feb 06, 2008 at 06:21:42PM +0300, Eygene Ryabinkin wrote:
> Josef, good day.
>
> Currently I can not answer your question, sorry. I just have the
> remark.
>
> Wed, Feb 06, 2008 at 03:41:04PM +0100, Josef Pojsl wrote:
> > ospfctl show rib:
> > Router 1:
> > Destination Nexthop Path Type Type Cost Uptime
> > 0.0.0.2 10.31.2.2 Intra-Area Router 20 00:03:51
> > 10.30.1.2/32 10.31.2.2 Intra-Area Network 40 00:03:41
> > 10.31.1.2/32 10.31.2.2 Intra-Area Network 70 00:03:51
>
> 'Cost' column looks perfectly correct: in order to reach the other
> router, the path with cost 20 is selected (presumably, WAN X); path
> to 10.30.1.2/32 costs 20+20: 20 from WAN X interface and 20 from
> the gre30 on the other end; and path to 10.31 costs 70=20+50,
> WAN X + gre31 on the other end.
>
> The only weird thing is the nexthop value. Your 'netstat -rn' shows
> routes via gre31 too? If yes, maybe the verbose mode of the openospfd
> (-v) will show something interesting?
> --
> Eygene
Yes, netstat -rn shows routes via gre31. I forgot to include its output:
Router 1:
10.30.1.2/32 10.31.2.2 UG2 0 0 gre31
10.30.2/24 10.31.2.2 UG2 0 0 gre31
10.30.2.2 10.30.1.2 UH 0 4148 gre30
10.31.1.2/32 10.31.2.2 UG2 0 0 gre31
10.31.2.2 10.31.1.2 UH 4 3178 gre31
192.168.1 link#3 UC 0 0 re0
192.168.2 10.31.2.2 UG2 0 0 gre31
Router 2:
10.30.1/24 10.31.1.2 UG2 0 0 gre31
10.30.1.2 10.30.2.2 UH 0 4551 gre30
10.30.2.2/32 10.31.1.2 UG2 0 0 gre31
10.31.1.2 10.31.2.2 UH 5 2451 gre31
10.31.2.2/32 10.31.1.2 UG2 0 0 gre31
192.168.1 10.31.1.2 UG2 0 0 gre31
192.168.2 link#4 UC 0 0 int
ospfd -dv shows the following:
Router 1:
startup
orig_asext_lsa: 10.10.0.0/16 age 0
start_spf_timer: IDLE -> DELAY
orig_asext_lsa: 10.20.0.0/16 age 0
orig_asext_lsa: 192.168.1.0/24 age 0
orig_rtr_lsa: area 0.0.0.0
orig_rtr_lsa: stub net, interface gre31
if_fsm: event UP resulted in action START and changing state for interface gre31 from DOWN to P2P
orig_rtr_lsa: area 0.0.0.0
orig_rtr_lsa: stub net, interface gre31
orig_rtr_lsa: stub net, interface gre30
if_fsm: event UP resulted in action START and changing state for interface gre30 from DOWN to P2P
spf_calc: calculation started, area ID 0.0.0.0
spf_calc: calculation ended, area ID 0.0.0.0
spf_start_holdtimer: DELAY -> HOLD
nbr_fsm: event HELLO_RECEIVED resulted in action START_INACTIVITY_TIMER and changing state for neighbor ID 0.0.0.2 from DOWN to INIT
nbr_fsm: event HELLO_RECEIVED resulted in action START_INACTIVITY_TIMER and changing state for neighbor ID 0.0.0.2 from DOWN to INIT
spf_timer: state HOLD -> IDLE
nbr_fsm: event 2_WAY_RECEIVED resulted in action EVAL and changing state for neighbor ID 0.0.0.2 from INIT to EXSTA
if_fsm: event NEIGHBORCHANGE resulted in action NOTHING and changing state for interface gre31 from P2P to P2P
nbr_fsm: event NEGOTIATION_DONE resulted in action SNAPSHOT and changing state for neighbor ID 0.0.0.2 from EXSTA to SNAP
nbr_fsm: event 2_WAY_RECEIVED resulted in action EVAL and changing state for neighbor ID 0.0.0.2 from INIT to EXSTA
if_fsm: event NEIGHBORCHANGE resulted in action NOTHING and changing state for interface gre30 from P2P to P2P
nbr_fsm: event NEGOTIATION_DONE resulted in action SNAPSHOT and changing state for neighbor ID 0.0.0.2 from EXSTA to SNAP
nbr_fsm: event SNAPSHOT_DONE resulted in action SNAPSHOT_DONE and changing state for neighbor ID 0.0.0.2 from SNAP to EXCHG
nbr_fsm: event SNAPSHOT_DONE resulted in action SNAPSHOT_DONE and changing state for neighbor ID 0.0.0.2 from SNAP to EXCHG
nbr_fsm: event EXCHANGE_DONE resulted in action EXCHANGE_DONE and changing state for neighbor ID 0.0.0.2 from EXCHG to LOAD
nbr_fsm: event EXCHANGE_DONE resulted in action EXCHANGE_DONE and changing state for neighbor ID 0.0.0.2 from EXCHG to LOAD
start_spf_timer: IDLE -> DELAY
orig_rtr_lsa: area 0.0.0.0
orig_rtr_lsa: point-to-point, interface gre31
orig_rtr_lsa: stub net, interface gre31
orig_rtr_lsa: stub net, interface gre30
nbr_fsm: event LOADING_DONE resulted in action NOTHING and changing state for neighbor ID 0.0.0.2 from LOAD to FULL
orig_rtr_lsa: area 0.0.0.0
orig_rtr_lsa: point-to-point, interface gre31
orig_rtr_lsa: stub net, interface gre31
orig_rtr_lsa: point-to-point, interface gre30
orig_rtr_lsa: stub net, interface gre30
nbr_fsm: event LOADING_DONE resulted in action NOTHING and changing state for neighbor ID 0.0.0.2 from LOAD to FULL
spf_calc: calculation started, area ID 0.0.0.0
spf_calc: w id 0.0.0.2 type 1 has
no link to v id 0.0.0.1 type 1
spf_calc: w id 0.0.0.2 type 1 has
no link to v id 0.0.0.1 type 1
spf_calc: calculation ended, area ID 0.0.0.0
spf_start_holdtimer: DELAY -> HOLD
spf_timer: state HOLD -> IDLE
start_spf_timer: IDLE -> DELAY
spf_calc: calculation started, area ID 0.0.0.0
spf_calc: calculation ended, area ID 0.0.0.0
spf_start_holdtimer: DELAY -> HOLD
spf_timer: state HOLD -> IDLE
Router 2:
startup
orig_asext_lsa: 10.10.0.0/16 age 0
start_spf_timer: IDLE -> DELAY
orig_asext_lsa: 10.20.0.0/16 age 0
orig_asext_lsa: 192.168.2.0/24 age 0
orig_rtr_lsa: area 0.0.0.0
orig_rtr_lsa: stub net, interface gre31
if_fsm: event UP resulted in action START and changing state for interface gre31 from DOWN to P2P
orig_rtr_lsa: area 0.0.0.0
orig_rtr_lsa: stub net, interface gre31
orig_rtr_lsa: stub net, interface gre30
if_fsm: event UP resulted in action START and changing state for interface gre30 from DOWN to P2P
spf_calc: calculation started, area ID 0.0.0.0
spf_calc: calculation ended, area ID 0.0.0.0
spf_start_holdtimer: DELAY -> HOLD
spf_timer: state HOLD -> IDLE
nbr_fsm: event HELLO_RECEIVED resulted in action START_INACTIVITY_TIMER and changing state for neighbor ID 0.0.0.1 from DOWN to INIT
nbr_fsm: event 2_WAY_RECEIVED resulted in action EVAL and changing state for neighbor ID 0.0.0.1 from INIT to EXSTA
if_fsm: event NEIGHBORCHANGE resulted in action NOTHING and changing state for interface gre31 from P2P to P2P
nbr_fsm: event HELLO_RECEIVED resulted in action START_INACTIVITY_TIMER and changing state for neighbor ID 0.0.0.1 from DOWN to INIT
nbr_fsm: event 2_WAY_RECEIVED resulted in action EVAL and changing state for neighbor ID 0.0.0.1 from INIT to EXSTA
if_fsm: event NEIGHBORCHANGE resulted in action NOTHING and changing state for interface gre30 from P2P to P2P
nbr_fsm: event NEGOTIATION_DONE resulted in action SNAPSHOT and changing state for neighbor ID 0.0.0.1 from EXSTA to SNAP
nbr_fsm: event NEGOTIATION_DONE resulted in action SNAPSHOT and changing state for neighbor ID 0.0.0.1 from EXSTA to SNAP
nbr_fsm: event SNAPSHOT_DONE resulted in action SNAPSHOT_DONE and changing state for neighbor ID 0.0.0.1 from SNAP to EXCHG
nbr_fsm: event SNAPSHOT_DONE resulted in action SNAPSHOT_DONE and changing state for neighbor ID 0.0.0.1 from SNAP to EXCHG
nbr_fsm: event EXCHANGE_DONE resulted in action EXCHANGE_DONE and changing state for neighbor ID 0.0.0.1 from EXCHG to LOAD
nbr_fsm: event EXCHANGE_DONE resulted in action EXCHANGE_DONE and changing state for neighbor ID 0.0.0.1 from EXCHG to LOAD
start_spf_timer: IDLE -> DELAY
orig_rtr_lsa: area 0.0.0.0
orig_rtr_lsa: point-to-point, interface gre31
orig_rtr_lsa: stub net, interface gre31
orig_rtr_lsa: stub net, interface gre30
nbr_fsm: event LOADING_DONE resulted in action NOTHING and changing state for neighbor ID 0.0.0.1 from LOAD to FULL
orig_rtr_lsa: area 0.0.0.0
orig_rtr_lsa: point-to-point, interface gre31
orig_rtr_lsa: stub net, interface gre31
orig_rtr_lsa: point-to-point, interface gre30
orig_rtr_lsa: stub net, interface gre30
nbr_fsm: event LOADING_DONE resulted in action NOTHING and changing state for neighbor ID 0.0.0.1 from LOAD to FULL
spf_calc: calculation started, area ID 0.0.0.0
spf_calc: w id 0.0.0.1 type 1 has
no link to v id 0.0.0.2 type 1
spf_calc: w id 0.0.0.1 type 1 has
no link to v id 0.0.0.2 type 1
spf_calc: calculation ended, area ID 0.0.0.0
spf_start_holdtimer: DELAY -> HOLD
spf_timer: state HOLD -> IDLE
start_spf_timer: IDLE -> DELAY
spf_calc: calculation started, area ID 0.0.0.0
spf_calc: calculation ended, area ID 0.0.0.0
spf_start_holdtimer: DELAY -> HOLD
spf_timer: state HOLD -> IDLE
Regards,
--
Josef
More information about the freebsd-net
mailing list