A Policy-Based Routing (PBR) Router based on Distance-Vector Algorithm

Objective

Design a DV-based router which simulates a RIP router on the Internet. The router can determine the shortest route based on the policy and transport packets.

Supported commands

The program should dispose the following commands:

N ---- Print activity’s adjacent list.

T ---- Display routing table.

D n ---- send a data packet the destination that the number n represents.

P K n1 n2 … nk ---- Specified priority route

       K: the count of nodes in the route.

       n1 n2 … nk : IDs of all K nodes and nk is the ID of destination node.

       Replace possible shortest route with possible priority route after the node receives the command. In routing update, replace original route with the shortest route and the new route is in accordance with the priority route.

R n ---- Refused to pass the node n.

       After the node receives the command,the node ignores all of the updates that contains node n in routing update.

P K n1 n2 … nk 这个命令我没有理解它什么意思,因为他涉及到了多个路由器,所以无法在一台路由器上配置,但是写的程序是一台路由器,加上时间紧张,最后这个命令没有实现。

开发语言:C++

开发工具:QT5.12

程序在GitHub上,链接

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值