ip address assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · a...

50
IP Address Assignment An IP address does not identify a specific computer. Instead, each IP address identifies a connection between a computer and a network. A computer with multiple network connections (e.g., a router) must be assigned one IP address for each connection.

Upload: others

Post on 26-May-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

IP Address Assignment

An IP address does not identify a specific computer. Instead, each IP address identifies a connection between a computer and a network. A computer with multiple network connections (e.g., a router) must be assigned one IP address for each connection.

Page 2: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

IP Address Details

Divided into two parts– Prefix identifies network

– Suffix identifies host

Global authority assigns unique prefix to network

Local administrator assigns unique suffix to host

Page 3: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Original Classes Of Addresses

Initial bits determine class

Class determines boundary between prefix and suffix

Page 4: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Dotted Decimal Notation

Shorthand for IP address

Allows humans to avoid binary

Represents each octet in decimal separated by dots

NOT the same as names like www.somewhere.com

Page 5: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Example Of Dotted Decimal Notation

Four decimal values per 32-bit address

Each decimal number– Represents eight bits

– Is between 0 and 255

Page 6: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Classful Addresses And Network Sizes

Maximum network size determined by class of address

Class A large

Class B medium

Class C small

Page 7: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Addressing Example

Page 8: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Illustration Of Router Addresses

Address prefix identifies network

Need one router address per connection

Page 9: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Special Addresses

Network address not used in packets

Loopback never leaves local computer

Page 10: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Subnet And Classless Addressing

Not part of original scheme

Invented to prevent address exhaustion

Allow boundary between prefix and suffix to occur on arbitrary bit boundary

Require auxiliary information to identify boundary

Page 11: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Address Mask

Accompanies IP address

32 bit binary value

Specifies prefix / suffix boundary– 1 bits cover prefix

– 0 bits cover suffix

Example: class B mask is

255 . 255 . 0 . 0

Page 12: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Subnet Addressing

Goal: extend address space

Invented in 1980s

Works within a site

Technique– Assign single network prefix to site

– Divide suffix into two parts: network at site and host

Typical use: divide class B address

Page 13: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Example Of Subnet Addressing

Single Class B number such as 128.10.0.0 assigned to site

Site chooses subnet boundary such as 24 bits

Routers and hosts configured with corresponding subnet mask

M = 255.255.255.0

Given destination address, D, extract prefix with ‘‘logical and’’ operation

D & M

Page 14: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Classless Addressing

Goal: extend address space

Invented in 1990s

Works throughout Internet

Accommodates– Original classful addresses

– Subnet addresses

– Other forms

Page 15: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Classless Addressing (continued)

Technique– Allow arbitrary prefix size

– Represent network address as pair ( address , mask_size )

Known as Classless Inter-Domain Routing (CIDR)

Page 16: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

CIDR

Uses slash notation

Example

128.211.0.0/17

means that the boundary between prefix and suffix occurs after the first 17 bits.

Each network can be as large or small as needed (power of two)

Page 17: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Motivation ForIP Packets

Because it can connect heterogeneous networks, a router cannot transmit a copy of a frame that arrives on one network across another. To accommodate heterogeneity, an internet must define a hardware-independent packet format.

Page 18: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Internet Packets

Abstraction

Created and understood only by software

Contains sender and destination addresses

Size depends on data being carried

Called IP datagram

Page 19: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

The Two Parts Of An IP Datagram

Header– Contains destination address

– Fixed-size fields

Payload– Variable size up to 64K

– No minimum size

Page 20: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Datagram Header

Three key fields– Source IP address

– Destination IP address

– Type (contents)

Page 21: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

IP Datagram Forwarding

Performed by routers

Similar to WAN forwarding– Table-driven

– Entry specifies next hop

Unlike WAN forwarding– Uses IP addresses

– Next-hop is router or destination

Page 22: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Example Of An IP Routing Table

Table (b) is for center router in part (a)

Page 23: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Routing Table Size

Because each destination in a routing table corresponds to a network, the number of entries in a routing table is proportional to the number of networks in an internet.

Page 24: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Datagram Forwarding

Given a datagram

Extract destination address field, D

Look up D in routing table

Find next-hop address, N

Send datagram to N

Page 25: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Key Concept

The destination address in a datagram header always refers to the ultimate destination. When a router forwards the datagram to another router, the address of the next hop does not appear in the datagram header.

Page 26: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

