NetSim网络仿真使用及静态路由配置

🍰 个人主页:不摆烂的小劉
🍞文章有不合理的地方请各位大佬指正。
🍉文章不定期持续更新,如果我的文章对你有帮助➡️ 关注🙏🏻 点赞👍 收藏⭐️

在这里插入图片描述
NetSim网络仿真使用及静态路由配置。

实验要求及其步骤

在这里插入图片描述

使用Boson NetWork Designer设计网络拓扑图

在这里插入图片描述

添加PC

在这里插入图片描述

添加路由器

在这里插入图片描述
选择路由接口
在这里插入图片描述
点击Select
效果图
在这里插入图片描述

添加连接

添加Serial连接

在这里插入图片描述

选择连接接口(选择最好和我的一样,下面会用到)
在这里插入图片描述在这里插入图片描述
在这里插入图片描述

添加Ethernet连接

Router1PC1使用Ethernet连接
在这里插入图片描述

在这里插入图片描述
同理的Router2PC2使用Ethernet连接起来
配置好如图
双击路由器Router1如图
在这里插入图片描述
拓扑图配置完毕

配置Boson NetSim for CCNP

接下来使用Boson NetSim for CCNP完成接下来实验

配置Router1

在这里插入图片描述

en
conf t
hostname router1
interface Serial 1/0
ip address 192.168.2.1 255.255.255.0
clock rate 6400//设置时钟频率,只在Serial 连接中配置,且只需要在这一个路由器中配置,另一个路由去里面则不用设置
no shut
interface Ethernet 0/0
ip address 192.168.0.2 255.255.255.0
no shut
end
config t
ip route 192.168.10.0 255.255.255.0 192.168.2.1//静态路由
ip route 192.168.2.0 255.255.255.0 192.168.2.1
end

查看route1路由表

在这里插入图片描述

配置router2

在这里插入图片描述

//router2
en 
conf t
hostname router2
interface Serial 1/0
ip address 192.168.2.2 255.255.255.0
no shut
interface Ethernet 0/0
ip address 192.168.10.2 255.255.255.0
no shut
end
config t
ip route 192.168.0.0 255.255.255.0 192.168.2.2
ip route 192.168.2.0 255.255.255.0 192.168.2.2
end
ping 192.168.2.1//测试两个路由器的连通性,若出现Success rate *****(省略)则两个路由器成功建立关联

查看route2路由表
在这里插入图片描述

配置PC1

在这里插入图片描述

//PC1 PC1与Router1相连接,Ethernet 0/0对应的ip即为PC1的网关
//先分配ip地址,根据实验要求 PC1分配地址为192.168.0.100
ipconfig /ip 192.168.0.100 255.255.255.0
//设置网关
ipconfig /dg 192.168.0.2
//PC1已经配置好了,可以测试试一下
ping 

PC2

在这里插入图片描述

//PC1 PC1与Router1相连接,Ethernet 0/0对应的ip即为PC1的网关
//先分配ip地址,根据实验要求 PC1分配地址为192.168.0.100
ipconfig /ip 192.168.0.100 255.255.255.0
//设置网关
ipconfig /dg 192.168.0.2
//PC1已经配置好了,可以测试试一下
ping 

测试连通性(完成)

PC1 ping Router2和PC2

在这里插入图片描述
使用tracert查看ip跳转的路径
在这里插入图片描述
实验完成!!!!🔥🔥🔥🔥
如果对你有帮助,点个👍👍

Inputs: [AorV] Either A or V where A is a NxN adjacency matrix, where A(I,J) is nonzero if and only if an edge connects point I to point J NOTE: Works for both symmetric and asymmetric A V is a Nx2 (or Nx3) matrix of x,y,(z) coordinates [xyCorE] Either xy or C or E (or E3) where xy is a Nx2 (or Nx3) matrix of x,y,(z) coordinates (equivalent to V) NOTE: only valid with A as the first input C is a NxN cost (perhaps distance) matrix, where C(I,J) contains the value of the cost to move from point I to point J NOTE: only valid with A as the first input E is a Px2 matrix containing a list of edge connections NOTE: only valid with V as the first input E3 is a Px3 matrix containing a list of edge connections in the first two columns and edge weights in the third column NOTE: only valid with V as the first input [SID] (optional) 1xL vector of starting points. If unspecified, the algorithm will calculate the minimal path from all N points to the finish point(s) (automatically sets SID = 1:N) [FID] (optional) 1xM vector of finish points. If unspecified, the algorithm will calculate the minimal path from the starting point(s) to all N points (automatically sets FID = 1:N) Outputs: [costs] is an LxM matrix of minimum cost values for the minimal paths [paths] is an LxM cell containing the shortest path arrays [showWaitbar] (optional) a scalar logical that initializes a waitbar if nonzero Note: If the inputs are [A,xy] or [V,E], the cost is assumed to be (and is calculated as) the point to point Euclidean distance If the inputs are [A,C] or [V,E3], the cost is obtained from either the C matrix or from the edge weights in the 3rd column of E3 Example: % Calculate the (all pairs) shortest distances and paths using [A,C] inputs n = 7; A = zeros(n); xy = 10*rand(n,2) tri = delaunay(xy(:,1),xy(:,2)); I = tri(:); J = tri(:,[2 3 1]); J = J(:); IJ = I + n*(J-1); A(IJ) = 1 a = (1:n); b = a(ones(n,1),:); C = round(reshape(sqrt(sum((xy(b,:) - xy(b',:)).^2,2)),n,n)) [costs,paths] = dijkstra(A,C) Example: % Calculate the shortest distance and path from point 3 to 5 n = 15; A = zeros(n); xy = 10*rand(n,2) tri = delaunay(xy(:,1),xy(:,2)); I = tri(:); J = tri(:,[2 3 1]); J = J(:); IJ = I + n*(J-1); A(IJ) = 1 [cost,path] = dijkstra(A,xy,3,5) gplot(A,xy,'b.:'); hold on; plot(xy(path,1),xy(path,2),'ro-','LineWidth',2) for k = 1:n, text(xy(k,1),xy(k,2),[' ' num2str(k)],'Color','k'); end Example: % Calculate the shortest distances and paths from the 3rd point to all the rest n = 7; V = 10*rand(n,2) I = delaunay(V(:,1),V(:,2)); J = I(:,[2 3 1]); E = [I(:) J(:)] [costs,paths] = dijkstra(V,E,3) Example: % Calculate the shortest distance and path from points [1 3 4] to [2 3 5 7] n = 7; V = 10*rand(n,2) I = delaunay(V(:,1),V(:,2)); J = I(:,[2 3 1]); E = [I(:) J(:)] [costs,paths] = dijkstra(V,E,[1 3 4],[2 3 5 7]) Revision Notes: (3/13/15) Previously, this code ignored edges that have a cost of zero, potentially producing an incorrect result when such a condition exists. I have solved this issue by using NaNs in the table rather than a sparse matrix of zeros.
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值