网络管理 - ITEC湖北省智能互联网技术重点实验室

Download Report

Transcript 网络管理 - ITEC湖北省智能互联网技术重点实验室

网络专题选讲
华中科技大学 电子与信息工程系
程文青
[email protected]
2012年12月
Towards an Measureable,
Manageable and Controllable Internet
华中科技大学 电子与信息工程系
互联网技术与工程研究中心
黑晓军
Email: [email protected]
Web: http://itec.hust.edu.cn/~heixj
2012.12
提纲





概要
网络测量
网络管理
软件定义网络
总结
《网络专题选讲》
-3-
40+ years ago….
Beginnings of today’s computer networks, and
applications:



P. Baran, “On Distributed Communications
Networks,” 1964
L. Kleinrock, Communication Nets, 1964
Licklider & Clark, "On-Line Man Computer
Communication,“ 1962
… arguably, networking is more than 40 years old,
approaching middle age (in human years)
What happens as we turn 40?




panic, denial (“I’m still 39”)
change in shape (expanding waist?)
mid-life crisis (hopefully not!)
more reasoned assessment:


where have I been, what have I accomplished?
how to spend my time: what good things, exciting
challenges lie ahead?
My! How we have grown!
….. and matured (protocols)
1970
~ 700 new
RFCs
1980
~ 400 new
1990
~ 1,600 new
2000
~ 1,300 new
2004
rsvp snmp ntp eth ip telnet rip bgp q2931
sip
rtp http dns
udp tcp
ftp is-is atm
ospf
….. and understood ourselves
better

10 years ago: IP versus ATM
 since then:
 QOS
 network calculi
 intserv diffserv
 signaling: RSVP
 high speed routers
 WWW protocols, caching
 CDNs
 streaming
 LRD traffic
 power laws
many, many successes!
 TCP, closed loop control
 multicast
 measurement
 active networking
 traceback, DDoS
 BGP pathologies
 VoIP, SIP
 IP-over-*
 capacity of wireless nets
 overlay networks
 DTN
 ……
Networking: expanding visions
CDN, pub/sub
pervasive
p2p,
computing
overlays Internet
2000
Internet
1990
ATM
BISDN
Internet
OSI
sensor
nets
high-performance
nets
wireless
Networking: expanding visions
CDN, pub/sub
pervasive
p2p,
computing
overlays Internet
sensor
nets
high-performance
nets
wireless
2000
applications
rule!
Internet
1990
ATM
BISDN
Internet
OSI
Big picture: supporting new applications –
losing the IP hour glass figure?
middle age: a narrowing mind, a widening waist
Applications
Applications
TCP UDP
TCP UDP
IP
Eth token
PPP 802.11
radio, copper, fiber
IP “hourglass”
IP
“love handles”
NAT diffserv IPSEC
mobile IP mcast
intserv
Eth token
PPP 802.11
radio, copper, fiber
Middle-age IP “hourglass” ?
Big picture: supporting new applications –
losing the IP hour glass figure?
middle age: a expanding mind, a slim waist
Applications
TCP UDP
client
server
apps
application overlays
overlay
services
IP
TCP UDP
Eth token
PPP 802.11
IP
radio, copper, fiber
Eth token
PPP 802.11
radio, copper, fiber
IP “hourglass”
Overlays: bringing networking techniques
up to the application
Network theory and practice:
… many many challenges


wireless networks: capacity, coverage
pricing, economics


measurement



auto-configuration, rapid deployment, resilience to faults,
misconfiguration, bugs
overlay networks


techniques: sampling, inference, signal analysis
management


utility-based view of protocols
competing levels of underlay/overlay control
mobility
security
Challenge: on beyond the data plane
Q: data plane performance really the major roadblock?
 “robustness” (non-fragility)
 adaptability
 complexity of control
 reconfigurability
 maintainability
 security
 evolvability
 manageability
the “X-ities”
Fundamental advances here are hard!
 “efficiency” not always the most important measure


tradeoff between x-ity, expected
performance
increasing work on the “X-ities”
Towards an Measureable,
Manageable and Controllable Internet
网络测量
引言

Lord Kelvin在一次著名的演讲中说:

“I often say that when you can measure what
you are speaking about and express it in
numbers, you know something about it; but
when you cannot measure it, when you cannot
express it in numbers, your knowledge is of a
meager and unsatisfactory kind.”
—— Lord Kelvin
《网络专题选讲》
-18-
网络测量的意义



确定来源于实际网络应用的问题
帮助建立合理的模型假设
指导原型设计,性能评估
《网络专题选讲》
-19-
网络测量






动机与历史
基本概念
基本方法
对象和工具
测量系统
总结
《网络专题选讲》
-20-
网络发展的推动力

网络应用驱动

基础理论驱动:网络科学
“As gold which he cannot spend will make no man
rich, so knowledge which he cannot apply will
make no man wise.”
-- Samuel Johnson: The Idler No. 84
《网络专题选讲》
-21-
网络:扩展视野
pervasive sensor
p2p,
high-performance
computing
nets
overlays Internet
nets
CDN, pub/sub
wireless
2000
应用驱动
Internet
1990
ATM
BISDN
《网络专题选讲》
Internet
OSI
-22-
网络科学的发展
Physics


