Chapter_4 Network Layer-IP Datagram and Addressing Copy
Chapter_4 Network Layer-IP Datagram and Addressing Copy
application
segments to transport we
physical physical
network
data link
layer network
physical
application
transport
network layer protocols network
data link
physical
network
data link
network
data link
no call setup at network layer يتم إعادة توجيه الحزم باستخدام عنوان مضيف الوجهة
application application
transport transport
network 1. send packets 2. receive packets network
data link data link
physical physical
…
in: one large datagram
• different link types, out: 3 smaller datagrams
different MTUs
large IP datagram divided
(“fragmented”) within net reassembly
• one datagram becomes
several datagrams
• “reassembled” only at …
final destination
• IP header bits used to
identify, order related
fragments
Network Layer: Addressing 4-6
IP addressing: introduction
223.1.1.1
IP address: 32-bit 223.1.2.1
identifier for host, router
interface 223.1.1.2
223.1.1.4 223.1.2.9
interface: connection
between host/router and
physical link 223.1.1.3 10 223.1.3.27 223.1.2.2
• router’s typically have pro
multiple interfaces
• host typically has one or
223.1.3.1 223.1.3.2
two interfaces (e.g., wired
Ethernet, wireless 802.11)
IP addresses associated 8 8 8
with each interface 223.1.1.1 = 11011111 00000001 00000001 00000001
223 1 1 1
in chapter 5, 6.
223.1.3.27
223.1.1.3
223.1.2.2
39
A: wireless WiFi interfaces
connected by WiFi base station
Solution
We replace each group of 8 bits with its equivalent
decimal number (see Appendix B) and add dots for
separation.
Solution
a.There must be no leading zero (045)
b.There can be no more than four numbers.
c.Each number needs to be less than or equal to 255
d.A mixture of binary notation and dotted-decimal
notation is not allowed .
Network Layer: Addressing 4-13
Note
Solution
a.The first bit is 0 . This is a class A address.
b.The first 3 bits are 110 ;the class is C.
c.The first byte is 14 ;the class is A.
d.The first byte is 252 ; the class is E.
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to teg ew ,0
00100101 00010000 11001101 00100000
or .205.16.37.32
This is actually the block shown in Figure 4..3
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 28 −32 rightmost bits to teg ew ,1
11001101 00010000 00100101 00101111
or 205.16.37.47
This is actually the block shown in Figure 4.3
Solution
The value of n is 28 , which means that
number of addresses is 232-28 = 16
IP address: 223.1.1.1
• subnet part - high order
bits 223.1.1.2 223.1.2.1
223.1.1.4 223.1.2.9
• host part - low order
bits 223.1.2.2
223.1.3.27
what’s a subnet ? 223.1.1.3
223.1.3.0/24
223.1.1.3
223.1.9.2 223.1.7.0
223.1.9.1 223.1.7.1
223.1.8.1 223.1.8.0
223.1.2.6 223.1.3.27
subnet host
part part
11001000 00010111 00010000 00000000
I
200.23.16.0/23