OSPF実験(コスト編)

ネットワーク図

R4からR5へping

$ ping 172.20.35.5 -R

PING 172.20.35.5 (172.20.35.5) 56(124) bytes of data.
64 bytes from 172.20.35.5: icmp_seq=1 ttl=62 time=1.83 ms
RR:     172.20.24.4
        172.20.23.2
        172.20.35.3
        172.20.35.5
        172.20.35.5
        172.20.23.3
        172.20.24.2
        172.20.24.4

R2とR3間のコストを100にする

R2# conf t
R2(config)# int eth1
R2(config-if)# ip ospf cost 100
R2(config-if)# end


R3# conf t
R3(config)# int eth1
R3(config-if)# ip ospf cost 100
R3(config-if)# end

もう一度ping

$ ping 172.20.35.5 -R

PING 172.20.35.5 (172.20.35.5) 56(124) bytes of data.
64 bytes from 172.20.35.5: icmp_seq=1 ttl=61 time=1.00 ms
RR:     172.20.24.4
        172.20.12.2
        172.20.13.1
        172.20.35.3
        172.20.35.5
        172.20.35.5
        172.20.13.3
        172.20.12.1
        172.20.24.2

ちゃんと最短経路を選んでくれました