Network
Physics
Watts, Nature, 1998
Barabási, Science, 1999
《网络专题选讲》
-23-
网络科学的兴起
WS 小世界模型(1998)
《网络专题选讲》
BA 无标度模型(1999)
Duncan Watts
(1971- , America)
Albert Barabási
(1967- , Hungary)
Steven Strogatz
(1959- , America)
Réka Albert
(Ph.D. in 2001)
-24-
测量动机





互联网是复杂巨系统,是现代信息社会的基础设施,
其行为影响我们每个人的工作和生活
互联网的行为难以预测,它在不停地变化
许多应用有性能要求:可靠性,可预见性等
网络管理者要根据条件来调整系统
如果不知道网络的结构和行为就不能改进它



不测量就无法理解网络
不测量就无法建立一个有效的模型
网络科学(Network Science)
《网络专题选讲》
-25-
网络测量早期历史

早在70年代,网络测量就是Arpanet的一部分



1972年形成网络测量组


Rfc 323 – who is involved and what is important
1974年,第一篇网络测量的文章发布


Kleinrock’s Network Measurement Center at UCLA
Resources in the network were reserved for
measurement
“On Measured Behavior of the ARPA Network,”
Kleinrock and Taylor
网络测量的研究和应用没有显著的区别

Size kept things tractable
《网络专题选讲》
-26-
从ARPAnet 到 Internet




测量的设施渐渐的淡出,但于此同时:
在80年代,基于测量的论文渐渐增多
 “The Experimental Literature of the Internet: An
Annotated Bibliography”,J. Mogul, ’88.
RFC 1262 – Guidelines for Internet Measurement
Activities, 1991
 V. Cerf, “Measurement of the Internet is critical
for future development, evolution and deployment
planning.”
“On the Self-Similar Nature of Ethernet Traffic”, Leland et
al., 1994.
 新颖的测量方式与详尽的分析相结合
 研究与实际应用的转折点
《网络专题选讲》
-27-
赞助与组织

1995 年:美国科学基金会(National Science Foundation, NSF)


1996年初:美国应用网络研究国家实验室(National Laboratory
of Applied Network Research, NLANR)



在NSF 的支持下召开了互联网统计与指标分析( Internet Statistics
and Metrics Analysis, ISMA)研讨会
标志大规模、系统化网络性能测量的开始
1997年:互联网数据分析合作组织(Cooperative Association
for Internet Data Analysis, CAIDA)


开始资助对互联网进行系统的测量
在美国加州大学圣地亚哥分校超级计算中心成立,对网络测量的相关理
论和方法展开系统研究。
IETF成立IP性能指标工作组( IPPM2WG)

对IP网络性能测量框架、指标定义与指标测量方法进行研究。
《网络专题选讲》
-28-
Vern Paxson的工作

Vern Paxson:“Measurement and Analysis of End-toEnd Internet Dynamics”(1997)




基于测量手段
端到端测量中路由行为特征与端到端数据包的动态
特性
网络测量领域的“经典文献”
V. Paxson, “Strategies for sound Internet
measurement,” in Proceedings of Internet
Measurement Conference, Sicily Italy, Oct. 2004.
《网络专题选讲》
-29-
Vern Paxson的工作:平台

NIMI (National Internet Measurement
Infrastructure)


由美国国家自然科学基金和美国国防部高级计划局资助
的一个研究项目,旨在建立一个可扩展的、动态的
Internet测量基础架构。
设计了测试平台NPD (Network Probe Daemon)


大量的NPD探测点构成了NIMI
NPD之间相互交换测量信息以获取对全局网络的认识
《网络专题选讲》
-30-
Vern Paxson的工作:平台(北美)
《网络专题选讲》
-31-
Vern Paxson的工作:平台(欧洲)
《网络专题选讲》
-32-
Vern Paxson的工作:测量

使用NPD架构测量Internet的路由动态性



大部分的网络路径被一个主导地位的路由控制
大约一半的网络路径展现出不对称的特性
记录了20000次TCP数据包的转发信息,用来测试
网路数据包的动态性

网络病理(pathologies)、瓶颈带宽、丢包率、网络
延迟
《网络专题选讲》
-33-
Vern Paxson的建议
为什么用仿真行不通?




仿真是现实世界的抽象模型
结果可能只在仿真器中看起来很好
模型和算法有可能过于简化
只能模拟可以预见的特性
为什么测量很重要?



测量是一种“现实检测(reality check)”
不存在假设,抽象等问题
但是……



进行一次完备的网络测量是困难的
在测量和数据分析两个步骤都必须要严谨和完整
强调一般的原则,而不是特殊的工具和技术
测量的难点

要进行全球性规模的网络测量,需要广泛的合
作







优秀的实验设计
安全问题
测试你的程序运行正常
减少未经处理的数据
收集数据并且展示结果
ISP通常不愿意分享它们的资源和成果
互联网增长速度惊人


有的测量成果很快就过时了
进行大规模的网络测量非常困难
进行网络测量时会遇到的基本问题

精确度


元数据


程序在运行阶段发生错误
误解


合理的对数据进行组织和分析
正确性


程序的基本设计理念有错误
我们正在测量我们想要的东西么?
校准

检测和校正已出现的错误
完备的网络测量策略








保存元数据
让你的同事运行你的测量方法
检查极值和峰值
程序采用自我一致性检测
与其他的测量和计算结果进行比对
构建可重复的分析结果
定期检测程序的运行状况
对海量的数据集进行抽样,并分析结果的不变
性
网络测量






