梅州网站建设中国建设人才信息网站查询

news/2025/9/22 18:33:58/文章来源:
梅州网站建设,中国建设人才信息网站查询,学校做网站难吗,wordpress提示恶意注册为什么要仿真随机路由#xff1f; 路由器测试中#xff0c;为了最大程度还原现网路由情况#xff0c;评估路由器在现网环境下稳定工作各项指标#xff0c;需要对导入路由进行离散仿真#xff0c;目前路由仿真可分为导入路由与生成路由两种方式#xff0c;导入路由需要现…为什么要仿真随机路由 路由器测试中为了最大程度还原现网路由情况评估路由器在现网环境下稳定工作各项指标需要对导入路由进行离散仿真目前路由仿真可分为导入路由与生成路由两种方式导入路由需要现网路由表导入本文讨论重点为生成路由方式。 自动化生成路由能解决什么问题 使用用户界面生成路由时可根据离散模型生成路由但生成路由与现网路由相比只注重路由段离散未体现AsPath、Community等BGP路由参数离散使用自动化生成路由可根据定义规则进行生成。 如何使用自动化生成随机路由 信而泰Renix平台提供了python API接口,可使用python API进行路由灵活定义。假设路由需求如下配置Port口1个包含20个IBGP个IBGP通告10个路由段、共10wIPv410wIPv6路由要求路由掩码随机选择AsPath随机选择、Connmity随机选择。 本文选择基础API使用信而泰APIrenix_py_api、MiscLibrary不另做定义使用时需安装相关环境。代码解析如下 导入相关库 #!/usr/bin/python -- coding: UTF-8 - import time from renix_py_api.renix import * from MiscLibrary.base import * import logging import random import re 初始化Python环境及定义参数 if name ‘main’: # 初始化环境 print(‘######################初始化环境######################’) print(time.strftime(‘%Y-%m-%d %H:%M:%S’, time.localtime(time.time()))) ############################################################### api MiscAPI() initialize(logTrue, log_levellogging.INFO, log_handleLogHandle.LOG_FILE) ############################################################### # 占用测试仪端口 chassis_DY “10.1.1.7” port_DY_1 “//10.1.1.7/3/1” # 路由起始地址 start_ip1 “20.0.0.0” start_ipv61 “2023::” #bgp路由参数 RgpSessionCount 20 BgpRouteBlock 10 BgpRouteBlockv6 10 ipv4routecount 100000 ipv6routecount 100000 #ipv4路由掩码 MaskMin 20 MaskMax 30 # ipv6路由掩码 PrefixMin 80 PrefixMax 120 # bgp as_pathcommunity限制 AsPathMaxLength 8 CommunityMaxLength 8 ############################################################### #其它参数 Ipv4RoutePerSession int(ipv4routecount / RgpSessionCount) ipv6PrefixPerSession int(ipv6routecount / RgpSessionCount) Ipv4CountRandonMax int(Ipv4RoutePerSession / BgpRouteBlock) Ipv4CountRandonMin int(Ipv4CountRandonMax * 0.5) Ipv6CountRandonMax int(ipv6PrefixPerSession / BgpRouteBlockv6) Ipv6CountRandonMin int(Ipv6CountRandonMax * 0.5) print(‘######################初始化完成######################’) print(time.strftime(‘%Y-%m-%d %H:%M:%S’, time.localtime(time.time()))) 创建端口及映射机箱 print(‘#######################连接机箱#######################’) print(time.strftime(‘%Y-%m-%d %H:%M:%S’, time.localtime(time.time()))) sys_entry get_sys_entry() sys_entry.edit(ProductType1) chassis ConnectChassisCommand(chassis_DY) # chassis.execute() # 占用端口、端口上线 port_1 Port(uppersys_entry, Locationport_DY_1, name‘port_1’) # BringPortsOnlineCommand(PortList[port_1.handle,port_2.handle]).execute() print(‘######################连接成功######################’) print(time.strftime(‘%Y-%m-%d %H:%M:%S’, time.localtime(time.time()))) print(‘#######################创建IBGP#######################’) print(time.strftime(‘%Y-%m-%d %H:%M:%S’, time.localtime(time.time()))) # 参数生成器定义 GeneratorRouteridv4 api.address_modifier(Startr’192.168.0.1’, Step1, Count1000, Offset0) GeneratorRouteridv6 api.address_modifier(Startr’192:168::1’, Step1, Count1000, Offset0) GeneratorMacAddress api.address_modifier(Startr’00:10:94:00:00:01’, Step1, Count1000, Offset0) GeneratorIPv4Address api.address_modifier(Startr’10.0.0.2’, Step1, Count1000, Offset8) GeneratorIPv6Address api.address_modifier(Startr’2000::2’, Step1, Count1000, Offset80) #接口生成interface for x in range(RgpSessionCount): #接口参数定义 Routeridv4 api.generator_next(GeneratorRouteridv4) Routeridv6 api.generator_next(GeneratorRouteridv6) MacAddr api.generator_next(GeneratorMacAddress) IPv4Addr api.generator_next(GeneratorIPv4Address) IPv6Addr api.generator_next(GeneratorIPv6Address) IPv4GWAddr api.ipv4_address_hopping(IPv4Addr, Mask32, Type‘decrement’, Step1) IPv6GWAddr api.ipv6_address_hopping(IPv6Addr, Mask128, Type‘decrement’, Step1) # 创建IPv4接口 interface Interface(upperport_1, RouterId Routeridv4, Ipv6RouterId Routeridv6) Interface_temp “Interface_” str(x1) build_Dual BuildInterfaceCommand(InterfaceListInterface_temp, NetworkLayers[‘eth’, ‘vlan’], TopLayers[‘ipv4’, ‘ipv6’]) build_Dual.execute() eth_layer interface.get_children(‘EthIILayer’)[0] eth_layer.edit(Address MacAddr) vlan_layer interface.get_children(‘VlanLayer’)[0] vlan_layer.edit(VlanId x1 ) ipv4_layer interface.get_children(‘Ipv4Layer’)[0] ipv4_layer.edit(Address IPv4Addr , GatewayIPv4GWAddr) ipv6_layer interface.get_children(‘Ipv6Layer’)[0] ipv6_layer.edit(Address IPv6Addr , GatewayIPv6GWAddr) 创建BGP协议及路由 创建BGP协议 BgpSession BgpProtocolConfig(upperport_1)BgpSession.edit(AsNumber65000)BgpSession.edit(DutAsNumber65000)BgpSession.edit(UseGatewayAsDutIpFalse)BgpSession.edit(DutIpv4AddressIPv4GWAddr)BgpSession.edit(DutIpv6AddressIPv6GWAddr)# 绑定Dual接口和协议select_interface SelectInterfaceCommand(ProtocolList[BgpSession.handle], InterfaceList[interface.handle])select_interface.execute()# IPv4路由block创建FirstRoute start_ip1Ipv4RouteCount 0for y in range(BgpRouteBlock):mask random.randint(MaskMin, MaskMax)if y BgpRouteBlock-1:RouteCount Ipv4RoutePerSession - Ipv4RouteCountelse:RouteCount random.randint(Ipv4CountRandonMin, Ipv4CountRandonMax)Ipv4RouteCount Ipv4RouteCountRouteCountoffset 32 - maskif x 0 and y 0:# bgp参数修改BgpRoute BgpIpv4RoutepoolConfig(upperBgpSession)BgpRoute.get()BgpRoute.edit(FirstRouteFirstRoute)BgpRoute.edit(PrefixLengthmask)BgpRoute.edit(RouteCountRouteCount)GeneratorIPv4Route api.address_modifier(StartFirstRoute, StepRouteCount, Offsetoffset, Count1000)IPv4Route api.generator_next(GeneratorIPv4Route)IPv4Route api.generator_next(GeneratorIPv4Route)else:BgpRoute BgpIpv4RoutepoolConfig(upperBgpSession)BgpRoute.get() BgpRoute.edit(FirstRouteIPv4Route) BgpRoute.edit(PrefixLengthmask) BgpRoute.edit(RouteCountRouteCount) Start IPv4Route GeneratorIPv4Route api.address_modifier(StartStart, StepRouteCount, Offsetoffset, Count1000) IPv4Route api.generator_next(GeneratorIPv4Route) IPv4Route api.generator_next(GeneratorIPv4Route) # bgp参数修改 as_path_length random.randint(2, AsPathMaxLength) community_length random.randint(2, CommunityMaxLength) as_path_list list() community_list list() AsPathIncrement_list list() as_path_tem str() community_tem str() communityIncrement_list list() for z in range(as_path_length): as_path random.randint(300, 64000) as_path_list.append(as_path) for z in range(community_length): community1 random.randint(1, 65535) community2 random.randint(1, 65535) community str(community1) ‘:’ str(community2) community_list.append(community) for i in range(len(community_list) - 1): community community_list[i] community_tem community community_tem ‘,’ community_tem str(community_list[-1]) AsPathPerBlockCount int(RouteCount / 6.5) for z in range(len(as_path_list)): AsPathIncrement_list.append(1) for z in range(len(community_list)): Temp str(1) ‘:’ str(1) communityIncrement_list.append(Temp) BgpRoute.edit(AsPathas_path_list) BgpRoute.edit(AsPathIncrementAsPathIncrement_list) BgpRoute.edit(AsPathPerBlockCountAsPathPerBlockCount) BgpRoute.edit(Communitycommunity_tem) BgpRoute.edit(CommunityIncrementcommunityIncrement_list) BgpRoute.edit(CommunityPerBlockCountAsPathPerBlockCount) # IPv6路由block创建 FirstPrefix start_ipv61 Ipv6PrefixCount 0 for y in range(BgpRouteBlockv6): mask random.randint(PrefixMin, PrefixMax) if y BgpRouteBlockv6 - 1:RouteCount ipv6PrefixPerSession - Ipv6PrefixCountelse:RouteCount random.randint(Ipv6CountRandonMin, Ipv6CountRandonMax)Ipv6PrefixCount Ipv6PrefixCount RouteCountoffset 128 - maskif x 0 and y 0:# bgp参数修改BgpRoute BgpIpv6RoutepoolConfig(upperBgpSession)BgpRoute.get()BgpRoute.edit(FirstIpv6RouteFirstPrefix)BgpRoute.edit(PrefixLengthmask)BgpRoute.edit(RouteCountRouteCount)GeneratorIPv6Route api.address_modifier(StartFirstPrefix, StepRouteCount, Offsetoffset, Count1000)IPv6Prefix api.generator_next(GeneratorIPv6Route)IPv6Prefix api.generator_next(GeneratorIPv6Route)else:BgpRoute BgpIpv6RoutepoolConfig(upperBgpSession)BgpRoute.get()BgpRoute.edit(FirstIpv6RouteIPv6Prefix)BgpRoute.edit(PrefixLengthmask)BgpRoute.edit(RouteCountRouteCount)Start IPv6PrefixGeneratorIPv6Route api.address_modifier(StartStart, StepRouteCount, Offsetoffset, Count1000)IPv6Prefix api.generator_next(GeneratorIPv6Route)IPv6Prefix api.generator_next(GeneratorIPv6Route)# bgp参数修改as_path_length random.randint(2, AsPathMaxLength)community_length random.randint(2, CommunityMaxLength)as_path_list list()community_list list()AsPathIncrement_list list()as_path_tem str()community_tem str()communityIncrement_list list()for z in range(as_path_length):as_path random.randint(300, 64000)as_path_list.append(as_path)for z in range(community_length):community1 random.randint(1, 65535)community2 random.randint(1, 65535)community str(community1) : str(community2)community_list.append(community)for i in range(len(community_list) - 1):community community_list[i]community_tem communitycommunity_tem ,community_tem str(community_list[-1])AsPathPerBlockCount int(RouteCount / 6.5)for z in range(len(as_path_list)):AsPathIncrement_list.append(1)for z in range(len(community_list)):Temp str(1) : str(1)communityIncrement_list.append(Temp)BgpRoute.edit(AsPathas_path_list)BgpRoute.edit(AsPathIncrementAsPathIncrement_list)BgpRoute.edit(AsPathPerBlockCountAsPathPerBlockCount)BgpRoute.edit(Communitycommunity_tem)BgpRoute.edit(CommunityIncrementcommunityIncrement_list)BgpRoute.edit(CommunityPerBlockCountAsPathPerBlockCount) # Save the test case to D:\ as the name of bgp_random.xcfg save_case SaveTestCaseCommand(TestCaseD/bgp_random.xcfg, ProductType1)随机路由生成测试 执行代码后生成配置如下 接口参数 BGP Session IPv4路由 随机变化点路由数量、路由前缀长度、AsPath、AsPath跳变步长、AsPath数量、Community、Community跳变步长、Community数量 IPv6路由 随机变化点路由数量、路由前缀长度、AsPath、AsPath跳变步长、AsPath数量、Community、Community跳变步长、Community数量 DarYu-X系列测试仪 DarYu-X系列高性能网络测试仪是信而泰推出的面向高端路由器等高端数通设备的测试产品具有高性能、高密度、高速率等特点配置信而泰基于PCT架构的新一代测试软件RENIX和X系列测试模块可为提供路由哭喊组网测试解决方案为建立一张高SLA保证、确定性时延、业务感知、灵活业务路径调优的下一代网络保驾护航。

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

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

