Professional Documents
Culture Documents
Static Routing
Default Routing
Enhanced Interior Gateway Protocol (EIGRP)
Open Shortest Path First (OSPF)
Standard Access List
Extended Access List
Static NAT
Overloading/Port Address Translation (PAT)
HSRP
Tanpa Subnet
Dengan Subnet
Subneting ini adalah hal yang wajib dikuasai oleh seorang network engineer. Klo
dulu waktu ulangan subnet masih iseng-iseng pake subnet calculator online.
Hehehe… Sekarang harus bener-bener paham. Untuk memahami subneting ini,
terlebih dahulu mengerti tentang bilangan decimal dan biner (nol atau satu).
Dalam subneting, ada beberapa hal yang paling sering dicari.
Misal ada ip 192.168.2.172/26 maka subnetmask atau netmask nya adalah /26 =
11111111.11111111.11111111.11000000. Prefix /26 mengindikasikan biner 1 (Net
ID) berjumlah 26 dan sisanya yaitu Host ID berjumlah 6.
Dari 11111111.11111111.11111111.11000000 ini ketika didesimalkan maka didapat
subnet mask dari adalah 255.255.255.192.
Total IP ini dihitung dari Host ID. Dari contoh soal, didapat Host ID ada 6bit. Karena
IPv4 32bit jadi 32-26 sisa 6. Sehingga maksimal IP didapat 2^6=64.
Rumus menghitung maksimal IP: 2^Host ID
Jumlah subnet dihitung dari Net ID. Karena Net ID subnet /26 adalah 26 maka
Subnet ID nya 2. Loh kok bisa? Karena Net ID 26 dikurangi 24 karena kelas C jadi
2. Intinya klo kelas C dikurangi 24, kelas B dikurangi 16, kelas A dikurangi 8.
InshaAlloh akan lebih paham dalam pembahasan soal selanjutnya sob. Didapat
banyak subnetnya adalah 2^2=4 subnet.
Rumus menghitung banyak subnet dengan rumus: 2^subnet ID
IP Network Broadcast
1 192.168.2.0 192.168.2.63
2 192.168.2.64 192.168.2.127
3 192.168.2.128 192.168.2.191
4 192.168.2.192 192.168.2.255
Dan ini adalah yang paling gampang, yaitu menghitung maksimal ip yang dapat
dipakai host. Rumusnya adalah total ip dikurangi 2 karena dipakai untuk network
id dan broadcast. Jadi IP Client tiap subnet adalah 64-2=62.
Untuk menghafal subnet lebih cepat, kita dapat memanfaatkan tabel subnet
dibawah ini.
Tabel Subneting
Dalam pembahasan ini, kita akan belajar untuk mengerjakan berbagai variasi soal
subneting. Soal subnetingnya sebagai berikut guys.
Carilah total ip, netmask, ip network, broadcast dan host untuk masing-masing ip
dibawah:
192.168.10.10/25
10.10.10.10/13
20.20.20.20/23
11.12.13.14/20
50.50.50.50./15
Ok langsung aja kita bahas bareng dari soal pertama ya…
a. Total IP : 128
Didapat dari 2^7 = 128, 7 merupakan Host ID dari subnet /25
b. Netmask : 255.255.255.128
Didapat dari 256 – Total IP = 256 – 128 = 128 menjadi
255.255.255.128
c. IP : 192.168.10.0
Network
Jumlah subnet adalah 2^1, 1 adalah Subnet ID. IP 192.168.2.10
masuk dalam subnet ke-1 karena berada dalam range 0-127
sehingga IP Networknya 192.168.10.0
d. Broadcast : 192.168.10.127
IP Network setelahnya dikurangi 1 => 192.168.10.128 – 1 =
192.168.10.127
b. Netmask : 255.248.0.0
Seperti biasa 248 didapat dari 256 – total ip. Karena kelas A
ditambah 8 dua kali jadi kelas C maka subnet dimajukan 2 kali dari
255.255.255.248 menjadi 255.248.0.0.
c. IP : 10.8.0.0
Network Setelah disamakan menjadi kelas C(13+8+8=29), maka didapat
jumlah subnet /29 adalah 2^5, 5 adalah Subnet ID. Total IP dari
subnet /29 adalah 8, maka IP 10.10.10.10 masuk dalam IP
Networknya 10.8.0.0.
d. Broadcast : 10.15.255.255
IP Network setelahnya dikurangi 1 => 10.16.0.0 – 1 = 10.15.255.255
a. Total IP : 4096
Subnet 20 merupakan subnet kelas B sehiggga agar lebih mudah
diubah dulu menjadi subnet kelas C dengan ditambah 8 menjadi 28.
Total host subnet 28 adalah 16. Lalu 16 x 256 = 4096. Dikali 256
karena sebelumnya ditambah 8 kali untuk menjadi subnet kelas C.
b. Netmask : 255.255.252.0
252 didapat dari 256 – total ip. Karena kelas B ditambah 8 jadi kelas
C maka subnet dimajukan 1 kali dari 255.255.255.252 menjadi
255.255.252.0.
c. IP : 11.12.0.0
Network Setelah disamakan menjadi kelas C(20+8=28), maka didapat jumlah
subnet /28 adalah 2^4, 4 adalah Subnet ID. Total IP dari subnet /28
adalah 16, maka IP 11.12.13.14 masuk dalam IP Networknya
11.12.0.0 karena masih dalam rentang 11.12.0.0 – 11.15.255.255.
d. Broadcast : 11.12.15.255
IP Network setelahnya dikurangi 1 => 11.16.0.0 – 1 = 11.15.255.255
Carilah total ip, netmask, ip network, broadcast dan host untuk masing-masing ip
dibawah:
172.16.10.111/27
99.99.99.99/28
100.100.100.100/20
111.222.33.44/14
8.8.8.8/32
IPV4 SUBNETTING packetlife.net
Subnets Decimal to Binary
CIDR Subnet Mask Addresses Wildcard Subnet Mask Wildcard
/32 255.255.255.255 1 0.0.0.0 255 1111 1111 0 0000 0000
/31 255.255.255.254 2 0.0.0.1 254 1111 1110 1 0000 0001
/30 255.255.255.252 4 0.0.0.3 252 1111 1100 3 0000 0011
/29 255.255.255.248 8 0.0.0.7 248 1111 1000 7 0000 0111
/28 255.255.255.240 16 0.0.0.15 240 1111 0000 15 0000 1111
/27 255.255.255.224 32 0.0.0.31 224 1110 0000 31 0001 1111
/26 255.255.255.192 64 0.0.0.63 192 1100 0000 63 0011 1111
/25 255.255.255.128 128 0.0.0.127 128 1000 0000 127 0111 1111
/24 255.255.255.0 256 0.0.0.255 0 0000 0000 255 1111 1111
/23 255.255.254.0 512 0.0.1.255 Subnet Proportion
/22 255.255.252.0 1,024 0.0.3.255
/21 255.255.248.0 2,048 0.0.7.255
Broadcast domain adalah area dalam suatu jaringan dimana broadcast diforward
pada pertama kali. Hub dan Switch mempunyai broadcast domain yang sama
karena sama-sama melewatkan broadcast, sedang Router tidak melewatkan
broadcast.
Hub gak lebih dari physical repeater yang bekerja pada layer 1 dan gak punya
intelijensi. Cara kerja hub adalah dengan menerima sinyal electric dari satu
interface dan mengirimkannya ke semua interface kecuali ke source interface,
butuh atau gak butuh.
Karena bekerja pada layer physical dengan half-duplex (satu mengirim, yang lain
menunggu), maka dapat terjadi tabrakan (collision) ketika ada packet yang
dikirimkan dalam waktu yang bersamaan. Area dimana dapat terjadi collision
disebut dengan collision domain.
Kedua topologi diatas merupakan single collision domain. Semakin besar jaringan
seperti diatas, collision juga semakin besar, dan menurunkan kinerja jaringan
(down).
Mengganti dengan perangkat yang bekerja pada layer 2 (data link) dan
mempunyai intelijensi yaitu bridge. Karakteristik bridge:
– Memutuskan kemana Ethernet frame dikirim dengan melihat MAC Address.
– Forward Ethernet frame hanya ke port yang membutuhkan.
– Filter Ethernet frames (discard them).
– Flood Ethernet frames (send them everywhere).
– Hanya punya beberapa port.
– Slow.
Dengan begitu collision domain terbagi menjadi 2 pada topologi diatas. Tapi
sekarang kita gak pake hub atau bridge karena udah ada switch.
Switch mempunyai tabel MAC Address yang menyimpan MAC Address dari PC
yang tersambung ke port-port pada switch. Misal ketika pertama kali ketika PC
disambungkan ke switch, PC A ingin mengirimkan data ke C.
–Maka PC A membuat Ethernet frame berisi IP address, MAC address dan
tujuannya dan mengirimkannya ke switch.
– switch lalu membroadcastnya ke semua port kecuali source. Sampai sini, switch
telah menyimpan MAC address A.
– Setelah dibroadcast, PC C akan mengirim reply berisi MAC addressnya dan ketika
lewat switch, switch akan menyimpan MAC address C.
Broadcast dikirim ketika ada packet data yang destination MAC addressnya gak
ada pada tabel MAC address switch.
RJ-45
ST (Straight Tip)
1000Base-SX/LX
RJ-11
SC (Subscriber Connector)
1000Base-T
RJ-21 (25-pair)
LC (Local Connector)
Cisco GigaStack
MT-RJ
1000Base-SX/LX SFP
DB-25 (Male)
RP-SMA
DB-60 (Male)
X2 (10Gig)
Meyimpan Konfigurasi
Konfigurasi agar ketika device direboot konfigurasi tidak hilang.
Router(config)#write
atau
Router(config)#copy run start
Keamanan adalah hal yang penting dalam suatu jaringan. Pemberian authentikasi
berupa username dan password dalam device dilakukan agar tidak sembarang
orang dapat masuk ke device.
Mengeset Password Line Console maka ketika melakukan config melalui port
console akan diminta login.
Router>enable
Router#configure terminal
Router(config)#line console 0
Router(config-line)#password 123
Router(config-line)#login
Ketika masuk ke device akan muncul tampilan berikut.
User Access Verification
Password:
Konfigurasi VTY (Virtual Terminal) agar device dapat ditelnet dengan
menggunakan username dan password yang spesifik.
Router(config)#username admin
Router(config)#enable password coba1
Router(config)#enable secret coba2
10.10.10.10/24 20.20.20.20/24
10.10.10.11/24 20.20.20.21/24
Buatlah topologi seperti pada gambar diatas pada packet tracer. Konfigurasi VLAN
pada switch dengan VLAN10 berikan nama Marketing dan VLAN20 dengan nama
Sales.
Switch>enable
Switch#conf t
Switch(config)#vlan 10
Switch(config-vlan)#name Marketing
Switch(config-vlan)#vlan 20
Switch(config-vlan)#name Sales
Switch(config-vlan)#int f0/1
Switch(config-if)#switchport access vlan 10
Switch(config-if)#int f0/2
Switch(config-if)#switchport access vlan 10
Switch(config-if)#int f0/3
Switch(config-if)#switchport access vlan 20
Switch(config-if)#int f0/4
Switch(config-if)#switchport access vlan 20
Untuk pengecekan,ping dari satu PC ke PC lain dan ketikkan perintah show vlan
pada switch. PC tidak bisa ping ke beda VLAN.
PC>ping 10.10.10.11
PC>ping 20.20.20.21
PC>
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- ----------------------------
---
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11,
Fa0/12
Fa0/13, Fa0/14, Fa0/15,
Fa0/16
Fa0/17, Fa0/18, Fa0/19,
Fa0/20
Fa0/21, Fa0/22, Fa0/23,
Fa0/24
10 VLAN0010 active Fa0/1, Fa0/2
20 VLAN0020 active Fa0/3, Fa0/4
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ----
--
1 enet 100001 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Trunking berfungsi melewatkan traffic VLAN dari switch yang berbeda. Antara
switch lantai 1 dan lantai 2 terhubung. PC1, PC2, PC5 dan PC6 masuk dalam VLAN
10 sedang PC3, PC4, PC5 dan PC6 masuk dalam VLAN 20.
10.10.10.10/24 20.20.20.20/24
10.10.10.11/24 20.20.20.21/24
10.10.10.12/24
20.20.20.22/24
10.10.10.13/24 20.20.20.23/24
Konfigurasi VLAN pada seperti dibawah. Membuat vlan 10 dan vlan 20.
switch1(config)#vlan 10
switch1(config-vlan)#vlan 20
switch1(config-vlan)#int f0/1
switch1(config-if)#sw access vlan 10
switch1(config-if)#int f0/2
switch1(config-if)#sw access vlan 10
switch1(config-vlan)#int f0/3
switch1(config-if)#sw access vlan 10
switch1(config-vlan)#int f0/4
switch1(config-if)#sw access vlan 10
Switch0(config)#vlan 10
Switch0(config-vlan)#vlan 20
Switch0(config-vlan)#int f0/1
Switch0(config-if)#sw access vlan 10
Switch0(config-if)#int f0/2
Switch0(config-if)#sw access vlan 10
Switch0(config-vlan)#int f0/3
Switch0(config-if)#sw access vlan 10
Switch0(config-vlan)#int f0/4
Switch0(config-if)#sw access vlan 10
Konfigurasi interface yang saling terhubung antar switch dengan mode trunk.
Lakukan pada kedua switch.
Switch0(config)#int f0/10
Switch0(config-if)#switchport mode trunk
Switch1(config)#int f0/10
Switch1(config-if)#switchport mode trunk
PC>ping 10.10.10.13
PC>ping 20.20.20.20
PC>
PC dapat melakukan ping ke sesame VLAN beda switch namun tidak bisa ke beda
VLAN.
Switch1#sh int trunk
Port Mode Encapsulation Status Native rpur
vlan
2017-05-06 11:20:57
Fa0/10 on 802.1q trunking 1
--------------------------------------------
Port Vlans allowed on trunk Switch(config-int)#do sh int trunk
Fa0/10 1-1005
PC>tracert 20.20.20.21
1 30 ms 0 ms 0 ms 10.10.10.1
2 0 ms 0 ms 0 ms 20.20.20.21
Trace complete.
Router#sh ip arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 10.10.10.10 4 0000.0C1B.0D20 ARPA
FastEthernet0/0.10
Internet 20.20.20.21 3 0060.7092.05A9 ARPA
FastEthernet0/0.20
Internet 30.30.30.1 1 0001.C7AE.3D52 ARPA
FastEthernet0/0.30
Router#
Untuk menghubungkan antar VLAN dibutuhkan suatu perangkat layer 3 baik itu
router atau switch layer 3. Kalau sebelum menggunakan router on a stick, kali ini
kita akan menggunakan switch L3 (layer 3). Inilah kerennya cisco, kalo switch
yang lain bekerja pada layer 2, switch cisco dapat bekerja pada layer 3 dan
menjalankan routing. Namun, meski untuk routing yang lebih luas lebih
dianjurkan menggunakan router sesuai fungsinya.
Konfigurasi port ke VLANnya masing-masing.
Switch(config)#interface FastEthernet0/1
Switch(config-if)#switchport access vlan 10
Switch(config-if)#switchport mode access
Switch(config-if)#
Switch(config-if)#interface FastEthernet0/2
Switch(config-if)#switchport access vlan 10
Switch(config-if)#switchport mode access
Switch(config-if)#
Switch(config-if)#interface FastEthernet0/3
Switch(config-if)#switchport access vlan 20
Switch(config-if)#switchport mode access
Switch(config-if)#interface FastEthernet0/4
Switch(config-if)#switchport access vlan 20
Switch(config-if)#switchport mode access
PC>
VLANS packetlife.net
Trunk Encapsulation Trunk Types
26 6 6 2 4 802.1Q ISL
ISL Dest Source
Type Header Size 4 bytes 26 bytes
ISL FCS
Header MAC MAC
Trailer Size N/A 4 bytes
Dest Source Standard IEEE Cisco
Untagged Type
MAC MAC
Maximum VLANs 4094 1000
Dest Source
802.1Q 802.1Q Type VLAN Numbers
MAC MAC
6 6 4 2 0 Reserved 1004 fdnet
VLAN Creation 1 default 1005 trnet
Konfigurasi DHCP.
Switch(config)#ip dhcp pool vlan10
Switch(dhcp-config)#network 10.10.10.0 255.255.255.0
Switch(dhcp-config)#default-router 10.10.10.1
Switch(dhcp-config)#dns-server 8.8.8.8
Switch(dhcp-config)#ip dhcp pool vlan20
Switch(dhcp-config)#network 20.20.20.0 255.255.255.0
Switch(dhcp-config)#default-router 20.20.20.1
Switch(dhcp-config)#dns-server 8.8.8.8
jika ada ip yg tidak ingin digunakan dalam DHCP masukkan perintah ip dhcp
excluded-address.
ip dhcp excluded-address 10.10.10.2 10.10.10.10
Perintah show ip dhcp binding menampilkan client yang mendapat ip dhcp.
Switch#sh ip dhcp binding
IP address Client-ID/ Lease expiration Type
Hardware address
10.10.10.12 0003.E4A2.9D08 -- Automatic
10.10.10.11 0001.64C9.674C -- Automatic
20.20.20.11 0001.4266.50B0 -- Automatic
20.20.20.12 0002.1638.8C69 -- Automatic
Switch#
DHCP juga dapat diset manual untuk client dengan MAC Address
ip dhcp pool PC_MANAGER
host 20.20.20.100
default router 20.20.20.1
client-id 0102.c7f8.0004.22
client-name Komputer_IDN
rpur
2016-07-29 11:05:04
--------------------------------------------
sticky : menandai mac addres yang p e
rta
ma
Port Security ini digunakan agar port interface perangkat cisco tidak dapat
di hubungkan.
digunakan kecuali untuk PC dengan MAC Address tertentu.
int fa0/1
switchport mode access
switchport port-security
switchport port-security mac-address sticky
switchport port-security violation shutdown
rpur
int fa0/2 2016-07-29 11:05:23
switchport mode access --------------------------------------------
switchport port-security
switchport port-maximum 2 ( ada 2 m c
a
switchport port-security mac-address sticky
yang bisa)
switchport port-security violation restrict
Ada 3 violation:
protect = data yg dikirim melalui port tsb dibiarkan tdk terkirim
restrict = seperti protect namun mengirimkan notifikasi dgn snmp
shutdown = port akan dishutdown secara otomatis, utk mengembalikannya
maka harus di no shut dengan console switch atau telnet.
Sticky artinya bahwa MAC address yang pertama kali lewat switch maka itulah
yang digunakan. Jika bukan MAC address tsb yang tersambung ke port yang diset
port-security maka akan diproses tergantung violation yang diset.
show port-security
Switch#show port-security
Secure Port MaxSecureAddr CurrentAddr SecurityViolation Security Action
(Count) (Count) (Count)
--------------------------------------------------------------------
Fa0/1 1 1 1 Shutdown
Fa0/2 1 1 1 Restrict
----------------------------------------------------------------------
Switch#
Spanning Tree Protocol (STP) merupakan protocol yang berfungsi mencegah loop
pada switch ketika switch menggunakan lebih dari 1 link dengan maksud
redundancy. STP secara defaultnya diset aktif pada Cisco Catalyst. STP merupakan
open standard (IEEE 802.1D). STP dapat mencegah:
Broadcast Storm
Multiple Frame Copies
Database Instability
Ketika Switch0 mengirim packet data dengan destination yang tidak terdapat pada
MAC address tabelnya, maka Switch0 akan membroadcast ke semua port sampai
ke Switch1. Jika pada tabel MAC address Switch1 juga tidak terdapat destination
tadi maka Switch1 akan kembali membroadcast ke Switch0 dan akan seperti itu
sehingga network down.
Ada beberapa cara mengatasi hal tersebut:
Hanya menggunakan 1 link (no redundancy)
Shutdown salah satu interface, melakukan shutdown manual pada salah
satu interface atau secara otomatis menggunakan STP.
STP akan membuat blocking atau shutdown pada salahsatu port untuk mencegah
terjadinya loop. Ketika link utama down maka port yang sebelumnya blocking
akan menjadi forward. Port blocking ditunjukkan dengan warna merah.
Cara kerja STP :
1. Ketika STP aktif, masing-masing switch akan mengirimkan frame khusus satu
sama lain yang disebut Bridge Protocol Data Unit (BPDU).
2. Menentukan Root Bridge
Switch dengan bridge id terendah akan menjadi root bridge. Bridge id = priority
+ MAC address. Dalam satu LAN hanya ada satu switch sebagai root bridge,
switch lain menjadi non-root bridge. Default priority adalah 32768 dan bisa
diubah.
3. Menentukan Root Port
Yang menjadi root port adalah path yang paling dekat dengan root bridge. Untuk
setiap non-root bridge hanya punya 1 root port.
4. Menentukan designated port dan non-designated port
Designated port adalah port yang forward dan non designated port adalah port
yang blocking. Untuk root bridge semua portnya adalah designated port.
Switch dengan priority terendah, salah satu portnya akan menjadi non-
designated port atau port blocking. Jika priority sama maka akan dilihat MAC
address terendah.
STP akan membuat blocking atau shutdown pada salahsatu port untuk mencegah
terjadinya loop. Ketika link utama down maka port yang sebelumnya blocking
akan menjadi forward. Port blocking ditunjukkan dengan warna merah.
STP menggunakan link cost calculation untuk menentukan root port pada non-root
switch.
10 Gbps = Cost 2
1 Gbps = Cost 4
100 Mbps = Cost 19
10 Mbps = Cost 100
Switch0#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 000B.BE80.D273
Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Switch0#
Switch1#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 000B.BE80.D273
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Switch1#
Secara otomatis, Switch0 menjadi root bridge dilihat dari semua portnya yang
fordward (berwarna hijau), agar Switch1 yang menjadi root bridge, ubah priority
pada Switch1.
Switch1(config)#spanning-tree vlan 1 priority 0
Sekarang Switch1 yang menjadi root bridge. Untuk memindahkan blocking port
dari fa0/2 menjadi fa0/1 pada Switch1 jalankan perintah berikut.
Switch1(config)#int f0/1
Switch1(config-if)#speed 10
Portfast adalah salahsatu fitur STP. Ketika pertama kali mencolokkan kabel ke
switch, perlu waktu agak lama dari proses blocking yang ditandai warna oranye
pada lampu indicator untuk menjadi forwarding yang ditandai dengan warna
kuning.
STP Port States:
Blocking 20 second/no limits
Listening 15 second
Learning 15 second
Forwarding no limits
Disable no limits
Hal ini disebabkan switch melakukan step listening dan learning terlebih dahulu
sebelum forward. Dari proses blocking, listening dan learning kira-kira
dibutuhkan waktu 30 detik. Untuk langsung ke forward tanpa melalui listening
dan learning maka digunakan portfast. Portfast cocok digunakan untuk port yang
mengarah ke end host. Untuk port yang mengarah ke switch, maka tidak
direkomendasikan karena akan mematikan fungsi STP dalam mencegah looping.
Misalkan port 1 sampai 4 yang mau dikonfigurasi stp portfast maka ketikkan
perintah berikut.
int range fa0/1 - 4
spanning-tree portfast
Dengan etherchannel maka transfer data lebih cepat dan tidak tergantung hanya
pada 1 link. Etherchannel dapat dikonfigurasi dengan beberapa mekanisme:
Static Persistence, tanpa menggunakan negotiation protocol.
Dengan menggunakan negotiation protocol:
LACP (Link Aggregation Control Protocol) – open standard IEEE
802.1AD.
PAgP (Port Aggregation Protocol) – cisco proprietary.
Buat topologi seperti dibawah.
A B A B A B
Dalam VTP ada namanya revision number. Revision number adalah banyaknya
update VTP yang telah diterima suatu switch.
Hal yang penting mengenai revision number adalah ketika switch mode server
atau client dengan VTP domain yang sama dan mempunyai revision number yang
lebih tinggi, ketika diletakkan dalam sebuah jaringan, maka otomatis mengirim
update VLAN databasenya dan mereplace database switch sebelumnya sehingga
membuat network down. Switch mode server akan tetap tereplace datatbasenya
karena mode server pada dasarnya merupakan mode client juga.
Solusinya dengan direset terlebih dahulu.
Server
Switch(config)#int vlan 1
Switch(config-if)#ip add 10.10.10.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#vtp mode server
Switch(config)#vtp domain belajar
Switch(config)#vtp password rahasia
Transparent
Switch(config)#int vlan 1
Switch(config-if)#ip add 10.10.10.2 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#vtp mode transparent
Switch(config)#vtp domain belajar
Switch(config)#vtp password rahasia
Client
Switch(config)#int vlan 1
Switch(config-if)#ip add 10.10.10.3 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#vtp mode client
Switch(config)#vtp domain belajar
Switch(config)#vtp password rahasia
Server2
Switch(config)#int vlan 1
Switch(config-if)#ip add 10.10.10.4 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#vtp mode server
Switch(config)#vtp domain belajar
Switch(config)#vtp password rahasia
Buat VLAN pada masing-masing switch.
Server : VLAN10, VLAN20
Transparent : VLAN30, VLAN40
Client : VLAN50, VLAN60
Server2 : VLAN70, VLAN80
Routing adalah mengirimkan packet data dari satu network ke network lain.
Perangkat yang digunakan dalam routing adalah router. Router digunakan untuk
best path selection dan packets forwarding.
Untuk menuju ke destination, router dapat dikonfigurasi dengan 2 cara:
Manually, memasukkan route ke tabel routing secara manual (static
routing).
Dynamically, menggunakan protocol routing (dynamic routing).
Router(config)#hostname SEMARANG
SEMARANG(config)#interface s0/0/0
SEMARANG(config-if)#ip address 12.12.12.1 255.255.255.0
SEMARANG(config-if)#no shutdown
Router(config)#hostname SOLO
SOLO(config)#interface s0/0/0
SOLO(config-if)#ip address 12.12.12.2 255.255.255.0
SOLO(config-if)#no shutdown
SOLO(config-if)#interface f0/0
SOLO(config-if)#ip address 23.23.23.2 255.255.255.0
SOLO(config-if)#no shutdown
Router(config)#hostname JOGJA
JOGJA(config)#interface f0/0
JOGJA(config-if)#ip address 23.23.23.3 255.255.255.0
JOGJA(config-if)#no shutdown
Konfigurasikan routing static pada router Semarang dan Jogja. Router Solo tidak
perlu dikonfigurasi static routing karena sudah direct connected dengan router
Semarang dan Jogja.
SEMARANG(config-if)#ip route 23.23.23.0 255.255.255.0 12.12.12.2
JOGJA(config-if)#ip route 12.12.12.0 255.255.255.0 23.23.23.2
JOGJA#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
SEMARANG#ping 23.23.23.3
SEMARANG#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Default routing sebenarnya masuk dalam static routing. Biasa digunakan untuk
routing ke internet. Pada tabel routing, default routing selalu berada paling bawah
dan selalu menjadi last preferred (pilihan terakhir).
Lanjutan lab sebelumnya. Hapus dulu static route yang sebelumnya dibuat.
SEMARANG(config)#no ip route 23.23.23.0 255.255.255.0 12.12.12.2
JOGJA(config)#no ip route 12.12.12.0 255.255.255.0 23.23.23.2
Sekarang masukkan default routingnya.
SEMARANG(config)#ip route 0.0.0.0 0.0.0.0 12.12.12.2
JOGJA(config)#ip route 0.0.0.0 0.0.0.0 23.23.23.2
Sekarang tes ping dan cek tabel routing.
SEMARANG#ping 23.23.23.3
OSPF :
- bandwidth
CPU cycles
bagaimana are
jika usedterdapat
1 router to calculate and
beberapa communicate
konfigurasi routes.
protokol routing ?
ada parameter Adiministrasi distance (AD)
Cocok untuk network skala besar.
S=1
E = 90
O = 110
R = 120
static paling pertama di jalankan
Cisco proprietary
Advanced distance vector/hybrid routing protocol
Using DUAL Algorithm.
Multicast or unicast for exchange information use port 88
Administrative distance 90
Classless routing protocol support VLSM/CIDR.
Support IPv6
Rich metric (bandwidth, delay, load and reliability)
Very fast convergence
Equal and Unequal Load balancing
100% loop-free
Konfigurasi interface seperti pada lab static routing dan tambahkan interface
loopback pada ketiga router. Interface loopback dapat dipakai sebagai identitas
dan sebagai ip logical.
SEMARANG(config)#int lo0
SEMARANG(config-if)#ip address 1.1.1.1 255.255.255.255
SOLO(config)#int lo0
SOLO(config-if)#ip add 2.2.2.2 255.255.255.255
JOGJA(config)#int lo0
JOGJA(config-if)#ip add 3.3.3.3 255.255.255.255
Konfigurasi EIGRP pada router. AS Number dalam semua router EIGRP harus
sama.
SEMARANG(config)#router eigrp ?
<1-65535> Autonomous system number
SEMARANG(config)#router eigrp 10
SEMARANG(config-router)#network 12.12.12.0 ?
A.B.C.D EIGRP wild card bits
<cr>
SEMARANG(config-router)#network 12.12.12.0 0.0.0.255
SEMARANG(config-router)#network 1.1.1.1 0.0.0.0
SEMARANG(config-router)#no auto-summary
SEMARANG(config-router)#ex
SOLO(config)#router eigrp 10
SOLO(config-router)#network 12.12.12.0 0.0.0.255
SOLO(config-router)#network 23.23.23.0 0.0.0.255
SOLO(config-router)#network 2.2.2.2 0.0.0.0
SOLO(config-router)#no auto-summary
JOGJA(config)#router eigrp 10
JOGJA(config-router)#network 23.23.23.0 0.0.0.255
JOGJA(config-router)#network 3.3.3.3 0.0.0.0
JOGJA(config-router)#no auto-summary
SEMARANG#ping 3.3.3.3
SEMARANG#traceroute 3.3.3.3
Type escape sequence to abort.
Tracing the route to 3.3.3.3
SOLO#sh ip route
JOGJA#sh ip route
Konfigurasi OSPF pada router. OSPF menggunakan process ID. Process ID pada
setiap router tidak harus sama, yang terpenting adalah areanya. Untuk terhubung
antara area yang satu dengan yang lain harus melewari area 0 atau area backbone.
SEMARANG(config)#router ospf ?
<1-65535> Process ID
SEMARANG(config)#router ospf 1
SEMARANG(config-router)#net
SEMARANG(config-router)#network 12.12.12.0 ?
A.B.C.D OSPF wild card bits
SEMARANG(config-router)#network 12.12.12.0 0.0.0.255 area 0
SEMARANG(config-router)#network 1.1.1.1 0.0.0.0 area 0
SOLO(config)#router ospf 2
SOLO(config-router)#network 12.12.12.0 0.0.0.255 area 0
SOLO(config-router)#network 23.23.23.0 0.0.0.255 area 1
SOLO(config-router)#network 2.2.2.2 0.0.0.0 area 0
JOGJA(config)#router ospf 3
JOGJA(config-router)#network 23.23.23.0 0.0.0.255 area 1
JOGJA(config-router)#network 3.3.3.3 0.0.0.0 area 1
Sekarang lakukan tes ping.
SEMARANG#ping 2.2.2.2
SEMARANG#ping 3.3.3.3
SEMARANG#
Cek tabel routing.
SEMARANG#sh ip route
SOLO#sh ip ro
JOGJA#sh ip route
Gateway of last resort is not set
Can block a network, host and subnet Can allow or deny a network, host,
subnet and service
PC>
Sekarang konfigurasikan standard access list agar PC LAN tidak dapat mengakses
web server. Set access list pada router dan interface yang paling dekat dengan
destination.
Router(config)#access-list 10 deny 192.168.10.0 ?
A.B.C.D Wildcard bits
<cr>
Router(config)#access-list 10 deny 192.168.1.0 0.0.0.255
Router(config)#access-list 10 permit any
Router(config)#int fa0/1
Router(config-if)#ip access-group 1 out
Cek ping dan akses browser dari PC LAN ke web server.
PC>ping 20.20.20.2
PC>
Cek access list pada Router1.
Router#show access-lists
Standard IP access list 10
deny 192.168.1.0 0.0.0.255 (64 match(es))
permit any (5 match(es))
Router#
Pada standard access list, semua service akan diblok, baik UDP untuk akses
browser atau ICMP untuk ping. Untuk memilih hanya service tertentu saja,
gunakan extended access list.
Extented access list mengizinkan hanya service tertentu saja yang diblok. Gambar
dibawah adalah jenis-jenis service beserta aplikasinya.
Masih memakai topologi dari lab sebelumnya. Hapus dulu standard access list
yang telah dibuat pada Router1.
Router(config)#no access-list 10
Konfigurasi extended access list pada Router1 agar PC LAN dapat mengakses web
server namun tidak bisa melakukan ping.
Router(config)#access-list 100 deny icmp 192.168.1.0 0.0.0.255 host
20.20.20.2 echo
Router(config)#access-list 100 permit ip any any
Router(config)#int fa0/1
Router(config-if)#ip access-group 100 out
Coba cek browser dan tes ping.
PC>ping 20.20.20.2
PC>
Cek access list.
Router#show access-lists
Standard IP access list 10
deny 192.168.1.0 0.0.0.255 (64 match(es))
permit any (5 match(es))
Router#
IOS IPV4 ACCESS LISTS packetlife.net
Standard ACL Syntax Actions
! Legacy syntax
access-list <number> {permit | deny} <protocol> <source> [<ports>] <destination> [<ports>] [<options>]
! Modern syntax
ip access-list extended {<number> | <name>}
[<sequence>] {permit | deny} <protocol> <source> [<ports>] <destination> [<ports>] [<options>]
Miscellaneous Options
TCP Options
reflect <name> Create a reflexive ACL entry
ack Match ACK flag
time-range <name> Enable rule only during the given time range
fin Match FIN flag
psh Match PSH flag Applying ACLs to Restrict Traffic
Konfigurasinya hampir sama dengan lab access list, namun tidak perlu dirouting
karena nantinya akan menggunakan NAT.
Konfigurasi interface dan routing pada Router1.
Router(config)#int fa0/1
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#int fa0/0
Router(config-if)#ip add 10.10.10.1 255.255.255.0
Router(config-if)#no sh
Konfigurasi interface dan routing pada Router2.
Router(config)#int fa0/0
Router(config-if)#ip add 10.10.10.2 255.255.255.0
Router(config-if)#no sh
Router(config-if)#int fa0/1
Router(config-if)#ip add 20.20.20.1 255.255.255.0
Router(config-if)#no sh
Konfigurasi static NAT dan default route pada R1. PC LAN 192.168.1.11 akan
ditranslasikan ke ip public 10.10.10.10.
Router(config)#ip nat inside source ?
list Specify access list describing local addresses
static Specify static local->global mapping
Router(config)#ip nat inside source static 192.168.1.11 10.10.10.10
Router(config)#int fa0/1
Router(config-if)#ip nat inside
Router(config-if)#int fa0/0
Router(config-if)#ip nat outside
Router(config)#ip route 0.0.0.0 0.0.0.0 fa0/0
Ping static NAT melalui server dan sebaliknya. Alamat PC LAN tidak akan pernah
dapat diping dari internet.
SERVER>ping 10.10.10.10
SERVER>ping 192.168.1.11
SERVER>
PC>ping 20.20.20.2
PC>
PAT digunakan agar banyak PC local dapat mengakses internet secara bersama-
sama hanya dengan menggunakan 1 ip public.
Lanjutan lab sebelumnya. Hapus dahulu konfigurasi static NAT yang telah dibuat.
Router(config)#no ip nat inside source static 192.168.1.11 10.10.10.10
Buat access list untuk mendefinisikan network yang akan ditranslasikan dan
konfigurasi dynamic nat overload pada R1.
Router(config)#access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)#ip nat inside source list ?
<1-199> Access list number for local addresses
WORD Access list name for local addresses
Router(config)#ip nat inside source list 1 interface fa0/0 overload
Sekarang ping web server melalui PC0 dan PC1 pastikan reply.
PC>ping 20.20.20.2
PC>
NETWORK ADDRESS TRANSLATION packetlife.net
Example Topology Address Classification
An actual address assigned to
Inside Local
an inside host
An inside address seen from
Inside Global
the outside
An actual address assigned to
FastEthernet0 FastEthernet1 Outside Global
an outside host
10.0.0.1/16 174.143.212.1/22
An outside address seen from
NAT Inside NAT Outside Outside Local
the inside
NAT Boundary Configuration Perspective
interface FastEthernet0 Local Global
ip address 10.0.0.1 255.255.0.0
ip nat inside
Inside Local Inside Global
Location
!
Inside
interface FastEthernet1
ip address 174.143.212.1 255.255.252.0
ip nat outside
Outside Outside Local Outside Global
Router1(config-if)#int fa0/1
Router1(config-if)#ip add 12.12.12.1 255.255.255.0
Router1(config-if)#no sh
Router1(config-if)#router eigrp 10
Router1(config-router)#network 13.13.13.1 0.0.0.255
Router1(config-router)#network 12.12.12.1 0.0.0.255
Router1(config-router)#passive-interface fa0/1
Router1(config-router)#no auto-summary
Router(config)#hostname Router2
Router2(config)#int fa0/1
Router2(config-if)#ip add 23.23.23.2 255.255.255.0
Router2(config-if)#no sh
Router2(config-if)#int fa0/0
Router2(config-if)#ip add 12.12.12.2 255.255.255.0
Router2(config-if)#no sh
Router2(config-if)#router eigrp 10
Router2(config-router)#network 23.23.23.2 0.0.0.255
Router2(config-router)#network 12.12.12.2 0.0.0.255
Router2(config-router)#passive-interface fa0/0
Router2(config-router)#no auto-summary
Router(config)#hostname Router3
Router3(config)#int lo0
Router3(config-if)#int fa0/0
Router3(config-if)#ip add 13.13.13.3 255.255.255.0
Router3(config-if)#no sh
Router3(config-if)#router eigrp 10
Router3(config-router)#network 23.23.23.3 0.0.0.255
Router3(config-router)#network 13.13.13.3 0.0.0.255
Router3(config-router)#network 3.3.3.3 0.0.0.0
Router3(config-router)#no auto-summary
Pastikan Router1 dan Router2 dapat melakukan ping ke 3.3.3.3 baru lakukan
konfigurasi HSRP.
Router1(config)#int fa0/1
Router1(config-if)#standby ?
<0-4095> group number
ip Enable HSRP and set the virtual IP address
ipv6 Enable HSRP IPv6
preempt Overthrow lower priority Active routers
priority Priority level
track Priority Tracking
Router1(config-if)#standby 1 ip 12.12.12.12
Router1(config-if)#standby 1 preempt
%HSRP-6-STATECHANGE: FastEthernet0/1 Grp 1 state Speak -> Standby
Router2(config)#int fa0/0
Router2(config-if)#standby 1 ip 12.12.12.12
Router2(config-if)#standby preempt
%HSRP-6-STATECHANGE: FastEthernet0/0 Grp 1 state Speak -> Standby
Konfigurasi di PC.
PC0 IP:12.12.12.100/24 GATEWAY:12.12.12.12
PC1 IP:12.12.12.101/24 GATEWAY:12.12.12.12
PC>tracert 3.3.3.3
1 1 ms 1 ms 0 ms 12.12.12.1
2 1 ms 1 ms 0 ms 3.3.3.3
Trace complete.
PC>
Router2#show standby br
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Fa0/0 1 100 Standby 12.12.12.1 local 12.12.12.12
Router2#
Router2(config)#int fa0/0
Router2(config-if)#standby 1 ip 12.12.12.12
Router2(config-if)#standby preempt
%HSRP-6-STATECHANGE: FastEthernet0/0 Grp 1 state Speak -> Standby
FIRST HOP REDUNDANCY packetlife.net
Protocols Attributes
Hot Standby Router Protocol (HSRP) HSRP VRRP GLBP
Provides default gateway redundancy using one active Standard RFC 2281 RFC 3768 Cisco
and one standby router; standardized but licensed by
Cisco Systems Load Balancing No No Yes
Virtual Router Redundancy Protocol (VRRP) IPv6 Support Yes No Yes
An open-standard alternative to Cisco's HSRP, Transport UDP/1985 IP/112 UDP/3222
providing the same functionality
Default Priority 100 100 100
Gateway Load Balancing Protocol (GLBP)
Supports arbitrary load balancing in addition to Default Hello 3 sec 1 sec 3 sec
redundancy across gateways; Cisco proprietary
Multicast Group 224.0.0.2 224.0.0.18 224.0.0.102
Aslinya : 2541:0000:360B:0000:0000:0020:875B:131B/64
Jika ada 0000 baik berjejer atau tidak, dapat diwakili tanda colon 2 (::). Syaratnya
semua harus 0, tidak boleh ada angka selain 0.
Diringkas : 2541:0000:360B::0020:875B:131B/64
Klo sudah ada :: maka jika ada 0000 tidak bisa diwakili :: lagi karena hanya ada
satu :: dalam satu IPv6. 0000 bisa diwakili hanya dengan 0 saja.
Selain itu jika ada field yang depannya (sisi kirinya) adalah 0, maka 0 bisa
dihilangkan.
Diringkas lagi : 2541:0:360B::20:875B:131B/64
Dalam IPv6 tidak ada broadcast. Adanya unicast, multicast dan anycast.
Unicast, unicast dalam IPv6 sama dengan IPv4. Kelebihannya, IPv6 dapat
memberikan lebih dari 1 alamat pada 1 interface. Keren kan?
Multicast, pada IPv6, broadcast digantikan oleh multicast karena memang tidak
ada broadcast dalam IPv6.
Anycast, dalam IPv6 beberapa host dan router dapat diberi ip yang sama. Misalkan
kita punya beberapa web server dengan ip anycast yang sama. Dengan cara
tersebut, kita bisa mengarahkan host yang mengakses web server tadi untuk di
route ke web server terdekat.
Unique Local, sama dengan IP private pada IPv4. IP private digunakan untuk
network local dan bukan untuk internet. IP network yang digunakan adalah
FD00::/8.
Link Local, digunakan untuk mengirim dan menerima packet IPv6 dalam sebuah
single subnet. Tiap perangkat yang memakai IPv6 akan mempunyai alamat link
local secara otomatis pada interfacenya dan mempunyai link local scope atau
jangkauan link local, artinya packet tidak akan meninggalkan link local. Packet
yang dikirim ke destination tertentu akan tetap berada dalam link local dan tidak
diforward ke subnet lain oleh router. Link Local menggunakan IP network
FE80::/10.
Link Local digunakan sebagai RS (Router Solicitation) and RA (Router
Advertisement), untuk network discovery (sama seperti ARP) dan digunakan
sebagai next-hop untuk ip route.
Global Unicast, sama seperti ip publik untuk internet. IP network yang digunakan
adalah 2000::/3.
Unspecified, alamat ini digunakan ketika host tidak bisa menggunakan IPv6,
menggunakan ::/128
Loopback yang digunakan untuk software testing seperti 127.0.0.1. Loopback
menggunakan ip ::1/128.
Site Local. Site local dulunya digunakan sebagai ip private, sekarang sudah tidak
digunakan. IP site local adalah FECO::/10.
Secara default IPv6 tidak aktif, untuk mengaktifkan ketikkan perintah unicast-
routing.
R1(config)#ipv6 unicast-routing
Setiap kali mengkonfigurasi IPv6 pada interface, link-local akan otomatis terbuat.
R1(config-if)#do sh ipv6 int fa0/0
FastEthernet0/0 is administratively down, line protocol is down
IPv6 is enabled, link-local address is FE80::C201:9FF:FED0:0 [TEN]
No Virtual link-local address(es):
No global unicast address is configured
Joined group address(es):
FF02::1
FF02::2
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 200 seconds
ND router advertisements live for 1800 seconds
ND advertised default router preference is Medium
Hosts use stateless autoconfig for addresses.
R1(config-if)#
Bisa juga dengan perintah berikut.
R2(config)#int fa0/0
R2(config-if)#ipv6 address autoconfig
R1(config)#int fa0/0
R1(config-if)#ipv6 address 12::1/126
RR1(config-if)#no sh
*Mar 1 00:22:30.687: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed
state to up
*Mar 1 00:22:31.687: %LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/0, changed state to up
R2(config)#int fa0/0
R2(config-if)#ipv6 add 12::2/126
R2(config-if)#no sh
*Mar 1 00:21:23.063: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed
state to up
*Mar 1 00:21:24.063: %LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/0, changed state to up
Cek ping.
R2(config-if)#do ping 12::1
R3(config)#int fa0/1
R3(config-if)#ipv6 address 23::/64 eui-64
R3(config-if)#no sh
*Mar 1 00:24:13.739: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed
state to up
*Mar 1 00:24:14.739: %LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/1, changed state to up
R1(config-if)#ipv6 rip 17 ?
default-information Configure handling of default route
enable Enable/disable RIP routing
metric-offset Adjust default metric increment
summary-address Configure address summarization
R2(config)#ipv6 unicast-routing
R2(config)#int fa0/0
R2(config-if)#ipv6 rip 17 enable
R2(config-if)#int fa0/1
R2(config-if)#ipv6 rip 17 enable
R3(config)#ipv6 unicast-routing
R3(config)#int fa0/1
R3(config-if)#ipv6 rip 17 enable
Cek tabel routing dan tes ping.
R3#sh ipv6 route
IPv6 Routing Table - 4 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route, M - MIPv6
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
D - EIGRP, EX - EIGRP external
R 12::/126 [120/2]
via FE80::C202:CFF:FED8:1, FastEthernet0/1
C 23::/64 [0/0]
via ::, FastEthernet0/1
L 23::C203:3FF:FEA8:1/128 [0/0]
via ::, FastEthernet0/1
L FF00::/8 [0/0]
via ::, Null0
R3#ping 12::1
R2(config-if)#int fa0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int s1/1
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no sh
R3(config)#ipv6 unicast-routing
R3(config)#int lo0
R3(config-if)#ipv6 add 3::3/128
R3(config-if)#int se1/1
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#no sh
Sekarang konfigurasi routing IPv4 nya, boleh pake static, EIGRP ato OSPF.
R1(config-if)#router ospf 1
R1(config-router)#net 12.12.12.0 0.0.0.255 area 0
R2(config-if)#router ospf 2
R2(config-router)#net 12.12.12.0 0.0.0.255 area 0
R2(config-router)#net 23.23.23.0 0.0.0.255 area 0
R3(config-if)#router ospf 3
R3(config-router)#net 23.23.23.0 0.0.0.255 area 0
R3(config)#int tun31
R3(config-if)#ipv6 add 13::3/64
R3(config-if)#tunnel source 23.23.23.3
R3(config-if)#tunnel destination 12.12.12.1
R3(config-if)#tunnel mode ipv6ip
Dari lab sebelumnya tinggal merubah tunnel mode atau cukup menghapus tunnel
mode sebelumnya karena GRE IP Tunneling secara default aktif.
R3(config)#int tunnel 31
R3(config-if)#tunnel mode gre ip
Cek interfacenya.
R3#show int tunnel31
Tunnel31 is up, line protocol is up
Hardware is Tunnel
MTU 1514 bytes, BW 9 Kbit, DLY 500000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source 23.23.23.3, destination 12.12.12.1
Tunnel protocol/transport GRE/IP
Key disabled, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255
Fast tunneling enabled
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 00:03:54, output 00:03:54, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
29 packets input, 3296 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
38 packets output, 3988 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
R3#
Tes ping.
R3#ping 1::1
Masih menggunakan topologi sebelumnya. Hapus dulu interface tunnel dan ipv6
routenya.
R1(config)#no int tun13
R1(config)#do sh run | s i ipv6 route
ipv6 route 3::3/128 13::3
R1(config)#no ipv6 route 3::3/128 13::3
Masih memakai topologi sebelumnya. Hapus dulu interface tunnel dan ipv6
routenya.
R3(config-if)#do ping
Masih memakai topologi sebelumnya. Hapus dulu interface tunnel dan ipv6
routenya.
R3(config)#int tun30001
*Mar 1 00:04:15.243: %LINEPROTO-5-UPDOWN: Line protocol on Interface
Tunnel30001, changed state to down
R3(config-if)#tunnel source 23.23.23.3
R3(config-if)#tunnel mode ipv6ip au
R3(config-if)#tunnel mode ipv6ip auto-tunnel
Ping tunnelnya.
R3(config-if)#do ping ::12.12.12.1
Pengecekan.
R1(config)#do ping 3::3
Address Formats
Source Address
Global unicast
Link-local unicast
Version (4 bits) · Always set to 6 Interface ID
Traffic Class (8 bits) · A DSCP value for QoS 64 64
Flow Label (20 bits) · Identifies unique flows (optional)
Multicast
Payload Length (16 bits) · Length of the payload in bytes
Scope
Flags
Group ID
Next Header (8 bits) · Header or protocol which follows
8 4 4 112
Hop Limit (8 bits) · Similar to IPv4's time to live field
Source Address (128 bits) · Source IP address EUI-64 Formation
Address Types
EUI-64
Unicast · One-to-one communication
Multicast · One-to-many communication · Insert 0xfffe between the two halves of the MAC
Anycast · An address configured in multiple locations · Flip the seventh bit (universal/local flag) to 1
EIGRP Packets
Hello Packet
Untuk discover dan recovery neighbor serta membentuk adjency.
Jika penerima membalas dengan hello packet maka terjadi adjency. Jika
penerima tidak mengirim hello packet dalam X waktu (hold time), maka
adjency akan didrop.
Setelah adjency terbentuk, akan melakukan exchange routing information
yang akan disimpan di topology table. Best path dari topology table akan
disave di routing table.
Reliable
Update Packet
Berisi informasi routing
Dapat dikirim secara unicast atau multicast
Reliable
Query Packet
Dikirim jika suatu router EIGRP kehilangan informasi tentang suatu
network, maka query akan dikirim ke neighbor untuk mendapat informasi
tentang neighbor yang hilang tadi.
Reply Packet
Response dari query packet
ACK Packet
Dikirim sebagai pemberitahuan bahwa telah menerima update packet.
Dikirim secara unicast.
No Auto-Summary
Digunakan untuk menyertakan subnetmask dalam advertise network.
Ketikkan konfigurasi interface berikut. Pastikan dapat ping antar interface yang
directly connect.
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Serial0/0
ip address 12.12.12.1 255.255.255.0
!
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Serial0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial0/1
ip address 23.23.23.2 255.255.255.0
!
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial0/0
ip address 23.23.23.3 255.255.255.0
!
Konfigurasi EIGRP. Advertise network ke dalam routing EIGRP. Autonomous
Number (AS Number) harus sama pada setiap router.
R1
router eigrp 10
network 1.1.1.1 0.0.0.0
network 12.12.12.1 0.0.0.0
no auto-summary
R2
router eigrp 10
network 2.2.2.2 0.0.0.0
network 12.12.12.2 0.0.0.0
network 23.23.23.2 0.0.0.0
no auto-summary
R3
router eigrp 10
network 3.3.3.3 0.0.0.0
network 23.23.23.3 0.0.0.0
no auto-summary
Cek routing tabel dan tes ping.
R1#show ip route
Diguanakn untuk memfilter network berdasarkan route network yang masuk dan
keluar interface. Pada topologi dibawah, tujuannya agar ip loopback 2.2.2.2 tidak
ada dalam routing tabel R1.
Cara pertama: filter network menggunakan access list pada R1 dengan distribute
IN.
Memfilter network berdasarkan prefix. Ketika dimasukkan prefix list IN pada R2,
maka network R3 yang dideny oleh R2 tidak akan diadvertise ke R1.
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Serial0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial0/1
ip address 23.23.23.2 255.255.255.0
!
router eigrp 10
network 0.0.0.0
no auto-summary
!
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial0/0
ip address 23.23.23.3 255.255.255.0
!
router eigrp 10
network 0.0.0.0
no auto-summary
!
Pada R1, buat ip loopback yang bervariatif untuk difilter.
interface Loopback1
ip address 3.3.3.17 255.255.255.240
!
interface Loopback2
ip address 3.3.3.33 255.255.255.248
!
interface Loopback3
ip address 3.3.3.150 255.255.255.252
!
interface Loopback4
ip address 3.3.3.200 255.255.255.240
!
interface Loopback5
ip address 3.3.3.100 255.255.255.224
!
Cek tabel routing R1.
R1#sh ip route
R2#sh ip route
R1#sh ip route
R2#sh ip route
***Advertise ke EIGRP***
R1(config)#router eigrp 10
R1(config-router)# network 11.11.11.1 0.0.0.0
R1(config-router)# network 11.11.11.2 0.0.0.0
R1(config-router)# network 11.11.11.3 0.0.0.0
R1(config-router)# network 11.11.11.4 0.0.0.0
R1(config-router)# network 11.11.11.5 0.0.0.0
R1(config-router)# network 11.11.11.6 0.0.0.0
R1(config-router)# network 11.11.11.7 0.0.0.0
R1(config-router)# network 11.11.11.8 0.0.0.0
R3(config)#do sh ip route
R3(config-if)#router eigrp 10
R3(config-router)#network 33.33.33.33 0.0.0.0
Pastikan sudah ter-advertise.
R2#sh 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
Dengan mengeset distance 255 pada network 33.33.33.33 di R2, maka network
33.33.33.33 tidak akan muncul pada tabel routing R2. Ketika dicek, network
33.33.33.33 sudah tidak ada.
R2(config)#access-list 33 permit 33.33.33.33
R2(config)#router eigrp 10
R2(config-router)#distance 255 0.0.0.0 255.255.255.255 33
R2(config-router)#do sh ip route
R2(config-if)#router eigrp 10
R2(config-router)# network 22.22.22.1 0.0.0.0
R2(config-router)# network 22.22.22.2 0.0.0.0
R2(config-router)# network 22.22.22.3 0.0.0.0
R2(config-router)# network 22.22.22.4 0.0.0.0
R2(config-router)# network 22.22.22.5 0.0.0.0
R2(config-router)# network 22.22.22.6 0.0.0.0
R2(config-router)# network 22.22.22.7 0.0.0.0
R2(config-router)# network 22.22.22.8 0.0.0.0
Cek di R1 dan R3.
R3#show ip route
R2(config)#router eigrp 10
R2(config-router)#neighbor 12.12.12.1 s0/0
Cek debug lagi harusnya sudah ganti unicast.
R1#debug ip packet detail
IP packet debugging is on (detailed)
R1#
*Mar 1 00:15:51.467: IP: tableid=0, s=12.12.12.2 (Serial0/0), d=12.12.12.1
(Serial0/0), routed via RIB
*Mar 1 00:15:51.471: IP: s=12.12.12.2 (Serial0/0), d=12.12.12.1
(Serial0/0), len 60, rcvd 3, proto=88
R1#
R1#undebug ip packet detail
IP packet debugging is off (detailed)
R1#
Agar setiap router tidak perlu membuat konfigurasi default route satu persatu
secara manual.
R1(config)#int s0/0
R1(config-if)#ip sum
R1(config-if)#ip summary-address eig
R1(config-if)#ip summary-address eigrp 10 0.0.0.0 0.0.0.0
R1(config-if)#
*Mar 1 00:01:20.419: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 10: Neighbor 12.12.12.2
(Serial0/0) is resync: summary configured
Cek di R1.
R1(config-if)#do sh ip route
R1(config-if)#router rip
R1(config-router)#version 2
R1(config-router)#network 111.111.111.0
R1(config-router)#no auto-summary
Redistribute RIP ke EIGRP.
R2(config)#ipv6 unicast-routing
R2(config)#int fa0/0
R2(config-if)#ipv6 rip 17 enable
R2(config-if)#int fa0/1
R2(config-if)#ipv6 rip 17 enable
R3#sh ip route
R2(config-if)#router ospf 11
R2(config-router)#net 222.222.222.222 0.0.0.0 area 0
Redistribute OSPF ke EIGRP.
R2(config)#router eigrp 10
R2(config-router)#redistribute ospf 11 metric 1 1 1 1 1
Cek tabel routing dan tes ping.
R1#sh ip route
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#int f0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int fa0/1
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#router eigrp 13
R2(config-router)#net 2.2.2.2 0.0.0.0
R2(config-router)#net 12.12.12.2 0.0.0.0
R2(config-router)#net 23.23.23.2 0.0.0.0
R2(config-router)#no au
R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#int s1/0
R3(config-if)#ip add 13.13.13.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int f0/1
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#router eigrp 13
R3(config-router)#net 3.3.3.3 0.0.0.0
R3(config-router)#net 13.13.13.3 0.0.0.0
R3(config-router)#net 23.23.23.3 0.0.0.0
R3(config-router)#no au
R1#traceroute 3.3.3.3
R1#sh ip route
Secara default EIGRP akan menerapkan load balancing pada link yang equal. Pada
topologi dibawah dari R1 menuju R3 dapat menggunakan 2 jalur dan semuanya
FastEthernet.
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#int fa0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int f0/1
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#router eigrp 16
R2(config-router)#net 0.0.0.0
R2(config-router)#no au
R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#int f0/1
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int fa0/0
R3(config-if)#ip add 34.34.34.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#router eigrp 16
R3(config-router)#net 0.0.0.0
R3(config-router)#no au
R4(config)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config-if)#int f0/1
R4(config-if)#ip add 14.14.14.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#int fa0/0
R4(config-if)#ip add 34.34.34.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#router eigrp 16
R4(config-router)#net 0.0.0.0
R4(config-router)#no au
Pada link yang unequal, maka load balancing tidak aktif dan hanya akan
menggunakan satu link.
R1(config-router)#
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Loopback1
ip address 22.22.21.1 255.255.255.0
!
interface Loopback2
ip address 22.22.22.1 255.255.255.0
!
interface Loopback3
ip address 22.22.23.1 255.255.255.0
!
interface Loopback4
ip address 22.22.24.1 255.255.255.0
!
interface Loopback5
ip address 22.22.25.1 255.255.255.0
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface FastEthernet0/1
ip address 23.23.23.2 255.255.255.0
ip summary-address eigrp 10 22.22.0.0 255.255.0.0 5
!
router eigrp 10
redistribute static
redistribute rip metric 1 1 1 1 1
network 2.2.2.2 0.0.0.0
network 12.12.12.2 0.0.0.0
network 22.22.0.0 0.0.0.0
network 23.23.23.2 0.0.0.0
no auto-summary
!
router rip
network 22.0.0.0
!
ip route 1.1.1.1 255.255.255.255 FastEthernet0/0
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/1
ip address 23.23.23.3 255.255.255.0
!
router eigrp 10
network 3.3.3.3 0.0.0.0
network 23.23.23.3 0.0.0.0
no auto-summary
!
Cek tabel routing di R3.
R3#sh ip route
Cek ip route dan tabel routing sudah kembali seperti semua. Masukkan eigrp stub
connected.
R3#sh ip route
R2(config)#router eigrp 10
R2(config-router)#no eigrp stub
R2(config-router)# eigrp stub summary
R3#sh ip route
R2(config)#router eigrp 10
R2(config-router)#no eigrp stub
R2(config-router)#eigrp stub static
R3#sh ip route
R2(config)#router eigrp 10
R2(config-router)#no eigrp stub
R2(config-router)#eigrp stub redistributed
R3#sh ip route
OSPF bekerja dengan konsep area. Area yang harus ada pada OSPF adalah area 0
atau backbone area. Area-area lain (non-backbone area) yang ingin terhubung,
harus melalui backbone area.
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial1/0
ip address 23.23.23.2 255.255.255.0
!
router ospf 13
router-id 2.2.2.2
network 2.2.2.2 0.0.0.0 area 10
network 12.12.12.0 0.0.0.255 area 0
network 23.23.23.0 0.0.0.255 area 10
!
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial1/0
ip address 23.23.23.3 255.255.255.0
!
router ospf 14
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 10
network 23.23.23.0 0.0.0.255 area 10
!
Cek tabel routing.
R1#sh ip route
R2#sh ip route
R3#sh ip route
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial1/0
ip address 23.23.23.2 255.255.255.0
!
router ospf 13
router-id 2.2.2.2
network 2.2.2.2 0.0.0.0 area 1
network 12.12.12.0 0.0.0.255 area 1
network 23.23.23.0 0.0.0.255 area 2
!
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial1/0
ip address 23.23.23.3 255.255.255.0
!
router ospf 14
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 2
network 23.23.23.0 0.0.0.255 area 2
!
Cek tabel routing.
R1(config-router)#do sh ip route
Gateway of last resort is not set
R2(config-router)#do sh ip route
Gateway of last resort is not set
R3(config-router)#do sh ip route
Gateway of last resort is not set
R1#sh ip route
Gateway of last resort is not set
R1#sh ip route
Gateway of last resort is not set
R2(config)#router ospf 13
R2(config-router)#no area 1 virtual-link 1.1.1.1
R2(config-router)#no area 2 virtual-link 3.3.3.3
R3(config)#router ospf 14
R3(config-router)#no area 2 virtual-link 2.2.2.2
Konfigurasi GRE tunnel.
R1(config)#int tun1
R1(config-if)#ip add 102.102.102.1 255.255.255.0
R1(config-if)#tunnel source 12.12.12.1
R1(config-if)#tunnel destination 12.12.12.2
R1(config-if)#router ospf 13
R1(config-router)#net 102.102.102.1 0.0.0.0 area 0
R2(config)#int tun1
R2(config-if)#ip add 102.102.102.2 255.255.255.0
R2(config-if)#tunnel destination 12.12.12.1
R2(config-if)#tunnel source 12.12.12.2
R2(config-if)#router ospf 13
R2(config-router)#net 102.102.102.2 0.0.0.0 area 0
R1#sh ip route
Gateway of last resort is not set
R1#sh ip int br
Interface IP-Address OK? Method Status
Protocol
FastEthernet0/0 12.12.12.1 YES NVRAM up
up
FastEthernet0/1 unassigned YES NVRAM administratively down
down
Serial1/0 unassigned YES NVRAM administratively down
down
Serial1/1 unassigned YES NVRAM administratively down
down
Serial1/2 unassigned YES NVRAM administratively down
down
Serial1/3 unassigned YES NVRAM administratively down
down
Loopback0 1.1.1.1 YES NVRAM up
up
Tunnel1 102.102.102.1 YES manual up
up
R1#
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
!
router ospf 13
router-id 1.1.1.1
network 1.1.1.1 0.0.0.0 area 10
network 12.12.12.0 0.0.0.255 area 10
!
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial1/0
ip address 23.23.23.2 255.255.255.0
!
router ospf 13
router-id 2.2.2.2
network 2.2.2.2 0.0.0.0 area 0
network 12.12.12.0 0.0.0.255 area 10
network 23.23.23.0 0.0.0.255 area 0
!
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial1/0
ip address 23.23.23.3 255.255.255.0
!
router ospf 14
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 0
network 23.23.23.0 0.0.0.255 area 0
!
Buat interface loopback di R3 dan masukkan beberapa interfacenya ke EIGRP.
interface Loopback1
ip address 33.33.33.1 255.255.255.255
!
interface Loopback2
ip address 33.33.33.2 255.255.255.255
!
interface Loopback3
ip address 33.33.33.3 255.255.255.255
!
interface Loopback4
ip address 33.33.33.4 255.255.255.255
!
interface Loopback5
ip address 33.33.33.5 255.255.255.255
!
interface Loopback6
ip address 33.33.33.6 255.255.255.255
!
interface Loopback7
ip address 33.33.33.7 255.255.255.255
!
interface Loopback8
ip address 33.33.33.8 255.255.255.255
!
router eigrp 2
net 33.33.33.1 0.0.0.0
net 33.33.33.2 0.0.0.0
net 33.33.33.3 0.0.0.0
net 33.33.33.4 0.0.0.0
no auto-summary
Masukkan interface yang lain ke OSPF dengan area 100 dan redistribute EIGRP ke
OSPF lalu cek tabel routing R1.
router ospf 14
net 33.33.33.5 0.0.0.0 area 100
net 33.33.33.6 0.0.0.0 area 100
net 33.33.33.7 0.0.0.0 area 100
net 33.33.33.8 0.0.0.0 area 100
redistribute eigrp 2 subnets
Cek R1.
R1(config-router)#do sh ip route
Gateway of last resort is not set
R1(config-if)#router rip
R1(config-router)#ver 2
R1(config-router)#no auto-summary
R1(config-router)#net 11.0.0.0
R1(config)#router ospf 13
R1(config-router)#redistribute rip subnets
Cek tabel routing R3. External route dari RIP dan EIGRP sudah muncul di R1.
R3#sh ip route
Gateway of last resort is not set
Pada R1 belum ada default route sehingga belum bisa ping ke 33.33.33.1 -
33.33.33.4 pada network EIGRP pada R3 yang diredistribute ke OSPF.
R1#ping 33.33.33.1
R1#sh ip route
Gateway of last resort is 12.12.12.2 to network 0.0.0.0
R2#sh ip route
Gateway of last resort is not set
R3#sh ip route
Gateway of last resort is not set
R2#sh ip route
Gateway of last resort is not set
Jika sebelumnya metric sama-sama 20 pada tabel routing R2 dan R3, sekarang
sudah berbeda.
R1
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.1 255.255.255.0
!
router ospf 1
router-id 1.1.1.1
network 0.0.0.0 255.255.255.255 area 0
!
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial1/0
ip address 23.23.23.2 255.255.255.0
!
router ospf 2
router-id 2.2.2.2
network 0.0.0.0 255.255.255.255 area 0
!
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial1/0
ip address 23.23.23.3 255.255.255.0
!
router ospf 3
router-id 3.3.3.3
network 0.0.0.0 255.255.255.255 area 0
!
Walau didalalam ip route tidak muncul, namun di ospf database masih muncul
karena router dalam area yang sama memiliki database yang sama.
R2
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
!
interface Serial1/0
ip address 23.23.23.2 255.255.255.0
!
router ospf 2
router-id 2.2.2.2
network 0.0.0.0 255.255.255.255 area 0
!
R3
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Serial1/0
ip address 23.23.23.3 255.255.255.0
!
router ospf 3
router-id 3.3.3.3
network 0.0.0.0 255.255.255.255 area 0
!
Buat ip loopback untuk nantinya disummary.
R3(config)#int lo1
R3(config-if)#ip add 33.33.33.1 255.255.255.255
R3(config-if)#int lo2
R3(config-if)#ip add 33.33.33.2 255.255.255.255
R3(config-if)#int lo3
R3(config-if)#ip add 33.33.33.3 255.255.255.255
R3(config-if)#int lo4
R3(config-if)#ip add 33.33.33.4 255.255.255.255
R3(config-if)#int lo5
R3(config-if)#ip add 33.33.33.5 255.255.255.255
R3(config-if)#int lo6
R3(config-if)#ip add 33.33.33.6 255.255.255.255
R3(config)#router ospf 3
R3(config-router)#net 33.33.33.1 0.0.0.0 area 10
R3(config-router)#net 33.33.33.2 0.0.0.0 area 10
R3(config-router)#net 33.33.33.3 0.0.0.0 area 10
R3(config-router)#net 33.33.33.4 0.0.0.0 area 10
R3(config-router)#net 33.33.33.5 0.0.0.0 area 10
R3(config-router)#net 33.33.33.6 0.0.0.0 area 10
R1(config-router)#do sh 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
R1#sh ip route
Gateway of last resort is not set
R1#sh 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
R2(config)#int f0/0
R2(config-if)#ip ospf authentication
R2(config-if)#ip ospf authentication-key CISCO123
R3(config)#int s1/0
R3(config-if)#ip ospf authentication message-digest
R3(config-if)#ip ospf message-digest-key 13 md5 CISCO123
R3(config-if)#do sh ip ospf int s1/0
Serial1/0 is up, line protocol is up
Internet Address 23.23.23.3/24, Area 0
Process ID 3, Router ID 3.3.3.3, Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:06
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 2.2.2.2
Suppress hello for 0 neighbor(s)
Message digest authentication enabled
Youngest key id is 13
R3(config-if)#
R1(config)#interface Loopback0
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#interface FastEthernet0/0
R1(config-if)#ip address 12.12.12.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#interface Serial1/0
R1(config-if)#ip address 13.13.13.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 0.0.0.0 255.255.255.255 area 0
R2(config)#interface Loopback0
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#interface FastEthernet0/0
R2(config-if)#ip address 12.12.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#interface FastEthernet0/1
R2(config-if)#ip address 23.23.23.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#router ospf 2
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 0.0.0.0 255.255.255.255 area 0
R3(config)#interface Loopback0
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#interface FastEthernet0/1
R3(config-if)#ip address 23.23.23.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#interface Serial1/0
R3(config-if)#ip address 13.13.13.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#router ospf 3
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 0.0.0.0 255.255.255.255 area 0
R1#
Karena ospf menggunakan bandwidth maka jalur yang lebih dipilih adalah yang
melalui FastEthernet. FastEthernet mempunyai metric 10 didapat dari
100.000.000:10.000.000(bandwidth terendah 10Mbps).
Tertulis metric nya 21 didapat dari metric FastEthernet R1-R2 dan R2-R3 masing-
masing 10 dan loopback R3 1 sehingga totalnya 21.
Coba shutdown FastEthernet pada R2.
R2(config)#interface FastEthernet0/0
R2(config-if)#shutdown
R1#
Maka jalurnya berpindah ke serial. Serial mempunyai metric 64 didapat dari
100.000.000:1.544.000(pembulatan bandwidth serial).
Metric 65 didapat dari link serial R1-R3 yaitu 64 dan loopback R3 1 totalnya 65.
R1#
Untuk memindahkan jalur ke Serial, ubah parameter bandwidth FastEthernet.
R1(config)#int fastEthernet0/0
R1(config-if)#bandwidth 100
R1#sh ip route 3.3.3.3
Routing entry for 3.3.3.3/32
Known via "ospf 1", distance 110, metric 65, type intra area
Last update from 13.13.13.3 on Serial1/0, 00:00:12 ago
Routing Descriptor Blocks:
* 13.13.13.3, from 3.3.3.3, 00:00:12 ago, via Serial1/0
Route metric is 65, traffic share count is 1
R1#
Maka jalur berpindah ke Serial.
OSPF · PART 1 packetlife.net
Protocol Header Attributes
8 16 24 32 Type Link-State
Version Type Length Algorithm Dijkstra
Router ID Metric Cost (Bandwidth)
Area ID AD 110
Checksum Instance ID Reserved Standard RFC 2328, 2740
Data Protocols IP
Transport IP/89
Link State Advertisements
Authentication Plaintext, MD5
Router Link (Type 1)
Lists neighboring routers and the cost to each; flooded within an area AllSPF Address 224.0.0.5
E2 (Default) · Cost of the route as seen by the ASBR · Tunnel formed to join two areas
across an intermediate
Troubleshooting
· Both end routers must share a
show ip [route | protocols] show ip ospf border-routers common area
show ip ospf interface show ip ospf virtual-links · At least one end must reside in area 0
show ip ospf neighbor debug ip ospf […] · Cannot traverse stub areas
Configuration Example
Router B Router C
interface Ethernet0/0 interface Ethernet0/0
description Area 0 description Area 9
ip address 192.168.0.2 255.255.255.0 ip address 192.168.9.1 255.255.255.0
ip ospf 100 area 0 ip ospf 100 area 9
! !
interface Ethernet0/1 interface Ethernet0/1
description Area 2 description Area 2
ip address 192.168.2.1 255.255.255.0 ip address 192.168.2.2 255.255.255.0
ip ospf 100 area 2 ip ospf 100 area 2
! Optional MD5 authentication configured ! Optional MD5 authentication configured
ip ospf authentication message-digest ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 FooBar ip ospf message-digest-key 1 md5 FooBar
! Give B priority in DR election ! Give C second priority (BDR) in election
ip ospf priority 100 ip ospf priority 50
! !
interface Ethernet0/2 !
description Area 1 !
ip address 192.168.1.1 255.255.255.0 !
ip ospf 100 area 1 !
! !
interface Loopback0 interface Loopback0
ip address 10.0.34.2 255.255.255.0 ip address 10.0.34.3 255.255.255.0
! !
router ospf 100 router ospf 100
! Define area 1 as a stub area ! Define area 9 as a totally stubby area
area 1 stub area 9 stub no-summary
! Virtual link from area 0 to area 9 ! Virtual link from area 9 to area 0
area 2 virtual-link 10.0.34.3 area 2 virtual-link 10.0.34.2
Ketika BGP berjalan didalam router-router dalam 1 AS, disebut iBGP. BGP yang
berjalan antar AS disebut eBGP. eBGP harus direct connected antara 2 router,
namun iBGP tidak harus direct connected selama ada IGP baik itu EIGRP, OSPF,
atau static routing yang berjalan dan menjadikan 2 router BGP tadi reachable satu
sama lain.
Ketika interface yang dijadikan source update down, maka adjency BGP juga ajan
down. Karena physical interface bisa down kapan saja, maka digunakan source
update via loopback karena interface loopback tidak akan down. Umumnya
digunakan dalam iBGP.
Dalam BGP, route map digunakan untuk mengontrol dan memodifikasi informasi
routing untuk incoming routes dan outcoming routes.
Attribute dalam BGP juga sering disebut path attribute. Ada beberapa jenis
attribute dalam BGP:
WELL KNOWN = ada pada setiap BGP
- Mandatory = ter-include pada setiap route BGP, jika attribute ini tidak ada akan
muncul error message. Harus disertakan dalam setiap update.
AS Path
Origin
Next Hop
- Discreationay = setiap BGP … namun tidak tampil pada setiap route entry.
local preference
Atomic Aggregate
OPTIONAL
- Transitive
Community
Aggregator
- Non-Transitive
Multi Exit Discriminator (MED)
Ketika packet update route dikirim melewati suatu AS, maka AS Number tersebut
akan ditambahkan ke dalam packet update. Jadi AS Path adalah urutan AS Number
yang dilewati suatu route untuk sampai ke destination. Karena hal ini juga, BGP
disebut juga path-vector protocol.
AS Path digunakan untuk loop detection.
Origin mendefinisikan asal dari suatu path information. Ada 3 value dari origin
attribute.
IGP (i) = berasal dari BGP baik iBGP atau eBGP dengan perintah network x.x.x.x
mask x.x.x.x
EGP (e) = berasal dari protocol EGP, saat ini sudah tidak ada.
INCOMPLETE (?) = berasal dari protocol lain(RIP, EIGRP, OSPF, Static) yang
diredistribute ke BGP.
R2(config)#int fa0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int f0/1
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#router ospf 1
R2(config-router)#net 0.0.0.0 255.255.255.255 area 0
R3(config)#int fa0/1
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int fa0/0
R3(config-if)#ip add 34.34.34.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#router ospf 1
R3(config-router)#net 0.0.0.0 255.255.255.255 area 0
R3(config-router)#passive-interface fa0/0
R4(config)#int fa0/0
R4(config-if)#ip add 34.34.34.4 255.255.255.0
R4(config-if)#no sh
R3(config)#router bgp 10
R3(config-router)#neighbor 12.12.12.1 remote-as 10
R1(config-if)#router bgp 10
R1(config-router)#network 11.11.11.11 mask 255.255.255.255
Sekarang cek di R3, pastikan State/PfxRcd sudah tidak 0 lagi.
R3(config-router)#do sh ip bgp sum
BGP router identifier 34.34.34.3, local AS number 10
BGP table version is 3, main routing table version 3
1 network entries using 120 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 420 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Interface fisik bisa down sewaktu-waktu sehingga adjency BGP juga bisa drop.
Karena itu adjency BGP dilakukan melalui loopback.
Buat dulu interface loopback nya.
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R1(config-if)#router bgp 10
R1(config-router)#neighbor 3.3.3.3 remote-as 10
R3(config-if)#router bgp 10
R3(config-router)#neighbor 1.1.1.1 remote-as 10
Oke sekarang cek neighbor BGP nya.
R3(config-router)#do sh ip bgp sum
BGP router identifier 34.34.34.3, local AS number 10
BGP table version is 3, main routing table version 3
1 network entries using 120 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 420 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Ups... ternyata adjency melalui loopback belum berhasil, walau state sudah active
tapi PfxRcd masih belum ada. Tambahkan perintah berikut.
R3(config-router)#neighbor 1.1.1.1 update-source loopback0
*Mar 1 00:06:33.639: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up
R1(config-router)#
*Mar 1 00:14:33.951: %BGP-5-ADJCHANGE: neighbor 23.23.23.3 Down Peer closed
the session
R1(config-router)#no neighbor 23.23.23.3
Oke cek lagi dan neighbor nya hanya ada 1.
R3(config-router)#do sh ip bgp sum
BGP router identifier 34.34.34.3, local AS number 10
BGP table version is 4, main routing table version 4
1 network entries using 120 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 420 total bytes of memory
BGP activity 1/0 prefixes, 2/1 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down
State/PfxRcd
1.1.1.1 4 10 14 13 4 0 0 00:09:13 1
R3(config-router)#
R4(config)#router bgp 20
R4(config-router)#neighbor 34.34.34.3 remote-as 10
*Mar 1 00:02:03.487: %BGP-5-ADJCHANGE: neighbor 34.34.34.3 Up
Cek neighbor.
R4(config-router)#do sh ip bgp sum
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down
State/PfxRcd
34.34.34.3 4 10 5 4 2 0 0 00:00:02 1
R4(config-router)#
R1#sh ip route
Gateway of last resort is not set
Upss... ternyata masih belum bisa. Disitu kadang saya merasa sedih...
Caranya... angkat R2 menjadi iBGP juga. Syarat iBGP adalah full mesh atau bisa
juga route reflector. Klo full mesh berarti setiap router harus punya satu link ke
setiap router lain.
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#router bgp 10
R2(config-router)#neighbor 1.1.1.1 remote-as 10
R2(config-router)#neighbor 1.1.1.1 up lo0
R2(config-router)#neighbor 3.3.3.3 remote-as 10
R2(config-router)#neighbor 3.3.3.3 up lo0
R1(config)#router bgp 10
R1(config-router)#neighbor 2.2.2.2 remote-as 10
R1(config-router)#neighbor 2.2.2.2 up lo0
R3(config)#router bgp 10
R3(config-router)#neighbor 2.2.2.2 remot 10
R3(config-router)#neighbor 2.2.2.2 up lo0
Oke cek lagi.
R1#ping
Protocol [ip]:
Target IP address: 44.44.44.44
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 11.11.11.11
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 44.44.44.44, timeout is 2 seconds:
Packet sent with a source address of 11.11.11.11
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/196/264 ms
R1#
Hal ini dikarenakan secara default source yang dipakai untuk ping adalah
interface phisicalnya. Jadi tinggal advertise network interfacenya ke dalam BGP.
R1(config)#router bgp 10
R1(config-router)#network 12.12.12.0 mask 255.255.255.0
R1(config-router)#do ping 44.44.44.44
R2#ping 44.44.44.44
R5(config)#int fa0/1
R5(config-if)#ip add 15.15.15.5 255.255.255.0
R5(config-if)#no sh
R5(config-if)#router bgp 5
R5(config-router)#neighbor 15.15.15.1 remot 10
R5(config-router)#do sh ip bgp
BGP table version is 4, local router ID is 15.15.15.5
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
*> 11.11.11.11/32 15.15.15.1 0 0 10 i
*> 12.12.12.0/24 15.15.15.1 0 0 10 i
*> 44.44.44.44/32 15.15.15.1 0 10 20 i
R5(config-router)#
iBGP tidak memilih next-hop nya sendiri, dalam hal ini dia numpang sama OSPF.
Karena OSPF dihapus, maka route BGP tidak muncul dalam tabel routing. Namun,
kita bisa mengkonfigurasi next-hop secara manual pada iBGP.
R2(config-router)#router bgp 10
R2(config-router)#neighbor 23.23.23.3 remot 10
R3(config-router)#router bgp 10
R3(config-router)#neighbor 23.23.23.2 remot 10
R3(config-router)#neighbor 23.23.23.2 next-hop-self
Sekarang cek lagi.
R2#sh ip bgp sum
BGP router identifier 2.2.2.2, local AS number 10
BGP table version is 13, main routing table version 13
4 network entries using 480 bytes of memory
4 path entries using 208 bytes of memory
3/2 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1084 total bytes of memory
BGP activity 6/2 prefixes, 6/2 paths, scan interval 60 secs
R2(config)#router bgp 10
R2(config-router)#neighbor 1.1.1.1 password ?
<0-7> Encryption type (0 to disable encryption, 7 for proprietary)
R1(config)#router bgp 10
R1(config-router)#neighbor 2.2.2.2 password 0 HAHAHA
*Mar 1 00:05:09.383: %BGP-3-NOTIFICATION: received from neighbor 2.2.2.2
4/0 (hold time expired) 0 bytes
R1(config)#
*Mar 1 00:05:09.383: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Down BGP
Notification received
*Mar 1 00:05:36.667: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up
Oke selesai. Gampangkan.
Balik lagi ke topologi lab 5. Pada iBGP, peers nya harus full mesh. Masalah terjadi
ketika ada router baru yang tersambung. Artinya harus dikonfigurasi peer yang
baru satu per satu.
Solusinya adalah menjadikan salah saru router menjadi Route Reflector(RR)
sehingga hanya RR yang full mesh ke semua router sedang router lain hanya perlu
peer ke RR.
Yang mau kita konfigurasi adalah iBGP AS 10. R1 akan kita jadikan RR.
R1#sh run | s r b
router bgp 10
no synchronization
bgp log-neighbor-changes
network 11.11.11.11 mask 255.255.255.255
network 12.12.12.0 mask 255.255.255.0
neighbor 2.2.2.2 remote-as 10
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 10
neighbor 3.3.3.3 update-source Loopback0
neighbor 15.15.15.5 remote-as 5
no auto-summary
R1#
Karena sudah dikonfigurasi sebelumnya, tinggal mengeset route-reflector-client
aja.
R1(config)#router bgp 10
R1(config-router)#neighbor 2.2.2.2 route-reflector-client
R1(config-router)#neighbor 3.3.3.3 route-reflector-client
*Mar 1 00:11:20.291: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Down RR client
config change
R1(config-router)#neighbor 2.2.2.2 route-reflector-client
*Mar 1 00:11:22.543: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up
*Mar 1 00:11:30.891: %BGP-5-ADJCHANGE: neighbor 3.3.3.3 Down RR client
config change
*Mar 1 00:11:33.275: %BGP-5-ADJCHANGE: neighbor 3.3.3.3 Up
Sekarang hapus peer pada R2 dan R3 yang tidak mengarah ke R1.
R2(config-router)#no neighbor 3.3.3.3 remot 10
R3(config-router)#no neighbor 2.2.2.2 remot 10
Untuk pengecekan, buat interface loopback dan advertise ke iBGP.
R2(config)#int lo22
R2(config-if)#ip add 22.22.22.22 255.255.255.255
R2(config-if)#router bgp 10
R2(config-router)#net 22.22.22.22 mask 255.255.255.255
Pastikan R1 dan R3 bisa ping.
R1#ping 22.22.22.22
Oke fix.
Buat interface loopback untuk diredistribute ke BGP.
R2(config)#int lo222
R2(config-if)#ip add 222.222.222.222 255.255.255.255
R2(config-if)#router rip
R2(config-router)#net 222.222.222.0
R2(config-router)#router bgp 10
R2(config-router)#redistribute rip
R5#sh ip bgp
BGP table version is 8, local router ID is 15.15.15.5
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#int lo11
R1(config-if)#ip add 11.11.11.11 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)#router ospf 1
R1(config-router)#net 1.1.1.1 0.0.0.0 area 0
R1(config-router)#net 12.12.12.0 0.0.0.255 area 0
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#int lo22
R2(config-if)#ip add 22.22.22.22 255.255.255.255
R2(config-if)#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)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int s1/1
R2(config-if)#ip add 24.24.24.2 255.255.255.0
R2(config-if)#no sh
R2(config)#router ospf 1
R2(config-router)#net 2.2.2.2 0.0.0.0 area 0
R2(config-router)#net 12.12.12.0 0.0.0.255 area 0
R2(config-router)#net 24.24.24.0 0.0.0.255 area 0
R2(config-router)#net 23.23.23.0 0.0.0.255 area 0
R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#int lo33
R3(config-if)#ip add 33.33.33.33 255.255.255.255
R3(config-if)#int fa0/1
R3(config-if)#no sh
R3(config-if)#ip add 23.23.23.
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#router ospf 1
R3(config-router)#net 3.3.3.3 0.0.0.0 area 0
R3(config-router)#net 23.23.23.0 0.0.0.255 area 0
R4(config-if)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config-if)#int s1/1
R4(config-if)#ip add 24.24.24.24 255.255.255.0
R4(config-if)#no sh
Konfigurasi BGP. R1 sebagai RR.
R1(config-router)#router bgp 123
R1(config-router)#neighbor 2.2.2.2 remote-as 123
R1(config-router)#neighbor 2.2.2.2 update-source loopback0
R1(config-router)#network 11.11.11.11 mask 255.255.255.255
R4(config-if)#router bgp 4
R4(config-router)#neighbor 24.24.24.2 remot 123
R4(config-router)#network 4.4.4.4 mask 255.255.255.255
Sekarang cek bgp route di R1 dan R4.
R1#sh ip bgp
BGP table version is 4, local router ID is 11.11.11.11
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
R4#sh ip bgp
BGP table version is 5, 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
R1(config-route-map)#match ip address 10
R1(config-route-map)#set community ?
<1-4294967295> community number
aa:nn community number in aa:nn format
additive Add to the existing community
internet Internet (well-known community)
local-AS Do not send outside local AS (well-known community)
no-advertise Do not advertise to any peer (well-known community)
no-export Do not export to next AS (well-known community)
none No community attribute
<cr>
R4#sh ip bgp
BGP table version is 7, 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
Oke sip.
R1(config-router)#do sh ip bgp
BGP table version is 5, local router ID is 11.11.11.11
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
R2#sh ip bgp
BGP table version is 5, local router ID is 22.22.22.22
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Advertise ke BGP.
R4(config-if)#router bgp 4
R4(config-router)#network 44.1.1.1 mask 255.255.255.255
R4(config-router)#network 44.2.1.1 mask 255.255.255.255
R4(config-router)#network 44.3.1.1 mask 255.255.255.255
R4(config-router)#network 44.4.1.1 mask 255.255.255.255
R4(config-router)#network 44.5.1.1 mask 255.255.255.255
R4(config-router)#network 44.6.1.1 mask 255.255.255.255
Cek di R1.
R1#sh ip bgp
BGP table version is 10, local router ID is 11.11.11.11
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
R1#sh ip bgp
BGP table version is 11, local router ID is 11.11.11.11
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
R1#sh ip bgp
BGP table version is 17, local router ID is 11.11.11.11
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Oke sip.
R1(config)#int fa0/0
R1(config-if)#ip add 12.12.12.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int fa0/1
R1(config-if)#ip add 15.15.15.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int s1/1
R1(config-if)#ip add 13.13.13.1 255.255.255.0
R1(config-if)#no sh
R2(config)#int fa0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int s1/1
R2(config-if)#ip add 24.24.24.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int fa0/1
R2(config-if)#ip add 26.26.26.2 255.255.255.0
R2(config-if)#no sh
R3(config)#int fa0/0
R3(config-if)#ip add 34.34.34.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int s1/1
R3(config-if)#ip add 13.13.13.3 255.255.255.0
R3(config-if)#no sh
R4(config)#int fa0/0
R4(config-if)#ip add 34.34.34.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#int s1/1
R4(config-if)#ip add 24.24.24.4 255.255.255.0
R4(config-if)#no sh
R5(config)#int fa0/1
R5(config-if)#ip add 15.15.15.5 255.255.255.0
R5(config-if)#no sh
R6(config)#int fa0/1
R6(config-if)#ip add 26.26.26.6 255.255.255.0
R6(config-if)#no sh
Konfigurasi BGP.
R1(config)#router bgp 13
R1(config-router)# neighbor 12.12.12.2 remote-as 24
R1(config-router)# neighbor 12.12.12.2 next-hop-self
R1(config-router)# neighbor 13.13.13.3 remote-as 13
R1(config-router)# neighbor 13.13.13.3 next-hop-self
R3(config-router)#router bgp 13
R3(config-router)# neighbor 13.13.13.1 remote-as 13
R3(config-router)# neighbor 13.13.13.1 next-hop-self
R3(config-router)# neighbor 34.34.34.4 remote-as 24
R3(config-router)# neighbor 34.34.34.4 next-hop-self
R2(config)#router bgp 24
R2(config-router)# neighbor 12.12.12.1 remote-as 13
R2(config-router)# neighbor 12.12.12.1 next-hop-self
R2(config-router)# neighbor 24.24.24.4 remote-as 24
R2(config-router)# neighbor 24.24.24.4 next-hop-self
R4(config-if)#router bgp 24
R4(config-router)# network 45.45.45.0 mask 255.255.255.0
R4(config-router)# neighbor 24.24.24.2 remote-as 24
R4(config-router)# neighbor 34.34.34.3 remote-as 13
R4(config-router)# neighbor 24.24.24.2 next-hop-self
R4(config-router)# neighbor 34.34.34.3 next-hop-self
R1(config-router)#do sh ip bgp
BGP table version is 8, local router ID is 15.15.15.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
R5#trace 26.26.26.6
R2(config)#int s1/1
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int s1/0
R2(config-if)#ip add 24.24.24.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int fa0/0
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no sh
R3(config)#int s1/1
R3(config-if)#ip add 34.34.34.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int s1/0
R3(config-if)#ip add 13.13.13.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int fa0/0
R3(config-if)#ip add 23.23.23.3 255.255.255.0
R3(config-if)#no sh
R4(config)#int s1/1
R4(config-if)#ip add 34.34.34.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#int s1/0
R4(config-if)#ip add 24.24.24.4 255.255.255.0
R4(config-if)#no sh
Konfigurasi BGP.
R1(config)#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
R2(config)#router bgp 23
R2(config-router)#neighbor 12.12.12.1 remote-as 1
R2(config-router)#neighbor 24.24.24.4 remote-as 4
R2(config-router)#neighbor 23.23.23.3 remote-as 23
R2(config-router)#neighbor 23.23.23.3 next-hop-self
R3(config)#router bgp 23
R3(config-router)#neighbor 34.34.34.4 remote-as 4
R3(config-router)#neighbor 13.13.13.1 remote-as 1
R3(config-router)#neighbor 23.23.23.2 remote-as 23
R2(config-router)#neighbor 23.23.23.2 next-hop-self
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 23
Buat loopback di R1 dan R4 lalu advertise ke BGP..
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)#network 1.1.1.1 mask 255.255.255.255
R4(config)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config-if)#router bgp 4
R4(config-router)#net 4.4.4.4 mask 255.255.255.255
R1(config-router)#do sh ip bgp
BGP table version is 15, 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
R1(config-router)#do sh ip bgp
BGP table version is 21, 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
1 13.13.13.3 80 msec
12.12.12.2 64 msec
13.13.13.3 60 msec
2 24.24.24.4 [AS 4] 188 msec
34.34.34.4 [AS 4] 152 msec
24.24.24.4 [AS 4] 168 msec
R1(config-router)#
Walau pada show ip bgp tanda “>” hanya 1, tapi ketika dicek sudah load balance.
Oke sip.
Oke hapus dulu konfigurasi load balancenya.
R1(config)#router bgp 1
R1(config-router)#no maximum-paths 2
Sekarang coba ping ke 4.4.4.4.
R1#sh ip bgp
BGP table version is 8, 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
R1(config-if)#do sh ip bgp
BGP table version is 23, 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
Maka sekarang akan untuk menuju 4.4.4.4 akan melewati 13.13.13.3. Coba
hidupkan interface nya lagi. Ternyata walau sudah dihidupkan, main link nya
tidak kembali ke 12.12.12.2 tapi tetap menggunakan 13.13.13.3.
R1(config-if)#int s1/1
R1(config-if)#no sh
R1(config-if)#do sh ip bgp
BGP table version is 24, 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
R1(config-router)#do 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
Sekarang hidupin lagi. Tunggu agak lama baru cek show ip bgp.
R1(config-if)#no sh
R1(config-if)#
*Mar 1 00:15:52.047: %LINK-3-UPDOWN: Interface Serial1/1, changed state to
up
R1(config-if)#
*Mar 1 00:15:53.051: %LINEPROTO-5-UPDOWN: Line protocol on Interface
Serial1/1, changed state to up
*Mar 1 00:16:19.355: %BGP-5-ADJCHANGE: neighbor 12.12.12.2 Up
R1(config-if)#do sh ip bgp
BGP table version is 18, 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
Oke sip.
Selain mengatur traffic yang keluar dari R1, juga bisa mengatur traffic yang
menuju R1 salah satunya dengan MED atau metric.
R1(config)#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-route-map)#route-map R3MED permit 10
R1(config-route-map)#match ip address LAN
R1(config-route-map)#set metric 100
R1(config-route-map)#
R1(config-route-map)#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
R1(config-router)#do clear ip bgp *
Cek di R2. Sekarang untuk menuju ke 1.1.1.1, akan dilewatkan 23.23.23.3 lalu ke
13.13.13.1 terlebih dahulu.
R2(config-router)#do sh ip bgp
BGP table version is 23, local router ID is 24.24.24.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
Cek.
R2#traceroute 1.1.1.1
R1(config-if)#do sh ip bgp
BGP table version is 7, 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
R1(config-if)#
R1(config-router)#
Oke sudah berhasil.
BGP · PART 1 packetlife.net
Attributes About BGP
Name Description Type Path Vector
Well-known Mandatory · Must be supported and propagated eBGP AD 20
1 Origin Origin type (IGP, EGP, or unknown) iBGP AD 200
List of autonomous systems which the Standard RFC 4271
2 AS Path
advertisement has traversed
Protocols IP
3 Next Hop External peer in neighboring AS
Transport TCP/179
Well-known Discretionary · Must be supported; propagation optional
Metric for internal neighbors to reach Authentication MD5
5 Local Preference
external destinations (default 100) Terminology
Includes ASes which have been dropped Autonomous System (AS)
6 Atomic Aggregate
due to route aggregation A logical domain under the control of a
Optional Transitive · Marked as partial if unsupported by neighbor single entity