cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1064
Views
0
Helpful
2
Replies

OSPF auto-cost reference-bandwidth - best way to change it on multiple devices

smailmilak
Level 4
Level 4

Hi,

we are installing new gear with 100G links and because of auto-cost reference-bandwidth 10000 we have to change it to 1000000 (1Tbps).

The problem is that we have over 200 devices under OSPF area 0 with multiple links on each.

One way is to connect to every device, check the cost, add it under the interface and after that change auto-cost. After every device is reconfigured we can remove that statically assigned cost.

Is there a better, faster way to change it?

I wonder why Cisco has no implemented a way to change auto-cost on every device at the same time.

e.g. auto-cost reference-bandwidth "at 23:00"

We have IOS, IOS-XR and IOS-XE in out network.

1 Accepted Solution

Accepted Solutions

andrewswanson
Level 7
Level 7

Hi

have you looked at using tcl scripts? below script will set ospf ref bw to 5656 for ospf process 1 - kron job will run the script once at 21:58

hth

Andy

tclsh
puts [open "nvram:ospf-cost.tcl" w] {
ios_config "router ospf 1" "auto-cost reference-bandwidth 5656"
}
tclquit
config t
kron policy-list ospf-cost.tcl
cli tclsh nvram:ospf-cost.tcl
exit
kron occurrence ospf-cost.tcl at 21:58 oneshot
policy-list ospf-cost.tcl

View solution in original post

2 Replies 2

andrewswanson
Level 7
Level 7

Hi

have you looked at using tcl scripts? below script will set ospf ref bw to 5656 for ospf process 1 - kron job will run the script once at 21:58

hth

Andy

tclsh
puts [open "nvram:ospf-cost.tcl" w] {
ios_config "router ospf 1" "auto-cost reference-bandwidth 5656"
}
tclquit
config t
kron policy-list ospf-cost.tcl
cli tclsh nvram:ospf-cost.tcl
exit
kron occurrence ospf-cost.tcl at 21:58 oneshot
policy-list ospf-cost.tcl

Hi,

tcl is a good way to do this, thanks for the script.

I can try to convince our customer to go with TCL.