Unit 9
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Network Layer
Classless Inter-Domain Routing (CIDR)
• Basically the method that ISPs (Internet Service
Providers) use to allocate an amount of
addresses to a company, a home
• Ex : 192.168.10.32/28
• The slash notation (/) means how many bits are
turned on (1s)
CIDR Values
11111111
Determining Available Host Addresses
172 16 0 0
10101100 00010000 00000000 00000000
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
Network Host
00000000 00000001
11111111 11111111
11111111 11111110
...
...
00000000 00000011
11111101
1
2
3
65534
65535
65536
–
...
2
65534
N
2N – 2 = 216 – 2 = 65534
IP Address Classes Exercise
Address Class Network Host
10.2.1.1
128.63.2.100
201.222.5.64
192.6.141.2
130.113.64.16
256.241.201.10
IP Address Classes Exercise Answers
Address Class Network Host
10.2.1.1
128.63.2.100
201.222.5.64
192.6.141.2
130.113.64.16
256.241.201.10
A
B
C
C
B
Nonexistent
10.0.0.0
128.63.0.0
201.222.5.0
192.6.141.0
130.113.0.0
0.2.1.1
0.0.2.100
0.0.0.64
0.0.0.2
0.0.64.16
• Network 172.16.0.0
172.16.0.0
Addressing Without Subnets
172.16.0.1 172.16.0.2 172.16.0.3
…...
172.16.255.253 172.16.255.254
• Network 172.16.0.0
Addressing with Subnets
172.16.1.0 172.16.2.0
172.16.3.0
172.16.4.0
Subnet Addressing
172.16.2.200
172.16.2.2
172.16.2.160
172.16.2.1
172.16.3.5
172.16.3.100
172.16.3.150
E0
172.16
Network
Network Interface
172.16.0.0
172.16.0.0
E0
E1
New Routing Table
2 160
Host
. .
172.16.3.1
E1
Subnet Addressing
172.16.2.200
172.16.2.2
172.16.2.160
172.16.2.1
172.16.3.5
172.16.3.100
172.16.3.150
172.16.3.1
E0
E1
172.16 2 160
Network Host
. . Network Interface
172.16.2.0
172.16.3.0
E0
E1
New Routing Table
Subnet
Subnet Mask Exercise
Address Subnet Mask Class Subnet
172.16.2.10
10.6.24.20
10.30.36.12
255.255.255.0
255.255.240.0
255.255.255.0
Subnet Mask Exercise Answers
Address Subnet Mask Class Subnet
172.16.2.10
10.6.24.20
10.30.36.12
255.255.255.0
255.255.240.0
255.255.255.0
B
A
A
172.16.2.0
10.6.16.0
10.30.36.0
Broadcast Addresses
172.16.1.0
172.16.2.0
172.16.3.0
172.16.4.0
172.16.3.255
(Directed Broadcast)
255.255.255.255
(Local Network Broadcast)
X
172.16.255.255
(All Subnets Broadcast)
Exercise
• 192.168.10.0
• /27
? – SNM
? – Block Size
?- Subnets
Exercise
• /27
? – SNM – 224
? – Block Size = 256-224 = 32
?- Subnets
Subnets 10.0 10.32 10.64
FHID 10.1 10.33
LHID 10.30 10.62
Broadcast 10.31 10.63
Exercise
• 192.168.10.0
• /30
? – SNM
? – Block Size
?- Subnets
Exercise
• /30
? – SNM – 252
? – Block Size = 256-252 = 4
?- Subnets
Subnets 10.0 10.4 10.8
FHID 10.1 10.5
LHID 10.2 10.6
Broadcast 10.3 10.7
Exercise
Mask Subnets Host
/26 ? ? ?
/27 ? ? ?
/28 ? ? ?
/29 ? ? ?
/30 ? ? ?
Exercise
Mask Subnets Host
/26 192 4 62
/27 224 8 30
/28 240 16 14
/29 248 32 6
/30 252 64 2
Exercise
192.168.10.54 /29
Mask ?
Subnet ?
Broadcast ?
Exercise
192.168.10.130 /28
Mask ?
Subnet ?
Broadcast ?
Exercise
192.168.10.193 /30
Mask ?
Subnet ?
Broadcast ?
Exercise
192.168.1.100 /26
Mask ?
Subnet ?
Broadcast ?
Exercise
192.168.20.158 /27
Mask ?
Subnet ?
Broadcast ?
Class B
172.16.0.0 /19
Subnets ?
Hosts ?
Block Size ?
Class B
172.16.0.0 /19
Subnets 23 = 8
Hosts 213 -2 = 8190
Block Size 256-224 = 32
Subnets 0.0 32.0 64.0 96.0
FHID 0.1 32.1 64.1 96.1
LHID 31.254 63.254 95.254 127.254
Broadcast 31.255 63.255 95.255 127.255
Class B
172.16.0.0 /27
Subnets ?
Hosts ?
Block Size ?
Class B
172.16.0.0 /27
Subnets 211 = 2048
Hosts 25 -2 = 30
Block Size 256-224 = 32
Subnets 0.0 0.32 0.64 0.96
FHID 0.1 0.33 0.65 0.97
LHID 0.30 0.62 0.94 0.126
Broadcast 0.31 0.63 0.95 0.127
Class B
172.16.0.0 /23
Subnets ?
Hosts ?
Block Size ?
Class B
172.16.0.0 /23
Subnets 27 = 128
Hosts 29 -2 = 510
Block Size 256-254 = 2
Subnets 0.0 2.0 4.0 6.0
FHID 0.1 2.1 4.1 6.1
LHID 1.254 3.254 5.254 7.254
Broadcast 1.255 3.255 5.255 7.255
Class B
172.16.0.0 /24
Subnets ?
Hosts ?
Block Size ?
Class B
172.16.0.0 /24
Subnets 28 = 256
Hosts 28 -2 = 254
Block Size 256-255 = 1
Subnets 0.0 1.0 2.0 3.0
FHID 0.1 1.1 2.1 3.1
LHID 0.254 1.254 2.254 3.254
Broadcast 0.255 1.255 2.255 3.255
Class B
172.16.0.0 /25
Subnets ?
Hosts ?
Block Size ?
Class B
172.16.0.0 /25
Subnets 29 = 512
Hosts 27 -2 = 126
Block Size 256-128 = 128
Subnets 0.0 0.128 1.0 1.128 2.0 2.128
FHID 0.1 0.129 1.1 1.129 2.1 2.129
LHID 0.126 0.254 1.126 1.254 2.126 2.254
Broadcast 0.127 0.255 1.127 1.255 2.127 2.255
Find out Subnet and Broadcast Address
• 172.16.85.30/29
Find out Subnet and Broadcast Address
• 172.30.101.62/23
Find out Subnet and Broadcast Address
• 172.20.210.80/24
Class A
10.0.0.0 /10
Subnets ?
Hosts ?
Block Size ?
Class A
10.0.0.0 /10
Subnets 22 = 4
Hosts 222 -2 = 4194302
Block Size 256-192 = 64
Subnets 10.0 10.64 10.128 10.192
FHID 10.0.0.1 10.64.0.1 10.128.0.1 10.192.0.1
LHID 10.63.255.254 10.127.255.254 10.191.255.254 10.254.255.254
Broadcast 10.63.255.255 10.127.255.255 10.191.255.255 10.254.255.255
Class A
10.0.0.0 /18
Subnets ?
Hosts ?
Block Size ?
Class A
10.0.0.0 /18
Subnets 210 = 1024
Hosts 214 -2 = 16382
Block Size 256-192 = 64
Subnets 10.0.0.0 10.0.64.0 10.0.128.0 10.0.192.0
FHID 10.0.0.1 10.0.64.1 10.0.128.1 10.0.192.1
LHID 10.0.63.254 10.0.127.254 10.0.191.254 10.0.254.254
Broadcast 10.0.63.255 10.0.127.255 10.0.191.255 10.0.254.255
VLSM(Variable Length Subnet Mask)
• VLSM extends classic subnetting.
• VLSM is a process of breaking down subnets
into the smaller subnets, according to the
need of individual networks.
VLSM
 An organization with a class C address and
