ZebraQuagga Ospf and Unh Test Section 2

xiaoxiao2021-03-05  23

Case 2.1

Dr and bdr become adjacent with all Other routers.

NSM_TWOWAY_RECEIVED () Changes Nbr State from NSM_INIT to NSM_EXSTART.

Two Ways can Trigger this function.

ospf_hello | --OSPF_NSM_EVENT_EXECUTE (nbr, NSM_HelloReceived) (NSM_Down -> NSM_NSM_Init) | --OSPF_NSM_EVENT_EXECUTE (nbr, NSM_TwoWayReceived) (NSM_Init -> NSM_ExStart) ospf_db_desc | --OSPF_NSM_EVENT_EXECUTE (nbr, NSM_TwoWayReceived) (NSM_Init -> NSM_ExStart)

after change to NSM_ExStart, begin to send DD packets.ospf_nsm_event | --nsm_twoway_received | --nsm_change_state | --ospf_db_desc_send | --nsm_timer_set | --OSPF_NSM_TIMER_ON (ospf_db_desc_timer) case 2.2ospf_db_desc_send | --ospf_make_db_desc

Case 2.3ospf_db_desc

Case 2.4

OSPF_NEighbor {} | --LS_RXMT | --DB_SUM | --LS_REQ

Negotiation Process Refer Page 106 of RFC 2328

Slave router (lower router id) change to NSM_Exchange after received the Initial DD packet from Master.Master router change to NSM_Exchange after received the ack DD packet from Slave.OSPF_NSM_EVENT_EXECUTE (nbr, NSM_NegotiationDone) (NSM_ExStart -> NSM_Exchange)

OSPF_NSM_EVENT | --NSM_NEGOTIN_DOONE (Add All Lsas to Database Summary List DB_SUM)

OSPF_DB_DESC | --SPF_DB_DESC_PROC | --SPF_LS_REQUEST_ADD (Add Received Lsas to Link State Request List Ls_req)

router generates event NSM_ExchangeDone after db_sum is empty.the slave always generates event NSM_ExchangeDone before the master ospf_db_desc_proc | --OSPF_NSM_EVENT_SCHEDULE (nbr, NSM_ExchangeDone) (NSM_Exchange -> NSM_Loading) |. --nsm_exchange_done | --ospf_ls_req_send case 2.5for router lsaospf_ls_upd | --ospf_lsa_more_recent | --ospf_flood | --ospf_lsa_is_self_originated | --ospf_process_self_originated_lsa | --ospf_router_lsa_timer_add (for router lsa) or | --ospf_schedule_lsa_flush_area (for network lsa) | --ospf_network_lsa_timer_addfor network lsa and router id is changed.ospf_ls_upd | - OSPF_LSA_FLUSH_AREA CASE 2.6

OSPF_LS_UPD | --SPF_LS_UPD_SEND_LSA (Nbr, Current, OSPF_SEND_PACKET_DIRECT) Case 2.7

OSPF_LS_UPD

OSPF_LS_REQ

case 2.8Part ASlave dont retransmit the non-initial DD packet.ospf_db_desc | --OSPF_NSM_EVENT_EXECUTE (NSM_NegotiationDone) (NSM_ExStart -> NSM_Exchange) | --nsm_timer_set | --if (IS_SET_DD_MS (nbr-> dd_flags)!) (the router is SLAVE) | --SPF_NSM_TIMER_OFF (NBR-> T_DB_DESC) Part bospf_db_desc | --ospf_db_desc_resend

Part CNBR-> T_DB_DESC IS on WHEN NBR CHANGE to NSM_EXSTART, AND IS Not Off When Change to NSM_Exchange If The Router Is Master

Case 2.9ospf_db_desc

OSPF_DB_DESC_PROC

case 2.10ospf_ls_upd | --ospf_flood | --ospf_flood_through | --ospf_flood_through_area (lsa-> area, inbr, lsa) | --ospf_flood_through_interface | --ospf_ls_upd_send_lsa (oi-> nbr_self, lsa, OSPF_SEND_PACKET_INDIRECT) | --ospf_lsa_install | - if (lsa_ack_flag) | --ospf_flood_delayed_lsa_ack (nbr, new) [note] parameter "inbr" will be used to distinguish the called context whether the given LSA was received from the neighbor, or the flooding for the LSA starts from this node (eg the LSA was self-originated, or the LSA is going to be flushed from routing domain) case 2.11ospf_ls_upd | --ospf_flood | --ospf_flood_through | --ospf_flood_through_as (lsa-> area, inbr, lsa) | --ospf_flood_through_interface | - -OSPF_LS_UPD_SEND_LSA (Oi-> NBR_SELF, LSA, OSPF_SEND_PACKET_INDIRECT) CASE 2.12 (Receive | ROUTER) | DR BDR DR OTHER ------------------------------------ ------------------------ DR | - DELAY ACK TO FLOOD | AllSpFrouter Implied Ack BDR | DELAY ACK To - No Action | Allspfrouter Dr 中er | delay ACK To Delay Ack To - | Alldrrouter AllDrrouter

