Project 2 Virtual Router EECS 489 Ying Zhang

  • Slides: 9
Download presentation
Project 2 Virtual Router EECS 489 Ying Zhang

Project 2 Virtual Router EECS 489 Ying Zhang

VRP packet structure • Version • Type • Distance vectors: – One vin_addr_t for

VRP packet structure • Version • Type • Distance vectors: – One vin_addr_t for one destination • Vad_metric is the distance between the sender and the destination

Five heuristics • Trigger updates – Routing entries change, immediately send out update message

Five heuristics • Trigger updates – Routing entries change, immediately send out update message • Split-horizon with poison reverse – Avoid sending routes in updates to the node from which they were learned • Route poisoning – If the cost continuously increases • Path hold down – Do not switch route for n update periods after cost goes up • All of them • None of them

 • Vrp_periodic – Update tp – Check whether it is time to update

• Vrp_periodic – Update tp – Check whether it is time to update • If no, return – Mark itself as modified (change the vrtbl_mod and vrouter_nmod of its own entry ([0]) – For each entry of the table, • For each valid entry, update it, check whether it is still valid – Set last propagation time to current time – Call vrp_propagate();

 • Vrp_propagate() – Construct the vrp (copy all the entries that are marked

• Vrp_propagate() – Construct the vrp (copy all the entries that are marked to the VRP packet) – For each entry in the routing table – Set the metric: • If route poisoning and vrtbl_infl is larger than VRP_INFLTRND, then mark it to be VRP_INPFINTY • If route VRP_HEURSHPR, and the neighbor is the same as the vrtbl_vif, and the destination is the not neighbor, then mark it to be VRP_INPFINTY – Vip_output – Free memory, reset all the entries

 • Vrp_reconfig() – For each valid entry • Check if the vif is

• Vrp_reconfig() – For each valid entry • Check if the vif is down • Mark all the destination that uses the vif is not reachable – Vif to 0; vrtbl_cost; vrtbl_ts • If HEURTRGD – Update the nmod and vrtbl_mod • If VRP_HEUROHD – Then update the start of hold timer : vrtbl_hold

 • Vrp_update – Drop the packet if the version and type is not

• Vrp_update – Drop the packet if the version and type is not known • Check vp field – For each distance vector in vp • Update cost (with the cost to the neighbor) • Find each vector in vrouter • If its from current nexthop – If new cost is higher » For PHD, if the hold_down timer has not been set, set it » For RP, increase vrtbl_infl, initialize the stability count vrtbl_reflected » For TRGD, mark mod and nmod updated

 • If the cost is lower or For PHD and holddown updates is

• If the cost is lower or For PHD and holddown updates is enough than the VRP_HOLDNRND, • If HEURRP and the path has been inflated, – If it has been reflected, reset vrtbl_infl to 0; – If not, then mark it as is reflected • If the cost is lower than new cost and is from other vif – If not PHD or PHD expires, then change the vif, cost, hold_down timer

Route Reflection Dv© = 1, NH=B Dv© = 2, NH=B A Dv© = 5,

Route Reflection Dv© = 1, NH=B Dv© = 2, NH=B A Dv© = 5, NH=B Infl++ Decrease? Infl = 0? No, set the reflected Dv© = 2, NH=B Dv© = 4, NH=B Dv© = 1, NH=B Dv© = 4, NH=B B Dv© = 3, NH=A Dv© = 3, NH=B C