Saturday, 5 October 2013

RIP Default Route Redistribution

Default route / Gateway of last resort digunakan untuk mengarahkan paket yang bertujuan ke network yang tidak ada di routing tabel. biasanya digunakan bersama nat agar user lokal dapat mengakses ke jaringan internet.
ada 3 cara untuk mendistribusikan default route ke dalam RIP , Default-information-origiante, redistribute static default route, dan ip default-network.


skenario lab ini R1 terhubung ke jaringan internet.
baca disini cara menghubungkan gns3 ke internet.
kemudian konfigurasikan dynamic nat Overload pada R1.
Saat mengkonfigurasikan ip nat pada router mungkin anda akan mengalami error memory seperti yang saya alami, lihat disini untuk solusinya.
konfigurasikan ip domain-lookup dan ip name-server 8.8.8.8 pada semua router.


1. Default-information originate

secara otomatis default-information originate akan mengadvertise semua default route ke dalam RIP.
R1(config-router)#do show run | begin rip        
router rip
 version 2
 network 12.0.0.0
 network 13.0.0.0
 no auto-summary
!
tambahkan subcommand default-information originate pada konfigurasi router rip
R1(config)#router rip
R1(config-router)#default-information originate
cek di routing tabel R2 dan R3, secara otomatis default route akan di kirimkan ke semua router rip
R2#show ip route
Gateway of last resort is 12.12.12.1 to network 0.0.0.0

     23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       23.23.23.0/24 is directly connected, FastEthernet0/1
R       23.0.0.0/8 [120/2] via 12.12.12.1, 00:00:18, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
R       13.13.13.0 [120/1] via 12.12.12.1, 00:00:18, FastEthernet0/0
R*   0.0.0.0/0 [120/1] via 12.12.12.1, 00:00:11, FastEthernet0/0


R3#show ip route
Gateway of last resort is 13.13.13.1 to network 0.0.0.0

     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
R       12.12.12.0 [120/1] via 13.13.13.1, 00:00:08, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/0
R*   0.0.0.0/0 [120/1] via 13.13.13.1, 00:00:08, FastEthernet0/0
R2(config)#do ping google.com   

Translating "google.com"...domain server (8.8.8.8) [OK]

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 173.194.126.33, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 116/136/152 ms

R3#ping google.com

Translating "google.com"...domain server (8.8.8.8) [OK]

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 173.194.126.32, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 160/178/200 ms

2. Redistribute Static

default route konfigurasinya menggunakan routing static dengan destination address dan masknya diset 0.0.0.0 yang artinya routing dengan network tujuan manapun dengan netmask berapapun. konfigurasi default route menggunakan static default route ini secara otomatis hanya mengatur gateway of last resort Router tersebut saja. oleh karena itu perlu di redistribute ke dalam RIP agar bisa diadvertise ke semua router rip.
R1(config-router)#no default-information originate
lihat  routing tabel R2, R3 dan pastikan default route sudah tidak ada
R2#show ip route
Gateway of last resort is not set

     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
R       13.13.13.0 [120/1] via 23.23.23.3, 00:00:19, FastEthernet0/1
                   [120/1] via 12.12.12.1, 00:00:11, FastEthernet0/0

R3#show ip route
Gateway of last resort is not set

     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
R       12.12.12.0 [120/1] via 23.23.23.2, 00:00:13, FastEthernet0/1
                   [120/1] via 13.13.13.1, 00:00:09, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/0
pertama perlu dikonfigurasikan dulu default routenya pada R1. kemudian redistribute ke RIP.
R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.42.129 
R1(config-router)#redistribute static
R2#show ip route
Gateway of last resort is 12.12.12.1 to network 0.0.0.0

     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
R       13.13.13.0 [120/1] via 23.23.23.3, 00:00:21, FastEthernet0/1
                   [120/1] via 12.12.12.1, 00:00:15, FastEthernet0/0
R*   0.0.0.0/0 [120/1] via 12.12.12.1, 00:00:15, FastEthernet0/0

R3#show ip route
Gateway of last resort is 13.13.13.1 to network 0.0.0.0

     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
R       12.12.12.0 [120/1] via 23.23.23.2, 00:00:02, FastEthernet0/1
                   [120/1] via 13.13.13.1, 00:00:01, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/0
R*   0.0.0.0/0 [120/1] via 13.13.13.1, 00:00:01, FastEthernet0/0

R2#ping sfprimary.com

Translating "sfprimary.com"...domain server (8.8.8.8) [OK]

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.31.186.20, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 300/313/360 ms

R3#ping sfprimary.com

Translating "sfprimary.com"...domain server (8.8.8.8) [OK]

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.31.186.20, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 288/493/1084 ms

3. ip default-network

jika ip default-gateway digunakan di router yang ip routingnya didisabled. ip default-network digunakan pada router yang aktif melakukan routing seperti R1 dan secara otomatis gateway yang dikonfigurasikan akan di advertise ke RIP. network yang dikonfigurasikan sebagai gateway of last resort di ip default-network haruslah classful network.
pertama hapus dulu default routing dan redistribute static pada R1.
R1(config)#ip default-network 192.168.42.0

R2#show ip route
Gateway of last resort is 12.12.12.1 to network 0.0.0.0

     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
R       13.13.13.0 [120/1] via 23.23.23.3, 00:00:18, FastEthernet0/1
                   [120/1] via 12.12.12.1, 00:00:07, FastEthernet0/0
R*   0.0.0.0/0 [120/1] via 12.12.12.1, 00:00:07, FastEthernet0/0


R3#show ip route
Gateway of last resort is 13.13.13.1 to network 0.0.0.0

     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
R       12.12.12.0 [120/1] via 23.23.23.2, 00:00:16, FastEthernet0/1
                   [120/1] via 13.13.13.1, 00:00:14, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/0
R*   0.0.0.0/0 [120/1] via 13.13.13.1, 00:00:14, FastEthernet0/0