动机与历史
基本概念
基本方法
对象和工具
测量系统
总结
《网络专题选讲》
-40-
什么是网络测量?

网络测量



是对网络行为进行特征化、对各项指标进行量化并充分
理解与正确认识互联网的最基本手段,是理解网络行为
的最有效的途径-从测量目的
是遵照一定的方法和技术,利用软件和硬件工具来测试
或验证表征网络性能指标的一系列活动的总和-从技术
层面
网络测量技术

是一个很广泛的概念,它涉及的领域包括测量本身、网
络建模和网络行为分析, 以及控制管理等
《网络专题选讲》
-41-
网络测量有哪些作用?

故障诊断:


协议排错:


使用统计技术来分析经验数据,从而提取出网络应用或网络协议
的特征,以优化其特性
性能评价:


为新协议和应用程序的正确运行提供测试的手段,使其和原标准
保持一致,或使老的版本向后兼容
网络流量特征化:


对广播风暴、非法分组长度、地址错误、安全性攻击等故障进行
诊断
考察某个协议或某个应用在网络中的性能水平, 帮助确定性能瓶
颈
其他用途:

用于选择服务器ISP, 验证网络配置, 设计互联网的新应用,配置网
络或服务器,广域网中的负载平衡以及计费等方面
《网络专题选讲》
-42-
测量的对象有哪些?




网络流量
 负载统计
 数据包/数据流记录
网络路径的性能
 应用程序的性能,如:WWW, P2P, DNS等
 传输的性能,如:TCP协议的吞吐量
 网络的性能,如:数据包的延迟,丢失
网络结构
 拓扑,以及拓扑结构的路径
 路由协议的动态性
网络的安全性
《网络专题选讲》
-43-
在哪里进行网络测量?





简单的答案
 任何地方!
端结点
 程序日志,如:Web服务器日志
 主动发送探测包来测量性能
特定的链路/路由器
 负载统计,数据包记录
 配置状态
 警报
测量的目的是“描述”
测量结点如何放置,是一个尚未被充分理解的问题
《网络专题选讲》
-44-
如何进行网络测量?

主动测量


被动测量



发送探测包,程序仿真
程序监控(日志),系统监控,数据包监控
关键的基础设施是必要的条件
资料


SLAC: www.slac.stanford.edu/xorg/nmtf/nmtftools.html
CAIDA: www.caida.org/tools/taxonomy
《网络专题选讲》
-45-
测量的时间



每日网络流量周期
时间跨度取决于测量方式和测量对象
被动测量是连续的



会产生海量的数据
许多系统被禁止访问日志内容
主动测量是离散的


重要的参数有可能被忽略
探测包有可能被过滤或者检测到
《网络专题选讲》
-46-
网络测量






动机与历史
基本概念
基本方法
对象和工具
测量系统
总结
《网络专题选讲》
-47-
测量方法

测量对象


测量环境


被测量的节点和链路,以及待测量节点、链路或网
络的某种或某些特性
包括测量点的选取,测量时间的确定、测量设备、
通信链路的类型等
测量方式

针对某一具体的网络行为指标, 选取合适的测量方
法
《网络专题选讲》
-48-
测量方法:要求

稳健性


可重复性


即被测网络的轻微变化不会使测量方法失效
即同样的网络条件下,多次测量结果应该一致
准确性

即测量结果应该能够反映网络的真实情况
《网络专题选讲》
-49-
测量方法:分类(1/2)

根据测量方式的不同



根据测量对象的不同




主动测量
被动测量
网络拓扑测量
网络性能测量
网络流量测量
根据测量环境的不同


单点测量
多点测量
《网络专题选讲》
-50-
测量方法:分类(2/2)

主动测量



被动测量



引入探测包测量网络状况,如网络拓扑、包丢失率
、延迟、接入带宽、TTL等。
但不能提供特定节点的信息,并加重了网络负荷。
通过在网络中的一个或多个网段上借助包捕获器捕
获数据的方式记录网络流量信息(如流数、包数、
字节数、协议等)
并对流量进行分析,被动地获知网络行为状况
当前性能测量趋向

采用主动与被动测量相结合的方法
《网络专题选讲》
-51-
网络测量






动机与历史
基本概念
基本方法
对象和工具
测量系统
总结
《网络专题选讲》
-52-
网络性能指标

根据不同的用途,可以对网络的多种参数进行测量



包括时延、丢包率、链路的容量和带宽、流量、连接的
平均持续时间、网络拓扑等等
目前的研究主要集中在时延、带宽、流量
在对网络各种参数(时延、丢包率、带宽等)的
测量中:



时延最容易测量,而且其测量结果也最可靠
但丢包率的测量需要复杂的模型,否则很难得出正确的
结果
同时,对链路可用带宽的直接测量几乎是不可能的,只
能通过对其他参数的测量来间接衡量链路的可用带宽
《网络专题选讲》
-53-
测量工具

点对点测量工具


路由信息测量工具



通过测量带宽的方式来获得吞吐量,Treno, bing,Btest
流量监控工具



traceroute及其变种,测量从源端到目的端的路由信息
路由协议交互(BGP,OSPF等):Routeviews, RIPE RIS
吞吐量测量工具


Ping及其变种,“往返时间”和“丢包率”
TcpDump、Netflow、OCXMON、DAG等流量采集工具
Tcptrace等离线流量分析工具
统计分析工具

