CAN201-Computer Network(2)

news2024/9/28 15:22:02

文章目录

  • 4. Network Layer
    • 4.1 Router
      • 4.1.1 Input port functions
      • 4.1.2 Destination-based forwarding
      • 4.1.3 Switching fabrics
      • 4.1.4 Input port queueing
      • 4.1.5 Output ports
    • 4.2 Internet Protocol
      • 4.2.1 IP fragmentation, reassembly
    • 4.3 IPv4 addressing
      • 4.3.1 Subnets
      • 4.3.2 Network Classes
      • 4.3.3 CIDR
      • 4.3.4 DHCP
      • 4.3.5 Hierarchical addressing
    • 4.4 NAT
    • 4.5 IPv6
      • 4.5.1 IPv6 datagram format:
      • 4.5.22 Transition from IPv4 to IPv6
    • 4.6 Generalized Forward and SDN

4. Network Layer

  • Transport segment from sending to receiving host
  • On sending side encapsulates segments into datagrams
  • On receiving side, delivers segments to transport layer
  • Network layer protocols in every host, router
  • Router examines header fields in all IP datagrams passing through it.

Two key network-layer functions

  • Forwarding: move packets from router’s input to appropriate router output.
  • Routing: determine route taken by packets from source to destination (Routing algorithms)

data plane

  • Local, per-router function
  • Determines how datagram arriving on router input port is forwarded to router output port.
  • Forwarding function

control plane

  • Network-wide logic
  • Determines how datagram is routed among routers along end-end path from source host to destination host
  • Two control-plane approaches:
    • traditional routing algorithms: implemented in routers.
    • software-defined networking (SDN): implemented in (remote) servers.

Pre-router control plane
A distinct (typically remote) controller interacts with local control agents (CAs)
在这里插入图片描述

4.1 Router

High-level view of generic router architecture:
在这里插入图片描述

4.1.1 Input port functions

在这里插入图片描述
在这里插入图片描述

4.1.2 Destination-based forwarding

在这里插入图片描述
Longest prefix matching

  • When looking forwarding table entry for given destination address, use longest address prefix that matches destination address.
  • Longest prefix matching: often performed using ternary content addressable memories (TCAMs)
    • Content addressable: present address to TCAM: retrieve address in one clock cycle, regardless of table size.
    • Cisco Catalyst: can up 1M routing table entries in TCAM
      在这里插入图片描述

4.1.3 Switching fabrics

  • Transfer packet from input buffer to appropriate output buffer
  • Switching rate: rate at which packets can be transfer from inputs to outputs
    • Often measured as multiple of input/output line rate
    • N inputs: switching rate N times line rate desirable
  • Three types of switching fabrics
    在这里插入图片描述
  • Switching via memory (first generation routers)
    • Traditional computers with switching under direct control of CPU
    • Packet copied to system’s memory
    • Speed limited by memory bandwidth (2 bus crossings per datagram)
  • Switching via a bus
    • Datagrams from input port memory to output memory via a shared bus
    • Bus contention: switching speed limited by bus bandwidth
    • Cisco 5600: 32 bus
  • Switching via interconnection network
    • Overcome bus bandwidth limitations
    • Banyan networks, crossbar, other interconnection nets initially developed to connect processors in multiprocessor
    • Advanced design: fragmenting datagram into fixed length cells, switch cells through the fabric
    • Cisco 12000: switches 60 Gbps through the interconnection network.

4.1.4 Input port queueing

  • Fabric slower than input ports combined, so queueing may occur at input queues (queueing delay and loss due to input buffer overflow)
  • Head-of-the-line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward
    在这里插入图片描述

4.1.5 Output ports

在这里插入图片描述
在这里插入图片描述

  • RFC 3439 rule of thumb: average buffering equal to “typical” R T T RTT RTT (say 250 msec) times link capacity C C C
  • Recent recommendation: with N N N flows, buffering equal to R T T ⋅ C N \frac{RTT\cdot C}{\sqrt N} N RTTC