相关文章

游戏ui设计网站东莞网站建设招聘

SQL表值函数和标量值函数的区别 写sql存储过程经常需要调用一些函数来使处理过程更加合理,也可以使函数复用性更强,不过在写sql函数的时候可能会发现,有些函数是在表值函数下写的有些是在标量值下写的,区别是表值函数只能返回一个…

企业网站建设的经验心得做网站的实践报告

一、需求及项目准备 二、系统框图 三、硬件接线 四、语音模块配置 五、模块测试 一、需求及项目准备 语音接入控制各类家电,如客厅灯、卧室灯、风扇Socket网络编程,实现Sockect发送指令远程控制各类家电烟雾警报监测, 实时检查是否存在煤气…

贪心算法应用:多重背包启发式疑问详解

贪心算法应用:多重背包启发式疑问详解pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Mon…

中标公示查询网站网络营销服务外包

加速时如何换挡,您知道吗?为了使换挡过程顺利进行,变速器内齿轮平稳啮合,必须掌握好发动机转速,在适当时机推动变速杆操纵齿轮啮合。为此,要通过反复练习,一边踩踏油门踏板,一边听发动机运转声…

划重点|云栖大会「AI 原生应用架构论坛」看点梳理

AI 潮正以不可阻挡之势重塑千行百业。兴奋与喧嚣过后,如何将强大的 AI 能力,真正高效、可靠地融入企业业务、从“可用”走向“好用”等问题是所有企业和技术人必须解决的问题。 答案正在指向一个全新的范式——AI 原…

