【2023】Computer network (top-down) - network layer

1. Network layer: data plane - forwarding

  • Fundamentals of network access, focusing on its data plane
    • Network service model
    • forwarding and routing
    • How router works
    • Universal forwarding
  • Examples and implementations of network layer protocols in the Internet

network layer services

  • Transferring a segment between a sending host and a receiving host pair
  • Encapsulate segments into datagrams at the sender end
  • At the receiving end, the segment is handed over to the transport layer entity
  • Network layer protocols exist on every host and router
  • The router examines the header of every IP datagram that passes through it

1. Network layer: data plane, control plane

Data plane - forwarding

  • Local, per-router capabilities
  • Determines how packets arriving at the router's input port are forwarded to the output port
  • Forward function:
    • Traditional method: based on target address + forwarding table
    • SDN method: based on multiple fields + flow table

Control plane - routing

  • network-wide logic
  • Determines how datagrams are routed between routers, determining the end-to-end path of datagrams from source to destination host
  • 2 control plane methods:
    • Traditional routing algorithm: implemented in routers
    • SDN (Software Defined Network): implemented in the remote server,

2. Router composition

High-level (very simplified) generic router architecture

  • Routing: Run routing algorithm/protocol (RIP, OSPF, BGP) - generate routing table
  • Forwarding: exchanging datagrams from input and output links - forwarding of packets according to routing tables

Insert image description here

input port buffer

  • When the rate of the switching mechanism is less than the aggregation rate of the input port → there may be queuing at the input port
    • Queuing delays and losses due to input buffer overflow!
  • (HOL) blocking: The datagram at the head of the queue prevents other datagrams in the queue from moving forward.
    • Because of output port competition: only one packet can be delivered and switched to the next output port, and other queues pointing to this output port will be blocked.

datagram switching structure

  1. Swapping via memory
  2. Exchange via bus
    1. Datagrams are forwarded from the input port to the output port through the shared bus
  3. Exchange via Internet (crossbar, etc.)
    1. Multiple groups can be concurrently processed to overcome bus bandwidth limitations.

Insert image description here

3. IP protocol

Main functions of IP protocol:

  • Implemented the forwarding function at the data level
  • Address agreement
  • datagram format
  • Conventions for group processing

Insert image description here
Insert image description here

IP fragmentation and reassembly

  • Network links have MTU (Maximum Transmission Unit) - the maximum length of data carried by link layer frames
    • different link types
    • Different MTU
  • Large IP datagrams are fragmented ("fragmented") across the network
    • A datagram is split into several smaller datagrams
      • Same ID
      • different offsets
      • The last shard is marked 0
    • "Reorganization" is only performed on the final target host
    • The information in the IP header is used to identify and sort related fragments

Subnets

  • IP address
    • Subnet part (high bits)
    • Host part (status bits)
  • What is a subnet?
    • The nodes (hosts or routers) in a subnet have the same high-order part of their IP addresses. The part of the network formed by these nodes is called a subnet.
    • No router intervention is required, and hosts in the subnet can physically reach each other directly.

network transmission

Insert image description here

NAT traversal problem

  1. Directly write the port
  2. Use UPnP protocol
  3. relay

IPv6 header

Insert image description here

and other changes to IPv4

Checksum is removed and lowered

3. Universal forwarding and SDN

Traditional method: belongs to the vertical plane

SDN method: belongs to

SDN Architecture: Data Plane Switch

Data plane switch

  • Fast, simple, commercial switching equipment uses hardware to implement universal forwarding functions
  • The flow table is calculated and installed by the controller
  • Switch for SDN controller access flows based on southbound APIs (e.g. OpenFiow)
    • Defines what can be controlled and what cannot
  • Also defines the protocol with the controller

SDN Controller (Network OS)

  • Maintain network status information
  • Control application exchanges via the above northbound API and network
  • Exchange via the southbound API and network switch below
  • Logically speaking, the machine type, but in implementation, it usually uses a distributed approach due to performance, scalability, and fault tolerance.

2. Network layer: control plane—routing

The specific path is calculated through the routing table, which determines which network path the group should take.

1. Routing algorithm

Routing Protocol

The goal of the routing protocol: to identify the "better" path through the router's network from the sending host to the receiving host (equivalent to the sequence of routers)

  • Path: The sequence of routers along which the packet will travel from the source host to the final destination host.
  • "Better": smallest "cost", "fastest", "least congested"
  • Routing: A "top-10" networking challenge!

2. Routing selection between ISPs: BGP

hierarchical routing

  • Hierarchical routing: Divide the Internet into ASs (router areas)
    • A collection of routers within a certain area, autonomous systems "autonomous systems" (AS)
    • An AS is uniquely identified by AS Number (ASN)
    • An ISP may include one or more ASs
  • Routing becomes: 2 levels of routing
    • AS intra-AS routing: Routers within the same AS run the same router protocol
      • “intra-AS” routing protocol: internal gateway protocol
      • Different ASs may run different interior gateway protocols
      • Able to sister size and management issues
      • Such as: RIP, OSPF, IGRP
      • Gateway router: AS edge router, which can connect to other ASs
    • Running inter-AS routing protocols between ASs
      • “inter-AS” routing protocol:External Gateway Protocol
      • Solve routing problems between ASs and complete interconnection between ASs

Internet inter-AS routing: BGP

  • BGP: the “de facto” standard for inter-autonomous area routing protocols
  • BGP provides the following methods to each AS:
    • eBGP: Obtain subnet reachability information from neighboring ASes
    • iBGP: Transmits the obtained subnet reachability information to all routers within the AS
    • Determine the "good" path to the subnet based on subnet reachability information and policies

Insert image description here

Guess you like

Origin blog.csdn.net/weixin_52315708/article/details/131707693