Documente Academic
Documente Profesional
Documente Cultură
Indication of class High order bits (left most bits on binary digit)
The Conclusion :
a.By default, class A IP Address have (128 – 2) networks, and (2^24 -2) usable IP addresses for each network.
b.By default, class B IP Address have (64 x 256) networks, and (2^16 -2) usable IP addresses for each network.
c.By default, class C IP Address have (32 x 256 x 256) networks, and (2^8 -2) usable IP addresses for each
network.
NETWORK FUNDAMENTAL
Related to RFC 1918, class A to C applicable addresses are divided into two parts,
a. Private IP address
Non routable address on public network (internet), for use in Local Area Network.
Private address range are,
* Class A : 10.0.0.0 – 10.255.255.255
* Class B : 172.16.0.0 – 172.31.255.255.255
* Class C : 192.168.0.0 – 192.168.255.255
b. Public IP address
Routable address on public network (internet), the IP address allocation is
controlled by IANA through its regional representative (RIR).
Private addresses can be routed on internet after the translation process (NAT =
Network Address Translation)
NAT is a mechanism used to solve the lack of public IP address by translating private IP
addresses into one or many public IP addresses.
Default
Device Interface IP Address Subnet Mask
Gateway
Fa0/0
R1
S0/0/0
Fa0/0
R2
S0/0/0
PC1 N/A
PC2 N/A
Subneting
• Alamat IP didesain untuk digunakan secara
berkelompok (sub-jaringan/subnet).
• Subneting adalah cara untuk memisahkan dan
mendistribusikan beberapa alamat IP.
• Host/perangkat yang terletak pada subnet yang
sama dapat berkomunikasi satu sama lain
secara langsung (tanpa melibatkan
router/routing).
Page 29
Subneting
• Apabila jaringan dianalogikan sebuah jalan, apabila disepanjang
jalan cuma ada 8 rumah, ketua RT mengumumkan sesuatu dari
rumah ke rumah lewat jalan itu.
• Apabila sepanjang jalan sudah penuh rumah butuh ada gang-gang .
Butuh ada ketua RT tiap gang untuk meminimalis transportasi saat
pengumuman dan mengatur urusan RTnya sendiri
Notasi Subnet
• Subnet ditulis dalam format 32 bit (seperti IP), atau
dalam bentuk desimal (prefix Length)
IP kelas C: 20.20.20.20/30,
Tentukan Range IP, IP Host , Network ID, Broadcast dan Subnet
Masknya :
• Network ID dan Boradcast:
Dari range IP yang telah ditemukan (20.20.20.20 s/d 20.20.20.23)
IP terkecil digunakan untuk network ID, terbesar untuk Broadcast
Network ID 20.20.20.20, Broadcast 20.20.20.23
• IP Host Range IP dikurangi Network ID dan broadcast
IP host 20.20.20.21 s/d 20.20.20.22
Jumlah IP host jumlah IP dalam subnet dikurangi dua
• Subnet mask 255.255.255.(256 – jumlah IP)
Subnet mask 255.255.255.252
Kerjakan Soal Berikut
Tentukan jumlah IP, network id & broadcast, IP
Host, dan subnet mask dari IP address berikut:
1. 11.11.11.11/26 9. 99.99.99.99/25
2. 22.22.22.22/28 10. 100.100.100.100/27
3. 33.33.33.33/25 11.111.111.111.111/30
12. 122.122.122.122/25
4. 44.44.44.44/29
13. 133.133.133.133/28
5. 55.55.55.55/27 14.144.144.144.144/24
6. 66.66.66.66/28 15.155.155.155.155/26
7. 77.77.77.77/30 16.166.166.166.166/29
8. 88.88.88.88/31
Contoh Soal Subneting
Dalam suatu jaringan host A dan B menggunakan subnet mask
berbeda, IP host A adalah192.168.0.200/26 sedangkan B akan
menggunakan subnet /25. Berapakah Range IP B yang boleh
dipakai agar antar host bisa saling komunikasi?
IP 204.17.5.0/24
1. Tentukan Jumlah subnet??
2. Tentukan Network ID /Network address setiap subnet ??
3. Tentukan jumlah host setiap subnet
4. Tentukan IP Broadcast setiap subnet??
5. Tentukan IP pertama dan IP terakhir setiap Subnet??
1.
n
2 = , dimana n adalah banyak angka 1 di octet terakhir
3
2 =8
2. 256 – 224 = 32
5
2 = 32
Subnet Network ID Subnetmask IP Pertama IP Terakhir IP Bordcast
1 204.17.5.0 255.255.255.22 204.17.5.1 204.17.5.30 204.17.5.31
4
2 204.17.5.32 IDEM 204.17.5.33 204.17.5.62 204.17.5.63
3 204.17.5.64 204.17.5.65 204.17.5.94 204.17.5.95
4 204.17.5.96 204.17.5.97 204.17.5.126 204.17.5.127
5 204.17.5.128 204.17.5.129 204.17.5.158 204.17.5.159
6 204.17.5.160 204.17.5.161 204.17.5.190 204.17.5.191
7 204.17.5.192 204.17.5.193 204.17.5.222 204.17.5.223
8 204.17.5.224 204.17.5.225 204.17.5.254 204.17.5.255
Contoh Soal
1. IP Host A 192.168.1.34/25 dan IP Host B
192.168.1.129/24, bisakah antara Host A dan Host B
berkomunikasi?
Jawab:
Range subnet A = 192.168.1.0 – 192.168.1.127 } Host B 192.168.1.129
IP host B tidak termasuk pada range subnet A, Host A dan Host B tidak
dapat berkomunikasi
IP Bogon
• IP Bogon adalah IP yang tidak dapat dipakai karena
tidak diatur dalam aturan organisasi internet.
• IP bogon biasanya muncul karena kesalahan konfigurasi
yang tidak disengaja atau sengaja untuk tujua tertentu
• Contoh IP bogon : 0.0.0.0/8, 10.0.0.0/8, 127.0.0.0/8,
169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24,
192.0.2.0/24, 192.168.0.0/16, 198.18.0.0/15,
198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, dsb
• Bogons dapat difilter menggunakan ACLs atau BGP
blackholing.
• IP bisa digolongkan IP bogon untuk saat ini, namum bisa
jadi kedepanya bukan merupakan IP bogon lagi jika
ditetapkan oleh organisasi internet internasional (IANA).
192.168.123.0/24
IP address 192.168.123.0/26
Fa0/0 N/A
R1
S0/0/0 N/A
Fa0/0 N/A
R2
S0/0/0 N/A
PC1 NIC
PC2 NIC
Gateway dan Default Gateway
• Static routing dilakukan dengan pengaturan arah paket data yang melalui
router, dengan menentukan GATEWAY untuk dst address/network
tertentu
• Gateway bisa berupa IP ADDRESS atau INTERFACE
• IP GATEWAY router harus satu subnet dengan salah satu IP Interface
router
• IP GATEWAY merupakan IP didepan device
• Hanya ada 1 Gateway untuk satu network
• Default Gateway adalah pengaturan untuk dst-address menggantikan
semua ip yang ada di internet. Dst-address = 0.0.0.0 0.0.0.0 (0.0.0.0/0)
LAB Gateway
192.168.50.1
192.168.10.1
192.168.10.2
192.168.30.1
192.168.50.2
192.168.30.2
KONFIGURASI ROUTER CISCO
1
2
Konfigurasi IP Address
Konfigurasi IP Address
Routing
Ada dua tipe Routing
• Dynamic Routing –rute dibuat secara otomatis
• Saat akan menambahkan IP address pada interface
• Informasi routing yang akan didapat dari protocol routing dinamis seperti :
RIP, OSPF dan BGP
• Statick Routing – rute dibuat manual oleh admin untuk mengatur ke
arah mana trafik tertentu akan diarahkan
• Defult route adalah salah satu contoh static routing
DASAR PEMILIHAN ROUTING
• Rule routing yang paling spesifik tujuan nya 192.168.0.5
• Contoh : destination 192.168.0.0/29 lebih spesifik dari 192.168.0.0/24
• Distance
• Router akan memilih distance yang Paling kecil
• Roud Robin
• Router akan memilih secara sequential
Dasar Pemilihan Routing
• Contoh kasus : untuk koneksi dengan destination 192.168.0.1,
manakah urutan prioritas rule yang digunakan
172.16.3.0/30
R2 192.168.10.0/24
RI
192.168.20.0/24
Web Server
LAB – Static Routing
Device Interface IP Address Subnet Mask DefaultGateway
Mensetting U/ Telnet
Router_I(config)#line vty 0 4
Router_I(config-line)#password cisco
Router_I(config-line)#login Router_I(config-line)#exit
Configurasi Untuk Router II Simpan configure ke NVRAM
Router_II (config)#ctrl+z
Memberi nama Router Router_II #copy run start -->> kemudian tekan enter 2 x
Router>enable Router#configure terminal Setting IP di Interface 0/0
Router(config)#Hostname ROUTER_II Router_II (config)#interface fastEthernet 0/0
Router_II (config-if)#ip address 172.16.3.2 255.255.255.252
Membuat Banner
Router_II (config-if)#no shutdown
Router_II(config)#banner motd #Selamat Datang di Router II#
Router_II (config-if)#exit
Membuat Password
Router_II#configure terminal Setting IP di Interface 0/1
Router_II(config)#line console 0 Router_II (config)#interface fastEthernet 0/0
Router_II(config-line)#password cisco Router_II (config-if)#ip address 192.168.10.1 255.255.255.0
Router_II(config-line)#login Router_II(config- Router_II (config-if)#no shutdown
line)#exit Router_II (config-if)#exit
PC 0
Mensetting U/ Telnet IPADDRESS 192.168.20.254
Router_II (config)#line vty 0 4 SUBNETMASK 255.255.255.0
Router_II (config-line)#password cisco DEFAULGATEWAY 192.168.20.1
Router_II (config-line)#login
Router_II (config-line)#exit SERVER
IPADDRESS 192.168.10.254
SUBNETMASK 255.255.255.0
DEFAULGATEWAY 192.168.10.1
Router_I(config)#ip route 192.168.10.0 255.255.255.0 172.16.3.1
Perintah Keterangan
ip route Identifikasi rute statik
192.168.10.0 Alamat IP Stub Network Konfigurasi R1
255.255.255.0 Subnet Mask
172.16.3.1 Alamat IP Router B
Konfigurasi R2
Troubleshooting
• Troubleshooting static routes may require some
of the following commands:
–Ping
–Traceroute
–Show IP route
–Show ip interface brief
–Show cdp neighbors detail
Link-State Routing Protocols
Introduction
Link-State Routing
• Link state routing protocols
– Also known as shortest path first algorithms
– These protocols built around Dijkstra’s SPF
Link-State Routing
• Dikjstra’s algorithm also known as the shortest path
first (SPF) algorithm
Link-State Routing
• The shortest path to a destination is not necessarily
the path with the least number of hops
Link-State Routing
• Link-State Routing Process
– How routers using Link State Routing Protocols reach
convergence
• Each routers learns about its own directly connected networks
• Link state routers exchange hello packet to “meet” other directly
• Connected link state routers
• Each router builds its own Link State Packet (LSP) which includes
information about neighbors such as neighbor ID, link type, &
bandwidth
• After the LSP is created the router floods it to all neighbors who
then store the information and then forward it until all routers have
the same information
• Once all the routers have received all the LSPs, the routers then
construct a topological map of the network which is used to
determine the best routes to a destination
Link-State Routing
• Directly Connected
Networks
• Link
– This is an interface on a
router
• Link state
– This is the information
about the state of the
links
Link-State Routing
• Sending Hello Packets to Neighbors
– Link state routing protocols use a hello protocol
– Purpose of a hello protocol:
• To discover neighbors (that use the same link state routing
protocol) on its link
Link-State Routing
• Sending Hello Packets to
Neighbors
– Connected interfaces that are
using the same link state routing
protocols will exchange hello
packets
– Once routers learn it has
neighbors they form an
adjacency
• 2 adjacent neighbors will
exchange hello packets
• These packets will serve as a
keep alive function
Link-State Routing
• Building the Link State
Packet
– Each router builds its
own Link State Packet
(LSP)
– Contents of LSP:
• State of each directly
connected link
• Includes information
about neighbors such
as neighbor ID, link
type, & bandwidth
Link-State Routing
• Flooding LSPs to Neighbors
– Once LSP are created they are forwarded out to neighbors
– After receiving the LSP the neighbor continues to forward it
throughout routing area
Link-State Routing
• LSPs are sent out under the following conditions:
– Initial router start up or routing process
– When there is a change in topology
Link-State Routing
• Constructing a link state data base
– Routers use a database to construct a topology map of
the network
Link-State Routing
Link-State Routing
• Shortest Path First (SPF) Tree
– Building a portion of the SPF tree
– Process begins by examining R2’s LSP information
• R1 ignores 1st LSP
• Reason: R1 already knows it’s connected to R2
Link-State Routing
• Building a portion of the SPF tree
– R1 uses 2nd LSP
• Reason: R1 can create a link from R2 to R5 - this
information is added to R1’s SPF tree
Link-State Routing
• Building a portion of the SPF tree
– R1 uses 3rd LSP
• Reason: R1 learns that R2 is connected to 10.5.0.0/16
• This link is added to R1’s SPF tree
Link-State Routing
• Determining the shortest path
– The shortest path to a destination determined by adding
the costs & finding the lowest cost
Link-State Routing
• Once the SPF algorithm has determined the
shortest path routes, these routes are placed in the
routing table
Link-State Routing Protocols
Advantages of a Link-State Routing Protocol
192.168.150.0/24 192.168.100.0/24
Router 2
`
`
LAB --- OSPF
Konfigurasi R1
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int lo 0
Router(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
Router(config-if)#ip add 1.1.1.1 255.255.255.255
Router(config-if)#ex
Router(config)#int fa0/1
Router(config-if)#ip add 192.168.90.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#ex
Router(config)#int fa0/0
Router(config-if)#ip add 192.168.150.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#ex
Router(config)#
LAB --- OSPF
Konfigurasi R2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int lo 0
Router(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
Router(config-if)#ip add 2.2.2.2 255.255.255.255
Router(config-if)#ex
Router(config)#int fa0/1
Router(config-if)#ip add 192.168.100.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#ex
Router(config)#int fa0/0
Router(config-if)#ip add 192.168.150.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#ex
Router(config)#
LAB --- OSPF
Konfigurasi R3
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int lo 0
Router(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
Router(config-if)#ip add 3.3.3.3 255.255.255.255
Router(config-if)#ex
Router(config)#int fa0/1
Router(config-if)#ip add 192.168.100.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#ex
Router(config)#int fa0/0
Router(config-if)#ip add 192.168.75.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#ex
Router(config)#
LAB --- OSPF
• Konfigurasi PC1
IP Address : 192.168.90.10
Netmask : 255.255.255.0
Default Gateway : 192.168.90.1
Konfigurasi PC2
IP Address : 192.168.90.20
Netmask : 255.255.255.0
Default Gateway : 192.168.90.1
Konfigurasi Server
IP Address : 192.168.75.200
Netmask : 255.255.255.0
Default Gateway : 192.168.75.1
LAB --- OSPF
Routing OSPF di R1
Router(config)#router ospf 10
Router(config-router)#network 1.1.1.1 0.0.0.0 area 0
Router(config-router)#network 192.168.90.0 0.0.0.255 area 0
Router(config-router)#network 192.168.150.0 0.0.0.255 area 0
Router(config-router)#ex Selanjutnya coba lakukan test
koneksi dengan melakukan
Routing OSPF di R2 ping ke masing-masing PC ke
Router(config)#router ospf 10 Server
Router(config-router)#network 2.2.2.2 0.0.0.0 area 0
Router(config-router)#network 192.168.100.0 0.0.0.255 area 0
Router(config-router)#network 192.168.150.0 0.0.0.255 area 0
Router(config-router)#ex
Routing OSPF di R3
Router(config)#router ospf 10
Router(config-router)#network 3.3.3.3 0.0.0.0 area 0
Router(config-router)#network 192.168.100.0 0.0.0.255 area 0
Router(config-router)#network 192.168.75.0 0.0.0.255 area 0
Router(config-router)#ex