Konfigurasikan OSPF yang akan di set default route nantinya
R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 12.12.12.0 0.0.0.255 area 0
R2(config)#router ospf 2
R2(config-router)#network 12.12.12.0 0.0.0.255 area 0
R2(config-router)#network 23.23.23.0 0.0.0.255 area 0
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0
R3(config)#router ospf 3
R3(config-router)#network 23.23.23.0 0.0.0.255 area 0
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0
tambah ip loopback yang tidak akan diadvertise ke ospf, loopback ini tidak masuk routing table hanya sebagi uji coba default route.R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 12.12.12.0 0.0.0.255 area 0
R2(config)#router ospf 2
R2(config-router)#network 12.12.12.0 0.0.0.255 area 0
R2(config-router)#network 23.23.23.0 0.0.0.255 area 0
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0
R3(config)#router ospf 3
R3(config-router)#network 23.23.23.0 0.0.0.255 area 0
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0
R1(config)#int lo1
R1(config-if)#ip address 10.10.10.1 255.255.255.255
R1(config-if)#int lo2
R1(config-if)#ip address 10.10.10.2 255.255.255.255
R1(config)#int lo3
R1(config-if)#ip address 10.10.10.3 255.255.255.255
R1(config)#router ospf 1
R1(config-router)#default-information originate always
Perintah diatas berfungsi untuk mendistribusikan default route kedalam ospf. Keyword always berfungsi bila tidak ada baris perintah static default route (ip route x.x.x.x)R1(config-if)#ip address 10.10.10.1 255.255.255.255
R1(config-if)#int lo2
R1(config-if)#ip address 10.10.10.2 255.255.255.255
R1(config)#int lo3
R1(config-if)#ip address 10.10.10.3 255.255.255.255
R1(config)#router ospf 1
R1(config-router)#default-information originate always
R2(config)#do sh ip route
Gateway of last resort is 12.12.12.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 12.12.12.1, 00:00:29, Ethernet0/0
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 12.12.12.1, 00:05:20, Ethernet0/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/11] via 23.23.23.3, 00:04:48, Ethernet0/1
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.12.12.0/24 is directly connected, Ethernet0/0
L 12.12.12.2/32 is directly connected, Ethernet0/0
23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 23.23.23.0/24 is directly connected, Ethernet0/1
L 23.23.23.2/32 is directly connected, Ethernet0/1
R2(config)#do ping 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R3(config)#do sh ip route 10.10.10.2
% Network not in table
bisa dilihat diatas ip 10.10.10.1 yang ada pada loopback sudah bisa di ping tapi apabila di cek di routing table tidak terdeteksi.
Gateway of last resort is 12.12.12.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 12.12.12.1, 00:00:29, Ethernet0/0
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 12.12.12.1, 00:05:20, Ethernet0/0
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/11] via 23.23.23.3, 00:04:48, Ethernet0/1
12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 12.12.12.0/24 is directly connected, Ethernet0/0
L 12.12.12.2/32 is directly connected, Ethernet0/0
23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 23.23.23.0/24 is directly connected, Ethernet0/1
L 23.23.23.2/32 is directly connected, Ethernet0/1
R2(config)#do ping 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R3(config)#do sh ip route 10.10.10.2
% Network not in table
0 Komentar
Penulisan markup di komentar