Basic of 4 Network Layer - 1 Data Plane
Basic of 4 Network Layer - 1 Data Plane
IP packet
IP header IP payload
Protocol (8 bits)
Identifies the higher-level (Transport layer, TCP or
UDP)protocol
Important for receiving host, send the data in
received IP packet to which protocol in transport layer
L3 Network IP
Protocol (8 bits)
examples
E.g., “6” for the Transmission Control Protocol (TCP)
E.g., “17” for the User Datagram Protocol (UDP)
protocol=6 protocol=17
IP header IP header
TCP header UDP header
5
Preventing loops (TTL)
interface 223.1.1.2
223.1.1.4 223.1.2.9
interface: connection
between host/router and
physical link
223.1.3.27
223.1.1.3
223.1.2.2
• router’s typically have
multiple interfaces
• host typically has one or two
interfaces (e.g., wired 223.1.3.1 223.1.3.2
223 1 1 1
Subnets
called a subnet
subnet
223.1.3.1 223.1.3.2
223.1.3.0/24
subnet mask: /24
Leftmost(most significant) X bits out of 32 bit defines the subnet address:
Here: 223.1.1.xxx 11011111.00000001.00000001.xxxxxxxx
Subnets 223.1.1.2
Hint:
consider subnet mask /24 (i.e. fix 223.1.9.2 223.1.7.0
first three bytes = 24 bits)
Answer:
6 subnets
223.1.9.1 223.1.7.1
223.1.8.1 223.1.8.0
223.1.2.6 223.1.3.27
For example:
192.168.0.0 with mask
255.255.255.0 (in decimal)
11111111. 11111111. 11111111.00000000 (in binary)
(24 1s (means subnet part is 24 bits) and
8 0s (means host part is 8bits) )
Same as:
192.168.0.0/24 in CIDR notation,
/24 Means:
leftmost 24 bits is subnetwork part,
Other 32-24=8bits are hosts part, which means in this subnet
have 254 hosts(8 bits for host part, 28-2=256-2=254).
ARP: address resolution protocol
transfer IP address to MAC address
Question: how to determine
interface’s MAC address,
knowing its IP address? ARP table: each node (host,
router) on LAN has ARP table
137.196.7.78
• IP/MAC address
mappings for some LAN
1A-2F-BB-76-09-AD
nodes:
137.196.7.23
137.196.7.14
< IP address; MAC address; TTL>
• TTL (Time To Live):
LAN time after which address
71-65-F7-2B-08-53 mapping will be
58-23-D7-FA-20-B0
forgotten (typically 20
min)
0C-C4-11-6F-E3-98
137.196.7.88
How is ARP protocol working?