4、sdn 网络性能的测试与验证

目录

[1.1 创建基本的网络拓扑](#1.1 创建基本的网络拓扑)

[1.2 测试丢包率](#1.2 测试丢包率)

[1.3 测试带宽](#1.3 测试带宽)

[1.4 测试延迟](#1.4 测试延迟)


1.1 创建基本的网络拓扑

TypeScript 复制代码
ubuntu@sdnhubvm:~[08:34]$ cd mininet/examples/
ubuntu@sdnhubvm:~/mininet/examples[08:39] (master)$ sudo mn
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2 
*** Adding switches:
s1 
*** Adding links:
(h1, s1) (h2, s1) 
*** Configuring hosts
h1 h2 
*** Starting controller
c0 
*** Starting 1 switches
s1 ...
*** Starting CLI:

1.2 测试丢包率

设置网络参数,丢包率

TypeScript 复制代码
ubuntu@sdnhubvm:~/mininet/examples[08:41] (master)$ sudo mn --link=tc,loss=5
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2 
*** Adding switches:
s1 
*** Adding links:
(5.00000% loss) (5.00000% loss) (h1, s1) (5.00000% loss) (5.00000% loss) (h2, s1) 
*** Configuring hosts
h1 h2 
*** Starting controller
c0 
*** Starting 1 switches
s1 ...(5.00000% loss) (5.00000% loss) 
*** Starting CLI:
mininet> 

测试:(h1 ping h2 1000次,间隔为0.01s)

TypeScript 复制代码
mininet> h1 ping -c 1000 -i 0.01 h2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=5.63 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.153 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=0.111 ms
64 bytes from 10.0.0.2: icmp_seq=4 ttl=64 time=0.087 ms
64 bytes from 10.0.0.2: icmp_seq=6 ttl=64 time=0.064 ms
64 bytes from 10.0.0.2: icmp_seq=7 ttl=64 time=0.266 ms
64 bytes from 10.0.0.2: icmp_seq=9 ttl=64 time=0.119 ms


64 bytes from 10.0.0.2: icmp_seq=994 ttl=64 time=0.126 ms
64 bytes from 10.0.0.2: icmp_seq=995 ttl=64 time=0.074 ms
64 bytes from 10.0.0.2: icmp_seq=996 ttl=64 time=0.045 ms
64 bytes from 10.0.0.2: icmp_seq=997 ttl=64 time=0.040 ms
64 bytes from 10.0.0.2: icmp_seq=999 ttl=64 time=0.455 ms
64 bytes from 10.0.0.2: icmp_seq=1000 ttl=64 time=0.274 ms

--- 10.0.0.2 ping statistics ---
1000 packets transmitted, 820 received, 18% packet loss, time 11989ms
rtt min/avg/max/mdev = 0.038/0.122/5.637/0.227 ms

1.3 测试带宽

设置带宽为10M

TypeScript 复制代码
ubuntu@sdnhubvm:~/mininet/examples[08:48] (master)$ sudo mn --link=tc,loss=0,bw=10
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2 
*** Adding switches:
s1 
*** Adding links:
(10.00Mbit 0.00000% loss) (10.00Mbit 0.00000% loss) (h1, s1) (10.00Mbit 0.00000% loss) (10.00Mbit 0.00000% loss) (h2, s1) 
*** Configuring hosts
h1 h2 
*** Starting controller
c0 
*** Starting 1 switches
s1 ...(10.00Mbit 0.00000% loss) (10.00Mbit 0.00000% loss) 
*** Starting CLI:

验证

1.4 测试延迟

TypeScript 复制代码
ubuntu@sdnhubvm:~/mininet/examples[09:01] (master)$ sudo mn --link=tc,loss=0,bw=10,delay='1ms'
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2 
*** Adding switches:
s1 
*** Adding links:
(10.00Mbit 1ms delay 0.00000% loss) (10.00Mbit 1ms delay 0.00000% loss) (h1, s1) (10.00Mbit 1ms delay 0.00000% loss) (10.00Mbit 1ms delay 0.00000% loss) (h2, s1) 
*** Configuring hosts
h1 h2 
*** Starting controller
c0 
*** Starting 1 switches
s1 ...(10.00Mbit 1ms delay 0.00000% loss) (10.00Mbit 1ms delay 0.00000% loss) 
*** Starting CLI:
mininet> 
相关推荐
Fnetlink140 分钟前
FNET 云网安 260819
网络·人工智能·安全·网络安全
lsh曙光2 小时前
playbook剧本(2)--Ansible变量
linux·运维·网络
发光小北2 小时前
IO‑Link 从站转接模块如何应用?
网络
我爱cope3 小时前
【计算机网络 | 数据链路层7:VLAN:一台交换机如何划分多个逻辑局域网?】
网络·学习·计算机网络
数据知道3 小时前
网络安全实战:服务指纹识别——Banner、协议探测、版本漏洞关联
网络·安全·web安全·网络安全
无锡耐特森3 小时前
ModbusTCP转Profinet网关:恒压供水系统互联互通解决方案
网络
旗开得胜马到成功3 小时前
SK海力士SSD售后翻车:企业备份介质裸奔风险与中科热备技术选型拆解
运维·服务器·网络
bitbrowser4 小时前
MXToolbox检测IP只红一个黑名单时,如何判断?
网络·网络协议·tcp/ip
网安蟹佬霸5 小时前
CTF Web方向解题全攻略:从信息收集到getshell(附实战payload与脚本)
android·前端·网络·安全·web安全·网络安全·网安
优化Henry5 小时前
学习笔记之爱立信站点指向证书执行
运维·服务器·网络·笔记·学习·信息与通信