[Note] BDR Maybe Receive New LSA from Dr in The Following Conditions: 1.the new lsa is Originated by Dr2.The New LSA IS Originated by DR Other And Flooded by DR

.. Ospf_ls_upd | --ospf_flood | --ospf_flood_through | --ospf_flood_through_area (lsa-> area, inbr, lsa) | --ospf_flood_through_interface lsa_ack_flag will be true in the following conditions: 1 inbr is DR or BDR2 the router is BDR (. but in ospf_flood_delayed_lsa_ack () only lsa from DR is acked) |. --ospf_ls_upd_send_lsa (oi-> nbr_self, lsa, OSPF_SEND_PACKET_INDIRECT) | --ospf_ls_upd_send | --if (oi-> state == ISM_DR || oi-> state = = ISM_Backup) | --p.prefix.s_addr = htonl (OSPF_ALLSPFROUTERS) | --p.prefix.s_addr = htonl (OSPF_ALLDROUTERS) ospf_flood | --ospf_flood_delayed_lsa_ack (nbr, new) implied ack is in ospf_ls_upd | --ospf_lsa_more_recent () == 0Part C (BDR will flood it?) nsm_timer_set | --OSPF_NSM_TIMER_ON (ospf_ls_upd_timer) ospf_flood_through_interface | --ospf_ls_retransmit_add case 2.13ospf_router_lsa_refresh | --ospf_flood_throu gh_area | --ospf_flood_through_interface (lsa-> area, inbr, lsa) (inbr is NULL) | --ospf_ls_retransmit_add if RUT and the nbr router are both DR Other, they will not form adjacency and the nbr state is NSM_TwoWay, which is Less tour nsm_exchange.so the new router LSA IS Not Added Into Ls Retransmit List

Case 2.14

ospf_ls_upd | --ospf_flood | --ospf_flood_through | --ospf_flood_through_area (lsa-> area, inbr, lsa) (inbr is not NULL) | --ospf_flood_through_interface | --ospf_ls_retransmit_add case 2.15ospf_ls_upd_send_lsa

Case 2.16see case 2.13 and 2.14

ospf_db_desc | --ospf_db_desc_proc | --ospf_ls_request_add | --OSPF_NSM_EVENT_SCHEDULE (nbr, NSM_ExchangeDone) (NSM_Exchange -> NSM_Loading) | --nsm_exchange_done | --ospf_ls_req_send ospf_ls_upd | --ospf_flood | --ospf_flood_through | --ospf_flood_through_area (lsa-> area, inbr, lsa) (inbr is not NULL) | --ospf_flood_through_interface | --ospf_ls_request_delete | --ospf_check_nbr_loading | --OSPF_NSM_EVENT_SCHEDULE (nbr, NSM_LoadingDone) (NSM_Loading -> NSM_Full) case 2.17ospf_ls_reqcase 2.18Part Aospf_ls_req

Part Bhigher sequence number is added to ls req list in dd exchange process.ospf_db_desc | --ospf_db_desc_proc | --ospf_ls_request_add | --ospf_lsdb_add (new_lsa-> lock = 2) | --ospf_lsa_discard (new_lsa-> lock = 1)

so if old lsa is received and in the ls req list, NSM_BadLSReq is triggered ospf_ls_upd |. --OSPF_NSM_EVENT_SCHEDULE (nbr, NSM_BadLSReq) case 2.19ospf_new | --ospf_lsa_maxage_walker | --ospf_lsa_maxage_walker_remover | --ospf_lsa_maxage | --OSPF_TIMER_ON (ospf_maxage_lsa_remover) | --SPF_MAXAGE_LSA_REMOVER | --SPF_FLOOD_THROUGH

case 2.20ospf_new | --ospf_lsa_refresh_walker ospf_lsa_install | --ospf_router_lsa_install | --OSPF_AREA_TIMER_ON (ospf_router_lsa_timer) | --ospf_network_lsa_install | --OSPF_INTERFACE_TIMER_ON (ospf_network_lsa_refresh_timer) | --ospf_summary_lsa_install | --ospf_summary_asbr_lsa_install | --ospf_external_lsa_install | --ospf_refresher_register_lsacase 2.21ospf_ls_upd | - -ospf_flood | --ospf_flood_through | --ospf_flood_through_area | --ospf_flood_through_interface | --ospf_ls_retransmit_add | --ospf_ls_retransmit_delete_nbr_area case 2.22ospf_db_descospf_ls_updospf_ls_req

转载请注明原文地址:https://www.9cbs.com/read-36218.html

New Post(0)