Rabu, 18 November 2020

Lab. 13 GRE Tunnel

 Lab. 13 GRE Tunnel

Generic Routing Encapsulation adalah protokol tunneling yang dikembangkan oleh Cisco Systems yang dapat merangkum berbagai protokol lapisan jaringan di dalam virtual point-to-point link atau point-to-multipoint link melalui jaringan Internet Protocol

Konfigurasi Dasar :

R1
R1(config)#interface f0/0
R1(config-if)#ip address 12.12.12.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface f0/1
R1(config-if)#ip address 13.13.13.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface lo0
R1(config-if)#ip add 8.8.8.8 255.255.255.255
R1(config-if)#exit

R2
R2(config)#interface f0/0
R2(config-if)#ip address 12.12.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#exit

R3
R3(config)#interface f0/0
R3(config-if)#ip add 13.13.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#exit

Masukan Default route di R2 dan R3

R2 dan R3
R2(config)#ip route 0.0.0.0 0.0.0.0 12.12.12.1
R3(config)#ip route 0.0.0.0 0.0.0.0 13.13.13.1 


Kita verifikasi

R2 dan R3

R2(config)#do ping 8.8.8.8 Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/64 ms

R3(config)#do ping 3.3.3.3
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/8 ms


R2
R2(config)#interface tunnel23
R2(config-if)#tunnel source f0/0
R2(config-if)#tunnel destination 13.13.13.3
R2(config-if)#ip address 172.16.10.1 255.255.255.252
R2(config-if)#exit

R3
R3(config)#interface tunnel23
R3(config-if)#tunnel source f0/0
R3(config-if)#tunnel destination 12.12.12.2
R3(config-if)#ip address 172.16.10.2 255.255.255.252
R3(config-if)#exit

Kita lakukan verifikasi pada R2 dan pastikan sudah “up” dan kita lakukan
ping.

R2
R2(config)#do show int tunnel 23 | i protocol
Tunnel23 is up, line protocol is up
Tunnel protocol/transport GRE/IP
0 unknown protocol drops

R2(config)#do ping 172.16.10.2
Sending 5, 100-byte ICMP Echos to 172.16.10.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/38/116 ms


R2
R2(config)#router eigrp 23
R2(config-router)#network 172.16.10.1 0.0.0.0
R2(config-router)#network 2.2.2.2 0.0.0.0
R2(config-router)#no auto-summary
R2(config-router)#exit

R3
R3(config)#router eigrp 23
R3(config-router)#network 3.3.3.3 0.0.0.0
R3(config-router)#network 172.16.10.2 0.0.0.0
R3(config-router)#no auto-summary

Verifikasi pada R2 dan R3

R2
R2(config)#do show ip route eigrp
3.0.0.0/32 is subnetted, 1 subnets
D…………3.3.3.3 [90/27008000] via 172.16.10.2, 00:00:32, Tunnel23

R3
R3(config)#do show ip route eigrp
2.0.0.0/32 is subnetted, 1 subnets
D……….2.2.2.2 [90/27008000] via 172.16.10.1, 00:01:46, Tunnel32


Kita cek ping

R2
R2(config)#do ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/31/44 ms

R3
R3(config)#do ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/35/52 ms

Maka jika kita traceroute maka traffic nya akan diarahkan via interface tunnel

R2
R2#traceroute 3.3.3.3 source 2.2.2.2
Type escape sequence to abort. Tracing the route to 3.3.3.3
1 172.16.10.2 52 msec 20 msec 36 msec

Koment

Selasa, 10 November 2020

lab 12 BGP Multihoming ISP Beda load balance

 Lab 12 BGP Multihoming ISP Beda load balance





Hapus terlebih dahulu config bgp dari lab sebelumnya ( bikin bgp baru )

R1

R1(config)#router bgp 1
R1(config-router)#
R1(config-router)#net 1.1.1.1 mask 255.255.255.255
R1(config-router)#neighbor 12.12.12.2 remote-as 2
R1(config-router)#neighbor 13.13.13.3 remote-as 3
R1(config-router)#maximum-paths 2

