Shared Flashcard Set


Lecture 4 - The Network Layer and IPv4
Alejandro Saucedo - Comp2008 Lecture 4 FlashCard Set
Computer Networking
Undergraduate 2

Additional Computer Networking Flashcards




What are the functions of the Network Layer?
  • Internetworking
    • The internet as a network of networks
    • Later 2 LANs at the edges, served by routers
    • Routers in core
  • Transmitting
    • Packetising (taking layer 4 header and data, adding layer 3 header)
    • Processing and routing IP datagrams
    • Fragmenting (if necessary where IP datagram > layer 2 MTU)
  • Receiving
    • Error checking
    • Reassembly (If necessary)
What are the properties of IP?
  • Packet-switched, connectionless
  • Unreliable
  • Routing
  • Globally unique, delegated addresses
How is IP packet-switched - is it always connectionless?
  • IP packets routed towards destination at each router on the path
  • It is connectionless, but TCP offers connection-oriented services at layer 4
Why is IP unreliable?
  • Routers forward packets on 'best effort' basis
  • IP packets might get dropped, ususally due to congestion
    • TCP retransmissions are inherently handled
    • With UDP, application layer must handle retransmission
  • Quality of service method can help
    • Prioritise certain traffic
What are the routing properties of IP?
  • Usually based only on destination IP address
  • Routers maintain routing tables to make routing decisions
What are the characteristics of IP being unique?
  • Devices must be globally addressable to initiate IP traffic towards them
  • Private address space (RFC 1918) may be used within sites
What are the properties of an IPv4 packet header?
  • The IP layer takes segments of data from the transport layer
    • Adds IP header to create IP datagram
    • TCP header and data become the data for IP datagram
  • IP datagram header fields include:
    • Source IP address
    • Destination IP address
    • IHL - header length (may vary with IP options)
    • Identification field and fragment offset
    • Time to live
    • IP header checksum
Make a diagram of the IPv4 Header
In which case would IP datagrams undergo fragmentation?

If a link with smaller Maximum Transmission Unit (Layer 2 MTU) is encountered, the IP datagram needs to be broken down into smaller pieces

  • Ethernet typically has an MTU of 1500 bytes
  • In IPv4 hosts and routers can fragment IP datagrams
    • IN IPv6 only sending host may fragment
  • Preferrable to avoid fragmentation


What are some ways of maximising use of address space?
  • Classless Inter-Domain Routing
    • Allows use of any prefix length (not just /8, /16 or /24)
    • ISPs must provide proof of address requirements to RIRs
  • Network address translation (NAT)
    • Use private IPv4 addresses (RFC 1918) internally, global(s) externally
  • Dynamic Host Configuration Protocol (DHCP) leases
    • Allows IP addresses to be reused
Why are IP subnets used?
  • We want to limit propagation of layer 2 broadcast traffic
    • Physical range of layer 2 media may also be limited
      • Even when passed through switches
  • Layer 3 (IP) routers don't forward Layer 2 Broadcasts
  • Large site networks can be broken down into multiple IP subnets, each served at the edge by one router
How is ARP handled between subnets?
When sending packets externally, hosts will run broadcast against default router's IP address, not the destination IP address
Draw a diagram example of a subnet
How can IP Subnets be managed?
  • A site will have an IP allocation
    • e.g. -
    • The allocation is a 16-bit network prefix; the remaining 16 bits can be used for host addresses and internal IP subnets
    • Prefix: <first-network-address>/prefix-length
    • So we would have
  • Administrators can decide how to do the further subneting
    • eg. allocating
What are the IP subnet specifics?
  • Subnet network adderss (First IP in range)
  • Subnet prefix length
  • Subnet mask (The fixed prefix bits for all hosts in the subnet)
  • The subnet IP ¬†broadcast address, for protocols using IP broadcasts

One address is also required for the router

Which are the IP addresses required for an IP subnet to function properly?
  • Network address (First IP in range)
  • IP broadcast Address (Subnet mask)
  • Router address
What is Network Address Translation (NAT)?
  • Is the process of modifying IP address information in IPv4 headers while in transit across a traffic routing device.
  • It is possible to run multiple hosts using private IP addresses behind a NAT device thatuses one or more global IP addresses
  • Use private IP space internally
  • IP headers rewritten as packets traverse NAT device
    • Maps private IPs to globale IPs and vice-versa
What is the dfference between NAT and NAPT
  • The original version of NAT had large pool of devices with private addresses sharing a smaller number of globally unique public addresses (Internal devices were allocated global IPs on demand)
  • Today's NAT has a pool of privately addressed devices sharing one public IP
What does Network Address Port Translation (NAPT) consist of?
  • Has only one public IP address (With many hosts wanting to share it)
  • Router maintains a TCP/UDP port mapping table in addition to address mapping
    • Source port rewritten in addition ot source address as packet travels out to internet
    • Router device needs to maintain table of mappings
    • Applications may need to use 'keepalives' where necessary to avoid the mapping state timeout
Why use Network Address Port Translation (NAPT)?
  • Can share one or more global IP addresses between any number of internal hosts on network
  • Often deployed for
    • Perceived security of private addresses and implicit firewall
    • Topology hiding, and perceived 'ease' of network renumbering
  • Relies hosts behind NAT being client-only
Why is Network Address Port Translation (NAPT) considered bad?
  • Poor scalability due to requiring state information (mapping between global and private IPs/ports) to be held
  • Breaks end to end transparency and security (IPsec) model, because globally unique IPs are not used end to end
  • Has problems if applications embed IP addresses
  • Causes problems if multiple NATed sites merged, if they share common internal private IP addresses
  • Adds a not insignificant cost to support NAT traversal for applications
What is IP fragmentation?
Breaking a datagram into smaller pieces, so that packets may be formed that can pass through a link with a smaller maximum transmission unit (MTU) than the original datagram size.
Supporting users have an ad free experience!