You are on page 1of 12

Network Layer: outline

Introduction Routing algorithms


IP: Internet Protocol •  link state
•  datagram format •  distance vector
•  ICMP •  hierarchical routing
•  IPv4 addressing Routing Protocols
•  Classful •  RIP
•  CIDR
•  OSPF
•  NAT, IPv6 •  BGP

Network Layer 3-1


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
•  written in dotted quad
notation
Ø  Interface: connection 223.1.1.3
223.1.3.27
223.1.2.2
between host/router and
physical link
§  router’s typically have
223.1.3.1 223.1.3.2
multiple interfaces
§  host typically has one or
two interfaces (e.g., wired
Ethernet, wireless 802.11) 223.1.1.1 = 11011111 00000001 00000001 00000001
Ø  IP addresses associated
223 1 1 1
with each interface
Network Layer 3-2
Original Class-ful Addresses
R 199 3
no f C ID
n trodu ctio
ll th e i
Used ti

0 8 16 24 31
Class A 0 netid hostid 1.0.0.0 to
127.255.255.255

hostid 128.0.0.0 to
Class B 10 netid
191.255.255.255

Class C 110 netid hostid 192.0.0.0 to


223.255.255.255

Class D 1110 multicast address 224.0.0.0 to


239.255.255.255

reserved for future use 240.0.0.0 to


Class E 1111 255.255.255.255

Network Layer 3-3


Finding the address class

Network Layer 3-4


Masking
Ø  Masking is the process to extract the netid from
an IP address
Ø  Logical and operation is used
Ø  Default mask for each class exists
•  Class A 255.0.0.0
•  Class B 255.255.0.0
•  Class C 255.255.255.0

141.14.0.0
141.14.2.21
Mask
IP Address 255.255.0.0 Network Address

1s 0s
Network Layer 3-5
Special IP Addresses

Private addresses

Ø  Class A
•  10.0.0.0
•  127.0.0.0
Ø  Class B
•  172.16.0.0 to 172.31.0.0
•  169.254.0.0(zero-conf range)
Ø  Class C
•  192.168.0.0

Network Layer 3-6


Subnetting
Ø  Subnetting is the process of dividing the class A, B or C
network into more manageable chunks that are suited
to your network’s size and structure.
Ø  Subnetting allows 3 levels of hierarchy
•  netid, subnetid, hostid
Ø  Original netid remains the same and designates the site
Ø  Subnetting remains transparent outside the site

Network Layer 3-7


Subnetting
Ø  The process of subnetting simply extends the point
where the 1’s of Mask stop and 0’s start
Ø  You are sacrificing some host ID bits to gain Network
ID bits

Network Layer 3-8


Example 1
What is the subnet address if the destination address is
19.30.84.5 and the mask is 255.255.192.0?

Solution

3-9
Example 2
A company is granted the site address 201.70.64.0 (class
C). The company needs six subnets. Design the subnets.

Solution
The company needs six subnets. 6 is not a power of 2.
The next number that is a power of 2 is 8 (23). We need
3 more 1s in the subnet mask. The total number of 1s
in the subnet mask is 27 (24 + 3). The mask is

11111111 11111111 11111111 11100000



or

255.255.255.224

Network Layer 3-10
The number of addresses in each subnet is 25 or 32.

Network Layer 3-11


Subnet with Class B
Subnet Bits Number of Subnets Hosts per Subnets
0 1 65534
2 2 16382
3 6 8190
4 14 4094
5 30 2046
6 62 1022
7 126 510
8 254 254
9 510 126
10 1022 62
11 2046 30
12 4094 14
13 8190 6
14 16382 2
Network Layer 3-12

You might also like