OSPF Filtering - Ganjil Genap - NETBLOG

OSPF Filtering - Ganjil Genap

OSPF Filtering - Ganjil Genap

Oke Guys, kali ini saya akan melanjutkan lagi pembahasan mengenai OSPF, sekarang kita akan membahas tentang OSPF Filtering Ganjil Genap. Maksudnya kita akan memfilter network yang ganjil, misal 1.1.1.1, 1.1.1.3, 1.1.1.5. Atau network yang genap seperti 1.1.1.2, 1.1.1.4, 1.1.1.6. Oke langsung aja masuk ke labnya, berikut topologi dan konfigurasinya.

Topologi
Skenario:
Semua network loopback pada area 1, baik genap maupun ganjil tidak terdaftar di routing table router area 2.

Sekarang beri IP pada setiap router, dan masukkan kedalam OSPF.
Konfigurasi di R1:
R1(config)#int fa0/0
R1(config-if)#no sh
R1(config-if)#ip add 14.14.14.1 255.255.255.0
R1(config-if)#int fa0/1
R1(config-if)#no sh
R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#router ospf 1
R1(config-router)#net 1.1.1.1 0.0.0.0 area 0
R1(config-router)#net 12.12.12.1 0.0.0.0 area 0
R1(config-router)#net 14.14.14.1 0.0.0.0 area 0

Konfigurasi di R2:
R2(config)#int fa0/0
R2(config-if)#no sh
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#int fa0/1
R2(config-if)#no sh
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#router osp 2
R2(config-router)#net 23.23.23.2 0.0.0.0 area 0
R2(config-router)#net 12.12.12.2 0.0.0.0 area 0
R2(config-router)#net 2.2.2.2 0.0.0.0 area 0

Konfigurasi di R3:
R3(config)#int f0/0
R3(config-if)#no sh
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#int fa0/1
R3(config-if)#no sh
R3(config-if)#ip add 35.35.35.3 255.255.255.0
R3(config-if)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config)#router ospf 3
R3(config-router)#net 35.35.35.3 0.0.0.0 area 0
R3(config-router)#net 23.23.23.3 0.0.0.0 area 0
R3(config-router)#net 3.3.3.3 0.0.0.0 area 0

Konfigurasi di R4:
R4(config)#int f0/0
R4(config-if)#no sh
R4(config-if)#ip add 14.14.14.4 255.255.255.0
R4(config-if)#int lo0
R4(config-if)#ip add 4.4.4.1 255.255.255.255
R4(config-if)#int lo1
R4(config-if)#ip add 4.4.4.2 255.255.255.255
R4(config-if)#int lo2
R4(config-if)#ip add 4.4.4.3 255.255.255.255
R4(config-if)#int lo3
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config-if)#int lo4
R4(config-if)#ip add 4.4.4.5 255.255.255.255
R4(config-if)#router ospf 4
R4(config-router)#net 4.4.4.1 0.0.0.0 area 1
R4(config-router)#net 4.4.4.2 0.0.0.0 area 1
R4(config-router)#net 4.4.4.3 0.0.0.0 area 1
R4(config-router)#net 4.4.4.4 0.0.0.0 area 1
R4(config-router)#net 4.4.4.5 0.0.0.0 area 1
R4(config-router)#net 14.14.14.4 0.0.0.0 area 0

Konfigurasi di R5:
R5(config)#int fa0/0
R5(config-if)#no sh
R5(config-if)#ip add 35.35.35.5 255.255.255.0
R5(config-if)#int lo0
R5(config-if)#ip add 5.5.5.1 255.255.255.255
R5(config-if)#int lo1
R5(config-if)#ip add 5.5.5.2 255.255.255.255
R5(config-if)#int lo2
R5(config-if)#ip add 5.5.5.3 255.255.255.255
R5(config-if)#int lo3
R5(config-if)#ip add 5.5.5.4 255.255.255.255
R5(config-if)#int lo4
R5(config-if)#ip add 5.5.5.5 255.255.255.255
R5(config-if)#router ospf 5
R5(config-router)#net 5.5.5.1 0.0.0.0 area 2
R5(config-router)#net 5.5.5.2 0.0.0.0 area 2
R5(config-router)#net 5.5.5.3 0.0.0.0 area 2
R5(config-router)#net 5.5.5.4 0.0.0.0 area 2
R5(config-router)#net 5.5.5.5 0.0.0.0 area 2
R5(config-router)#net 35.35.35.5 0.0.0.0 area 0

Setelah itu kita liat routing table pada salah satu router pastikan semua network telah terdaftar.

R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/21] via 23.23.23.2, 00:00:03, FastEthernet0/0
     35.0.0.0/24 is subnetted, 1 subnets
C       35.35.35.0 is directly connected, FastEthernet0/1
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/11] via 23.23.23.2, 01:41:50, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
     4.0.0.0/32 is subnetted, 5 subnets
