![Page 1: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/1.jpg)
Set # 05
Network Layer
Delivered By: Engr Tahir Niazi
Internet Architecture and Protocol
![Page 2: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/2.jpg)
Layer 3: Internet Protocol
Logical address for computers on network
Fragmentation and reassembly control
Datagram service
IP makes use of "best efforts" service
– Connectionless
– Similar to postal service
![Page 3: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/3.jpg)
Layer 3: Internet Protocol Advantages
– Simplicity and less overhead
– Upper layers can build more reliable service (TCP)
– Adequate for many networks
– Hop-by-hop routing is resilient
Disadvantages
– “Best efforts” allows no inherent Quality of Service (QoS)
– Hop-by-hop routing allows no traffic engineering
– IPv4 address space
![Page 4: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/4.jpg)
IP Functions: Encapsulates TCP and UDP Segments
Common logical interface to different networks
Universal 32-bit address notation (IPv4)
Connectionless network protocol
![Page 5: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/5.jpg)
IPv4 Address Structure:
![Page 6: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/6.jpg)
Example:
Since I is in the range 128 ≤ I < 192 we know this is a Class B
address
We can write the address in a form that is a network address by
putting 0s in the host part:
138.37.0.0
Usually done with subnets – see later
![Page 7: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/7.jpg)
Public & Private IP addresses
Reserved for private intranets
– 10.0.0.0 - 10.255.255.255
– 172.16.0.0 - 172.31.255.255
– 192.168.0.0 - 192.168.255.255
Used within organisations and within the home
Use NAT (Network Address Translation) at edge of private
domain (e.g in ADSL router) if need to connect to Internet.
Loopback range used for testing: 127.x.x.x
![Page 8: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/8.jpg)
Subnets:
Use some of the bits in the host identifier field to distinguish
between multiple networks called subnets
More flexibility and the smaller subnets are easier to manage -
also reduces the traffic on individual subnets
Subnet mask is applied at the Network Layer. 1s define the subnet and
0s the host Hosts apply the subnet mask to the destination
address.
If it is in the same network (subnet) ARP used to find MAC
address; if not forwarded to a router
![Page 9: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/9.jpg)
Subnet Example:
![Page 10: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/10.jpg)
More Subnet Examples:
![Page 11: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/11.jpg)
More Subnet Examples:
![Page 12: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/12.jpg)
Price of Subnetting:
Lose available number of addresses for hosts
– The very first IP address within the network range identifies
the network, can no be assigned to any host
– The very last IP address within the network range is the
broadcast address can not be assigned to any host
![Page 13: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/13.jpg)
Exercise 1: Subnetting based on Networks
![Page 14: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/14.jpg)
3 Steps: 1. Determine number of networks and convert to binary
2. Reserve bits in subnet mask and find the increment
3. Use increment to find the network range.
![Page 15: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/15.jpg)
Solution:
![Page 16: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/16.jpg)
Exercise 2: Subnetting based on Hosts
![Page 17: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/17.jpg)
Solution Ex: 2
![Page 18: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/18.jpg)
Exercise: An organisation has purchased class C address 216.21.5.0, and
would like to use it to address his 9 networks
Find upper range and lower range using following IP address
and subnet mask (also find few next subnets)
- Net id = 138.37.32.0, Subnet mask = 255.255.255.240
- Net id= 138.37.32.0, Subnet Mask = 255.255.252.0
An organisation has purchased this address 150.5.0.0, and
would like to use to accommodate 220 hosts
![Page 19: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/19.jpg)
Advance Subnetting: VLSM
![Page 20: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/20.jpg)
![Page 21: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/21.jpg)
Solution
![Page 22: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/22.jpg)
Solution
![Page 23: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/23.jpg)
VLSM Exercise: (IP =192.168.10.0)
![Page 24: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/24.jpg)
NAT: Network Address Translation:
Multiple computers, one internet connection
NAT allows multiple devices to “share” the same public IP
address
NAT glues two worlds together
– DHCP server: assigns private IP addresses
– DHCP client: gets public IP address
NAT swaps public/private addresses on packets
![Page 25: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/25.jpg)
How NAT works?
![Page 26: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/26.jpg)
Public and Private IP address Mapping:
![Page 27: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/27.jpg)
IPv4 and IPv6:
There are currently two versions
IP version 4
IP version 6
IPv4:
was the first version of Internet Protocol to be widely used, and
accounts for most of today’s Internet traffic. There are just over
4 billion IPv4 addresses. While that is a lot of IP addresses, it is
not enough to last forever.
![Page 28: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/28.jpg)
IPv6:
IPv6 is a newer numbering system that provides a much larger
address pool than IPv4. It was deployed in 1999 and should meet
the world’s IP addressing needs well into the future.
Difference b/w IPv4 & IPv6:
The major difference between IPv4 and IPv6 is the number of IP
addresses. There are 4,294,967,296 IPv4 addresses. In contrast,
there are 340,282,366,920,938,463,463,374,
607,431,768,211,456 IPv6 addresses.
Many other like IP sec, Simpler header, no broadcast
![Page 29: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/29.jpg)
Continue…..
![Page 30: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/30.jpg)
IPv4 Header
![Page 31: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/31.jpg)
IPv6 Header
![Page 32: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/32.jpg)
Migration between IPv4 & IPv6
Tunnelling
Dual Stack Router
![Page 33: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/33.jpg)
Summary:
IP protocol
Public and Private IP address
Subnetting
Variable length subnet mask
Network address Translation
IPv4 and IPv6
![Page 34: Internet Architecture and Protocolbsituos.weebly.com/uploads/2/5/2/5/25253721/set_05.pdf · IP version 4 IP version 6 IPv4: was the first version of Internet Protocol to be widely](https://reader033.vdocument.in/reader033/viewer/2022042023/5e7aa0f9e6107559ca7195c4/html5/thumbnails/34.jpg)
Q & A