mrtg ,rrdtool等,与流量监视工具不同,主要是给出网络状态消
息数据,并进行一定的统计分析
《网络专题选讲》
-54-
网络测量






动机与历史
基本概念
基本方法
对象和工具
测量系统
总结
《网络专题选讲》
-55-
网络测量系统体系结构(1/3)

基本功能


包括测量数据的采集、精简、存储、传输、分析、
应用和发布
体系结构


网络测量系统的各层次功能及其相互关系的集合
从低层到高层依次为数据采集、数据管理、数据分
析、数据表示
《网络专题选讲》
-56-
网络测量系统体系结构(2/3)

数据采集:(关键点,包括主动测量采集、被动测量采集)
数据采集时,尽量照顾到各种性能指标;
 提供一个向第二层统一的访问接口;
 数据采集的粒度要满足所测指标的需求,尽量减轻网络的开
销;
 采样间隔的选择,这应视具体情况而定
 数据管理: (数据存贮、维护、检索策略)
 对于采集到的大量数据选取合适的存储方法和维护检索策略
 将数据格式化,以便于分析
 在数据存储之前做必要的预处理,以压缩存储量

《网络专题选讲》
-57-
网络测量系统体系结构(3/3)

数据分析:





在测量得到原始数据后,首先对某一指标的大量样本采
用统计学的方法进行分析,得出均值、方差等基本统计
量
其次由一些数学模型(如时间序列预测、回归分析、判
断预测、小波分析等) 作出性能趋势预测
进而采用数据挖掘(Data Mining) 技术进行关联分析,
得出网络本质的行为规律
经过这些步骤,通过归纳、综合、分析、演绎对每一个
指标给出合理的定义和分析算法.
数据表示:

即直观形象地表示出测量结果。柱状图、表格(矩阵显
示)、曲线图
《网络专题选讲》
-58-
网络测量案例
ICMP: internet control message protocol

used by hosts & routers to
communicate networklevel information



network-layer “above” IP:


error reporting:
unreachable host,
network, port, protocol
echo request/reply (used
by ping)
ICMP msgs carried in IP
datagrams
ICMP message: type,
code plus first 8 bytes of
IP datagram causing error
Type
0
3
3
3
3
3
3
4
Code
0
0
1
2
3
6
7
0
8
9
10
11
12
0
0
0
0
0
description
echo reply (ping)
dest. network unreachable
dest host unreachable
dest protocol unreachable
dest port unreachable
dest network unknown
dest host unknown
source quench (congestion
control - not used)
echo request (ping)
route advertisement
router discovery
TTL expired
bad IP header
Network Layer 4-60
Traceroute and ICMP

source sends series of UDP
segments to dest




first set has TTL =1
second set has TTL=2, etc.
unlikely port number
when nth set of datagrams
arrives to nth router:



router discards datagrams
and sends source ICMP
messages (type 11, code 0)
ICMP messages includes
name of router & IP address
3 probes

when ICMP messages
arrives, source records
RTTs
stopping criteria:
 UDP segment eventually arrives
at destination host
 destination returns ICMP “port
unreachable” message (type 3,
code 3)
 source stops
3 probes
3 probes
Network Layer 4-61
P2P系统测量


对等网络流媒体系统的现状
PPLive系统的测量及分析






测量方法
流量监测
视频播放质量
用户行为监测
系统安全
对等网络流媒体系统研究热点的若干探讨
《网络专题选讲》
-62-
对等网络流媒体系统

两大设计空间



如何形成重叠网络?
如何传输内容?
现有体系结构


树状拓扑 + 推式内容传输
 ESM, Yoid, CoopNet, SplitStream, Bullet, Chunkspread
…
网状拓扑 + 拉式内容传输
《网络专题选讲》
-63-
网状-拉式对等网络流媒体系统

这类系统非常类似于BitTorrent
《网络专题选讲》
-64-
节点软件结构

双缓存



《网络专题选讲》
积极下载 vs 保守下载
处理丢失的数据块
缓存控制
-65-
缓存映像(buffer map)


缓存映像反映了节点缓存所拥有的数据块信息
此映像可以被用来评估用户的播放质量
《网络专题选讲》
-66-
测量方法


协议分析
主动爬行




周期性的访问某一频道内的所有节点
获取节点的地址信息
获取节点的内存映像
被动监听


在网路中放置监听节点:家庭接入网,校园网
截取网络流量,并分析
《网络专题选讲》
-67-
获取节点信息
《网络专题选讲》
-68-
获取缓存映像

主动爬行




被动监听


《网络专题选讲》
基于C++的爬虫软件
每台Linux机器负责爬
行节点<50
5~10台Linux机器
流量截取
 WinDump
三个地点
 香港校园节点
 纽约校园节点
 纽约家庭节点
-69-
缓存映像测量数据一览
频道名称
流行度 数率
CCTV新闻
五星
CCTV1
四星
CCTV3
四星
CCTV8
三星
CCTV9
一星
《网络专题选讲》
数据块 缓存映 节点数
(bps) (字节) 像数量
381,9 4,774 1,952, 8,120
60
837
381,9 4,774 1,440, 6,668
60
117
381,9 4,774 1,789, 12,392
60
331
381,9 4,774 1,359, 6,985
60
236
516,8 6,350 1,263, 2,125
02
097
时间
(分钟)
635
636
650
751
1,031
-70-
系统流量监测
(a)日变化(Feb.8,2007)
(b)周变化(Feb.5-12,2007)
 高峰流量在160Gbps附近
 流量的周期性日变化及周变化