君子如水,心中有火:vivo本心而为30周年

「 水之灵的战术应变,水之韧的战略坚守,水之谦的价值观底色 」 不同时代、不同背景下的企业,有着不同的生存哲学。 在过去三十年中国企业迅猛发展的历程中,中国很多科技企业大都是在强调竞争,把对手干掉,最终赢家…

Margin 塌陷问题如何解决?触发BFC。BFC的概念和触发条件

1️⃣ 什么是 Margin 塌陷 【现象】两个垂直方向相邻的块级盒子(兄弟或父子)之间的margin 会合并为其中的最大值,而不是两者相加。【影响】兄弟元素:上下margin合并为其中的最大值  父子元素:如果父元素没有paddi…

网站开发目的与意义wordpress 您没有足够的权限访问该页面.

如果需要一个全局对象,如对话框、系统日志、显卡等设备的驱动程序对象、一台PC连接一个键盘等。这样的全局对象只能是一个且是全局的,这就是单例模式,如何实现呢?1 不能在类外部通过构造函数新建对象:构造函数的访问方…

返利网站怎么做做我的狗在什么网站上看

以下内容摘自笔者即将出版的最新著作《深入理解计算机网络》一书。本书将于12月底出版上市,敬请留意!! 本书原始目录参见此文:http://winda.blog.51cto.com/55153/1063878 5.3.2 循环冗余校验检错方案 上节介绍的奇偶校验码&#…