R2

R2(config)#router bgp 2
R2(config-router)#neighbor 12.12.12.1 remote-as 1
R2(config-router)#
R2(config-router)#neighbor 24.24.24.4 remote-as 4

R3

R3(config)#router bgp 3
R3(config-router)#neighbor 13.13.13.1 remote-as 1
R3(config-router)#neighbor 34.34.34.4 remote-as 4

R4

R4(config)#router bgp 4
R4(config-router)#net 4.4.4.4 mask 255.255.255.255
R4(config-router)#neighbor 24.24.24.2 remote-as 2
R4(config-router)#neighbor 34.34.34.3 remote-as 3

Coba kita cek terlebih dahulu

R1

R1#sh ip bgp
    Network             Next Hop        Metric    LocPrf     Weight Path
*> 1.1.1.1/32         0.0.0.0                    0 32768 i
*> 4.4.4.4/32         12.12.12.2             0     2 4 i
*                                     13.13.13.3     0             3 4 i

R1

R1#sh ip route 4.4.4.4
Routing entry for 4.4.4.4/32
    Known via "bgp 1", distance 20, metric 0
    Tag 2, type external
    Last update from 12.12.12.2 00:09:09 ago
    Routing Descriptor Blocks:
        * 12.12.12.2, from 12.12.12.2, 00:09:09 ago
                Route metric is 0, traffic share count is 1
                AS Hops 2
                Route tag 2

R1

R1#traceroute 4.4.4.4 source 1.1.1.1
Type escape sequence to abort.
Tracing the route to 4.4.4.4
1 12.12.12.2 4 msec 40 msec 8 msec
2 24.24.24.4 56 msec 44 msec 32 msec

Supaya bisa load sharing melalui 2 ISP

R1

R1(config)#router bgp 1
R1(config-router)#bgp bestpath as-path multipath-relax
R1(config-router)#do clear ip bgp *

R1

 R1(config)#do show ip bgp
Network                 next Hop                 Metric         LocPrf Weight Path
*> 1.1.1.1/32         0.0.0.0                         0                     32768 i
* 4.4.4.4/32             13.13.13.3                 0                     3 4 i
*>                                 12.12.12.2                 0                     2 4 i

R1

R1(config)#do show ip route 4.4.4.4
Routing entry for 4.4.4.4/32
Known via "bgp 1", distance 20, metric 0
Tag 2, type external
Last update from 12.12.12.2 00:06:26 ago
Routing Descriptor Blocks:
    * 13.13.13.3, from 13.13.13.3, 00:06:26 ago
        Route metric is 0, traffic share count is 1
        AS Hops 2
        Route tag 2
12.12.12.2, from 12.12.12.2, 00:06:26 ago
        Route metric is 0, traffic share count is 1
        AS Hops 2
        Route tag 2

R1

R1#traceroute 4.4.4.4 source 1.1.1.1
Type escape sequence to abort.
Tracing the route to 4.4.4.4
    1 12.12.12.2 40 msec
        13.13.13.3 28 msec
        12.12.12.2 20 msec
    2 34.34.34.4 40 msec
        24.24.24.4 32 msec
        34.34.34.4 44 msec

sudah load sharing tapi beda link, caranya d bawah ini

R1

R1(config)#int g1/0
R1(config-if)#bandwidth 1000
R1(config-if)#int g2/0
R1(config-if)#bandwidth 2000
R1(config-if)#do clear ip bgp

cek lagi

R1

 R1(config)#do show ip route 4.4.4.4
Routing entry for 4.4.4.4/32
Known via "bgp 1", distance 20, metric 0
Tag 2, type external
Last update from 12.12.12.2 00:25:22 ago
Routing Descriptor Blocks:
* 13.13.13.3, from 13.13.13.3, 00:25:22 ago
Route metric is 0, traffic share count is 1
AS Hops 2
Route tag 2
12.12.12.2, from 12.12.12.2, 00:25:22 ago
Route metric is 0, traffic share count is 1
AS Hops 2
Route tag 2

 Ternyata masih 1:1 padahal bandwidthnya berbeda.