《网络专题选讲》
-71-
大型事件播放监测
稳定
8pm
美国
EST
20万用户
同时在线
(a)频道节点监测
8pm
中国
(b)节点地域分布
2006春节联欢晚会
《网络专题选讲》
-72-
研究问题

传输方式选择:链路连接(TCP) vs 数据报(UDP)




网络拥塞响应
网络连接开销:端节点和家庭路由器
数据传输可靠性 (数据报拥塞控制协议(DCCP)?)
基于网路位置的节点选择和数据块调度


减少网络提供商网间流量
根据应用的需要,优化用户质量体验(QoE)
《网络专题选讲》
-73-
播放质量性能指标

播放连续性






播放冻结:缓存内没有视频内容可供播放
播放跳动:缓存中视频内容不连续
播放重启:流媒体下载过程重新启动
启动时延
频道切换时延
节点播放时延差异
《网络专题选讲》
-74-
频道CCTV9中节点启动时延
50%


节点数:220
中位数: 低端边界: 14.2 sec; 高端边界: 19.7 sec
《网络专题选讲》
-75-
CCTV新闻频道中节点播放时延差异
《网络专题选讲》
-76-
对等网络流媒体系统面临的两大挑战

节点的动态特性



节点来来往往
提供资源,但没有保证
节点的多样性



带宽
CPU
稳定性
《网络专题选讲》
-77-
节点动态特性(1/2)
日间变化
批量离开
一个受欢迎的电影频道,节点到达和离开的动态特性
《网络专题选讲》
-78-
节点动态特性(2/2)
一个受欢迎的电视频道,节点到达和离开的动态特性
《网络专题选讲》
-79-
对等网络建设费用与质量保证的平衡



单纯对等网络
内容传输网路(CDN)+对等网络(P2P)
如何利用对等网络中的超级节点
《网络专题选讲》
-80-
超级节点的上传能力
4Mbps
380kbps
CCTV3频道中, 位于纽约PolyU的校园节点
《网络专题选讲》
-81-
超级节点存在的普遍性
CCTVNews 频道中,香港节点所看到的若干超级节点
《网络专题选讲》
-82-
频道流行度
美国东部时间 07:42AM Feb. 8, 2007
《网络专题选讲》
-83-
数据块下载率可用于流量补偿
(a)内存映像变化
(b)数据块下载率
某一节点的播放质量与数据块下载率之间的相关性
《网络专题选讲》
-84-
污染攻击





攻击者加入一个频道
攻击者发出广告,自己拥有大量的数据块
当邻居节点请求下载数据块时,攻击者发送受了污
染的数据块
节点收到污染的数据块,自身播放受到影响
节点可能进一步转发污染的数据块
《网络专题选讲》
-85-
节点
节点
请求
节点
污染源
节点
节点
节点
节点
《网络专题选讲》
-86-
数据块污染实验设置
《网络专题选讲》
-87-
测量结果: 频道内的节点数
《网络专题选讲》
-88-
测量结果: 纽约节点
(a)下载
(b)上传
流入流出纽约节点的污染数据包以及清洁数据包
《网络专题选讲》
-89-
测量结果: 香港节点
(a)下载
(b)上传
流入流出香港节点的污染数据包以及清洁数据包
《网络专题选讲》
-90-
抵御污染攻击




黑名单
流量加密
数据块认证
…
《网络专题选讲》
-91-
对等网络流媒体可能面临的攻击


污染攻击
服务器劫持




一个PPLive频道的出口带宽200+KByte/sec
虚假广告大量不存在的节点
虚假广告错误的内存映像
…
可用性好的安全设计:复杂度 vs 安全目标
《网络专题选讲》
-92-
PPLive测量研究小结


2006~2007,“免费”对等网络流媒体系统,播
放质量到达了可以接受的水平
即将到来的流媒体应用,期望更高的服务水平保
证



当节点资源不够,服务质量下降:服务器帮助
减少启动时延,频道切换时延
有效抵御各种攻击:污染,毒害,禁止服务…
《网络专题选讲》
-93-
网络测量






动机与历史
基本概念
基本方法
对象和工具
测量系统
总结
《网络专题选讲》
-94-
总结



网络测量是理解和提高Internet架构和性能的
重要手段
现有的测量工具和测量方法给出了Internet一
个大致的描述
Internet测量工作很容易做出一个粗糙、不充
分的结果;如果想做出详尽的结果,将要花费
大量的人力物力。
《网络专题选讲》
-95-
网络管理
Network Management



What is network management?
Internet-standard management framework
 Structure of Management Information:
SMI
 Management Information Base: MIB
 SNMP Protocol Operations and
Transport Mappings
 Security and Administration
ASN.1
97
What is network management?


autonomous systems (aka “network”): 1000s of
interacting hardware/software components
other complex systems requiring monitoring, control:
 jet airplane
 nuclear power plant
 others?
