View
217
Download
1
Tags:
Embed Size (px)
Citation preview
John Chuang 2
Network Layer
Application (layer 7): specific to application need
Transport (layer 4): end-to-end delivery, congestion and flow control
Network (layer 3): addressing, routing
Data Link (layer 2): framing, error detection
Physical (layer 1): bits (0/1), voltages, frequencies, wires, pins, …
IP
TCP, UDP
HTTP, FTP, NNTP, SMTP,
telnet, ...
coax, twisted pair, fiber,
wireless, ...
Ethernet
FDDI, SONET
Wi-Fi
John Chuang 3
L3 Outline
Addressing: - Internet Protocol (IP): address notation; address allocation; address translation
Packet switching:- Routing: BGP, OSPF, RIP- Packet forwarding: IP fragmentation, TTL, …
Extensions:- IP Multicast; QoS; Mobile IP; IPSec; …
Evolution:- IPv6
John Chuang 4
Internet Protocol
Supports two main functions:- Addressing- Packet switching (routing)
Allows packets to traverse multiple networks - hence the term “inter-networking”
Delivers packet to specified destination host
Best effort service model- deliver as reliably and as soon as it can
John Chuang 5
IP Does Not:
Guarantee latency for packets that are delivered
Guarantee delivery, or notify source host if packet is not delivered
Guarantee order of delivery Guarantee integrity of packet payload Maintain conversational context (each packet is independent)
Specify process that should receive the packet at destination host
John Chuang 6
“Definition” of the Internet"Internet" refers to the global information system that -- - (i) is logically linked together by a globally unique address space based on the Internet Protocol (IP) or its subsequent extensions/follow-ons;
- (ii) is able to support communications using the Transmission Control Protocol/Internet Protocol (TCP/IP) suite or its subsequent extensions/follow-ons, and/or other IP-compatible protocols; and
- (iii) provides, uses or makes accessible, either publicly or privately, high level services layered on the communications and related infrastructure described herein.
Resolution passed by the Federal Networking Council (FNC) October 24, 1995
John Chuang 7
IP Address
An IP address identifies a network interface, i.e., a connection between a computer and a network, not a specific computer.- A computer with multiple network interfaces (e.g., a router) must be assigned one IP address for each interface.
IP (version 4) addresses are 32 bits long- 232 = 4,294,967,296 unique IPv4 addresses
IPv6 addresses are 128 bits long- 2128 =
340,282,366,920,938,463,463,374,607,431,768,211,455 = 3.4*10^38 unique IPv6 addresses
John Chuang 8
Dotted Decimal Notation
Represent each byte (8 bits) in decimal separated by dots
128 32 226 87
Hostname: www.ischool.berkeley.edu IP address: 128.32.226.87
0 16 318 24
1 0 0 0 0 0 0 00 0 1 0 0 0 0 01 1 1 0 0 0 1 00 1 0 1 0 1 1 1
Domain Name Service (DNS) performs translation
John Chuang 9
Example of Dotted Decimal Notation
Four decimal values per 32-bit address
Each decimal number- Represents eight bits- Is between 0 and 255
John Chuang 10
IP Address
Divided into two parts- Prefix identifies network- Suffix identifies host
Global authority (IANA) assigns unique prefix to network
Local administrator assigns unique suffix to host
John Chuang 11
Illustration of Router Addresses
Routers usually have multiple IP addresses- One address needed for each network interface- Address prefix identifies network
John Chuang 13
Original Classes of Addresses
Initial bits determine classClass determines boundary between prefix and suffix
John Chuang 14
IP Addresses
Class From To
A 0.0.0.0 127.255.255.255
B 128.0.0.0 191.255.255.255
C 192.0.0.0 223.255.255.255
D 224.0.0.0 239.255.255.255
E 240.0.0.0 255.255.255.255
John Chuang 15
Classful Addresses and Network Sizes
Maximum network size determined by class of address
Class A large (mostly assigned or reserved)
Class B medium (mostly assigned) Class C small
John Chuang 16
IP Address Exhaustion
32 bit address space not enough- Exacerbated by inefficient allocation of addresses
Several approaches to deal with problem:- Increase IP address length (IPv6)- Overcome inefficient address allocation
- Subnetting- Classless inter-domain routing (CIDR)
- Allow sharing of addresses- Network Address Translation (NAT)- Dynamic Address Allocation (DHCP)
John Chuang 17
Subnetting
Problem:- Class A and class B address blocks have too many host ID’s allocated (tremendous waste of addresses)
- Can we support multiple physical networks (subnets) within a single class A or class B address block?
Solution: External routing based on Network ID
Internal routing based on Subnet ID
- Significantly reduces the number of entries required in Internet routing tables.
John Chuang 18
Subnetting Host ID portion is divided into subnet ID and host ID Routers and hosts use a subnet mask to separate the
subnet id from the host id. Example: supporting 256 subnets within a class B
network
Network ID Host ID16
Subnet ID Host ID
16
8 8
IP address (Class B)
Network ID16
Subnet ID Host ID8 8
IP address (Class B)
11111111111111111111111124
000000008
Subnet mask (255.255.255.0)
John Chuang 19
Example: Router Operation with Subnet Mask Router R:
- Receives incoming IP packet (128.32.226.87)
- Applies subnet mask (255.255.255.0) via logical AND operation
- Gets result (128.32.226.0)
- Also applies subnet mask to its own addresses (one on each subnet)- Gets: 128.32.1.0, 128.32.226.0
- There is a match (128.32.226.0)
- Router delivers to host on that network
Internet
128.32.1.0 128.32.226.0
128.32.0.1
128.32.226.1128.32.1.1
128.32.226.87128.32.1.87
128.32.0.0
R
John Chuang 20
Classless Inter-Domain Routing (CIDR) Drops notion of fixed classes Represent network address as: <address/prefix_size>- E.g., 65.0.0.0/8 or simply 65/8; 192.1.2.0/22
Prefix_size is length of “network id” field (in bits)
CIDR allows arbitrary prefix size- Each network can be as large or small as needed (power of two)
Backward-compatible with network classes:- Class A networks have prefix size of 8- Class B networks have prefix size 16- Class C networks have prefix size 24
John Chuang 21
CIDR Example
Combining four class C networks- 192.1.4.0/24- 192.1.5.0/24- 192.1.6.0/24- 192.1.7.0/24- First two can be combined as: 192.1.4.0/23
- Last two can be combined as: 192.1.6.0/23
- All four can be combined as: 192.1.4.0/22
John Chuang 23
Network Address Translation
Network Address Translators (NATs) allow multiple hosts within a local network to share a single IP address
From outside perspective, the network appears as a single end host
Can use arbitrary IP address scheme within network- Typically: 10.0.0.0 or 192.168.0.0
Most common implementation is actually Network Address and Port Translation (NAPT)- Maps internal <address, port> to external <address, port> where ports are transport layer (Layer 4) addresses
- Incorporated into most residential gateway routers today- Controversial because it violates layering principle