kita konfigurasikan seperti di bawah ini

R1

R1(config)#router bgp 1
R1(config-router)#bgp dmzlink-bw
R1(config-router)#neighbor 12.12.12.2 dmzlink-bw
R1(config-router)#neighbor 13.13.13.3 dmzlink-bw
R1(config-router)#do clear ip bgp * soft

R1

R1(config)#do show ip bgp
BGP table version is 6, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
            r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network             Next Hop         Metric     LocPrf     Weight Path
*> 1.1.1.1/32         0.0.0.0            0             32768 i
* 4.4.4.4/32         13.13.13.3         0                 3 4 i
*>                            12.12.12.2         0                 2 4 i

R1

R1(config)#do show ip route 4.4.4.4
Routing entry for 4.4.4.4/32
Known via "bgp 1", distance 20, metric 0
Tag 2, type external
Last update from 12.12.12.2 00:18:51 ago
Routing Descriptor Blocks:
    * 13.13.13.3, from 13.13.13.3, 00:18:51 ago
            Route metric is 0, traffic share count is 2
            AS Hops 2
            Route tag 2
    12.12.12.2, from 12.12.12.2, 00:18:51 ago
            Route metric is 0, traffic share count is 1
            AS Hops 2
            Route tag 2

R1

R1#traceroute 4.4.4.4 source 1.1.1.1
Type escape sequence to abort.
Tracing the route to 4.4.4.4
    1 12.12.12.2 56 msec
        13.13.13.3 40 msec 24 msec
    2 24.24.24.4 36 msec
        34.34.34.4 32 msec 36 msec










Jumat, 06 November 2020

Lab.11 BGP Weight

 Lab.11 BGP Weight


konfigurasi dasar 

R1

R1(config)#int g1/0
R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#no sh
R1(config)#int g2/0
R1(config-if)#ip add 13.13.13.1 255.255.255.0
R1(config-if)#no sh
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#router bgp 1
R1(config-router)#neighbor 12.12.12.2 remote-as 23
R1(config-router)#neighbor 13.13.13.3 remote-as 23
R1(config-router)#net 1.1.1.1 mask 255.255.255.255

R2

R2(config)#int g2/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int f0/0
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int g1/0
R2(config-if)#ip add 24.24.24.2 255.255.255.0
R2(config-if)#no sh
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#router bgp 23
R2(config-router)#neighbor 12.12.12.1 remote-as 1
R2(config-router)#neighbor 23.23.23.3 remote-as 23
R2(config-router)#neighbor 24.24.24.4 remote-as 4
R2(config-router)#net 2.2.2.2 mask 255.255.255.25
R2(config-router)#neighbor 23.23.23.3 next-hop-self

R3

R3(config)#int g1/0
R3(config-if)#ip add 13.13.13.3 255.255.255.0
R3(config-if)#no sh
R3(config)#int f0/0
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#int g2/0
R3(config-if)#ip add 34.34.34.3 255.255.255.0
R3(config-if)#no sh
R3(config)#router bgp 23
R3(config-router)#neighbor 13.13.13.1 remote-as 1
R3(config-router)#neighbor 23.23.23.2 remote-as 23
R3(config-router)#neighbor 34.34.34.4 remote-as 4
R3(config-router)#neighbor 23.23.23.2 next-hop-self

R4

R4(config)#int g1/0
R4(config-if)#ip add 24.24.24.4 255.255.255.0
R4(config-if)#no sh
R4(config)#int g2/0
R4(config-if)#ip add 34.34.34.4 255.255.255.0
R4(config-if)#no sh
R4(config)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config)#router bgp 4
R4(config-router)#neighbor 24.24.24.2 remote-as 23
R4(config-router)#neighbor 34.34.34.3 remote-as 23s
R4(config-router)#net 4.4.4.4 mask 255.255.255.255 

kita verifikasi

R1

R1(config)#do show ip bgp
    Network                 Next Hop     Metric LocPrf Weight Path