"Network management includes the deployment, integration
and coordination of the hardware, software, and human
elements to monitor, test, poll, configure, analyze, evaluate,
and control the network and element resources to meet the
real-time, operational performance, and Quality of Service
requirements at a reasonable cost."
98
Infrastructure for network management
definitions:
managing entity
managing
data
entity
agent data
managed device
agent data
network
management
agent data
protocol
managed device
agent data
managed device
agent data
managed devices
contain
managed objects
whose
data is gathered into
a
Management
Information
Base (MIB)
managed device
managed device
99
Network management standards
OSI CMIP
SNMP: Simple Network
 Common
Management Protocol
Management
 Internet roots (SGMP)
Information Protocol
 started simple
 designed 1980’s:
 deployed, adopted rapidly
the unifying net
 growth: size, complexity
management
 currently: SNMP V3
standard
 de facto network
 too slowly
management standard
standardized
100
Network Management



What is network management?
Internet-standard management framework
 Structure of Management Information:
SMI
 Management Information Base: MIB
 SNMP Protocol Operations and
Transport Mappings
 Security and Administration
ASN.1
Network Management 9-101
SNMP overview: 4 key parts

Management information base (MIB):


Structure of Management Information (SMI):


data definition language for MIB objects
SNMP protocol


distributed information store of network
management data
convey manager<->managed object info,
commands
security, administration capabilities

major addition in SNMPv3
102
SMI: data definition language
Purpose: syntax, semantics
of management data welldefined, unambiguous

base data types:


OBJECT-TYPE


straightforward, boring
data type, status,
semantics of managed
object
MODULE-IDENTITY

groups related objects
into MIB module
Basic Data Types
INTEGER
Integer32
Unsigned32
OCTET STRING
OBJECT IDENTIFIED
IPaddress
Counter32
Counter64
Guage32
Time Ticks
Opaque
103
SNMP MIB
MIB module specified via SMI
MODULE-IDENTITY
(100 standardized MIBs, more vendor-specific)
MODULE
OBJECT TYPE:
OBJECT TYPE:OBJECT TYPE:
objects specified via SMI
OBJECT-TYPE construct
104
SMI: object, module examples
OBJECT-TYPE: ipInDelivers
ipInDelivers OBJECT TYPE
SYNTAX
Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
“The total number of input
datagrams successfully
delivered to IP userprotocols (including ICMP)”
::= { ip 9}
MODULE-IDENTITY:
ipMIB
ipMIB MODULE-IDENTITY
LAST-UPDATED “941101000Z”
ORGANZATION “IETF SNPv2
Working Group”
CONTACT-INFO
“ Keith McCloghrie
……”
DESCRIPTION
“The MIB module for managing
IP
and ICMP implementations, but
excluding their management of
IP routes.”
REVISION “019331000Z”
………
::= {mib-2 48}
105
MIB example: UDP module
Object ID
Name
Type
1.3.6.1.2.1.7.1
UDPInDatagrams Counter32
Comments
total # datagrams delivered
at this node
1.3.6.1.2.1.7.2
UDPNoPorts
Counter32
# underliverable datagrams:
no application at port
1.3.6.1.2.1.7.3
UDInErrors
Counter32
# undeliverable datagrams:
all other reasons
1.3.6.1.2.1.7.4
UDPOutDatagrams Counter32
# datagrams sent
1.3.6.1.2.1.7.5
udpTable
one entry for each port
SEQUENCE
in use by app, gives port #
and IP address
106
SNMP naming
question: how to name every possible
standard object (protocol, data, more..) in
every possible network standard??
answer: ISO Object Identifier tree:
 hierarchical naming of all objects
 each branchpoint has name, number
1.3.6.1.2.1.7.1
ISO
ISO-ident. Org.
US DoD
Internet
udpInDatagrams
UDP
MIB2
management
107
OSI Object Identifier Tree
108
SNMP protocol
Two ways to convey MIB info, commands:
managing
managing
entity
entity
request
response
agent data
managed device
request/response mode
trap msg
agent data
managed device
trap mode
109
SNMP protocol: message types
Message type
GetRequest
GetNextRequest
GetBulkRequest
InformRequest
SetRequest
Response
Trap
Function
Mgr-to-agent: “get me data”
(instance,next in list, block)
Mgr-to-Mgr: here’s MIB value
Mgr-to-agent: set MIB value
Agent-to-mgr: value, response to
Request
Agent-to-mgr: inform manager
of exceptional event
110
SNMP protocol: message formats
Variables to get/set
Get/set header
PDU
type
(0-3)
PDU
type
4
Request
ID
Error
Status
(0-5)
Enterprise Agent
Addr
Error
Index
Trap
Type
(0-7)
Value ….
Name
Value
Name
Specific
code
Time
stamp
Name Value ….
Trap header
Trap info
SNMP PDU
111
SNMP security and administration




encryption: DES-encrypt SNMP message
authentication: compute, send MIC(m,k):
compute hash (MIC) over message (m),
secret shared key (k)
protection against playback: use nonce
view-based access control:


SNMP entity maintains database of access
rights, policies for various users
database itself accessible as managed object!
112
Network Management



What is network management?
Internet-standard management framework
 Structure of Management Information:
SMI
 Management Information Base: MIB
 SNMP Protocol Operations and
Transport Mappings
 Security and Administration