Scheduling mechanisms

  • Scheduling: choose next packet to send on link
  • FIFO scheduling: send in order of arrival to queue
    • Discard policy: if packet arrives to full queue
      • Tail drop: drop arriving packet
      • Priority: drop/remove on priority basis
      • Random: drop/remove randomly
  • Priority
    • send highest priority queued packet
    • Multiple classes, with different priorities. Class may depend on marking or other header info (IP source / dest, port numbers)
  • Round Robin (RR) scheduling
    • Multiple classes
    • Cyclically scan class queues, sending one complete packet from each class (if available)
  • Weighted Fair Queueing (WFQ)
    • Generalized Round Robin
    • Each class gets weighted amount of service in each cycle

4.2 Internet Protocol

Host, router network layer functions:
在这里插入图片描述
在这里插入图片描述

4.2.1 IP fragmentation, reassembly

Network links have MTU (max transfer size), largest possible link-level frame (Different link types, defferent MTUs)

Large IP datagram divided within net

  • One datagram becomes several datagrams
  • “Reassembled” only at final destination
  • IP header bits used to identify, order related fragments.

在这里插入图片描述

4.3 IPv4 addressing

IP address: 32-bit identifier for host, router interface
Interface: connection between host/router and physical link

  • Router’s typically have multiple interfaces
  • Host typically has one or two interfaces

IP addresses associated with each interface

4.3.1 Subnets

IP address, two parts:

  • Subnet part: high order bits
  • Host part: low order bits

What’s a subnet?
Device interfaces with same subnet part of IP address. Can physically reach each other without intervening router

Recipe
To determine the subnets, detach each interface from its host or router, creating islands of isolated networks. Each isolated network is called a subnet.

4.3.2 Network Classes

Classful addressing

  • The network portion of an IP address were constrained to be 8, 16, or 24 bits in length.
  • Subnets with 8-, 16-, and 24-bit subnet addresses were known as class A, B and C networks.
  • It became problematic
    • A class A (/8) subnet could accommodate only up to 2 8 − 2 = 254 2^8 − 2 = 254 282=254 hosts
    • A class B (/16) subnet supporting 2 16 – 2 = 65534 2^{16} – 2 = 65534 216–2=65534 hosts, which is too large

4.3.3 CIDR

CIDR: Classless Inter Domain Routing

  • Subnet portion of address of arbitrary length
  • Address format: a.b.c.d/x, where x is # bits in subnet portion of address

在这里插入图片描述

4.3.4 DHCP

DHCP: Dynamic Host Configuration Protocol

Goal: allow host to dynamically obtain its IP address from network server when it joins network

  • Can renew its lease on address in use
  • Allows reuse of addresses (only hold address while connected/“on”)
  • Support for mobile users who want to join network (more shortly)

DHCP overview:

  1. host broadcasts “DHCP discover” msg [optional]
  2. DHCP server responds with “DHCP offer” msg [optional]
  3. host requests IP address: “DHCP request” msg
  4. DHCP server sends address: “DHCP ack” msg

DHCP can return more than just allocated IP address on subnet:

  • Address of first-hop router for client
  • Name and IP address of DNS sever
  • Network mask (indicating network versus host portion of address)

4.3.5 Hierarchical addressing

route aggregation
Hierarchical addressing allows efficient advertisement of routing information

The ability to use a single prefix to advertise multiple networks is often referred to as address aggregation or route aggregation.

more specific routes
在这里插入图片描述


4.4 NAT

NAT: network address translation
在这里插入图片描述
Motivation: local network uses just one IP address as far as outside world is concerned:

  • Range of addresses not needed from ISP: just one IP address for all devices
  • Can change addresses of devices in local network without notifying outside world
  • Can change ISP without changing addresses of devices in local network
  • Devices inside local net not explicitly addressable, visible by outside world (a security plus)

Implementation: NAT router must:

  • Remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair
  • Outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #)
  • Incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table.

16-bit port-number field: 60,000 simultaneous connections with a single LAN-side address.

