Sunday 13 December 2015

OSPF Metric Cost









Note Path with the least cost is chosen.
Cost is the OSPF Metric.

Note change cost on outgoing interface not incoming interface.
AS per the Forum I use and the Books , both ends of the
Router's connecting together are to be changed.Like 
Router1 g0/1 Interface and Router2 g0/0 interface.



Cost = 10^8/ BW Note : 10^8 can be changed using 
auto-cost reference-bandwidth.

Router 1 before :
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.1.0/24 is directly connected, GigabitEthernet0/0

L 192.168.1.2/32 is directly connected, GigabitEthernet0/0

O 192.168.2.0/24 [110/2] via 192.168.1.1, 01:04:30, GigabitEthernet0/0

192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.3.0/24 is directly connected, GigabitEthernet0/1

L 192.168.3.1/32 is directly connected, GigabitEthernet0/1

O 192.168.4.0/24 [110/2] via 192.168.3.2, 00:04:49, GigabitEthernet0/1

O 192.168.5.0/24 [110/3] via 192.168.3.2, 00:04:49, GigabitEthernet0/1

[110/3] via 192.168.1.1, 00:04:49, GigabitEthernet0/0

O 192.168.6.0/24 [110/2] via 192.168.3.2, 00:04:31, GigabitEthernet0/1



Changes on Router 1 :

Router(config)#int g0/1

Router(config-if)#ip ospf cost 20000

Router(config-if)#end


Router 1 after:
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.1.0/24 is directly connected, GigabitEthernet0/0

L 192.168.1.2/32 is directly connected, GigabitEthernet0/0

O 192.168.2.0/24 [110/2] via 192.168.1.1, 01:04:32, GigabitEthernet0/0

192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.3.0/24 is directly connected, GigabitEthernet0/1

L 192.168.3.1/32 is directly connected, GigabitEthernet0/1

O 192.168.4.0/24 [110/3] via 192.168.1.1, 00:00:00, GigabitEthernet0/0

O 192.168.5.0/24 [110/3] via 192.168.1.1, 00:00:00, GigabitEthernet0/0

O 192.168.6.0/24 [110/4] via 192.168.1.1, 00:00:00, GigabitEthernet0/0




On Router 1 :



Router#show ip ospf int g0/1

GigabitEthernet0/1 is up, line protocol is up

Internet address is 192.168.3.1/24, Area 0

Process ID 11, Router ID 192.168.3.1, Network Type BROADCAST, Cost: 20000

Router#show int g0/1

GigabitEthernet0/1 is up, line protocol is up (connected)

Hardware is CN Gigabit Ethernet, address is 0002.4a25.c102 (bia 0002.4a25.c102)

Internet address is 192.168.3.1/24

MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,


OSPF Cost

The cost (also called metric) of an interface in OSPF is an indication of the overhead required to send packets across a certain interface. The cost of an interface is inversely proportional to the bandwidth of that interface. A higher bandwidth indicates a lower cost. There is more overhead (higher cost) and time delays involved in crossing a 56k serial line than crossing a 10M ethernet line. The formula used to calculate the cost is:
  • cost= 10000 0000/bandwidth in bps
For example, it will cost 10 EXP8/10 EXP7 = 10 to cross a 10M Ethernet line and will cost 10 EXP8/1544000 = 64 to cross a T1 line.

Note :
10 Mbps = 10*10^6     ---------10BaseT
100 Mbps = 100*10^6  --------100BaseT
1000 Mbps = 1000*10^6 ---- 1000BaseT
1000BASE-T is Gigabit Ethernet (1 gigabit is 1000 megabits per second) 

T1(DS-1) line Bandwidth = 1.544 Mbps or 1.5Mbps
T3(DS-3) line Bandwidth = 44.736 Mbps

Source.






No comments:

Post a Comment