Configuring OSPF default metrics
Before you begin
You configure OSPF on a VRF instance the same way you configure the GlobalRouter, except that you must use VRF Router configuration mode and replace ipv6 with ipv6 ospf.
About this task
Use the following procedure to configure global OSPF default metrics.
Procedure
Example
Configure IPv6 default cost metric for Ethernet to 100, for fast Ethernet to 20, for gig-ethernet, twentyfive-gig-ethernet, forty-gig-Ethernet, and hundred-gig-ethernet to 2, and VLAN to 1.
Switch:1>enable Switch:1#configure terminal Switch:1(config)#router ospf Switch:1(config-ospf)#ipv6 default-cost ethernet 100 Switch:1(config-ospf)#ipv6 default-cost fast-ethernet 20 Switch:1(config-ospf)#ipv6 default-cost gig-ethernet 2 Switch:1(config-ospf)#ipv6 default-cost ten-gig-ethernet 2 Switch:1(config-ospf)#ipv6 default-cost Forty-gig-ethernet 2 Switch:1(config-ospf)#ipv6 default-cost twentyfive-gig-ethernet 2 Switch:1(config-ospf)#ipv6 default-cost hundred-gig-ethernet 2 Switch:1(config-ospf)#ipv6 default-cost vlan 1
Variable definitions
Use the data in the following table to use the ipv6 default-cost command.
Note
Different hardware platforms support different port speeds. For more information, see your hardware documentation.
Variable |
Value |
---|---|
ethernet <1-65535> |
Configures the IPv6 OSPF default metrics. The lower the metric, the more likely that OSPF chooses the link to route an OSPF packet. ethernet is for 10 Mb/s Ethernet (default is 100). |
fast-ethernet <1-65535> |
Configures the IPv6 OSPF default metrics. The lower the metric, the more likely that OSPF chooses the link to route an OSPF packet. fast-ethernet is for 100 Mb/s Fast-Ethernet (default is 10). |
forty-gig-ethernet <1-65535> |
Configures the IPv6 OSPF default metrics. The lower the metric, the more likely that OSPF chooses the link to route an OSPF packet. forty-gig-ethernet is for 10 Mb/s Forty-Gigabit-Ethernet (default is 1). |
gigabit-ethernet <1-65535> |
Configures the IPv6 OSPF default metrics. The lower the metric, the more likely that OSPF chooses the link to route an OSPF packet. gigabit-ethernet is for 10 Mb/s Gigabit-Ethernet (default is 1). |
hundred-gig-ethernet <1-65535> |
Configures the IPv6 OSPF default metrics. The lower the metric, the more likely that OSPF chooses the link to route an OSPF packet. hundred-gig-ethernet is for 100 Gigabit Ethernet (default is 1). |
ten-gig-ethernet <1-65535> |
Configures the IPv6 OSPF default metrics. The lower the metric, the more likely that OSPF chooses the link to route an OSPF packet. ten-gig-ethernet is for 10 Mb/s Ten-Gigabit-Ethernet (default is 1). |
twentyfive-gig-ethernet <1-65535> |
Configures the IPv6 OSPF default metrics. The lower the metric, the more likely that OSPF chooses the link to route an OSPF packet. On a channelized 100 Gbps port, the default-cost for each 25 Gbps channel is 1. |
vlan <1-65535> |
Configures the IPv6 OSPF default metrics. The lower the metric, the more likely that OSPF chooses the link to route an OSPF packet. vlan is for Vlan interfaces (default is 10). |