Transcript ch21

Computer Networks and Internets, 5e
By Douglas E. Comer
Lecture PowerPoints
By Lami Kaya, [email protected]
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
1
Chapter 21
IP: Internet Addressing
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
2
Topics Covered
•
•
•
•
•
•
•
•
•
•
21.1 Introduction
21.2 Addresses For The Virtual Internet
21.3 The IP Addressing Scheme
21.4 The IP Address Hierarchy
21.5 Original Classes Of IP Addresses
21.6 Dotted Decimal Notation
21.7 Division Of The Address Space
21.8 Authority For Addresses
21.9 Subnet And Classless Addressing
21.10 Address Masks
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
3
Topics Covered
•
•
•
•
•
•
•
•
21.11
21.12
21.13
21.14
21.15
21.16
21.17
21.18
CIDR Notation
A CIDR Example
CIDR Host Addresses
Special IP Addresses
Summary Of Special IP Addresses
The Berkeley Broadcast Address Form
Routers And The IP Addressing Principle
Multi-Homed Hosts
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
4
21.1 Introduction
• This chapter
– begins a description of protocol software that makes the Internet
appear to be a single, seamless communication system
– introduces the addressing scheme used by the IP version 4 (IPv4)
• Unless otherwise noted, Internet Protocol and IP refer to version 4 of IP throughout the
text
– discusses the use of address masks for classless and subnet
addressing
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
5
21.2 Addresses For The Virtual Internet
• To achieve a seamless communication system
– protocol software must hide the details of physical networks
– it should offer the illusion of a single, large network
• From the point of view of an application
– the virtual Internet operates like any network
• allowing computers to send and receive packets
• The main difference between the Internet and a physical
network is
– that the Internet is an abstraction imagined by its designers and
created entirely by protocol software
• Thus, the designers chose
– addresses, packet formats, and delivery techniques independent of
the details of the underlying hardware
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
6
21.2 Sanal Internet için Adresler
• Kesintisiz(seamless) haberleşme sistemi başarmak için
– Protokol yazılımı fiziksel ağ ile alakalı detayları saklamalıdır
– Bu büyük ve tak ağ görüntüsü sunmalıdır
• Uygulama bakış açısından
– Sanal internet herhangi bir ağ gibi işlem yapar
• allowing computers to send and receive packets
• İnternet ve fiziksel ağ arasındaki ana fark
– İnternet kendi tasarımcıları tarafından hayal edilmiş bir soyutlamadır
ve tamamen protokol yazılımından üretilmiştir
• Böylece, tasarımcı
– Mevcut donanımın detaylarında bağımsız olarak adresleri, paket
biçimini ve teslim etme tekniklerini seçmiştir
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
7
21.2 Addresses For The Virtual Internet
• Addressing is a critical component of the Internet
• All host computers must use a uniform addressing scheme
• Each address must be unique
• MAC addresses do not suffice because
– the Internet can include multiple network technologies
– and each technology defines its own MAC addresses
• The advantage of IP addressing lies in uniformity:
– an arbitrary pair of application programs can communicate without
knowing the type of network hardware or MAC addresses being used
• IP addresses are supplied by protocol software
– They are not part of the underlying network
• Many layers of protocol software use IP addresses
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
8
21.2 Sanal Internet için Adresler
• Adresleme, internet için krtitk bir bileşendir
• Bütün host makinaları aynı adresleme taslağını
kullanmalıdır
• Bütün adresler eşsiz olmalıdır
• MAC adresler yeterli değildir, çünkü
– İnternet birden fazla ağ teknolojisine sahiptir
– Ve her teknoloji kendi MAC adresini tanımlar
• Ip adreslerinin avantajı tek biçimliliğinden gelir:
– Gelişigüzel uygulama program çifti ağ donanımı veya kullanılan MAC
adresleri tipinin bilmeden haberleşebilir
• IP adresleri protokol yazılımı tarafından desteklenir
– Bunlar mevcut ağın parçası değildir
• protocol software in pek çok katmanı IP addresses kullanır
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
9
21.3 The IP Addressing Scheme
• Each host is assigned a unique 32-bit number
– known as the host's IP address or Internet address
• When sending a packet across the Internet, sender’s
protocol software must specify
– its own 32-bit IP address (the source address)
– and the address of the intended recipient (the destination address)
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
10
21.3 IP Adresleme taslağı
• Her host’a eşsiz bir 32 bitlik sayı atanır
– Bu sayı IP adresi veya Internet adtesi olarak bilinir
• İnternetten bir paket gönderirken, gönderene ait protokol
yazılımı şunları belirtmelidir
– Kendi 32-bitlik IP aderesini
– Ve alıcının adresini (the destination address)
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
11
21.4 The IP Address Hierarchy
• IP address is divided into two parts:
• A prefix
– identifies the physical network to which the host is attached
– Each network in the Internet is assigned a unique network number
• A suffix
– identifies a specific computer (host/node) on the network
– Each computer on a given network is assigned a unique suffix
• IP address scheme guarantees two properties:
– Each computer is assigned a unique address
(i.e., a single address is never assigned to more than one computer)
– Network number (prefix) assignments must be coordinated globally
– Suffixes are assigned locally without global coordination
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
12
21.4 IP Address Hiyerarşisi
• IP address iki parçaya ayrılır:
• A prefix (ön ek)
– Host un bulunduğu fşzşksel ağı belirtir
– İnternetteki her ağ eşsiz bir ağ numarasına sahiptir
• A suffix (son ek)
– Ağdaki özel bir bilgisaayrı ifade eder
– Ağdaki her bilgisayar eşsiz bir son ek eklenir
• IP address taslağı iki özelliği garanti eder:
– Her bilgisayar özel bir adres atanır
(i.e., a single address is never assigned to more than one computer)
– ağ numarası (prefix) atanması dünya çapında koordineli olmalıdır
– Suffixes dünya çapında koordinasyon olmadan yerel olarak atanır
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
13
21.5 Original Classes Of IP Addresses
• How many bits to place in each part of an IP address?
– The prefix needs sufficient bits to allow a unique network number to
be assigned to each physical network in the Internet
– The suffix needs sufficient bits to permit each computer attached to a
network to be assigned a unique suffix
• No simple choice was possible to allocate bits!
– Choosing a large prefix accommodates many networks
• but limits the size of each network
– Choosing a large suffix means each physical network can contain
many computers
• but limits the total number of networks
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
14
21.5 Original Classes Of IP Addresses
• Ip adresinin her kısmında ne kadar bit olacaktır?
– Prefix, her fiziksel ağa atanacak eşsiz sayıya yetecek kadar bit
sayısına ihtiyaç duyar
– Suffix, bir ağa erişen her bilgisayara bir eşsiz sayı atayabilecek kadar
bit içermelidir.
• Bitleri tahsis etmek için basit bir seçim münkün değildir!
– Geniş bir prefix seçmek pek çok ağ sağlar
• but limits the size of each network
– Geniş bir suffix seçmek her fiziksel ağın pek çok bilgisayar içermesi
anlamındadır
• but limits the total number of networks
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
15
21.5 Original Classes Of IP Addresses
• Internet contains a few large physical networks and many
small networks
– the designers chose an addressing scheme to accommodate a
combination of large and small networks
• The original classful IP addressing, divided the IP address
space into three (3) primary classes
– each class has a different size prefix and suffix
• The first four bits of an IP address determines the class to
which the address belonged
– It specifies how the remainder of the address was divided into prefix
and suffix
• Figure 21.1 illustrates the five address classes
– the leading bits used to identify each class
– and the division into prefix and suffix
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
16
21.5 Original Classes Of IP Addresses
• Internet bir kaç geniş fiziksel ağ ve pek çok küçük ağ içerir
– Tasarımcı küçük ve büyük ağların uyumlu olması için bir adresleme
taslağı seçmiştir
• The original classful IP addressing, Ip adreslerinin 3 ana
sınıfa ayırır
– Her sınıf farklı uzunlukta prefix ve suffix içerir
• Ip nin ilk dört biti hangi adrese ait olduğu sınıfı belirler
– Burası kalan adres kısmının nazıl suffix ve prefixlere ayrıldığınıda
belirtir
• Figure 21.1 5 adres sınıfını gösterir
– the leading bits used to identify each class
– and the division into prefix and suffix
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
17
21.5 Original Classes Of IP Addresses
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
18
21.6 Dotted Decimal Notation
• A more convenient for humans to understand is used
• Notation that has been accepted is
– express each 8-bit section of a 32-bit number as a decimal value
– use periods to separate the sections
– The scheme is known as dotted decimal notation
• Figure 21.2 illustrates examples of binary numbers and the
equivalent dotted decimal notation
• Dotted decimal treats each octet (byte) as an unsigned
binary integer
– the smallest value, 0
• occurs when all bits of an octet are zero (0)
– the largest value, 255
• occurs when all bits of an octet are one (1)
– dotted decimal addresses range
0.0.0.0 through 255.255.255.255
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
19
21.6 Dotted Decimal Notation
• İnsanların anlaması için daha uygun gösterim şekilleri kullanılır
• Kabul edilen notasyon
– 32 bitlik sayının her 8 bitlik kısmını ondalık bir sayıyla ifade edilir
– Bu kısımlar noktalar ile ayrılır
– Bu taslak dotted decimal notation dur
• Figure 21.2 illustrates examples of binary numbers and the equivalent
dotted decimal notation
• Dotted decimal her 8liği(byte) unsigned binary integer olarak işler
– En küçük sayı, 0
• occurs when all bits of an octet are zero (0)
– En büyük sayı, 255
• occurs when all bits of an octet are one (1)
– dotted decimal adres alanı
0.0.0.0 through 255.255.255.255
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
20
21.6 Dotted Decimal Notation
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
21
21.7 Division Of The Address Space
• The classful scheme, divided the address space into
unequal sizes
• The designers chose an unequal division to accommodate a
variety of scenarios
– For example, although it is limited to 128 networks, class A contains
half of all addresses
• The motivation was to allow major ISPs to each deploy a large network that
connected millions of computers
– Similarly, the motivation for class C was to allow an organization to
have a few computers connected on a LAN
• Figure 21.3 summarizes the maximum number of networks
available in each class and the maximum number of hosts
per network
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
22
21.7 Adres Alanlarının Bölünmesi
• The classful scheme, adres alanlarını eşit olmayan
boyutlarda böler
• Tasarımcılar pek çok durumu birbirine uygun hale getirmek
için eişt olmayan parçalar seçilir
– Örneğin; 128 ağ ile sınırlı olmasına rağmen sınıf A bütün adreslerin
yarının kapsar
• The motivation was to allow major ISPs to each deploy a large network that
connected millions of computers
– Benzer şekilde, sınıf C bir kaç bilgisayarın bir LAN a bağlanmasına
izin verir
• Figure 21.3 her sınıfda uygun olabilecek maksimum ağ
sayısını ve her ağ için maksismum host sayısını gösteriri
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
23
21.7 Division Of The Address Space
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
24
21.8 Authority For Addresses
• Internet Corporation for Assigned Names and Numbers
(ICANN) authority has been established
– to handle address assignment and adjudicate disputes
• ICANN does not assign individual prefixes
– Instead, ICANN authorizes a set of registrars to do so
• Registrars make blocks of addresses available to ISPs
– ISP provide addresses to subscribers
• To obtain a prefix
– a corporation usually contacts an ISP
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
25
21.8 Adresler için Otorite
• Internet Corporation for Assigned Names and Numbers
(ICANN) otoritesi kurulmuştur
– Adres atamaları ve anlaşmazlıklara hakemlik etmek için
• ICANN bireysel prefix ler atamazlar
– Yerine, ICANN bunu yapan kayıt birimlerine yetki verir
• Kayıt birimleri adres bloklarını ınternet servis sağlayıcılar
için uygun duruma getirir
– ISP abonelerine adres sağlar
• Prefix elde etmek için
– Bir kurum ISP ile kontak kurar
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
26
21.9 Subnet And Classless Addressing
• As the Internet grew
– the original classful addressing scheme became a limitation
• Everyone demanded a class A or class B address
– So they would have enough addresses for future growth
• but, many addresses in class A and B were unused
– Many class C addresses remained, but few wanted to use them
• Two mechanisms were invented to overcome the limitation:
– Subnet addressing
– Classless addressing
• The two mechanisms are closely related
– they can be considered to be part of a single abstraction:
• instead of having three distinct address classes, allow the division between
prefix/suffix on an arbitrary bit boundary
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
27
21.9 Subnet And Classless Addressing
• Internetin büyümesi ile
– Orjinal classful adressing taslağı sınırlı hale geldi
• Herkes Sınfı A ve B adresleri talep etti
– Böyle olunca, onlar gelecekteki gelişme için yeteri kadar adrese
sahiptiler
• but, many addresses in class A and B were unused
– Sınıf C deki pek çok adres kaldı fakat çok azı onları kullanmak istedi
• Bu sınırlamanın üstesinden gelmek için iki mekanizma
üretildi:
– Subnet addressing
– Classless addressing
• İki mekanizma yakın şekilde ilişkilidir
– Onlar bir tek sayutlamanın parçaları olarak düşünülebilir:
• instead of having three distinct address classes, allow the division between
prefix/suffix on an arbitrary bit boundary
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
28
21.9 Subnet And Classless Addressing
•
•
•
•
Subnet addressing was initially used within large organizations
Classless addressing extended the approach to all Internet
The motivation for using an arbitrary boundary?
Consider an ISP that hands out prefixes. And suppose a
customer of the ISP requests a prefix for a network that
contains 55 hosts
– classful addressing requires a complete class C prefix
– only 4 bits of suffix are needed to represent all possible host values
• means 219 of the 254 possible suffixes would never be assigned
– most of the class C address space is wasted
• For the above example
– classless addressing allows the ISP to assign
• a prefix that is 26 bits long
• a suffix that is 6 bits long
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
29
21.9 Subnet And Classless Addressing
•
•
•
•
Subnet addressing ilk olarak geniş organizasyonlarda kullanıdı
Classless addressing yaklaşımı bütün internet için genişletir
The motivation for using an arbitrary boundary?
Prefix dağıtan bir ISP düşünün. Ve bir müşterinin 55
hostdan oluşan bir ağ için prefix talebindebulunduğunu
düşünün
– classful addressing bir tam sınıf C prefix gerekir
– Bütün host değerlerini ifade etmek için sadece 4 bitlik suffix gerekir
• means 219 of the 254 possible suffixes would never be assigned
– Pek çok sınıf C adres alanı israf edilir
• Yukarıdaki örnek için
– classless addressing allows the ISP to assign
• a prefix that is 26 bits long
• a suffix that is 6 bits long
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
30
21.9 Subnet And Classless Addressing
• Assume an ISP owns a class C prefix
– Classful addressing assigns the entire prefix to one organization
• With classless addressing
– the ISP can divided the prefix into several longer prefixes
– and assign each to a subscriber
• Figure 21.4 illustrates how classless addressing allows an
ISP to divide a class C prefix into four (4) longer prefixes
– each one can accommodate a network of up to 62 hosts
– the host portion of each prefix is shown in gray
• The original class C address has 8 bits of suffix
– and each of the classless addresses has 6 bits of suffix
• Assuming that the original class C prefix was unique
– each of the classless prefixes will also be unique
• Thus, instead of wasting addresses
– ISP can assign each of the four (4) classless prefixes to a subscriber
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
31
21.9 Subnet And Classless Addressing
• Bir ISP bir C sınıf prefix sahibi olsun
– Sınıflı adresleme bir organizasyona bütün prefix i atar
• Sınıfsız adresleme ile
– ISP prefix i birden fazla daha uzun prefix lere bölebilir
– Ve her birini bir abonye verir
• Figure 21.4 sınıfsız adresleme bir ISP nin bir C sınıfı prefix i
4 tane daha uzun prefix e bölmesine imkan sağlar
– Her biri 62 host a kadarlık ağ için kullanılır
– Her prefix için host kısmı gri ile gösterilmiştir
• Orjinal C sınıf adresi 8 bitlik suffix içerir
– Ve rher sınıfsız adres 6 bitlik suffix içeriri
• Orjinal c sınıf prefix in eşsiz olduğunu düşünün
– Her sınıfsız prefix ler de eşsizdir
• Böylece, adresleri israf etmek yerine
– ISP her 4 sınıf prefixlerini bir aboneye atar
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
32
21.9 Subnet And Classless Addressing
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
33
21.10 Address Masks
• How can an IP address be divided at an arbitrary boundary?
• The classless and subnet addressing schemes require
hosts and routers to store an additional piece of information:
– a value that specifies the exact boundary between the network prefix
and the host suffix
• To mark the boundary, IP uses a 32-bit value
– known as an address mask, also called a subnet mask
• Why to store the boundary size as a bit mask?
– A mask makes processing efficient
• Hosts and routers need to compare the network prefix
portion of the address to a value in their forwarding tables
– The bit-mask representation makes the comparison efficient
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
34
21.10 Address Masks
• IP adresleri istenilen sınırlarda nasıl bölünebilir?
• Sınıfsız (classless) ve subnet adresleme şemaları host’ların
ve routerların ek bilgi saklamasına ihtiyaç duyar
– Bu değer tam olarak ağ prefix (önek) ve host suffix (sonek)
arasındaki sınır’ı tanımlar
• Sınır işareti için, IP 32-bitlik değer kullanır
– Adres işareti(address mask) olarak bilinir, yada subnet adresi(subnet
mask) olarakta
• Neden sınır büyüklüğü olan bit işaretini saklar/kaydeder?
– Mask işlemi’i etkin kılar
• Hostlar ve Routerlar iletim tablosunda bulunan ağ prefix
bölümündeki adres değerini karşılaştımak ihtiyacı duyarlar
– Bit-Mask’ı bu karşılaştırmayı verimli bir şekilde yapar
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
35
21.10 Address Masks
• Suppose a router is given
– a destination address, D
– a network prefix represented as a 32-bit value, N
– a 32-bit address mask, M
• Assume the top bits of N contain a network prefix, and the
remaining bits have been set to zero
• To test whether the destination lies on the specified
network, the router tests the condition:
N == (D & M)
• The router
– uses the mask with a “logical and (&)” operation to set the host bits
of address D to zero (0)
– and then compares the result with the network prefix N
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
36
21.10 Address Masks
• Router’a aşağıdakilerin verildiğini farzedin
– Hedef adresi,D
– Ağ prefix’ini temsil eden 32-bitlik değer,N
– 32-bitlik adres mask’ı, M
• N’in En sütteki bitlerininağ prefix’inin içerdiğini fazedin, ve
geri kalan bitlerin de 0 olduğunu
• Hedef’in tanımlanan ağ olduğunu test etmek için, router şu
koşul’u test eder:
N == (D & M)
• Router
– Mask’ı “mantıksal ve (&)” kullanır ve bu işlem D adresinin host
bitlerini 0 sıfır’a eşitler
– Ve daha sonra sonucu N ağının prefix’i ile karşılaştırır
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
37
21.10 Address Masks
As an example:
• Consider the following 32-bit network prefix:
10000000 00001010 00000000 00000000 = 128.10.0.0
• Consider a 32-bit mask:
11111111 11111111 00000000 00000000 = 255.255.0.0
• Consider a 32-bit destination address , which has a
10000000 00001010 00000010 00000011 = 128.10.2.3
• A logical and between the destination address and the
address mask extracts the high-order 16-bits
10000000 00001010 00000000 00000000 = 128.10.0.0
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
38
21.10 Address Masks
Örnek olarak:
• Aşağıdaki 32-bitlik ağ prefix’inin üzerinde düşünün:
10000000 00001010 00000000 00000000 = 128.10.0.0
• Ve 32-bitilk mask:
11111111 11111111 00000000 00000000 = 255.255.0.0
• 32-bitlik hedef adresi, buda aşağıdaki
10000000 00001010 00000010 00000011 = 128.10.2.3
• Mantıksal ve hedef adres ve adres mask arasında yüksek
sıralı 16-bit
10000000 00001010 00000000 00000000 = 128.10.0.0
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
39
21.11 CIDR Notation
• Classless Inter-Domain Routing (CIDR)
– The name is unfortunate because CIDR only specifies addressing
and forwarding
– Designers wanted to make it easy for a human to specify a mask
• Consider the mask needed for the example in Figure 21.4b
– It has 26 bits of 1s followed by 6 bits of 0s
– In dotted decimal, the mask is: 255.255.255.192
• The general form is of CIDR notation is: ddd.ddd.ddd.ddd/m
– ddd is the decimal value for an octet of the address
– m is the number of one bits in the mask
• Thus, one might write the following: 192.5.48.69/26
– which specifies a mask of 26 bits
• Figure 21.5 lists address masks in CIDR notation
– along with the dotted decimal equivalent of each
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
40
21.11 CIDR Notation
• Classless Inter-Domain Routing (CIDR)
– Verilen isim talihsizliktir çünkü CIDR sadece adresleme ve iletimi tanımlar
– Tasarlayıcışar insanlar için mask tanımlamanın kolay olması için uğraşmışlar
• Şekil 21.4b deki örnek’te bulunan ve gerekli olan mask’ı dikkate alın
– 26 bitin 1 olduğunu ve bunu 6 bitlik 0’ların takip ettiğini göreceksiniz
– Noktalı ondalık, mask şuna eşittir: 255.255.255.192
• CIDR notasyonun genel form’u : ddd.ddd.ddd.ddd/m
– Octet adresinin, ddd ondalık değeridir
– M ise mask’taki birlerin sayısıdır
• Böylelikle, birisi şunları yazabilir: 192.5.48.69/26
– Buda 26 bitlik adresi tanımlar
• Şekil 21.5 adres listesi CIDR notasyonunu’nun masklarını belirtir
– Ondalıklı noktalar boyunca her birine eşittir
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
41
Figure 21.5
CIDR
içerisindeki
adres maskları
ve
noktalandırılmış
ondalıklı sayılar
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
42
21.12 A CIDR Example
• Assume an ISP has the following block 128.211.0.0/16
• Suppose the ISP has 2 customers
– one customer needs 12 IP addresses and the other needs 9
• The ISP can assign
– customer1 CIDR: 128.211.0.16/28
– customer2 CIDR: 128.211.0.32/28
– both customers have the same mask size (28 bits), the prefixes differ
• The binary value assigned to customer1 is:
10000000 11010011 00000000 0001 0000
• The binary value assigned to customer2 is:
10000000 11010011 00000000 0010 0000
• There is no ambiguity
– Each customer has a unique prefix
– More important, the ISP retains most of the original address block
• it can them allocate to other customers
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
43
21.12 A CIDR Example
• ISP nin şu bloğa sahip olduğunu farzedin, 128.211.0.0/16
• Ve ISP’nin iki müşterisi olduğunu farzedin
– Bir müşterinin 12 IP adresine ve diğerinin de 9 adrese ihtiyacı olduğunu
farzedin
• ISP şunları atayabilir
– 1.müşteri CIDR: 128.211.0.16/28
– 2.müşteri CIDR: 128.211.0.32/28
– HEr iki müşteri içinde aynı mask büyüklüğü mevcut (28 bit), fakat prefixleri
farklı
• 1.müşteri için binary değer :
•
10000000 11010011 00000000 0001 0000
• 2.müşteri için binary değer :
10000000 11010011 00000000 0010 0000
• Belirsizlik yok,
– Her müşteri eşsiz prefix’e sahiptir
– Dahada Önemlisi, ISP orjinal adres blocklarını turar
• it can them allocate to other customers
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
44
21.13 CIDR Host Addresses
• Once an ISP assigns a customer a CIDR prefix
– the customer can assign host addresses for its network users
– suppose an organization is assigned 128.211.0.16/28
• Figure 21.6 illustrates that the organization will have 4-bits
to use as a host address field
– It shows the highest/lowest addresses in binary and dotted decimal
– The example avoids assigning the all 1s and all 0s host addresses
• Figure 21.6 illustrates a disadvantage of classless
addressing
• Because the host suffix can start on an arbitrary boundary
– values are not easy to read in dotted decimal
– For example
• when combined with the network prefix, the 14 possible host suffixes result
in dotted decimal values from 128.211.0.17 through 128.211.0.30
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
45
21.13 CIDR Host Addresses
• ISP kendi müşterisine CIDR prefix atadığı zaman
– Müşteri ken ağ kullanıcıları için host adresleri atayabilir
– Şirketin 128.211.0.16/28 atadığını farzedin
• Şekil 21.6 bu şirketin host adres alanında nasıl 4-bit
kullandığını göstermektedir
– En yüksek/en düşük adreslerin ikili ve ondalıklı sayı şeklinde gösterir
– Örnekte host adreslerine 1’leri ve 0’ları atamaktan kaçınmıştır
• Şekil 21.6 sınıfsız adresin dezavantajını göstermektedir
• Çünkü host suffix keyfi başlangıç sınırları ile başlayabilir
– Noktalı ondalıklı sayıları okuması kolay değil
– Mesela,
• when combined with the network prefix, the 14 possible host suffixes result
in dotted decimal values from 128.211.0.17 through 128.211.0.30
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
46
21.13 CIDR Host Addresses
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
47
21.14 Special IP Addresses
• IP defines a set of special address forms that are reserved
– That is, special addresses are never assigned to hosts
• This section describes both the syntax and semantics of
each special address form
–
–
–
–
–
21.14.1
21.14.2
21.14.3
21.14.4
21.14.5
Network Address
Directed Broadcast Address
Limited Broadcast Address
This Computer Address
Loopback Address
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
48
21.14 Özel IP Adresleri
• IP özel adres formları tanımlamıştır, bunlar rezerve olarakta
bilinir
– Bunlar, hostlara hiçbir zaman atanmayacak özel adreslerdir
• Bu Bölümde özel adreslerin hem sözbilim hemde anlambilim
formları açıklanacaktır
–
–
–
–
–
21.14.1
21.14.2
21.14.3
21.14.4
21.14.5
Network Address
Directed Broadcast Address
Limited Broadcast Address
This Computer Address
Loopback Address
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
49
21.14 Special IP Addresses
21.14.1 Network Address
• One of the motivations for defining special address forms
can be seen in Figure 21.6
• It is convenient to have an address that can be used to
denote the prefix assigned to a given network
• IP reserves host address zero
– and uses it to denote a network
• Thus, the address 128.211.0.16/28 denotes a network
– because the bits beyond the 28 are zero
• A network address should never appear as the destination
address in a packet
• Note: Section 21.16 discusses the Berkeley broadcast
address form, which is a nonstandard exception
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
50
21.14 Özel IP Adresleri
21.14.1 Network Address
• Özel adres tanımlamak için çnemli motivasyonlardan bir
tanesi Şekil 21.6’da gösterilmiştir
• Adreslerin, prefixlerin atanmış olduğu ağları belirmetek için
de kullanılabilirler
• IP host adreslere sıfır ayırmıştır
– Ve ağ’ı belirtmek için kullanılır
• Böylelikle, adres 128.211.0.16/28 ağ’ı simgeler
– Çünkü bitlerin arkasındaki 28 tane sıfır var
• Ağ adresi hiç bir zaman hedef adres olarak gözükmez
• Not: 21.16 daki bölün Berkeley broadcast tarışılmıştır
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
51
21.14 Special IP Addresses
21.14.2 Directed Broadcast Address
• To simplify broadcasting (send to all)
– IP defines a directed broadcast address for each physical network
• When a packet is sent to a network's directed broadcast
– a single copy of the packet travels across the Internet
• until it reaches the specified network
– the packet is then delivered to all hosts on the network
• The directed broadcast address for a network is formed by
adding a suffix that consists of all 1 bits to the network prefix
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
52
21.14 Special IP Addresses
21.14.2 Directed Broadcast Address
• Broadcast’i kolaylaştırmak için (hepsini göndermek için)
– IP her fiziksel ağ’için broadcast adresleri tanımlamıştır
• Ağ’ın bağlı olduğu broadcast paket gönderebilmek için
– İnternet üzerinden dolaşan paketin kopyası gider
• until it reaches the specified network
– Ağ üzerindeki bütün hostlara paket iletilir
•
Ağ için direkt bağlı olan broadcast adresi , 1 lerden oluşan
suffixler ağ prefix’i olarak eklenir
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
53
21.14 Special IP Addresses
21.14.2 Directed Broadcast Address
• How does broadcast work?
• If network hardware supports broadcast
– a directed broadcast will be delivered using the hardware broadcast
capability
• If a particular network does not have hardware support for
broadcast
– software must send a separate copy of the packet to each host on
the network
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
54
21.14 Special IP Addresses
21.14.2 Directed Broadcast Address
• Broadcast nasıl çalışır?
• Eğer ağ donanımı broadcast için desteklenirse
– Direct broadcast paketleri donanım broadcast özelliğini kullanarak
iletir
• Eğer özel ağ, broadcast özelliği bulunmayan donanımı
sahipse
– Yazılım paket’in bir kopyasını ağ daki bütün hostlara göndermek
zorunda
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
55
21.14 Special IP Addresses
21.14.3 Limited Broadcast Address
•
Limited broadcast refers to a broadcast on a directlyconnected network:
– informally, we say that the broadcast is limited to a “single wire”
• Limited broadcast is used during system startup
– by a computer that does not yet know the network number
• IP reserves the address consisting of 32-bits of 1s
– refer to limited broadcast
• Thus, IP will broadcast any packet sent to the all-1s address
across the local network
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
56
21.14 Special IP Addresses
21.14.3 Limited Broadcast Address
• Limitli broadcast direct olarak ağ’a bağlanmayı temsil ediyor
– Gayri resmi olarak, bu broadcast’in limitli “tek kablo” olduğunu
söyleyebiliriz
• Limitli broadcast sistem açılış aşamasında iken kullanılır
– by a computer that does not yet know the network number
– Bilgisayar ağ adresini daha bilmiyor
• IP 32 bitin 1 olduğu hali rezerve etmiştit
– Limitli broadcast’i temsil ediyor
• Böylelikle, IP bütün paketleri, hepsinin 1 olduğu adrese
(lokal adres) gönderir
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
57
21.14 Special IP Addresses
21.14.4 This Computer Address
• A computer needs to know its IP address
– before it can send or receive Internet packets
• TCP/IP contains protocols a computer can use to obtain its
IP address automatically when the computer boots
– The startup protocols also use an IP to communicate
• When using such startup protocols
– a computer cannot supply a correct IP source address
– To handle such cases
• IP reserves the address that consists of all 0s to mean this computer
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
58
21.14 Special IP Addresses
21.14.4 This Computer Address
• Bilgisayar kendi IP adresini bilmeye ihtiyacı var
– Internet paketlerinin gönderilip alınacağı zamandan önce
• TCP/IP protokollere sahiptir, ve böylelikle bilgisayar
başladığı zamanda IP adresini atomatik olarak alınır
– Başlangıç protokolleri IP iletişimin de kullanılır
• Başlangıç protokollerinin kullanması için
– Bilgisayar doğru kaynak adresi sağlayamaz
– Bu tarz durumların üstesinden gelebilmek için
• IP reserves the address that consists of all 0s to mean this computer
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
59
21.14 Special IP Addresses
21.14.5 Loopback Address
• Loopback address used to test network applications
• It is used for preliminary debugging after a network
application has been created
• A programmer must have two application programs that are
intended to communicate across a network
– Each application includes the code needed to interact with TCP/IP
• Instead of executing each program on a separate computer
– the programmer runs both programs on a single computer
– and instructs them to use a loopback address when communicating
• When one application sends data to another
– data travels down the protocol stack to the IP software
– then forwards it back up through the protocol stack to the second
program
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
60
21.14 Special IP Addresses
21.14.5 Loopback Address
• Loopback adresi ağ uygulamalarını test etmek için kullanılır
• Ağ uygulaması oluşturulduğu zaman debug için kullanılır
• Programcının iki uygulamaya sahip olması gerekir, bu
uygulamalar ağ üzerinden haberleşir
– Her uygulama TCP/IP ile iletişime geçebilmek için kod’a ihtiyacı var
• Her programı farklı bir bilgisayar da çalıştırmak yerine
– Programcı bütün programları tek bir bilgisayarda çalıştırabilir
– Ve iletişim için loopback adres kullanılıyor
• Bir uygulama diğer uygulamaya veri gönderidiği zaman
– Veri IP yazılım stack’inde aşağıya doğru hareket ediyor
– İkinci programda stack’ten veriyi aşağıdan yukarı doru alır
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
61
21.14 Special IP Addresses
21.14.5 Loopback Address
• A programmer can test the program logic quickly
– without needing two computers and without sending packets across
a network
• IP reserves the network prefix 127/8 for use with loopback
• The host address used with 127 is irrelevant
– all host addresses are treated the same
– programmers often use host number 1
– so it makes 127.0.0.1 the most popular loopback address
• During loopback testing no packets ever leave a computer
– the IP software forwards packets from one application to another
• The loopback address never appears in a packet traveling
across a network
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
62
21.14 Special IP Addresses
21.14.5 Loopback Address
• Programcı program mantığını hızlı bir şekilde test edebilir
– İki bilgisayarı bilmesine gerek duymadan ve ağ üzerinden paket
göndermeye ihtiyaç duymadan
• IP 127/8 prefix’ini loopback kullanımı için rezerve etmiştir
• Host adresleri için kullanılan 127 gereksizdir
– Bütün host adresleri aynı şekilde muamele eder
– Programcılar genelde host sayısı olarak 1 i kullanırlar
– Böylelikle, 127.0.0.1 en popüler loopback adresi olarak bilinir
• Loopback testi sırasında bilgisayarı hiç bir paket terketmez
– IP yazılımı paketleri bir uygulamadan diğer uygulamaya gönderir
• Loopback adresi ağ üzerinden hiçbir zaman gönderilmez
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
63
21.15 Summary Of Special IP Addresses
• Şekil 21.7’deki tablo bütün özel IP adreslerini gösterir
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
64
21.17 Routers And The IP Addressing
Principle
• Each router is assigned two or more IP addresses
– one address for each network to which the router attaches
• To understand why, recall two facts:
– A router has connections to multiple physical networks
– Each IP address contains a prefix that specifies a physical network
• A single IP address does not suffice for a router
– because each router connects to multiple networks
– and each network has a unique prefix
• The IP scheme can be explained by a principle:
– An IP address does not identify a specific computer
– each address identifies a connection between a computer and a network
– A computer with multiple network connections (e.g., a router) must be
assigned one IP address for each connection
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
65
21.17 Routers And The IP Addressing
Principle
• Her router’a iki yada daha fazla IP adresi atanır
– Router’ın bağlı olduğu her ağ’için bir adres
• Bunun nedenini anlamak için, iki şeyi hatırlayalım:
– Router bir sürü fiziksel ağ bağlanmak için bağlantılara sahiptir
– HEr IP adresi prefixler bulundurur ve bunlar fiziksel ağları temsil ederler
• Tek bir IP adres router için yeterli değildir
– Çünkü her router bir sürü Ağ’a bağlanır
– Ve her Ağ’ın eşsiz bir prefix’i vardır
• IP şeması şu prensiplerle açıklanabilir
– IP adresi tek bir bilgisayarı tanımlamaz
– Her bir adres bilgisayar ile Ağ bağlantısını tanımlar
– Eğer bir bilgisayarın birden fazla bağlantısı varsa, her biri için bir IP adresi
tanımlamak zorundadır
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
66
21.17 Routers And The IP Addressing
Principle
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
67
21.18 Multi-Homed Hosts
• Can a host connect to multiple networks? Yes
• A host computer with multiple network connections is said to
be multi-homed
• Multi-homing is sometimes used to increase reliability
– if one network fails, the host can still reach the Internet through the
second connection
• Alternatively, multi-homing is used to increase performance
– connections to multiple networks can make it possible to send traffic
directly and avoid routers, which are sometimes congested
• Like a router, a multi-homed host has multiple protocol
addresses
– one for each network connection
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
68
21.18 Multi-Homed Hosts
• Host bir sürü ağ’a bağlanabilir mi? Evet
• Birsürü bağlantıya sahip Host bilgisyarına, multi-homed
denir
• Multi-homing bazen güvenilirliği artırıyor
– Eğer bir ağ çökerse, host ikinci bir ağ ile internet’e bağlanır
• Alternatif olarak, multi-homing performansı arttırmak için
kullanılabilir
– Bir sürü bağlantıya sahip ağlar trafiği tıkanmış routerlar üzerinden
göndermekten kaçınabilirler
• Router gibi, multi-homed host birden çok protokol adresi
mevcuttur
– Her ağ bağlantısı için bir tane
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
69