The presentation problem: ASN.1
113
The presentation problem
Q: does perfect memory-to-memory copy
solve “the communication problem”?
A: not always!
struct {
test.code
char code;
test.x
int x;
} test;
test.x = 256;
test.code=‘a’
a
00000001
00000011
host 1 format
test.code
a
test.x
00000011
00000001
host 2 format
problem: different data format, storage
conventions
114
A real-life presentation problem
?
?
?
?
?
?
?
?
Groovy!
grandma
2012 teenager
aging 60’s
hippie
115
Presentation problem: potential solutions
1. Sender learns receiver’s format. Sender translates
into receiver’s format. Sender sends.


real-world analogy?
pros and cons?
2. Sender sends. Receiver learns sender’s format.
Receiver translate into receiver-local format


real-world-analogy
pros and cons?
3. Sender translates host-independent format.
Sends. Receiver translates to receiver-local
format.


real-world analogy?
pros and cons?
116
Solving the presentation problem
1. Translate local-host format to host-independent format
2. Transmit data in host-independent format
3. Translate host-independent format to remote-host
format
“It is pleasing
to me!”
presentation
service
service
“Cat’s pajamas!”
!
“It is pleasing
to me!”
presentation
“Groovy!”
presentation
service
“Awesome, dude!”
!
!
!
!
grandma
!
aging 60’s
hippie
!
!
2012 teenager
117
ASN.1: Abstract Syntax Notation 1

ISO standard X.680



defined data types, object constructors


used extensively in Internet
like eating vegetables, knowing this “good for you”!
like SMI
BER: Basic Encoding Rules


specify how ASN.1-defined data objects to be transmitted
each transmitted object has Type, Length, Value (TLV)
encoding
118
TLV Encoding
Idea: transmitted data is self-identifying



T: data type, one of ASN.1-defined types
L: length of data in bytes
V: value of data, encoded according to ASN.1
standard
Tag Value
1
2
3
4
5
6
9
Type
Boolean
Integer
Bitstring
Octet string
Null
Object Identifier
Real
119
TLV
encoding:
example
lastname ::= OCTET STRING
weight ::= INTEGER
{weight, 259}
{lastname, “smith”}
module of data type
declarations written
in ASN.1
instances of data type
specified in module
Basic Encoding Rules
(BER)
Value, 259
Length, 2 bytes
Type=2, integer
Value, 5 octets (chars)
Length, 5 bytes
Type=4, octet string
3
1
2
2
h
t
i
m
s
5
4
transmitted
byte
stream
120
Network management: summary

network management




extremely important: 80% of network “cost”
ASN.1 for data description
SNMP protocol as a tool for conveying
information
network management: more art than science



what to measure/monitor
how to respond to failures?
alarm correlation/filtering?
121
Software Defined Networks
Look for blind spots
– suggested by Prof. Nick McKeown
Question old school assumptions
Open your heart and mind to people who
question assumptions
Question Assumptions
Myth 1: It is hard for switch/router hardware to
maintain lots of queues.


Since 1995, seen 10-15 ASICs do it easily
Recently: 64x10Gb/s switch, 128k flows, 8% overhead.
Myth 2: You can’t build a large flow table

Next couple of years: Over 1Tb/s, 100,000s entries,
100s bits wide, several tables.
It doesn’t mean you have to; just says you can.
We have lost our way
Routing, management, mobility management,
access control, VPNs, …
Ap
p
Ap
p
Ap
p
Operating
System
Specialized Packet
Forwarding Hardware
Million of lines
of source code
5400 RFCs
Barrier to entry
500M gates
10Gbytes RAM
Bloated
Power Hungry
Many complex functions baked into the infrastructure
OSPF, BGP, multicast, differentiated services,
Traffic Engineering, NAT, firewalls, MPLS, redundant layers, …
An industry with a “mainframe-mentality”
Reality
Ap
p
Ap
p
Ap
p
Operating
System
Ap
p
Ap
p
Ap
p
Operating System
Specialized Packet
Forwarding Hardware
Specialized Packet
Forwarding Hardware
• Lack of competition means glacial innovation
• Closed architecture means blurry, closed interfaces
Glacial process of innovation made
worse by captive standards process
Deployment
Idea
Standardize
Wait 10 years
•
•
•
•
Driven by vendors
Consumers largely locked out
Lowest common denominator features
Glacial innovation
AppAppAppAppAppAppAppAppAppAppApp
Specialized
Applications
Specialized
Operating
System
Specialized
Hardware
Vertically integrated
Closed, proprietary
Slow innovation
Small industry
Open Interface
Windows
(OS)
or Linux
or
Open Interface
Microprocessor
Horizontal
Open interfaces
Rapid innovation
Huge industry
Mac
OS
AppAppAppAppAppAppAppAppAppAppApp
Specialized
Features
Specialized
Control
Plane
Specialized
Hardware
Vertically integrated
Closed, proprietary
Slow innovation
Open Interface
Control
Plane
or
Control
Plane
or
Open Interface
Merchant
Switching Chips
Horizontal
Open interfaces
Rapid innovation
Control
Plane
Change is happening in non-traditional markets
App
App
App
Network Operating System
Ap
p
Ap
p
Ap
p
Operating
System
Ap
p
Specialized Packet
Forwarding Hardware
Ap
p
Ap
p
Ap
p
Ap
p
Operating
System
Ap
p
Specialized Packet
Forwarding Hardware
Operating
System
Ap
p
Specialized Packet
Forwarding Hardware
Ap
p
Ap
p
Operating
System
Ap
p
Ap
p
Ap
p
Operating
System
Specialized Packet
Forwarding Hardware
Specialized Packet
Forwarding Hardware
The “Software-defined Network”
2. At least one good operating system
Extensible, possibly open-source
3. Well-defined open API
App
App
App
Network Operating System
1. Open interface to hardware
Simple Packet
Forwarding
Hardware
Simple Packet
Forwarding
Hardware
Simple Packet
Forwarding
Hardware
Simple Packet
Forwarding
Hardware
Simple Packet
Forwarding
Hardware
Software Defined Network (SDN)
(
f View
Control
Programs
)
(
f View
(
)
Control
Programs
f View
)
Control
Programs
Abstract Network View
Network Virtualization
Global Network View
Network OS
Packet
Forwarding
Packet
Forwarding
Packet
Forwarding
Packet
Forwarding
Packet
Forwarding
Software Defined Network (SDN)
(
f View
Control
Programs
)
(
firewall.c
…
f View
(
)
f View
if( pkt->tcp->dport == 22)
Control dropPacket(pkt);
Control
Programs
…Programs
)
Abstract Network View
Network Virtualization
Global Network View
1. <Match, Action>
Network
OS
2. <Match, Action>
1. <Match, Action>
2. <Match, Action>
3. <Match, Action>
4. <Match, Action>
5. <Match, Action>
6. …
7. …
Packet
Forwarding
Packet
Forwarding
3. <Match, Action>
4. <Match, Action>
5. <Match, Action>
6. …
7. …
1. <Match, Action>
2. <Match, Action>
3. <Match, Action>
4. <Match, Action>
5. <Match, Action>
6. …
7. …
Packet
Forwarding
Packet
Forwarding
Packet
Forwarding
1. <Match, Action>
2. <Match, Action>
3. <Match, Action>
4. <Match, Action>
5. <Match, Action>
6. …
7. …
1. <Match, Action>
2. <Match, Action>
3. <Match, Action>
4. <Match, Action>
5. <Match, Action>
6. …
7. …
With SDN we will:
1.
2.
Formally verify that our networks
are behaving correctly.
Identify bugs, then systematically
track down their root cause.
OpenFlow Usage
Dedicated OpenFlow Network
Controller
Peter’s code
OpenFlow
Rule Switch
Action
PC
Statistics
OpenFlow
Protocol
OpenFlow
Action
Switch
Rule
OpenFlowSwitch.org
Statistics
OpenFlow
Action
Switch
Rule
Peter
Statistics
Usage examples

