華為產品技術學習筆記之路由原理(一)

? ? ? ?路由器:路由器是一種典型的網絡連接設備,用來進行路由選擇和報文轉發。
路由器與它直接相連的網絡的跳數為0,通過一臺路由器可達的網絡的跳數為1.
????? 路由協議:路由器之間維護路由表的規則,用以發現路由,生成路由表,并引導報文轉發。
路由器決策路由關鍵是路由表,轉發報文關鍵是FIB表(Forwarding Information Base)表。每個路由器至少維護著一張路由表和一張FIB表。
????? 路由表中通常包含:
鏈路層協議發現的路由(接口路由或直連路由)
網絡管理員人工配置的靜態路由
動態路由協議主動發現的路由
FIB表指明分組到某網段或某主機應通過路由器的物理接口或邏輯接口發送,到達計劃路徑的下一個路由器,當然也可以不經過路由器直達直接相連網絡中的主機。
一臺路由器保存著一張本地核心(管理)路由表,路由協議也維護著自己的路由表。即
本地核心路由表
????? 用來保護協議路由和決策優選路由,負責把優選路由下發到FIB,由FIB負責指導轉發。具體通過display ip routing-table,查看?
各種路由協議的優先級和度量值選取路由。
協議路由表
???? 即協議主動發現的路由。路由協議可以引入并發布其它協議生成的路由。
例如:查看路由表
<quidway>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
??????? Destinations : 20?????? Routes : 20
Destination/Mask??? Proto? Pre? Cost???? Flags NextHop???????? Interface
10.201.54.215/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
? 10.201.57.128/27? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
??? 10.201.62.0/26? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
??? 10.201.63.4/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
?? 10.201.81.16/29? Direct 0??? 0?????????? D? 10.201.81.20??? GigabitEthernet1/0/23
?? 10.201.81.20/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
?? 10.201.81.23/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
?? 10.201.81.24/30? Direct 0??? 0?????????? D? 10.201.81.25??? Vlanif30
?? 10.201.81.25/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
?? 10.201.81.26/32? Direct 0??? 0?????????? D? 10.201.81.26??? Vlanif30
?? 10.201.81.27/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
? 10.201.93.241/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
? 10.201.93.242/32? Static 60?? 0????????? RD? 10.201.81.26??? Vlanif30
????? 127.0.0.0/8?? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
????? 127.0.0.1/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
127.255.255.255/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
????? 138.1.1.1/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
????? 138.2.1.1/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
????? 138.7.1.1/32? Static 60?? 0????????? RD? 10.201.81.19??? GigabitEthernet1/0/23
255.255.255.255/32? Direct 0??? 0?????????? D? 127.0.0.1?????? InLoopBack0
解釋:
Route Flags:路由標記,R表示該路由是迭代路由,D表示該路由下發到FIB表。
Routing Tables:說明路由表是公網路由表還是私網路由表。
Destinations:目的網絡或者主機的總數。
Routes:路由總數。
Destination/Mask:目的地址和子網掩碼。
Proto:協議,說明是直連、靜態還是動態路由。
Pre:本條路由加入路由表的優先級。它包括前面所講的所有路由,加上優先級,優先級高(數值小)的便是當前的最佳路由。各協議的路由優先級如下表:
表1-1 路由協議及缺省時的路由優先級
路由協議或路由種類 相應路由的優先級
DIRECT????????????????????????????? 0
OSPF??????????????????????????????? 10
IS-IS???????????????????????????????? 15
STATIC???????????????????????????? 60
RIP????????????????????????????????? 100
OSPF ASE??????????????????????? 150
OSPF NSSA????????????????????? 150
IBGP???????????????????????????????? 255
EBGP??????????????????????????????? 255
注意:除直連路由(DIRECT)外,各種路由協議的優先級都可由用戶手工進行配置。
Cost:路由開銷。當到達同一目的地的多條路由具有相同的優先級時,它就派上用場了。路由開銷小的將成為當前的最佳路由。
提醒:Pre用于不同路由協議間路由優先級的比較,cost即用于同一種路由協議內部不同路由優先級的比較。
Flags:路由標記,即路由表頭的Route Flags,表示路由信息所處狀態。
NextHop:下一跳地址。說明IP包經過的下一個路由器。
Interface:下一跳可達的出接口。說明IP包將從下一個路由器哪一個接口轉發。
不過上面的路由表只是路由表簡表,它只顯示激活的路由,而完整的路由表還包括未激活的路由。可以通過命令display ip routing-table verbose查看。
例如:
<quidway>dis ip routing-table verbose
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : Public
??????? Destinations : 20?????? Routes : 27