needs to have 5 subnets with the following
number of hosts: 60, 60, 60, 30, 30.
 The site cannot use a subnet mask with only 2
bits in the subnet section because this allows
only 4 subnetworks each 62.
 Nor can the site use a subnet mask with 3 bits in
the subnet section because this allows 8
subnetworks each with 30 hosts.
VLSM
 The router uses 2 different masks, one
applied after the other.
 It first uses the masks with 26 1s(11111111
11111111 11111111 11000000 or
255.255.255.192) to divide the network into
4 subnets.
 Then it applies the mask with 27 1s
(11111111 11111111 11111111
11100000 or 255.255.255.224) to one of the
subnets to divide it into two smaller subnets.
Network Layer
Steps for VLSM
• If an ISP has a 200.1.1.0 Network, he wants to
give assign to 5 customers who need 20, 12, 6,
25, 18 hosts.
– What should the subnet mask be?
– What is the address range in each subnet?
– What should the routing table entries be?
– Can it be done efficiently to conserve IP
addresses?
Question
VLSM - example
Network Layer
Supernetting
• Supernets are the opposite of Subnets in that
they combine multiple Class C networks into
blocks rather than dividing them into segments.
• When Subnetting, we borrow bits from the Host
ID portion, which increases the number of bits
used for the Network ID portion.
• With Supernetting we do exactly the opposite,
meaning we take the bits from the Network ID
portion and give them to the Host ID portion
Supernet Masks
 A supernet mask is the reverse of the subnet
mask.
 In a supernet mask, we change some 1s in
