560 likes | 640 Views
Addressing the network IPv4. Application. HTTP, FTP, TFTP, SMTP etc. Data stream. Presentation. Application. Session. Transport. Transport. TCP, UDP. Segment. Network. Internet. IP. Packet. Data link. Ethernet, WAN technologies. Frame. Network Access. Physical. Bits.
E N D
Addressing the network IPv4 Jaringan Komputer_D3 TT
Application HTTP, FTP, TFTP, SMTP etc Data stream Presentation Application Session Transport Transport TCP, UDP Segment Network Internet IP Packet Data link Ethernet, WAN technologies Frame Network Access Physical Bits IP addressing – works at • OSI model layer 3 • TCP/IP model Internet layer Jaringan Komputer_D3 TT
Addressing topics • Binary and decimal • Types of IP addresses • Assigning addresses • Network part and subnet masks • Calculating addresses • Ping and Traceroute Utilities Jaringan Komputer_D3 TT
Binary and decimal • Convert to 8-bit binary • 248 • 187 • 89 • Convert to decimal • 00110100 • 01010101 • 11001111 Jaringan Komputer_D3 TT
248-128120 120-6456 56-3224 24-168 248 to binary Jaringan Komputer_D3 TT
187-12859 59-3227 11-83 3-21 27-1611 187 to binary Jaringan Komputer_D3 TT
89-6425 9-81 25-169 89 to binary Jaringan Komputer_D3 TT
32 +16+ 452 00110100 to decimal 52 Jaringan Komputer_D3 TT
64 +16+ 4+ 185 01010101 to decimal 85 Jaringan Komputer_D3 TT
128+ 64 + 8+ 4+ 2+ 1207 11001111 to decimal 207 Jaringan Komputer_D3 TT
Binary and decimal • Convert to 8-bit binary • 248 11111000 • 187 10111011 • 89 01011001 • Convert to decimal • 00110100 52 • 01010101 85 • 11001111 207 Jaringan Komputer_D3 TT
octet octet octet octet network part host part IPv4 address Prefix /24 Subnet mask: Jaringan Komputer_D3 TT
Find the network address In a network address, all the host bits are 0. The router needs to do this for every packet. Jaringan Komputer_D3 TT
Logical AND Do a logical AND at each position Jaringan Komputer_D3 TT
Find the broadcast address In a broadcast address, all the host bits are 1. The broadcast is the last address in the network. Jaringan Komputer_D3 TT
3 types of address • Every network has: • Network address – the first one • Broadcast address – the last one • Host addresses – everything in between Jaringan Komputer_D3 TT
Classful addressing A network part host part B network part host part C network part host part Jaringan Komputer_D3 TT
Classful addressing • Easy to work out but very wasteful. • Routers and hosts still assume class subnet masks by default • Class A /8 255.0.0.0 • Class B /16 255.255.0.0 • Class C /24 255.255.255.0 Jaringan Komputer_D3 TT
Classless addressing • Any suitable prefix can be used • We (and devices) need to know what the prefix is. • More flexible, less wasteful. Jaringan Komputer_D3 TT
Classless addressing /16 • 172.16.0.0/16 mask 255.255.0.0 • Broadcast address 172.16.255.255 • Hosts 172.16.0.1 to 172.16.255.254 • 65534 host addresses (256 x 256)-2 Jaringan Komputer_D3 TT
Classless addressing /24 • 172.16.0.0/24 mask 255.255.255.0 • Broadcast address 172.16.0.255 • Hosts 172.16.0.1 to 172.16.0.254 • 254 host addresses Jaringan Komputer_D3 TT
Classless addressing /22 • 172.16.0.0/22 mask 255.255.252.0 • Broadcast address 172.16.3.255 • Hosts 172.16.0.1 to 172.16.3.254 • 1022 host addresses Jaringan Komputer_D3 TT
Classless addressing /26 • 172.16.0.0/26 mask 255.255.255.192 • Broadcast address 172.16.0.63 • Hosts 172.16.0.1 to 172.16.0.62 • 62 host addresses Jaringan Komputer_D3 TT
Classless addressing /28 • 172.16.0.0/28 mask 255.255.255.240 • Broadcast address 172.16.0.15 • Hosts 172.16.0.1 to 172.16.0.14 • 14 host addresses Jaringan Komputer_D3 TT
Calculating addresses • A host has IP address 192.168.1.70/24 • What is the subnet mask? • What is the network address? • What is the broadcast address? • What is the range of host addresses in the network? Jaringan Komputer_D3 TT
192.168.1.70/24 – fill in the table Jaringan Komputer_D3 TT
192.168.1.70/24 Jaringan Komputer_D3 TT
Calculating addresses • A host has IP address 192.168.1.70/26 • What is the subnet mask? • What is the network address? • What is the broadcast address? • What is the range of host addresses in the network? Jaringan Komputer_D3 TT
192.168.1.70/26 fill in the table Jaringan Komputer_D3 TT
192.168.1.70/26 Jaringan Komputer_D3 TT
Calculating addresses • A host has IP address 192.168.1.70/28 • What is the subnet mask? • What is the network address? • What is the broadcast address? • What is the range of host addresses in the network? Jaringan Komputer_D3 TT
192.168.1.70/28 fill in the table Jaringan Komputer_D3 TT
192.168.1.70/28 Jaringan Komputer_D3 TT
Internet Protocol Version 4 • Classfull IPv4 classfull adalah IP yang sudah terbagi bagi menjadi beberapa kelas dengan masing-masing subnet mask dari tiap kelas sudah diset default. Subnetting tidak bisa dilakukan pada IP address classfull. Kelas IP Octet pertama Subnet Mask A 0-126 255.0.0.0 B 128-191 255.255.0.0 C 192-223 255.255.255.0 D (multicast) 224-239 - E (reserved) 240-255 - Jaringan Komputer_D3 TT
Internet Protocol Version 4 • Classless Pada Ipv4 classless,Subnetting dapat dilakukan sesuai dengan kebutuhan, sehingga Ipv4 classless ini lebih fleksible dan effisien. Namun ada beberapa alamat IP yang tidak bisa dijadikan alamat host. Kelas Range A 10.0.0.0 - 10.255.255.255 B 172.16.0.0 - 172.31.255.255 C 192.168.0.0- 192.168.255.255 Jaringan Komputer_D3 TT
Latihan Soal • Kelas B : 172.16.0.0 / 20 Jumlah subnet ? Jumlah host/subnet ? Block Subnet ? Tuliskan semua blok subnet (Subnet, Host Pertama, Host Terakhir, Broadcast) • Kelas B : 172.16.0.0/25 • Kelas A : 10.0.0.0/16 Jaringan Komputer_D3 TT
TUGAS / PR • 192.168.2.0/28 • 172.16.0.64/24 • 10.0.16.0/12 Hitunglah : 1. Jumlah subnet ? 2. Jumlah host/subnet ? 3. Block Subnet ? 4. Tuliskan semua blok subnet Jaringan Komputer_D3 TT
Unicast, Multicast, Broadcast • Unicast – a message addressed to one host • Broadcast – a message addressed to all hosts on a network. Uses network’s broadcast address or 255.255.255.255 locally • Multicast – a message addressed to a group of hosts. Uses an address starting 224 - 239 Jaringan Komputer_D3 TT
Private IP addresses • Penggunaan tak terbatas pada jaringan pribadi . Tidak diarahkan di Internet • 10.0.0.0 – 10.255.255.255 (10.0.0.0/8) • 172.16.0.0 – 172.31.255.255 (172.16.0.0/20) • 192.168.0.0 – 192.168.255.255 (192.168.0.0/24) Jaringan Komputer_D3 TT
Public IP addresses • Routed over the Internet • Master holder is IANA • Assigned to regional registries and then to ISPs • ISPs allocate them to organisations and individual users • Use is strictly controlled as duplicate addresses are not allowed Jaringan Komputer_D3 TT
Special addresses • 0.0.0.0 “all addresses” in default route. Hosts cannot be given addresses starting 0. • 127.0.0.1 is loopback. Hosts cannot be given addresses starting 127. • 240.0.0.0 and higher – reserved for experimental purposes. • 169.254.0.0 - 169.254.255.255 local only • 192.0.2.0 to 192.0.2.255 for teaching Jaringan Komputer_D3 TT
Network address translation • A large number of hosts on a network use private addresses to communicate with each other. • The ISP allocates one or a few public addresses. • NAT allows the hosts to share the public addresses when they want to use the Internet Jaringan Komputer_D3 TT
Addressing hosts • Static addressing – address is configured by an administrator • Servers, printers, routers, switches need static addresses • Dynamic addressing – address is allocated automatically by DHCP by leasing addresses from a pool • Dynamic addressing is best for workstations Jaringan Komputer_D3 TT
Blocks of addresses Jaringan Komputer_D3 TT
Subnetting 192.168.1.0/24 Last octet binary Borrow 1 bit from host part, give it to network part, /25 Jaringan Komputer_D3 TT
Subnetting 192.168.1.0/24 Borrow 2 bits from host part, give to network part, /26 Jaringan Komputer_D3 TT
Subnetting 192.168.1.0/24 Borrow 3 bits from host part, give to network part, /27 Jaringan Komputer_D3 TT
Subnetting 192.168.1.0/24 Borrow 4 bits from host part, give to network part, /28 And so on… Jaringan Komputer_D3 TT
Subnetting 192.168.1.0/24 • Every time you borrow another bit you: • Double the number of subnets • Halve the size of the subnets • Each subnet has a network address, a broadcast address, and everything in between is a host address. • Here are some ways of visualising the process. Jaringan Komputer_D3 TT
Subnetting 192.168.1.0/24 Jaringan Komputer_D3 TT