O IA    4.4.4.4 [110/31] via 23.23.23.2, 00:15:16, FastEthernet0/0
O IA    4.4.4.5 [110/31] via 23.23.23.2, 00:15:18, FastEthernet0/0
O IA    4.4.4.1 [110/31] via 23.23.23.2, 00:15:18, FastEthernet0/0
O IA    4.4.4.2 [110/31] via 23.23.23.2, 00:15:18, FastEthernet0/0
O IA    4.4.4.3 [110/31] via 23.23.23.2, 00:15:18, FastEthernet0/0
     5.0.0.0/32 is subnetted, 5 subnets
O IA    5.5.5.5 [110/11] via 35.35.35.5, 00:04:53, FastEthernet0/1
O IA    5.5.5.4 [110/11] via 35.35.35.5, 00:04:53, FastEthernet0/1
O IA    5.5.5.1 [110/11] via 35.35.35.5, 00:04:53, FastEthernet0/1
O IA    5.5.5.3 [110/11] via 35.35.35.5, 00:04:53, FastEthernet0/1
O IA    5.5.5.2 [110/11] via 35.35.35.5, 00:04:53, FastEthernet0/1
     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/20] via 23.23.23.2, 01:41:52, FastEthernet0/0
     14.0.0.0/24 is subnetted, 1 subnets
O       14.14.14.0 [110/30] via 23.23.23.2, 01:41:52, FastEthernet0/0

Disini terlihat bahwa semua network dari router yang berbeda dan berbeda area itu telah terdaftar di routing table.

Sekarang kita mau pada router di area 2, hanya network genap dari area 1 saja yang terdaftar di routing table.

R5(config)#acc 1 permit 0.0.0.0 255.255.255.254
R5(config)#router ospf 5

R5(config-router)#distribute-list 1 in

Setelah itu kita lihat routing table yang telah kita beri distribute list.

R5#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     35.0.0.0/24 is subnetted, 1 subnets
C       35.35.35.0 is directly connected, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/21] via 35.35.35.3, 00:00:48, FastEthernet0/0
     4.0.0.0/32 is subnetted, 2 subnets
O IA    4.4.4.4 [110/41] via 35.35.35.3, 00:00:48, FastEthernet0/0
O IA    4.4.4.2 [110/41] via 35.35.35.3, 00:00:48, FastEthernet0/0
     5.0.0.0/32 is subnetted, 5 subnets
C       5.5.5.5 is directly connected, Loopback4
C       5.5.5.4 is directly connected, Loopback3
C       5.5.5.1 is directly connected, Loopback0
C       5.5.5.3 is directly connected, Loopback2
C       5.5.5.2 is directly connected, Loopback1
     23.0.0.0/24 is subnetted, 1 subnets
O       23.23.23.0 [110/20] via 35.35.35.3, 00:00:49, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.12.12.0 [110/30] via 35.35.35.3, 00:00:49, FastEthernet0/0
     14.0.0.0/24 is subnetted, 1 subnets
O       14.14.14.0 [110/40] via 35.35.35.3, 00:00:49, FastEthernet0/0

Disini terlihat hanya network genap yang terdaftar di routing table.

Sekarang kita coba untuk yang ganjilnya. Pertama hapus access-list yang tadi dibuat untuk mengijinkan network genap, lalu buat access-list untuk mengijinkan network ganjil.

R5(config)#no access 1 
R5(config)#acc 18 permit 0.0.0.1 255.255.255.254
R5(config)#router ospf 5 
R5(config-router)#distribute-list 18 in

Setelah itu cek routing table lagi.

R5#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/31] via 35.35.35.3, 00:00:36, FastEthernet0/0
     35.0.0.0/24 is subnetted, 1 subnets
C       35.35.35.0 is directly connected, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/11] via 35.35.35.3, 00:00:36, FastEthernet0/0
     4.0.0.0/32 is subnetted, 3 subnets
O IA    4.4.4.5 [110/41] via 35.35.35.3, 00:00:36, FastEthernet0/0
O IA    4.4.4.1 [110/41] via 35.35.35.3, 00:00:36, FastEthernet0/0
O IA    4.4.4.3 [110/41] via 35.35.35.3, 00:00:38, FastEthernet0/0
     5.0.0.0/32 is subnetted, 5 subnets
C       5.5.5.5 is directly connected, Loopback4
C       5.5.5.4 is directly connected, Loopback3
C       5.5.5.1 is directly connected, Loopback0
C       5.5.5.3 is directly connected, Loopback2
C       5.5.5.2 is directly connected, Loopback1

Disini terlihat hanya ada network yang berangka ganjil saja.

Dengan ini lab kali ini BERHASILL!!!

Selesaii.....


See u on the next post... AND... stay on this blog


Wassalamualaikum warahmatullahi wabarakatuh..













Previous
Next Post »