Sunday, 5 May 2013

OSPF - Virtual link

OSPF Virtual Link merupakan solusi terhadap area yang tidak terhubung langsung ke area 0

TOPOLOGI






R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#int fa0/0
R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 12.12.12.1 0.0.0.0 area 1

R2(config)#int lo0
R2(config-if)#int fa0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int s0/0
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#router ospf 2
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 2.2.2.2 0.0.0.0 area 1
R2(config-router)#network 12.12.12.2 0.0.0.0 area 1
R2(config-router)#network 23.23.23.2 0.0.0.0 area 2

R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#int s0/0
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#no clock rate 2000000
R3(config-if)#no shut
R3(config-if)#router ospf 3
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 23.23.23.3 0.0.0.0 area 2
R3(config-router)#network 3.3.3.3 0.0.0.0 area 3

routing tabelnya belum lengkap
R1#sh ip route
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/11] via 12.12.12.2, 00:00:14, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0

bila menggunakan area lain pada ospf harus terhubung ke area 0, bila tidak maka routing table nya  tidak lengkap .
pada topologi ini hanya R1 yang terhubung ke OSPF databasenya,
maka hanya R1 yang menampilkan informasi tentang area 0.
R1#show ip ospf database

            OSPF Router with ID (1.1.1.1) (Process ID 1)

        Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1209        0x80000002 0x00D152 1

        Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
2.2.2.2         1.1.1.1         364         0x80000001 0x007DA8
12.12.12.0      1.1.1.1         1204        0x80000001 0x001EEC

        Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         369         0x80000002 0x002EA7 1
2.2.2.2         2.2.2.2         369         0x80000003 0x001D96 2

        Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
12.12.12.1      1.1.1.1         368         0x80000001 0x004CB8
         
                Summary Net Link States (Area 1)
         
Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         1210        0x80000001 0x0047EC
R1#

berikut ini kita konfigurasikan virtual linknya, virtual link ini dikonfigurasikan dua sisi yaitu R1 dan R2 kemudian antara R2 dan R3.
pada R2 yang memiliki 2 area yang terhubung langsung area 0, maka virtual link dibuat melalui area 1 sebagai jembatan.
R2(config)#router os 2
R2(config-router)#area 1 virtual-link 1.1.1.1
R1(config)#router os 1        
R1(config-router)#area 1 virtual-link 2.2.2.2
R1(config-router)#do sh ip route
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/11] via 12.12.12.2, 00:13:34, FastEthernet0/0
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.23.23.0 [110/74] via 12.12.12.2, 00:01:20, FastEthernet0/0
     12.0.0.0/r.12.0 is directly connected, FastEthernet0/0

network pada area 2 sudah muncul pada routing tabel,berikutnya kita konfigurasikan virtual link pada R3, area 2 digunakan sebagai jembatanya.
R3(config)#router os 3
R3(config-router)#area 2 virtual-link 2.2.2.2
R2(config)#router os 2
R2(config-router)#area 2 virtual-link 3.3.3.3

cek lagi tabel routingnya
R1(config-router)#do sh ip route
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/11] via 12.12.12.2, 00:19:37, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/75] via 12.12.12.2, 00:01:24, FastEthernet0/0
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.23.23.0 [110/74] via 12.12.12.2, 00:07:23, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
sekarang, router sudah mengenal network pada area1 ,area 2, dan  area 3
R3(config-router)#do ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/28/92 ms
R3(config-router)#
R3(config-router)#do sh ip ospf virtual-link
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 2, via interface Serial0/0, Cost of using 64
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:02
    Adjacency State FULL (Hello suppressed)
    Index 1/2, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec