Post on 15-Jan-2016
Network Layer
The Network layer, or OSI Layer 3, provides services to exchange the individual pieces of data over the network between identified end devices.
To accomplish this end-to-end transport, Layer 3 uses four basic processes: Addressing Encapsulation Routing Decapsulation
Routing
The source and destination hosts are not always connected to the same network. In fact, the packet might have to travel through many different networks. Along the way, each packet must be guided through the network to reach its final destination.
Intermediary devices that connect the networks are called routers. The role of the router is to select paths for and direct packets toward their destination. This process is known as routing.
Each route that a packet takes to reach the next device is called a hop.
Protocols in Network Layer
The Internet Protocol (IPv4 and IPv6) is the most widely-used Layer 3 data carrying protocol
Why separate hosts into network ?
Performance
Packet tracer broadcast domain
Security
Address Management
Network layer in an internetwork
Network layer at the source
Network layer at a router
Network layer at the destination
IP Addressing (IPv4)IP Addressing (IPv4)
Internet Address
Class full Addressing
An IP address is a 32-bit address.
NoteNote::
The Internet Protocol was designed as a protocol with low overhead. It provides only the functions that are necessary to deliver a packet from a source to a destination over an interconnected system of networks. The protocol was not designed to track and manage the flow of packets. These functions are performed by other protocols in other layers.
IPv4 basic characteristics:•Connectionless - No connection is established before sending data packets.•Best Effort (unreliable) - No overhead is used to guarantee packet deliveryHere, Unreliable means simply that IP does not have the capability to manage, and recover from, undelivered or corrupt packets.
•Media Independent - Operates independently of the medium carrying the data.
The IP addresses are unique and universal.
NoteNote::
Dotted-decimal notation
Example 1Example 1
Change the following IP addresses from binary notation to dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11111001 10011011 11111011 00001111
Example 2Example 2
Change the following IP addresses from dotted-decimal notation to binary notation.
a. 111.56.45.78
b. 75.45.34.78
In classful addressing, the address space is divided into five classes: A, B,
C, D, and E.
NoteNote::
Finding the class in binary notation
Finding the address class
Example 3Example 3
Find the class of each address:
a. 000000001 00001011 00001011 11101111
b. 111111110011 10011011 11111011 00001111
Finding the class in decimal notation
Example 4Example 4
Find the class of each address:
a. 227.12.14.87
b. 252.5.15.111
c. 134.11.78.56
Netid and hostid
Blocks in class A
Millions of class A addresses are wasted.
NoteNote::
Blocks in class B
Many class B addresses are wasted.
NoteNote::
The number of addresses in class C is smaller than the needs of most
organizations.
NoteNote::
Blocks in class C
Network address
In class full addressing, the network address is the one that is assigned to
the organization.
NoteNote::
Example 5Example 5
Given the address 23.56.7.91, find the network address.
Ans. 23.0.0.0 (kelas A)
Example 6Example 6
Given the address 132.6.17.85, find the network address.
Ans. 132.6.0.0 (kelas B)
Example 7Example 7
Given the network address 17.0.0.0, find the class.
A network address is different from a netid. A network address has both
netid and hostid, with 0s for the hostid.
NoteNote::
Sample internet (classful)
Gateway
IP Private
Range Total
10.0.0.0 to 10.255.255.255 224
172.16.0.0 to 172.31.255.255 220
192.168.0.0 to 192.168.255.255 216
Private addresses (others are called Public IP or Global address) :