IP Semantics

IP is connectionless– Datagram contains identity of destination

– Each datagram sent/handled independently

Routes can change at any time

Page 27: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

IP Semantics(continued)

IP allows datagrams to be– Delayed

– Duplicated

– Delivered out of order

– Lost

Called best effort delivery

Motivation: accommodate all possible networks

Page 28: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

PART XII

Internetworking Part 4

(Transport Protocols, UDP and TCP, Protocol Port

Numbers)

Page 29: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Transport Protocol

Separate layer of protocol stack

Conceptually between– Applications

– IP

Page 30: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Terminology

IP– Provides computer-to-computer communication

– Source and destination addresses are computers

– Called machine-to-machine

Transport protocols– Provide application-to-application communication

– Need extended addressing mechanism to identify applications

– Called end-to-end

Page 31: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Transport Protocol Functionality

Identify sending and receiving applications

Optionally provide– Reliability

– Flow control

– Congestion control

Note: not all transport protocols provide above facilities

Page 32: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Relationship Between TransportProtocols And Other Protocols

Transport protocols are end-to-end

Transport protocol on one computer uses IP to communicate with transport protocol on another computer

Page 33: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Two Transport Protocols Available

Transmission Control Protocol (TCP)

User Datagram Protocol (UDP)

Major differences– Interface provided to applications

– Underlying functionality

Page 34: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

User Datagram Protocol

Lightweight transport

Becoming more popular (IP telephony)

Best-effort delivery

Page 35: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

UDP Features

Connectionless service

Arbitrary interaction

Message-oriented interface

Best-effort semantics

Each message encapsulated in IP datagram

Uses protocol ports to identify applications

Page 36: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

UDP Details

Accepts and delivers messages– Message received is exactly same as message

sent

– Boundaries preserved

Maximum message size approximately 64K octets Efficient– No connection overhead

– No state information maintained

Page 37: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

UDP Semantics

Same best-effort semantics as IP (i.e., unreliable transfer)

Message can be– Lost

– Duplicated

– Delayed

– Delivered out of order

Works best in LAN applications

Page 38: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Interaction With UDP

UDP allows communication that is– 1-to-1

– 1-to-many

– Many-to-1

– Many-to-many

Application programmer chooses

Page 39: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Packet Delivery

UDP can support– Unicast

– Multicast

– Broadcast

Page 40: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

User Datagram Format

Extremely small header (called thin layer)

Checksum optional

Page 41: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

UDP Encapsulation

Two levels of encapsulation

UDP datagram size cannot exceed maximum IP payload

Page 42: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Identifying An Application

Cannot extend IP address– No unused bits

Cannot use OS-dependent quantity– Process ID

– Task number

– Job name

Must work on all computer systems

Page 43: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Identifying An Application(continued)

Invent new abstraction– Called protocol port number

– Used to identify sending or receiving application unambiguously

– Independent of underlying operating system

– Used only with TCP/IP protocols

Page 44: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Protocol Port Numbers

Server– Follows standard

– Always uses same port number

– Uses low port numbers

Client– Obtains unused port from protocol software

– Uses high port numbers

Page 45: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Protocol Port Example

Domain name server application is assigned port 53

Application using DNS obtains port 28900

UDP datagram sent from application to DNS server has– Source port number 28900

– Destination port number 53

When DNS server replies, UDP datagram has– Source port number 53

– Destination port number 28900

Page 46: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Transmission Control Protocol (TCP)

Major transport protocol used in Internet

Heavily used

Completely reliable transfer

Page 47: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

TCP Features

Connection-oriented service

Point-to-point

Full-duplex communication

Stream interface

Stream divided into segments for transmission

Each segment encapsulated in IP datagram

Uses protocol ports to identify applications

Page 48: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

TCP Feature Summary

TCP provides a completely reliable (no data duplication or loss), connection-oriented, full-duplex stream transport service that allows two application programs to form a connection, send data in either direction, and then terminate the connection.

Page 49: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Apparent Contradiction

IP offers best-effort (unreliable) delivery

TCP uses IP

TCP provides completely reliable transfer

How is this possible?

Page 50: IP Address Assignmentvlsi.hongik.ac.kr/lecture/이전 강의 자료/이전... · 2006-09-08 · A computer with multiple network connections (e.g., a router) must be assigned one

Achieving Reliability

Reliable connection startup

Reliable data transmission

Graceful connection shutdown