Destination: 10.201.54.215/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 8d05h16m34s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 10.201.54.215/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 8d05h16m34s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 10.201.57.128/27
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 138d23h14m06s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 10.201.57.128/27
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 138d23h14m06s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 10.201.62.0/26???????????????
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 138d23h14m05s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 10.201.62.0/26
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 138d23h14m08s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 10.201.63.4/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h35m45s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 10.201.63.4/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h28m08s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 10.201.81.16/29
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 10.201.81.20???? Neighbour: 0.0.0.0
??????? State: Active Adv???????????? Age: 140d23h35m45s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.81.20/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h35m46s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.81.23/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h35m46s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
??????????????????????????????????????????
Destination: 10.201.81.24/30
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 10.201.81.25???? Neighbour: 0.0.0.0
??????? State: Active Adv???????????? Age: 140d23h28m09s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.81.25/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h28m09s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.81.26/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h28m05s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.81.27/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h28m54s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.93.241/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active Adv???????????? Age: 140d23h42m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 10.201.93.242/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 138d23h13m26s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 127.0.0.0/8
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m07s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 127.0.0.1/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m10s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 127.255.255.255/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m10s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
Destination: 138.1.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h36m37s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 138.1.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h29m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 138.2.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h36m38s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 138.2.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h29m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 138.7.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 60??????????????????? Cost: 0
????? NextHop: 10.201.81.19???? Neighbour: 0.0.0.0
??????? State: Active Adv GotQ??????? Age: 140d23h36m38s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: GigabitEthernet1/0/23
???? TunnelID: 0x0????????????????? Flags: RD
Destination: 138.7.1.1/32
???? Protocol: Static????????? Process ID: 0
?? Preference: 100?????????????????? Cost: 0
????? NextHop: 10.201.81.26???? Neighbour: 0.0.0.0
??????? State: Inactive Adv GotQ????? Age: 140d23h29m01s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: Vlanif30
???? TunnelID: 0x0????????????????? Flags: R
Destination: 255.255.255.255/32
???? Protocol: Direct????????? Process ID: 0
?? Preference: 0???????????????????? Cost: 0
????? NextHop: 127.0.0.1??????? Neighbour: 0.0.0.0
??????? State: Active NoAdv?????????? Age: 140d23h42m11s
????????? Tag: 0???????????????? Priority: 0
??????? Label: NULL?????????????? QoSInfo: 0x0
?RelayNextHop: 0.0.0.0????????? Interface: InLoopBack0
???? TunnelID: 0x0????????????????? Flags:? D
解釋:
注意這里的Routes比剛才的多了,是因為將未激活的路由條數加進來了。此外,還多出其它一些項目:
Process ID:路由協議的進程號。
Neighbour:鄰居。
State:路由的狀態,包括有
Active:激活的路由
Invalid:無效的路由
Inactive:非激活的路由
NoAdv:不充許發布的路由
Adv:可以發布的路由
Del:即將要刪除的路由
GotQ:迭代到下一跳及出接口的路由,或者迭代到隧道的路由
WatiQ:沒有迭代到下一跳及出接口的路由,或者迭代到隧道的路由
Stale:帶Stale標記的路由,在GR中使用
Age:路由有存活時間。
Tag:路由管理標識。
Priority:優先級。
Label:MPLS分配的標簽。
QoSInfo:QoS信息。
RelayNextHop:迭代下一跳。
Interface:迭代出接口。
Tunnel ID:隧道ID。
SecTunnel ID:備份隧道ID。
BkNextHop:備份出接口。
Route of Packet Load-balance:顯示逐包軟轉發查詢時所使用的路由的信息
前面說過,華為路由器還有一個FIB負責指引報文轉發。路由表選擇出路由后,路由表就會將已經激活的路由下發到FIB中。由于FIB表進行轉發。
FIB表根據匹配最長匹配原則。即查找FIB表時,報文的目的地址和FIB中各表項的掩碼進行“邏輯與”運算,將得到的地址與FIB表項中的網絡地址匹配,并選擇最長匹配的FIB表項進行報文轉發。

?
附注:關于迭代路由的解釋(摘抄網上的)
我對路由迭代的理解:
????? 通常路由的下一跳是路由器某個接口的同網段地址,但是存在這樣的情形:
A ____B______D___E?
?????? \____C_____/