the netid section to 0s.
Example
• With the supernet mask of 255.255.252.0 we
can have 4 class C address combined into one
supernetwork.
• If we choose the first address to be X.Y.32.0, the
other three addresses are X.Y.33.0, X.Y.34.0, and
X.Y.35.0.
• Whenever the router receives a packet, it
applies the supernet mask to the destination
address and compares the result to the lowest
address. If the result and the lowest address are
the same, the packet belongs to the supernet.
Network Layer
Network Layer
NAT: network address translation
10.0.0.1
10.0.0.2
10.0.0.3
10.0.0.4
138.76.29.7
local network
(e.g., home network)
10.0.0/24
rest of
Internet
datagrams with source or
destination in this network
have 10.0.0/24 address for
source, destination (as usual)
all datagrams leaving
local
network have same
single source NAT IP
address:
138.76.29.7,different
motivation: local network uses just one IP
address as far as outside world is concerned:
– range of addresses not needed from ISP: just one
IP address for all devices
– can change addresses of devices in local network
without notifying outside world
– can change ISP without changing addresses of
devices in local network
– devices inside local net not explicitly addressable,
visible by outside world (a security plus)
NAT: network address translation
implementation: NAT router must:
– outgoing datagrams: replace (source IP address, port #)
of every outgoing datagram to (NAT IP address, new port
#)
– remember (in NAT translation table) every (source IP
address, port #) to (NAT IP address, new port #)
translation pair
– incoming datagrams: replace (NAT IP address, new port
#) in dest fields of every incoming datagram with
corresponding (source IP address, port #) stored in NAT
table
NAT: network address translation
10.0.0.1
10.0.0.2
10.0.0.3
S: 10.0.0.1, 3345
D: 128.119.40.186, 80
1
10.0.0.4
138.76.29.7
1: host 10.0.0.1
sends datagram to
128.119.40.186, 80
NAT translation table
WAN side addr LAN side addr
138.76.29.7, 5001 10.0.0.1, 3345
…… ……
S: 128.119.40.186, 80
D: 10.0.0.1, 3345
4
S: 138.76.29.7, 5001
D: 128.119.40.186, 802
2: NAT router
changes datagram
source addr from
10.0.0.1, 3345 to
138.76.29.7, 5001,
updates table
S: 128.119.40.186, 80
D: 138.76.29.7, 5001 3
3: reply arrives
dest. address:
138.76.29.7, 5001
4: NAT router
changes datagram
dest addr from
138.76.29.7, 5001 to 10.0.0.1, 3345
NAT: network address translation
Network Layer
Network Layer
Network Layer
Network Layer
IGMP(Internet Group Management
Protocol)
• IGMP is a protocol that manages group
membership.
• The IGMP protocol gives the multicast routers
information about the membership status of
hosts (routers) connected to the network.
Position of IGMP in network layer
IGMP is a group management protocol.
It helps a multicast router create and
update a list of loyal members related
to each router interface.
Note:
IGMP messages types
• aggregate routers into
regions, “autonomous
systems” (AS)
• routers in same AS run
same routing protocol
– “intra-AS” routing
protocol
– routers in different AS
can run different intra-
AS routing protocol
gateway router:
• at “edge” of its own AS
• has link to router in
another AS
Hierarchical routing
3b
1d
3a
1c
2a
AS3
AS1
AS2
1a
2c
2b
1b
Intra-AS
Routing
algorithm
Inter-AS
Routing
algorithm
Forwarding
table
3c
Interconnected ASes
 forwarding table
configured by both intra-
and inter-AS routing
algorithm
 intra-AS sets entries
for internal dests
 inter-AS & intra-AS sets
entries for external
dests
Inter-AS tasks
 suppose router in AS1
receives datagram
destined outside of AS1:
 router should forward
packet to gateway
router, but which one?
AS1 must:
1. learn which dests are
reachable through AS2,
which through AS3
2. propagate this
reachability info to all
routers in AS1
job of inter-AS routing!
AS3
AS2
3b
3c
3a
AS1
1c
1a
1d
1b
2a
2c
2b
other
networks
other
networks
Intra-AS Routing
also known as interior gateway protocols (IGP)
most common intra-AS routing protocols:
 RIP: Routing Information Protocol
 OSPF: Open Shortest Path First
 IGRP: Interior Gateway Routing Protocol (Cisco
proprietary)
OSPF (Open Shortest Path First)
• “open”: publicly available
• uses link state algorithm
– route computation using Dijkstra’s algorithm
• OSPF advertisement carries one entry per
neighbor
• advertisements flooded to entire AS
– carried in OSPF messages directly over IP
OSPF “advanced” features (not in RIP)
• security: all OSPF messages authenticated (to
prevent malicious intrusion)
• multiple same-cost paths allowed (only one
path in RIP)
• for each link, multiple cost metrics for
different TOS(Type Of Service)
• integrated uni- and multicast support
• hierarchical OSPF in large domains.
Internet inter-AS routing: BGP
• BGP (Border Gateway Protocol): the de facto
inter-domain routing protocol
– “glue that holds the Internet together”
• BGP provides each AS a means to:
– eBGP: obtain subnet reachability information from
neighboring ASs.
– iBGP: propagate reachability information to all AS-
internal routers.
– determine “good” routes to other networks based
on reachability information and policy.
• allows subnet to advertise its existence to rest
of Internet: “I am here”
BGP basics
• when AS3 advertises a prefix to AS1:
– AS3 promises it will forward datagrams towards that prefix
– AS3 can aggregate prefixes in its advertisement
AS3
AS2
3b
3c
3a
AS1
1c
1a
1d
1b
2a
2c
2b
other
networks
other
networks
 BGP session: two BGP routers (“peers”) exchange BGP
messages:
 advertising paths to different destination network
 exchanged over semi-permanent TCP connections
BGP
message
BGP basics: distributing path information
AS3
AS2
3b
3a
AS1
1c
1a
1d
1b
2a
2c
2b
other
networks
other
networks
 using eBGP session between 3a and 1c, AS3 sends prefix
reachability info to AS1.
 1c can then use iBGP do distribute new prefix info to all routers in AS1
 1b can then re-advertise new reachability info to AS2 over 1b-to-2a
eBGP session
 when router learns of new prefix, it creates entry for prefix in
its forwarding table.
eBGP session
iBGP session
IPv6: motivation
• initial motivation: 32-bit address space soon
to be completely allocated.
• additional motivation:
– header format helps speed processing/forwarding
– header changes to facilitate QoS
IPv6 datagram format:
– fixed-length 40 byte header
– no fragmentation allowed
IPv6 datagram format
priority: identify priority among datagrams in flow
flow Label: identify datagrams in same “flow.”
(concept of“flow” not well defined).
next header: identify upper layer protocol for data
data
destination address
(128 bits)
source address
(128 bits)
payload len next hdr hop limit
flow labelpriver
32 bits
Other changes from IPv4
• checksum: removed entirely to reduce
processing time at each hop
• options: allowed, but outside of header,
indicated by “Next Header” field
• ICMPv6: new version of ICMP
– additional message types, e.g. “Packet Too Big
Transition from IPv4 to IPv6
• not all routers can be upgraded simultaneously
– no “flag days”
– how will network operate with mixed IPv4 and IPv6
routers?
• tunneling: IPv6 datagram carried as payload in
IPv4 datagram among IPv4 routers
IPv4 source, dest addr
IPv4 header fields
IPv4 datagram
IPv6 datagram
IPv4 payload
UDP/TCP payload
IPv6 source dest addr
IPv6 header fields
Tunneling
physical view:
IPv4 IPv4
A B
IPv6 IPv6
E
IPv6 IPv6
FC D
logical view:
IPv4 tunnel
connecting IPv6 routers
E
IPv6 IPv6
FA B
IPv6 IPv6
flow: X
src: A
dest: F
data
A-to-B:
IPv6
Flow: X
Src: A
Dest: F
data
src:B
dest: E
B-to-C:
IPv6 inside
IPv4
E-to-F:
IPv6
flow: X
src: A
dest: F
data
B-to-C:
IPv6 inside
IPv4
Flow: X
Src: A
Dest: F
data
src:B
dest: E
physical view:
A B
IPv6 IPv6
E
IPv6 IPv6
FC D
logical view:
IPv4 tunnel
connecting IPv6 routers
E
IPv6 IPv6
FA B
IPv6 IPv6
Tunneling
IPv4 IPv4
IPv6: adoption
• US National Institutes of Standards estimate
[2013]:
– ~3% of industry IP routers
– ~11% of US gov’t routers
• Long (long!) time for deployment, use
– 20 years and counting!
– think of application-level changes in last 20 years:
WWW, Facebook, …
– Why?

More Related Content

PPT
CCNA presentation.
PDF
MPLS Presentation
PPTX
Networking basic fundamental
PPTX
IP Addressing & subnetting strategy
PPT
OSI Layers
PDF
TCP - Transmission Control Protocol
PPTX
Integrated service digital network
PPTX
Computer networking
CCNA presentation.
MPLS Presentation
Networking basic fundamental
IP Addressing & subnetting strategy
OSI Layers
TCP - Transmission Control Protocol
Integrated service digital network
Computer networking

What's hot (20)

PDF
IP Addressing and Subnetting
PPT
IEEE Standards
PPTX
COMPUTER NETWORKING
PPT
Internet control message protocol
PDF
Networking devices
PPT
Chapter10
PPT
CCNA IP Addressing
PPT
Subnetting
PPT
CCNA TCP/IP
PPT
internetworking operation
PPSX
Subnetting
PPSX
Netwerken - 3-3-netwerkverdeeldozen
PPTX
Arp (address resolution protocol)
PPT
Subnetting
PDF
CCNA Report
PPT
Smtp
PPT
Loopback address
PDF
CCNAv5 - S1: Chapter 9 - Subnetting Ip Networks
PPTX
CCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptx
PPT
IP Subnetting
IP Addressing and Subnetting
IEEE Standards
COMPUTER NETWORKING
Internet control message protocol
Networking devices
Chapter10
CCNA IP Addressing
Subnetting
CCNA TCP/IP
internetworking operation
Subnetting
Netwerken - 3-3-netwerkverdeeldozen
Arp (address resolution protocol)
Subnetting
CCNA Report
Smtp
Loopback address
CCNAv5 - S1: Chapter 9 - Subnetting Ip Networks
CCNA 200-301 Chapter 1-Introduction to TCP IP Networking.pptx
IP Subnetting
Ad

Viewers also liked (20)

PPTX
Overview of the graphics system
PPTX
Routing Algorithm
PPTX
Strings in C
PPTX
Micro Programmed Control Unit
PPTX
Array in C
PPTX
Array in c language
PPTX
Dedicated fully parallel architecture
PPTX
Computer Communication Architecture
PPTX
Overview of Digital Communication
PPTX
Media Access Layer
PPTX
Data Link Layer
PPTX
Data Communication Principles
PPT
Ch1: Operating System- Introduction
PPTX
Advanced computer architecture lesson 1 and 2
PPT
Ch2: Computer System Structure (OS)
PDF
High Performance JavaScript - WebDirections USA 2010
PPTX
Dynamic Memory Allocation(DMA)
PPT
Operating System
PPTX
Pointers in C
PPT
32 Security in_Internet_IP_SEC_SSL/TLS_PGN_VPN_and_Firewalls
Overview of the graphics system
Routing Algorithm
Strings in C
Micro Programmed Control Unit
Array in C
Array in c language
Dedicated fully parallel architecture
Computer Communication Architecture
Overview of Digital Communication
Media Access Layer
Data Link Layer
Data Communication Principles
Ch1: Operating System- Introduction
Advanced computer architecture lesson 1 and 2
Ch2: Computer System Structure (OS)
High Performance JavaScript - WebDirections USA 2010
Dynamic Memory Allocation(DMA)
Operating System
Pointers in C
32 Security in_Internet_IP_SEC_SSL/TLS_PGN_VPN_and_Firewalls
Ad

Similar to Network Layer (20)

PDF
IP Addressing (Subnetting, VLSM, Supernetting)
PDF
QuickTutorial Guide Advanced Topics in IP Addressing
PDF
subnet network Addressing Network v1.pdf
PPTX
Wipro telecom training i pv4 concepts
PPTX
Subentting, Supernetting and VLSM presentation
PPTX
chapter 4.pptx
PPTX
3_IP_Address-RP. By bsnl rttc Hyderabad pptx
PDF
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
PPTX
CCNA ppt Day 3
PDF
[Ccna] subnetting & vlsm
PPTX
Chapter_5, Internet Protocol and IP addressing
PPT
Subneting.ppt
PPT
PPT
Classless Interdomain Data Routing CIDR.ppt
PPTX
IP Addressing and Subnetting
PPT
Ip Addressing Basics
PPT
Ipv4 address
PPTX
03 coms 525 tcpip - ip address
PPTX
IP addressing and Subnetting PPT
IP Addressing (Subnetting, VLSM, Supernetting)
QuickTutorial Guide Advanced Topics in IP Addressing
subnet network Addressing Network v1.pdf
Wipro telecom training i pv4 concepts
Subentting, Supernetting and VLSM presentation
chapter 4.pptx
3_IP_Address-RP. By bsnl rttc Hyderabad pptx
Chapter 8 - IP Subnetting, Troubleshooting and Introduction to NAT 9e
CCNA ppt Day 3
[Ccna] subnetting & vlsm
Chapter_5, Internet Protocol and IP addressing
Subneting.ppt
Classless Interdomain Data Routing CIDR.ppt
IP Addressing and Subnetting
Ip Addressing Basics
Ipv4 address
03 coms 525 tcpip - ip address
IP addressing and Subnetting PPT

More from Kamal Acharya (20)

PPTX
Programming the basic computer
PPTX
Computer Arithmetic
PPTX
Introduction to Computer Security
PPTX
Session and Cookies
PPTX
Functions in php
PPTX
Web forms in php
PPTX
Making decision and repeating in PHP
PPTX
Working with arrays in php
PPTX
Text and Numbers (Data Types)in PHP
PPTX
Introduction to PHP
PPTX
Capacity Planning of Data Warehousing
PPTX
Data Warehousing
PPTX
Search Engines
PPTX
Web Mining
PPTX
Information Privacy and Data Mining
PPTX
Cluster Analysis
PPTX
Association Analysis in Data Mining
PPTX
Classification techniques in data mining
PPTX
Data Preprocessing
PPTX
Introduction to Data Mining and Data Warehousing
Programming the basic computer
Computer Arithmetic
Introduction to Computer Security
Session and Cookies
Functions in php
Web forms in php
Making decision and repeating in PHP
Working with arrays in php
Text and Numbers (Data Types)in PHP
Introduction to PHP
Capacity Planning of Data Warehousing
Data Warehousing
Search Engines
Web Mining
Information Privacy and Data Mining
Cluster Analysis
Association Analysis in Data Mining
Classification techniques in data mining
Data Preprocessing
Introduction to Data Mining and Data Warehousing

Recently uploaded (20)

PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
Empowerment Technology for Senior High School Guide
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
Hazard Identification & Risk Assessment .pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
Practical Manual AGRO-233 Principles and Practices of Natural Farming
What if we spent less time fighting change, and more time building what’s rig...
LDMMIA Reiki Yoga Finals Review Spring Summer
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Empowerment Technology for Senior High School Guide
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
AI-driven educational solutions for real-life interventions in the Philippine...
Hazard Identification & Risk Assessment .pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
A powerpoint presentation on the Revised K-10 Science Shaping Paper
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
B.Sc. DS Unit 2 Software Engineering.pptx

Network Layer

  • 31. Classless Inter-Domain Routing (CIDR) • Basically the method that ISPs (Internet Service Providers) use to allocate an amount of addresses to a company, a home • Ex : 192.168.10.32/28 • The slash notation (/) means how many bits are turned on (1s)
  • 33. 11111111 Determining Available Host Addresses 172 16 0 0 10101100 00010000 00000000 00000000 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 Network Host 00000000 00000001 11111111 11111111 11111111 11111110 ... ... 00000000 00000011 11111101 1 2 3 65534 65535 65536 – ... 2 65534 N 2N – 2 = 216 – 2 = 65534
  • 34. IP Address Classes Exercise Address Class Network Host 10.2.1.1 128.63.2.100 201.222.5.64 192.6.141.2 130.113.64.16 256.241.201.10
  • 35. IP Address Classes Exercise Answers Address Class Network Host 10.2.1.1 128.63.2.100 201.222.5.64 192.6.141.2 130.113.64.16 256.241.201.10 A B C C B Nonexistent 10.0.0.0 128.63.0.0 201.222.5.0 192.6.141.0 130.113.0.0 0.2.1.1 0.0.2.100 0.0.0.64 0.0.0.2 0.0.64.16
  • 36. • Network 172.16.0.0 172.16.0.0 Addressing Without Subnets 172.16.0.1 172.16.0.2 172.16.0.3 …... 172.16.255.253 172.16.255.254
  • 37. • Network 172.16.0.0 Addressing with Subnets 172.16.1.0 172.16.2.0 172.16.3.0 172.16.4.0
  • 39. Subnet Addressing 172.16.2.200 172.16.2.2 172.16.2.160 172.16.2.1 172.16.3.5 172.16.3.100 172.16.3.150 172.16.3.1 E0 E1 172.16 2 160 Network Host . . Network Interface 172.16.2.0 172.16.3.0 E0 E1 New Routing Table Subnet
  • 40. Subnet Mask Exercise Address Subnet Mask Class Subnet 172.16.2.10 10.6.24.20 10.30.36.12 255.255.255.0 255.255.240.0 255.255.255.0
  • 41. Subnet Mask Exercise Answers Address Subnet Mask Class Subnet 172.16.2.10 10.6.24.20 10.30.36.12 255.255.255.0 255.255.240.0 255.255.255.0 B A A 172.16.2.0 10.6.16.0 10.30.36.0
  • 43. Exercise • 192.168.10.0 • /27 ? – SNM ? – Block Size ?- Subnets
  • 44. Exercise • /27 ? – SNM – 224 ? – Block Size = 256-224 = 32 ?- Subnets Subnets 10.0 10.32 10.64 FHID 10.1 10.33 LHID 10.30 10.62 Broadcast 10.31 10.63
  • 45. Exercise • 192.168.10.0 • /30 ? – SNM ? – Block Size ?- Subnets
  • 46. Exercise • /30 ? – SNM – 252 ? – Block Size = 256-252 = 4 ?- Subnets Subnets 10.0 10.4 10.8 FHID 10.1 10.5 LHID 10.2 10.6 Broadcast 10.3 10.7
  • 47. Exercise Mask Subnets Host /26 ? ? ? /27 ? ? ? /28 ? ? ? /29 ? ? ? /30 ? ? ?
  • 48. Exercise Mask Subnets Host /26 192 4 62 /27 224 8 30 /28 240 16 14 /29 248 32 6 /30 252 64 2
  • 54. Class B 172.16.0.0 /19 Subnets ? Hosts ? Block Size ?
  • 55. Class B 172.16.0.0 /19 Subnets 23 = 8 Hosts 213 -2 = 8190 Block Size 256-224 = 32 Subnets 0.0 32.0 64.0 96.0 FHID 0.1 32.1 64.1 96.1 LHID 31.254 63.254 95.254 127.254 Broadcast 31.255 63.255 95.255 127.255
  • 56. Class B 172.16.0.0 /27 Subnets ? Hosts ? Block Size ?
  • 57. Class B 172.16.0.0 /27 Subnets 211 = 2048 Hosts 25 -2 = 30 Block Size 256-224 = 32 Subnets 0.0 0.32 0.64 0.96 FHID 0.1 0.33 0.65 0.97 LHID 0.30 0.62 0.94 0.126 Broadcast 0.31 0.63 0.95 0.127
  • 58. Class B 172.16.0.0 /23 Subnets ? Hosts ? Block Size ?
  • 59. Class B 172.16.0.0 /23 Subnets 27 = 128 Hosts 29 -2 = 510 Block Size 256-254 = 2 Subnets 0.0 2.0 4.0 6.0 FHID 0.1 2.1 4.1 6.1 LHID 1.254 3.254 5.254 7.254 Broadcast 1.255 3.255 5.255 7.255
  • 60. Class B 172.16.0.0 /24 Subnets ? Hosts ? Block Size ?
  • 61. Class B 172.16.0.0 /24 Subnets 28 = 256 Hosts 28 -2 = 254 Block Size 256-255 = 1 Subnets 0.0 1.0 2.0 3.0 FHID 0.1 1.1 2.1 3.1 LHID 0.254 1.254 2.254 3.254 Broadcast 0.255 1.255 2.255 3.255
  • 62. Class B 172.16.0.0 /25 Subnets ? Hosts ? Block Size ?
  • 63. Class B 172.16.0.0 /25 Subnets 29 = 512 Hosts 27 -2 = 126 Block Size 256-128 = 128 Subnets 0.0 0.128 1.0 1.128 2.0 2.128 FHID 0.1 0.129 1.1 1.129 2.1 2.129 LHID 0.126 0.254 1.126 1.254 2.126 2.254 Broadcast 0.127 0.255 1.127 1.255 2.127 2.255
  • 64. Find out Subnet and Broadcast Address • 172.16.85.30/29
  • 65. Find out Subnet and Broadcast Address • 172.30.101.62/23
  • 66. Find out Subnet and Broadcast Address • 172.20.210.80/24
  • 67. Class A 10.0.0.0 /10 Subnets ? Hosts ? Block Size ?
  • 68. Class A 10.0.0.0 /10 Subnets 22 = 4 Hosts 222 -2 = 4194302 Block Size 256-192 = 64 Subnets 10.0 10.64 10.128 10.192 FHID 10.0.0.1 10.64.0.1 10.128.0.1 10.192.0.1 LHID 10.63.255.254 10.127.255.254 10.191.255.254 10.254.255.254 Broadcast 10.63.255.255 10.127.255.255 10.191.255.255 10.254.255.255
  • 69. Class A 10.0.0.0 /18 Subnets ? Hosts ? Block Size ?
  • 70. Class A 10.0.0.0 /18 Subnets 210 = 1024 Hosts 214 -2 = 16382 Block Size 256-192 = 64 Subnets 10.0.0.0 10.0.64.0 10.0.128.0 10.0.192.0 FHID 10.0.0.1 10.0.64.1 10.0.128.1 10.0.192.1 LHID 10.0.63.254 10.0.127.254 10.0.191.254 10.0.254.254 Broadcast 10.0.63.255 10.0.127.255 10.0.191.255 10.0.254.255
  • 71. VLSM(Variable Length Subnet Mask) • VLSM extends classic subnetting. • VLSM is a process of breaking down subnets into the smaller subnets, according to the need of individual networks.
  • 72. VLSM  An organization with a class C address and needs to have 5 subnets with the following number of hosts: 60, 60, 60, 30, 30.  The site cannot use a subnet mask with only 2 bits in the subnet section because this allows only 4 subnetworks each 62.  Nor can the site use a subnet mask with 3 bits in the subnet section because this allows 8 subnetworks each with 30 hosts.
  • 73. VLSM  The router uses 2 different masks, one applied after the other.  It first uses the masks with 26 1s(11111111 11111111 11111111 11000000 or 255.255.255.192) to divide the network into 4 subnets.  Then it applies the mask with 27 1s (11111111 11111111 11111111 11100000 or 255.255.255.224) to one of the subnets to divide it into two smaller subnets.
  • 76. • If an ISP has a 200.1.1.0 Network, he wants to give assign to 5 customers who need 20, 12, 6, 25, 18 hosts. – What should the subnet mask be? – What is the address range in each subnet? – What should the routing table entries be? – Can it be done efficiently to conserve IP addresses? Question
  • 79. Supernetting • Supernets are the opposite of Subnets in that they combine multiple Class C networks into blocks rather than dividing them into segments. • When Subnetting, we borrow bits from the Host ID portion, which increases the number of bits used for the Network ID portion. • With Supernetting we do exactly the opposite, meaning we take the bits from the Network ID portion and give them to the Host ID portion
  • 80. Supernet Masks  A supernet mask is the reverse of the subnet mask.  In a supernet mask, we change some 1s in the netid section to 0s.
  • 81. Example • With the supernet mask of 255.255.252.0 we can have 4 class C address combined into one supernetwork. • If we choose the first address to be X.Y.32.0, the other three addresses are X.Y.33.0, X.Y.34.0, and X.Y.35.0. • Whenever the router receives a packet, it applies the supernet mask to the destination address and compares the result to the lowest address. If the result and the lowest address are the same, the packet belongs to the supernet.
  • 84. NAT: network address translation 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 138.76.29.7 local network (e.g., home network) 10.0.0/24 rest of Internet datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual) all datagrams leaving local network have same single source NAT IP address: 138.76.29.7,different
  • 85. motivation: local network uses just one IP address as far as outside world is concerned: – range of addresses not needed from ISP: just one IP address for all devices – can change addresses of devices in local network without notifying outside world – can change ISP without changing addresses of devices in local network – devices inside local net not explicitly addressable, visible by outside world (a security plus) NAT: network address translation
  • 86. implementation: NAT router must: – outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #) – remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair – incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table NAT: network address translation
  • 87. 10.0.0.1 10.0.0.2 10.0.0.3 S: 10.0.0.1, 3345 D: 128.119.40.186, 80 1 10.0.0.4 138.76.29.7 1: host 10.0.0.1 sends datagram to 128.119.40.186, 80 NAT translation table WAN side addr LAN side addr 138.76.29.7, 5001 10.0.0.1, 3345 …… …… S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 S: 138.76.29.7, 5001 D: 128.119.40.186, 802 2: NAT router changes datagram source addr from 10.0.0.1, 3345 to 138.76.29.7, 5001, updates table S: 128.119.40.186, 80 D: 138.76.29.7, 5001 3 3: reply arrives dest. address: 138.76.29.7, 5001 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345 NAT: network address translation
  • 92. IGMP(Internet Group Management Protocol) • IGMP is a protocol that manages group membership. • The IGMP protocol gives the multicast routers information about the membership status of hosts (routers) connected to the network.
  • 93. Position of IGMP in network layer
  • 94. IGMP is a group management protocol. It helps a multicast router create and update a list of loyal members related to each router interface. Note:
  • 96. • aggregate routers into regions, “autonomous systems” (AS) • routers in same AS run same routing protocol – “intra-AS” routing protocol – routers in different AS can run different intra- AS routing protocol gateway router: • at “edge” of its own AS • has link to router in another AS Hierarchical routing
  • 97. 3b 1d 3a 1c 2a AS3 AS1 AS2 1a 2c 2b 1b Intra-AS Routing algorithm Inter-AS Routing algorithm Forwarding table 3c Interconnected ASes  forwarding table configured by both intra- and inter-AS routing algorithm  intra-AS sets entries for internal dests  inter-AS & intra-AS sets entries for external dests
  • 98. Inter-AS tasks  suppose router in AS1 receives datagram destined outside of AS1:  router should forward packet to gateway router, but which one? AS1 must: 1. learn which dests are reachable through AS2, which through AS3 2. propagate this reachability info to all routers in AS1 job of inter-AS routing! AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks
  • 99. Intra-AS Routing also known as interior gateway protocols (IGP) most common intra-AS routing protocols:  RIP: Routing Information Protocol  OSPF: Open Shortest Path First  IGRP: Interior Gateway Routing Protocol (Cisco proprietary)
  • 100. OSPF (Open Shortest Path First) • “open”: publicly available • uses link state algorithm – route computation using Dijkstra’s algorithm • OSPF advertisement carries one entry per neighbor • advertisements flooded to entire AS – carried in OSPF messages directly over IP
  • 101. OSPF “advanced” features (not in RIP) • security: all OSPF messages authenticated (to prevent malicious intrusion) • multiple same-cost paths allowed (only one path in RIP) • for each link, multiple cost metrics for different TOS(Type Of Service) • integrated uni- and multicast support • hierarchical OSPF in large domains.
  • 102. Internet inter-AS routing: BGP • BGP (Border Gateway Protocol): the de facto inter-domain routing protocol – “glue that holds the Internet together” • BGP provides each AS a means to: – eBGP: obtain subnet reachability information from neighboring ASs. – iBGP: propagate reachability information to all AS- internal routers. – determine “good” routes to other networks based on reachability information and policy. • allows subnet to advertise its existence to rest of Internet: “I am here”
  • 103. BGP basics • when AS3 advertises a prefix to AS1: – AS3 promises it will forward datagrams towards that prefix – AS3 can aggregate prefixes in its advertisement AS3 AS2 3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks  BGP session: two BGP routers (“peers”) exchange BGP messages:  advertising paths to different destination network  exchanged over semi-permanent TCP connections BGP message
  • 104. BGP basics: distributing path information AS3 AS2 3b 3a AS1 1c 1a 1d 1b 2a 2c 2b other networks other networks  using eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1.  1c can then use iBGP do distribute new prefix info to all routers in AS1  1b can then re-advertise new reachability info to AS2 over 1b-to-2a eBGP session  when router learns of new prefix, it creates entry for prefix in its forwarding table. eBGP session iBGP session
  • 105. IPv6: motivation • initial motivation: 32-bit address space soon to be completely allocated. • additional motivation: – header format helps speed processing/forwarding – header changes to facilitate QoS IPv6 datagram format: – fixed-length 40 byte header – no fragmentation allowed
  • 106. IPv6 datagram format priority: identify priority among datagrams in flow flow Label: identify datagrams in same “flow.” (concept of“flow” not well defined). next header: identify upper layer protocol for data data destination address (128 bits) source address (128 bits) payload len next hdr hop limit flow labelpriver 32 bits
  • 107. Other changes from IPv4 • checksum: removed entirely to reduce processing time at each hop • options: allowed, but outside of header, indicated by “Next Header” field • ICMPv6: new version of ICMP – additional message types, e.g. “Packet Too Big
  • 108. Transition from IPv4 to IPv6 • not all routers can be upgraded simultaneously – no “flag days” – how will network operate with mixed IPv4 and IPv6 routers? • tunneling: IPv6 datagram carried as payload in IPv4 datagram among IPv4 routers IPv4 source, dest addr IPv4 header fields IPv4 datagram IPv6 datagram IPv4 payload UDP/TCP payload IPv6 source dest addr IPv6 header fields
  • 109. Tunneling physical view: IPv4 IPv4 A B IPv6 IPv6 E IPv6 IPv6 FC D logical view: IPv4 tunnel connecting IPv6 routers E IPv6 IPv6 FA B IPv6 IPv6
  • 110. flow: X src: A dest: F data A-to-B: IPv6 Flow: X Src: A Dest: F data src:B dest: E B-to-C: IPv6 inside IPv4 E-to-F: IPv6 flow: X src: A dest: F data B-to-C: IPv6 inside IPv4 Flow: X Src: A Dest: F data src:B dest: E physical view: A B IPv6 IPv6 E IPv6 IPv6 FC D logical view: IPv4 tunnel connecting IPv6 routers E IPv6 IPv6 FA B IPv6 IPv6 Tunneling IPv4 IPv4
  • 111. IPv6: adoption • US National Institutes of Standards estimate [2013]: – ~3% of industry IP routers – ~11% of US gov’t routers • Long (long!) time for deployment, use – 20 years and counting! – think of application-level changes in last 20 years: WWW, Facebook, … – Why?