34
Set # 05 Network Layer Delivered By: Engr Tahir Niazi Internet Architecture and Protocol

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

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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
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

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

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

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

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

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

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

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

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

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

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

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

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

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

Q & A