??? 路由器A、B、C、D間運行IGP路由協議,而路由器E不參與,為了使A能到達E,需要在A上配置靜態路由,A可以經由B或者C到達D再到達E,那么我們可以在A上配置到E的2條路由:
E??? 下一跳B???????
????? E??? 下一跳C? (備用)
?????
???? 當A到B的鏈路出現問題
A __X_B______D___E?
?????? \____C_____/
????
??? 下一跳到C的路由起作用了,可以正常工作。
??? 但是如果是B-D的鏈路出問題怎么辦呢?看下圖:
???? A ____B__X___D___E?
?????? \____C_____/
A并不知道這一點,仍然將到E的報文向B轉發結果當然是不通了。
????? 解決的辦法就是在A上配置迭代路由
E??? 下一跳D?
??????
????? A到E具體走B還是走C取決于A到D是走B還是走C,
????? 而A到D具體是走B還是走C則由IGP路由協議動態算出,這樣無論是A-B的鏈路出現問題還是B-D的鏈路出現問題都不會影響A-E的轉發。
????? 有人要問為什么不讓E也參與IGP不使用靜態路由不就不會出類似問題么?
????? 1、在真實的組網環境中很可能A\B\C\D屬于同一個管理區域,E屬于另一個管理區域,互相之間不允許運行IGP路由協議。
????? 2、A-D間可能采用了某種隧道技術,可能B/C根本就不知道E的存在,使用IGP路由協議也不能解決。


本文轉自 獨鉤寒江雪 51CTO博客,原文鏈接:http://blog.51cto.com/bennie/265440,如需轉載請自行聯系原作者

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/392127.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/392127.shtml
英文地址,請注明出處:http://en.pswp.cn/news/392127.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Linux網絡配置:設置IP地址、網關DNS、主機名

查看網絡信息 1、ifconfig eth0 2、ifconfig -a 3、ip add 設置主機名需改配置文件&#xff1a; /etc/hosts /etc/sysconfig/network vim /etc/sysconfig/network NETWORKINGyes NETWORKING_IPV6no HOSTNAMEwendyhost Linux配置網絡 方法一&#xff1a; 1、使用setup命令進入如…

編譯原理—小型(簡化)高級語言分析器前端(Java)

實現一個一遍掃描的編譯前端&#xff0c;將簡化高級語言的部分語法成分&#xff08;含賦值語句、分支語句、循環語句等&#xff09;翻譯成四元式&#xff08;或三地址代碼&#xff09;&#xff0c;還要求有合理的語法出錯報錯和錯誤恢復功能。 測試樣例 beginwhile a<b do…

linux boot菜單列表,Bootstrap 下拉菜單(Dropdowns)簡介

Bootstrap 下拉菜單是可切換的&#xff0c;是以列表格式顯示鏈接的上下文菜單。這可以通過與 下拉菜單(Dropdown) JavaScript 插件 的互動來實現。如需使用下拉菜單&#xff0c;只需要在 class .dropdown 內加上下拉菜單即可。下面的實例演示了基本的下拉菜單&#xff1a;實例主…

dynamodb管理ttl_如何使用DynamoDB TTL和Lambda安排臨時任務

dynamodb管理ttlby Yan Cui崔燕 如何使用DynamoDB TTL和Lambda安排臨時任務 (How to schedule ad-hoc tasks with DynamoDB TTL and Lambda) CloudWatch Events let you easily create cron jobs with Lambda. However, it’s not designed for running lots of ad-hoc tasks,…

5g創業的構想_數據科學項目的五個具體構想

5g創業的構想Do you want to enter the data science world? Congratulations! That’s (still) the right choice.您想進入數據科學世界嗎&#xff1f; 恭喜你&#xff01; 那(仍然)是正確的選擇。 The market currently gets tougher. So, you must be mentally prepared f…

Microsoft Windows Phone 7 Toolkit Silverlight SDK XNA Game Studio 4.0 開發工具套件正式版下載...

Windows Phone 7開發工具套件包括Visual Studio 2010 Express for Windows Phone、Windows Phone模擬器、Expression Blend 4 for Windows Phone、XNA Game Studio 4.0和新增加的必應地圖SDK。 英文版的光盤鏡像&#xff1a;點擊下載 文檔中心&#xff1a;Windows Phone develo…

數據挖掘—Apriori算法(Java實現)

算法描述 &#xff08;1&#xff09;掃描全部數據&#xff0c;產生候選1-項集的集合C1&#xff1b; &#xff08;2&#xff09;根據最小支持度&#xff0c;由候選1-項集的集合C1產生頻繁1-項集的集合L1&#xff1b; &#xff08;3&#xff09;對k>1&#xff0c;重復執行步驟…

怎么匯報一周開發工作情況_如何在沒有經驗的情況下獲得第一份開發人員工作

怎么匯報一周開發工作情況Whether you’ve done a coding bootcamp or taught yourself, getting your first developer job with only a few months of coding under your belt is hard.無論您是完成了編碼訓練營還是自學了&#xff0c;僅靠幾個月的編碼就很難拿到第一份開發人…