NAT is controversial:

  • Routers should only process up to layer 3
  • Address shortage should be solved by IPv6
  • Violates end-to-end argument (NAT possibility must be taken into account by app designers, e.g., P2P applications)
  • NAT traversal: what if client wants to connect to server behind NAT?

4.5 IPv6

Initial motivation: 32-bit address space soon to be completely allocated.
Additional motivation:

  • Header format helps speed processing/forwarding
  • Header changes to facilitate Q&S

4.5.1 IPv6 datagram format:

Fixed-length 40 byte header. No fragmentation allowed.

  • Priority (Traffic Class): identify priority among datagrams in flow.
  • Flow Label: identify datagrams in same “flow”.
  • Next header: identify upper layer protocol for data.

Other changes from IPv4

  • Checksum: removed entirely to reduce processing time at each hop.
  • Options: allowed, but outside of header, indicated by “Next Header” field.
  • ICMPv6: new version of ICMP. Additional message types and Multicast group management functions.

在这里插入图片描述

4.5.22 Transition from IPv4 to IPv6


4.6 Generalized Forward and SDN


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/150506.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

高等数学(第七版)同济大学 习题11-4 个人解答

高等数学(第七版)同济大学 习题11-4 函数作图软件:Mathematica 1.设有一分布着质量的曲面Σ,在点(x,y,z)处它的面密度为μ(x,y,z),用对面积的曲面积分表示这曲面对于x轴的转动惯量.\begin{aligned}&1. \ 设有一分…

IB生物课程介绍与Topic 1: Cell Biology考点分享

