Network-Addressing
Network-Addressing
Network-Addressing
Srinivas Narayana
1
Transport
Transport TC UD
P P
IP
Network
Endpoint
Two key network-layer functions
• Forwarding: move packets from Analogy: taking a road trip
router’s input to appropriate
router output ▪ Forwarding: process of
getting through single
interchange
• Routing: determine route taken
by packets from source to
destination
• routing algorithms ▪ Routing: process of
planning trip from
• The network layer solves the source to destination
routing problem.
4
Data plane and Control Plane
Data plane = Forwarding Control plane = Routing
• local, per-router function • network-wide logic
• determines how datagram arriving • determines how datagram is routed
on router input port is forwarded to along end-to-end path from source to
router output port destination endpoint
• two control-plane approaches:
• Distributed routing algorithm
values in arriving running on each router
packet header
• Centralized routing algorithm
011 1 running on a (logically) centralized
1
3
2 server
CS 352
Internet Addressing
CS 352, Lecture 14.2
http://www.cs.rutgers.edu/~sn624/352
Srinivas Narayana
7
The Internet needs addresses
• Addresses allow endpoints to identify, and hence talk to each other
• E.g., like people have names
• Two methods:
• Old: Classful addressing
• New: Classless addressing (also called classless
inter-domain routing, or CIDR)
Classful IPv4 addressing
Classful IPv4 addressing
Class 32 bits
network host
part part
11001000 00010111 00010000 00000000
200.23.16.0/23
CIDR
•An ISP can obtain a block of addresses and 200.8.0.0/16
partition this further to its customers
•Say an ISP has 200.8.0.0/16 address (65K
addresses).
200.8.0.0
•The ISP has customer who needs only 64 200.8.0.1
addresses starting from 200.8.4.128 200.8.4.128/26
…
•Then that block can be specified as 200.8.1.0
200.8.4.128/26 200.8.1.1
…
•200.8.4.128/26 is “inside” 200.8.0.0/16
200.8.255.255
Netmask (or subnet mask)
• An alternative to denote the IP prefix length of an organization
• 32 bits: a 1-bit denotes a prefix bit position. 0 is the host part.
network host
part part
11001000 00010111 00010000 00000000
200.23.16.0/23
network part Host part of
of mask mask
11111111 11111111 11111110
00000000
Netmask: 255.255.254.0
Detecting addresses from same network
• Given IP addresses A and B, and netmask M.
1. Compute logical AND (A & M).
2. Compute logical AND (B & M).
3. If (A & M) == (B & M) then A and B are
on the same subnet.