哪些网站做品牌折扣的建站公司技术服务费

在开发工程中线程可以帮助我们提高运行速度,Android开发中我知道的线程有四个一个是老生长谈的Thread,第二个是asyncTask,第三个:TimetTask,第四个是Looper,四个多线程各有个的有点,Thread的运行速度是最快的,AsyncTas…

什么企业做网站比较方便呢微信注册小程序步骤

1, 概述 1.1 课题背景 本系统由说书客面向广大民营药店、县区级医院、个体诊所等群体的药品和客户等信息的管理需求,采用SpringSpringMVCMybatisEasyui架构实现,为单体药店、批发企业、零售连锁企业,提供有针对性的信息数据管理…

邵东网站开发微信小程序h5开发

flex如何做响应式设计Responsive design is not just about the web that automatically adjusts to different screen resolutions and resizeable images, but designs that are crucial for web performance.自适应设计不仅涉及可自动适应不同屏幕分辨率和可调整大小图像的网…

郑州门户网站建设哪家好有了自己的域名怎么做网站

✌全网粉丝20W,csdn特邀作者、博客专家、CSDN新星计划导师、java领域优质创作者,博客之星、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战✌ 🍅文末获取项目下载方式🍅 一、项目背景介绍: 随着互联网技术的不断…

广州建站模板诚信网站平台建设方案