*> 1.1.1.1/32         0.0.0.0                 0 32768 i
* 2.2.2.2/32             13.13.13.3         0 23 i
*>                               12.12.12.2         0 0 23 i
* 4.4.4.4/32             13.13.13.3         0 23 4 i
*>                             12.12.12.2             0 23 4 i 


R1

 R1(config)#int g1/0
R1(config-if)#sh

R1

R1(config)#do sh ip bgp
        Network         Next Hop     Metric     LocPrf Weight Path
*> 1.1.1.1/32         0.0.0.0             0 32768 i
*> 4.4.4.4/32         13.13.13.3     0 23 4 i

R1

R1(config)#do show ip route bgp
        4.0.0.0/32 is subnetted, 1 subnets
B         4.4.4.4 [20/0] via 13.13.13.3, 00:03:06

Saat ini linknya sudah berpindah melalui R3. Kemudian, kita tes kembali
dengan cara kita no shutdown pada port yang menuju ke R2.

R1

 R1(config)#int g1/0
R1(config-if)#no sh

R1

 R1#sh ip bgp
BGP table version is 5, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
    Network                 Next Hop         Metric LocPrf Weight Path
*> 1.1.1.1/32         0.0.0.0                 0 32768 i
* 4.4.4.4/32             12.12.12.2             0 23 4 i
*>                                 13.13.13.3         0 23 4 i

R1

R1#sh ip route bgp
            4.0.0.0/32 is subnetted, 1 subnets
B             4.4.4.4 [20/0] via 13.13.13.3, 00:32:17 

 kita konfigurasikan attribute weight

R1

R1(config)#route-map WEIGHT
R1(config-route-map)#set weight 100
R1(config-route-map)#ex
R1(config)#router bgp 1
R1(config-router)#neighbor 12.12.12.2 route-map WEIGHT in
R1(config-router)#ex
R1(config)#do clear ip bgp *

 R1

R1#sh ip bgp
BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

    Network             Next Hop     Metric LocPrf Weight Path
*> 1.1.1.1/32     0.0.0.0                 0 32768 i
*> 4.4.4.4/32     12.12.12.2         100 23 4 i
*                             13.13.13.3             0 23 4 i

R1

R1#sh ip route bgp
        4.0.0.0/32 is subnetted, 1 subnets
B         4.4.4.4 [20/0] via 12.12.12.2, 00:02:09 

kita tes lagi shutdown interface ke R2. 

R1

R1(config)#int g1/0
R1(config-if)#sh

R1

 R1(config)#do sh ip bgp
BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
    Network                 Next Hop         Metric     LocPrf Weight Path
*> 1.1.1.1/32         0.0.0.0                     0 32768 i
*> 4.4.4.4/32         13.13.13.3                 0 23 4 i

R1

R1(config)#do sh ip route bgp
        4.0.0.0/32 is subnetted, 1 subnets
B         4.4.4.4 [20/0] via 12.12.12.2, 00:00:02

 kita juga bisa mengatur trafik yang dating dengan menggunakan (MED)

R1

R1(config)#router bgp 1
R1(config-router)#ip access-list standard LAN
R1(config-std-nacl)#permit 1.1.1.1
R1(config-std-nacl)#route-map R2MED permit 10
R1(config-route-map)#match ip address LAN
R1(config-route-map)#set metric 110
R1(config)#router bgp 1
R1(config-router)#neighbor 12.12.12.2 route-map R2MED out
R1(config-router)#neighbor 13.13.13.3 route-map R3MED out


kita verifikasi 

R3

R3#sh ip route 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "bgp 23", distance 20, metric 100
Tag 1, type external
Last update from 13.13.13.1 00:00:10 ago
Routing Descriptor Blocks:
* 13.13.13.1, from 13.13.13.1, 00:00:10 ago
    Route metric is 100, traffic share count is 1
    AS Hops 1
    Route tag 1

R2

R2(config)#do show ip bgp 1.1.1.1
BGP routing table entry for 1.1.1.1/32, version 23
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
3
1
23.23.23.3 from 23.23.23.3 (34.34.34.3)
Origin IGP, metric 100, localpref 100, valid, internal, best
1
12.12.12.1 from 12.12.12.1 (1.1.1.1)
Origin IGP, metric 110, localpref 100, valid, external