Peter’s code:
 Static “VLANs”
 His own new routing protocol: unicast, multicast, multipath, loadbalancing
 Network access control
 Home network manager
 Mobility manager
 Energy manager
 Packet processor (in controller)
 IPvPeter
 Network measurement and visualization
 …
Separate VLANs for Production
and Research Traffic
Controller
Research VLANs
Flow Table
Production VLANs
Normal L2/L3 Processing
Virtualize OpenFlow Switch
Controller A
Controller B
Researcher A VLANs
Flow Table
Researcher B VLANs
Controller C
Flow Table
Researcher C VLANs
Flow Table
Production VLANs
Normal L2/L3 Processing
Virtualizing OpenFlow
Heidi’s
Controller
Aaron’s
Controller
Craig’s
Controller
OpenFlow
Protocol
OpenFlow
Switch
OpenFlow FlowVisor
& Policy Control
OpenFlow
Protocol
OpenFlow
Switch
OpenFlow
Switch
Virtualizing OpenFlow
Broadcast
Multicast
http
Load-balancer
OpenFlow
Protocol
OpenFlow
Switch
OpenFlow
FlowVisor & Policy Control
OpenFlow
Protocol
OpenFlow
Switch
OpenFlow
Switch
Towards an Measureable,
Manageable and Controllable Internet
Software Define Networking?
Reading List










Chapter 9 in James F. Kurose and Keith W. Ross, Computer Networking: A
Top-Down Approach (6th edition), Pearson Education Inc., 2012
Jim Kurose, "Networking: successes, new challenges, and an expanding
waist as the field approaches 40," Spring 2005. http://wwwnet.cs.umass.edu/kurose/talks/ufrj_2005.ppt
M. Crovella and B. Krishnamurthy, Internet Measurement: Infrastructure,
Traffic and Applications. New York, NY, USA: John Wiley & Sons, Inc.,
2006.
V. Paxson, “Strategies for sound Internet measurement,” in Proceedings of
Internet Measurement Conference, Sicily Italy, Oct. 2004.
M. Arlitt and C. Williamson, “The extensive challenges of internet application
measurement,” IEEE Network, vol. 21, no. 3, pp. 41–46, May-June 2007.
F. Michaut and F. Lepage, “Application-oriented network metrology: metrics
and active measurement tools,” Communications Surveys & Tutorials, IEEE
Second Quater 2005, pp. 2 – 24, 2005.
Nick McKeown, http://tiny-tera.stanford.edu/~nickm
McKeown, N., et al., OpenFlow: enabling innovation in campus networks.
SIGCOMM Comput. Commun. Rev., 2008. 38(2): p. 69--74.
Vaughan-Nichols, S.J., OpenFlow: The Next Generation of the Network?
Computer, 2011. 44(8): p. 13 -15.
Limoncelli, T.A., OpenFlow: a radical new idea in networking. Commun.
ACM, 2012. 55(8): p. 42--47.
《网络专题选讲》
-142-