vue.js的認知

Vue.js&#xff08;讀音 /vju?/, 類似于 view&#xff09; 是一套構建用戶界面的漸進式框架。 Vue 只關注視圖層&#xff0c; 采用自底向上增量開發的設計。 Vue 的目標是通過盡可能簡單的 API 實現響應的數據綁定和組合的視圖組件。 Vue 學習起來非常簡單&#xff0c;。轉載于…

c語言中的無符號字節,C語言之有符號數和無符號數

我們知道&#xff0c;在C語言中存在無符號數和有符號數(一些高級語言如Java里面是沒有無符號數的)&#xff0c;但是對于計算機而言&#xff0c;其本身并不區別有符號數和無符號數&#xff0c;因為在計算機里面都是0或者1&#xff0c;但是在我們的實際使用中有時候需要使用有符號…

8種排序算法比較

8種排序算法&#xff0c;各算法名稱見下表或見源碼。運行程序時&#xff0c;將需要你輸入一數值&#xff0c;以確定對多少隨機數進行排序。然后將會顯示各排序算法的耗時。并且你可選擇時否進行正序和反序測試。 由于水平有限&#xff0c;可能存在一些錯誤&#xff0c;還請各位…

兩個問題,關于XP進程優化及SVSP虛擬存儲平臺

這兩個問題讓我有點頭痛&#xff0c;是Boss這陣子布置給我的&#xff0c;都一段時間了&#xff0c;我還是沒找出合適的解決方案來答復Boss.第一個問題是&#xff1a;查查X200或X61中的進程&#xff0c;看哪些是可以不要的&#xff0c;停掉&#xff0c;但又不影響用戶使用。&…

數據挖掘—樸素貝葉斯分類算法(Java實現)

算法描述 &#xff08;1&#xff09;掃描訓練樣本數據集&#xff0c;分別統計訓練集中類別 Ci 的個數 Di 和屬于類別Ci 的樣本中屬性Ak取值Xk為 Dik 的實例樣本個數&#xff0c;構成統計表&#xff1b; &#xff08;2&#xff09;計算先驗概率和條件概率&#xff0c;構成概率表…

net core 獲取網站目錄

AppContext.BaseDirectory 獲取項目的根目錄轉載于:https://www.cnblogs.com/zxs-onestar/p/7147265.html

泰晤士報下載_《泰晤士報》和《星期日泰晤士報》新聞編輯室中具有指標的冒險活動-第1部分:問題

泰晤士報下載TLDR: Designing metrics that help you make better decisions is hard. In The Times and The Sunday Times newsrooms, we have spent a lot of time trying to tackle three particular problems.TLDR &#xff1a;設計度量標準以幫助您做出更好的決策非常困難…

速度一半永遠追不上_您將永遠不會知道自己應該怎么做的一半-沒關系。

速度一半永遠追不上by Ken Gilb肯吉爾伯(Ken Gilb) 您將永遠不會知道自己應該怎么做的一半-沒關系。 (You will never know half of what you think you should — and that’s ok.) Impostor syndrome is a real thing in software development. After 20 years in the indus…

c語言自學門檻,初學C語言的人最常問的幾個問題

初學C語言的人最常問的幾個問題C語言是一門通用計算機編程語言&#xff0c;應用廣泛。對于新手來說學習C語言并不是那么容易&#xff0c;下面是C語言初學者最常問的幾個問題&#xff0c;歡迎閱讀!1.多久能學會編程?這是一個沒有答案的問題。每個人投入的時間、學習效率和基礎都…

背景消除的魔力

圖片的功能非常強大&#xff0c;有一圖勝千言的效果&#xff0c;所以在文檔或演示文稿中使用圖片來增加趣味性是一種很棒的想法。但問題是&#xff0c;圖片通常會變為文字中間的獨立矩形&#xff0c;而不是真正與內容融合在一起。您可以在圖片中放置邊框或效果&#xff0c;使其…

Puppet 之 模板和模塊

1 概述模板文件是在puppet模塊下面templates目錄中以”.erb”結尾的文件&#xff0c;puppet模板主要用于文件&#xff0c;例如各種服務的配置文件&#xff0c;相同的服務&#xff0c;不同的配置就可以考慮使用模板文件。模塊是Puppet自包含的代碼和數據集合。絕大多數的清單都…

java異步io_Java中的異步IO與異步請求處理

java異步ioIn this article, I am trying to explain the difference between Async-IO and Async-Request processing in the HTTP request in the Java world.在本文中&#xff0c;我試圖解釋Java世界中HTTP請求中Async-IO和Async-Request處理之間的區別。 In the pre-Java …