R2

 R2(config)#do show ip bgp
BGP table version is 24, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                    r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
    Network                 Next Hop     Metric     LocPrf     Weight Path
*>i1.1.1.1/32            23.23.23.3     100 100 0 1 i
*                                     12.12.12.1 110 0 1 i
*> 2.2.2.2/32                0.0.0.0         0 32768 i
* i4.4.4.4/32             23.23.23.3     0 100 0 4 i
*>                             24.24.24.4         0 0 4 i 

R2

R2#traceroute 1.1.1.1 source 2.2.2.2
Type escape sequence to abort.
Tracing the route to 1.1.1.1
    1 23.23.23.3 20 msec 20 msec 8 msec
    2 13.13.13.1 28 msec 24 msec 8 msec

Seperti yang kita lihat diatas, maka dari R2 (AS 23) untuk menuju ke R1 (AS 1)
akan melalui R3 terlebih dahulu.

 Terlebih dahulu kita hapus konfigurasi MED sebelumnya.

R1

R1(config)#router bgp 1
R1(config-router)#no neighbor 12.12.12.2 route-map R2MED out
R1(config-router)#no neighbor 13.13.13.3 route-map R3MED out

Kita mengkonfigurasikan AS-Path

R1

 R1(config)#router bgp 1
R1(config-router)#neighbor 12.12.12.2 route-map AS-PREPEND out
R1(config-router)#route-map AS-PREPEND
R1(config-route-map)#set as-path prepend 1 1 1
R1(config-route-map)#do clear ip bgp

 Sekarang kita verifikasi

R2

R2#sh ip bgp
BGP table version is 29, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, r
            rIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
    Network                 Next Hop         Metric LocPrf Weight Path
*>i1.1.1.1/32         23.23.23.3         0 100 0 1 i
*                                 12.12.12.1         0 0 1 1 1 1 i
*> 2.2.2.2/32         0.0.0.0                     0 32768 i
* i4.4.4.4/32         23.23.23.3             0 100 0 4 i
*>                             24.24.24.4             0 0 4 i 

R2

R2#sh ip route bgp
    1.0.0.0/32 is subnetted, 1 subnets
B         1.1.1.1 [200/0] via 23.23.23.3, 00:05:20
    4.0.0.0/32 is subnetted, 1 subnets
B         4.4.4.4 [20/0] via 24.24.24.4, 02:23:15 

R2

R2#traceroute 1.1.1.1 source 2.2.2.2
Tracing the route to 1.1.1.1
1 23.23.23.3 20 msec 20 msec 24 msec
2 13.13.13.1 20 msec 24 msec 12 msec

R3

R3#sh ip bgp
BGP table version is 18, local router ID is 34.34.34.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r
RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 13.13.13.1 0 0 1 i
*>i2.2.2.2/32 23.23.23.2 0 100 0 i
* i4.4.4.4/32 23.23.23.2 0 100 0 4 i
*> 34.34.34.4 0 0 4 i

R4

 R4#sh ip bgp
BGP table version is 13, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r
RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 1.1.1.1/32 34.34.34.3 0 23 1 i
*> 24.24.24.2 0 23 1 i
* 2.2.2.2/32 34.34.34.3 0 23 i
*> 24.24.24.2 0 0 23 i
*> 4.4.4.4/32 0.0.0.0 0 32768 i

R4

R4#trace 1.1.1.1 source 4.4.4.4
Type escape sequence to abort.
Tracing the route to 1.1.1.1
1 24.24.24.2 8 msec 24 msec 20 msec
2 23.23.23.3 16 msec 20 msec 20 msec
3 13.13.13.1 44 msec 48 msec 32 msec

LAB 1 FORTIGATE BASIC KONFIG

BASIC KONFIG FORTIGATE     Assalamualaikum Warahmatullahi Wabarakaatuh.....       Yaa...  jadi kali ini saya akan menjelaskan tutorial basic...