[Network week4] ARP, IP Headers, Fragmentation, MTU, PMTUD, ICMP

Hailey·2020년 10월 5일
1

Computer Science

목록 보기
6/9

Network Layer Protocol

Protocols at Network Layer

ARP

  • Hosts and routers are recognized at the network layer by IP addresses
    : An IP address is universally unique
  • Hosts and routers are recognized at the data-link layer by MAC addresses
    : A MAC address is locally unique
MACIP
Full formMedia Access ControlInternet Protocol Address
PurposeIt identifies the physical address of computer on the InternetIt identifies connection of a computer on the internet
BitsIt is 48 bits hexadecimal address.IPv4 is a 32-bit address, and IPv6 is a 128-bits address
AddressMAC address is assigned by the manufacturer of NIC cardIP address is assigned by the network administrator or Internet Service Provider.
  • Internet routers move the packets from the source network to the destination network
    : IP address is used to find a path to destination
  • Packets pass through physical networks to reach hosts and routers
    : MAC address is used to move packets between hosts and routers
  • A routing table outputs a next-hop IP address based on destination's IP address
    : Should be able to map an IP address to MAC address

Mapping

  • Static
    -- Create a table that associate IP address with MAC address
    -- Table is stored in each machine
    -- MAC address may change
    --> Change NIC card
    --> A mobile computer roams from network to network
    -- Static mapping table needs to be update periodically
  • Dynamic
    -- A machine knows one of the two addresses
    -- ARP and RARP

ARP Operation

IP(Internet Protocol)

  • Host-to host network layer delivery protocol
  • Unreliable and connectionless datagram protocol
    -- Best-effort delivery service
    -- No errol control nor flow control
    -- Only error detection (If detected, discard packet)
  • Pair with a reliable protocol (TCP) for a reliability

IP Datagram

  • Packets in IP layer are called datagram
  • Variable-length packet with 20 to 60 header size

IP Headers

  • Header length (HLEN) defines the header length in 4-byte words
  • Total length filed defines the total length of the datagram including header
    -- The length of IP datagram is limited to 65,555(2^16-1)
  • Time To Live (TTL) is approximately 2 times the Max. number of routes between two hosts
  • Checksum covers only header not data
    -- Rely on higher-level protocols
    -- Header changes en route not data

Maximum Transfer Unit

  • Data link layer (DLL) protocol defines its Max. size of frame that can be transmitted
    : Ethernet has 1500 bytes
  • IP datagram must be less that Max. size
    : This size defines Maximum Transfer Unit(MTU)
  • Originally, IP has 65,536 bytes
    : We must divide datagram to pass through the network = Fragmentation
    : A datagram can be fragmented by SRC and any routers
    : Reassembly is only done because each fragment becomes independent

Fragmentation

  • Identification (16bits)
    : All fragments have the same identification number
    : Help DST to reassemble
  • Flags (3bits)
    : 1st is reserved
    : 2nd is DF(Don't Fragment)
    : 3rd is MF(More Fragment)
  • Fragmentation Offset (13bits)
    : Relative position with respect to whold datagram
    : Measured in units of 8 bytes

Fragmentation Example

  • Datagram with 400 bytes
  • MTU 1420 bytes

Notes on Fragmentation

  • Performance
    : Single fragment lost means entire packet useless
    : Waste of resources all along the way
  • Don't Fragment (DF) bit set
    : Datagram discarded if need to fragment
    : ICMP message generated
    -- May spefify MTU
    : Used to determine Path MTU (both in TCP, UDP)
  • Transport and application layer headers do not appear in all fragments.
    : Problem if you peep into those headers

Path MTU Discovery (PMTUD)

  • The longer the MTU the better for performance, but the worse for reliability
    : Lost packet means more data to be retransmitted
  • IP fragmentation has serious disadvantages
    : It's avoided in practice using DF
  • What does router do if it can't deliver a packet and can't fragment it either
    : ICMP sent to SRC
    : SRC adjusts the packet size accordingly

Options

  • Headers of IPv4 is made of 2 parts
    : Fixed and variable
    : Variable part comprises options that can be maximum of 40 bytes to preserve boundary of header
  • Option is not required
    : Can be used for network testing and debugging

Discussion on IP Header

  • If fragmentation is going to be avoided all the time, why not have 4- bytes of fragmentation info as an IP option?
  • Is 32-bit address going to be enough?
  • Why mess with variable length headers?
    : Can the variability in header length be controlled to allow better encoding?
  • Are the IP options really that useful? Why variable length option headers?
  • Many of these issues addressed in IPv6

ICMP (Internet Control Message Protocol)

  • No error-reporting or error-correcting mechanism in IP
    " What if route must discard a datagram
  • Lack of mechanism for host and management queries
    : For example, determining if a router is alive

Error control

  • Not guarantee successful delivery of every datagram
  • May be discarded a number of reasons
    -- TTL expiration
    -- Congestion
    -- FCS error
    : Not possible to return as SRC address may be damaged
  • If datagram is discarded by router, router should attempt to return some information to SRC
    : SRC may use this information to modify transmission strategy

Flow control

  • Router and/or receiving station limit the rate at which they receive data
    : Not mandatory and so very limited iin use
  • Router sends flow control packets to request reducing data flow to other routers and SRC

ICMP Encapsulation

  • ICMP is a network layer protocol
    : But not passed directly to the data link layer
    : Encapsulated inside IP datagrams first

Types of Messages

  • Error-reporting messages and query messages
  • ICMP always reports error messages to the original source

Tunneling

Virtual Private Network

IP-in-IP Tunnel

  • Encapsulates IP packets in IP to make a tunnel between two routers

profile
Business & Software 💗🌎

0개의 댓글