准备让孩子就读国际学校或者孩子正在国际学校就读的家长肯定听说过“IB”或者“IB班”,那IB究竟是什么呢?IB与IB课程 IB是International Baccalaureate(国际文凭)的简称,其课程体系国际文凭大学预科课程(In…

Educational Codeforces Round 141 (Rated for Div. 2)A——C

ps:先自我检讨...自从世界杯开始后,就一直摆烂到现在。直到打了今年的第一场cf,看见打的这么菜,真是想remake/。后面我会陆陆续续的补完前段时间没有打的比赛... Dashboard - Educational Codeforces Round 141 (Rated for Div. …

ReentrantLock

目录 ReentrantLock ReentrantLock语法 ReentrantLock可重入 ReentrantLock可打断 ReentrantLock锁超时 ReentrantLock解决哲学家就餐问题 ReentrantLock公平锁 ReentrantLock条件变量 ReentrantLock ReentrantLock 相比于synchronized的特点 : 可中断:比如A线程拥有…

基于移动最小二乘法的曲线曲面拟合论文阅读笔记

基于移动最小二乘法的曲线曲面拟合论文阅读笔记 论文地址:http://www.cnki.com.cn/Article/CJFDTotal-GCTX200401016.htm 一、Problem Statement 传统的曲线(曲面)拟合方法一般使用最小二乘法, 通过使误差的平方和最小, 得到一个线性方程组&#xff0…

通过alist挂在阿里网盘的方法

1、在github官网https://github.com/alist-org/alist/releases/download/v3.8.0/alist-windows-amd64.zip下载alist软件客户端,双击运行,可以看到默认的密码和服务器地址,打开网页http://localhost:5244/manage/accounts,填写密码…

【Linux】Linux工具

文章目录软件包管理器yumVIM编辑器Linux编译器-gcc/g使用gcc如何完成预处理(进行宏替换)编译(生成汇编)汇编(生成机器课识别代码)链接在这里涉及到一个重要的概念: 函数库函数库一般分为静态库和动态库两种gcc选项gcc选项记忆Linux项目自动化构建工具-make/Makefile背景理解实例…

解决vue中报错 Duplicate keys detected:‘1‘. This may cause an update error.

报错截图: 报错原因: 通过上图的报错信息我们不难看出,报错的主要原因出现在 key 值上,报错的意思大概是检测到重复的 key 值,通俗来讲就是你的 key 值不是唯一的。 解决方案: 问题的根源找到了&#xff…

【初阶数据结构】——链表常见面试题剖析

文章目录前言题目1:移除链表元素题目分析思路1:暴力求解思路2:取非val值尾插至新链表思路讲解思考代码实现不带哨兵位带哨兵位题目2:合并两个有序链表题目分析思路讲解代码实现不带哨兵位带哨兵位题目3:反转链表题目分…

用ode45解微分方程遇到的实际问题

最近在用ode45解微分方程数值解,试图复现论文中的图。一般来说说微分方程(组)只要按照响应的条件去撰写好对应的回调函数即可,基本没什么难度,但对于本文遇到的的这个问题,可能还需要一些技巧去实现解法&am…

动态路由和导航守卫

一、动态路由1、什么是动态路由?将URL地址中可变的内容设置成参数,根据不同的参数渲染不同的组件。(组件可以复用)2、动态路由如何进行参数的传递:(1)如何设置URL地址中的参数:’/ur…

【手写 Vue2.x 源码】第十二篇 - 生成 ast 语法树-流程说明

一,前言 上篇,主要介绍了 vue 数据渲染核心流程,涉及以下几个点: 初次渲染时 template 模板被编译为 ast 语法树;通过 ast 语法树生成 render 函数;通过 render 函数返回 vnode 虚拟节点;使用…

基于K8s的DevOps平台实践(三)

文章目录前言1. Jenkins与k8s集成🍑 插件安装及配置🍑 演示动态slave pod🍑 Pod-Template中容器镜像的制作🍑 实践通过Jenkinsfile实现demo项目自动发布到kubenetes环境2. Jenkins集成Sonarqube🍑 sonarqube架构简介&a…

初阶产品经理必看:如何快速进阶B端产品经理

​从去年开始,大批的互联网企业开始转战B端,众多传统企业也早在几年前就开始向互联网转型。 产业互联网的兴起,让一个岗位的潜藏价值正在逐渐爆发,尤其是富有经验的背景,更加让身价越来越高。 这个岗位就是&#xff…

QProcess的非阻塞式用法以及QApplication::processEvents的使用

一、QProcess的阻塞模式QProcess的应用场景非常广泛。可以使用它在qt程序中执行其他进程,并与之进行通信。当使用它执行一些终端命令和操作时,命令和操作往往是需要一定的时间的,这时QProcess本身提供了方法如:waitForStarted() /…

神经网络自适应PID控制及其应用

神经网络自适应PID控制及其应用 总结来自重庆大学宋永瑞教授2022暑期校园行学术会议 1. 研究背景 目前人工智能的发展为很多领域里的研究提供了可延展性,提供了新的研究问题的思路,无人系统和人工智能正走向深度融合,无人系统里具有核心驱动作…

C语言及算法设计课程实验三:最简单的C程序设计——顺序程序设计(四)

C语言及算法设计课程实验三:最简单的C程序设计——顺序程序设计(四)一、实验目的二、 实验内容2.4、将"China”译成密码三、 实验步骤3.4、顺序程序设计实验题目4:将"China”译成密码的实验步骤3.4.1、变量的定义与赋初…

Android EventBus源码深入解析

前言 EventBus:是一个针对Android进行了优化的发布/订阅事件总线。 github对应地址:EventBus 大家肯定都已经比较熟悉了,这里重点进行源码分析; EventBus源码解析 我们重点从以下三个方法入手,弄清楚register、unre…

关于sql注入这一篇就够了(适合入门)

本文章根据b站迪总课程总结出来,若有不足请见谅 目录 存在sql注入条件 判断数据库类型 注入mysql思路 判断网站是否存在注入点 判断列名数量(字段数) 文件读写操作 网站路径获取方法 注入类型 按注入点数据类型来分类 根据提交方式分类 猜测查询方式 sql…

(Java高级教程)第三章Java网络编程-第四节:TCP流套接字(ServerSocket)编程

文章目录一:Java流套接字通信模型二:相关API详解(1)ServerSocket(2)Socket三:TCP通信示例一:客户端发送什么服务端就返回什么(1)代码(2&#xff0…