在无限的整数序列 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...中找到第 n 个数字。 注意: n 是正数且在32为整形范围内 ( n < 231)。 示例 1: 输入: 3 输出: 3 示例 2: 输入: 11 输出: 0 说明: 第11个数字在序列 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... 里是0&#xff0c;它是…

伊犁州住房城乡建设局网站建站快车加盟

铁路订票管理系统按照权限的类型进行划分&#xff0c;分为用户和管理员两个模块。管理员模块主要针对整个系统的管理进行设计&#xff0c;提高了管理的效率和标准。主要功能包括个人中心、用户管理、火车类型管理、火车信息管理、车票预订管理、车票退票管理、系统管理等&#…

手机影视素材网站大全汽油价格92号最新调整时间

1. 指针和数组 C语言中只有一维数组&#xff0c;而且数组的大小必须在编译器就作为一个常数确定下来&#xff0c;然而在C语言中数组的元素可以是任何类型的对象&#xff0c;当然也可以是另外的一个数组&#xff0c;这样&#xff0c;要仿真出一个多维数组就不是难事。 对于一个…

app和网站哪个难做宁夏免费建个人网站

物品名称物品代码电池battery.small骨头碎片bone.fragments空的豆罐头can.beans.empty空的金枪鱼罐头can.tuna.empty摄像头cctv.camera木炭charcoal煤coal石油crude.oil炸药explosives动物脂肪fat.animal火药gunpowder高级金属矿hq.metal.ore金属碎片metal.fragments金属矿meta…

商家自己做的商品信息查询网站网站开发结论

本文实例讲述了PHP双向链表定义与用法。分享给大家供大家参考&#xff0c;具体如下&#xff1a;由于需要对一组数据多次进行移动操作&#xff0c;所以写个双向链表。但对php实在不熟悉&#xff0c;虽然测试各个方法没啥问题&#xff0c;就是不知道php语言深层的这些指针和unset…

漯河市万金镇网站建设建设个人网站用到的技术

matlab语言丰富的图形表现方法&#xff0c;使得数学计算结果可以方便地、多样性地实现了可视化&#xff0c;这是其它语言所不能比拟的。;第一节 符号函数绘图第二节 图形编辑第三节 2D数据图第四节 3D数据图第五节 MATLAB的视图功能第六节 图像、视频和声音;plot —— 最基本的…

嘉兴品牌网站初学者求教怎样做网站

序言 Sentinel 是阿里巴巴开源的一款流量防护与监控平台&#xff0c;它可以帮助开发者有效地管理微服务的流量&#xff0c;实现流量控制、熔断降级、系统负载保护等功能。本文将介绍如何在项目中部署和配置 Sentinel 控制台&#xff0c;实现微服务的流量防护和监控。 一、Sen…