2017/02/12

[國考-電信類] 01 計算機概論-01 電腦網路 筆記(四)




第四章. Network Layer 應用層 network core

1. Forwarding vs. Routing

  • forwarding: 查routing table,source to destination往哪走
  • routing: 選擇routing路徑,決定和建立source to destination路徑

2. Network Layer Service

  • Virtual circuits: 建connection,像telephone circuit,通了一定要給頻寬,但有時候因為多人佔線會導致不通
  • Datagram networks: 不建connection,相同source的packet路徑可能不同;查表forwarding,利用prefix來比較

3. Inside a router
  • Input Port: lookup, forwarding, queueing
  • Switching
    • via Memory: 兩次I/O時間
    • via a Bus: Bus的頻寬要是所有port的總和
    • via an Interconnection Network: Cisco 12000 60 Gbps
  • Output Port:buffering, scheduling, discipline (如果datagram speed > line termination)
4. IP (Internet Protocol)
  • IPv4 addressing:
    • CIDR (Classless Inter Domain Routing): 不只用8/16/24來分subnet,a.b.c.d/x
    • DHCP (Dynamic Host Configuration Protocol): plug-and-play
    • NAT (Network Address Translation): 1個local network共享1個public IP,外部看不到內部server,靠port number分辨,最多65536個connections
  • ICMP (Internet Control Message Protocol): 錯誤偵測及回報,Ping
  • IPv6
5. Routing Algorithms:
  • Link State
    • Global,所有routers都有complete topology
    • Dijsktra's Algorithm: 遞迴計算最短路徑
    • 缺點: O(n^2),可能會oscillations (重複計算的封包)
  • Distance Vector
    • Decentrailized, router只知道physically-connected neighbors
    • Bellman-Ford Equation: x->y最短路徑為x->v + v->y最短路徑
    • Good news travels fast/ Bad news travels slow (count to infinity)
      • poisoned reverse: 如果z->x最短路徑經過y,就告訴y到x的路徑為“無限大”
  • Hierarchical Routing: 網路太大,分層管理
    • AS (autonomous system, 自治區)
    • intra-AS: Interior Gateway Protocols (IGP)
    • inter-AS
6. Routing in the Internet
  • RIP (Routing Information Protocol): Distance Vector,每30秒 advertisement 
  • OSPF (Open Shortest Path First): Link State,Hierarchical in large domain,網路越快,cost越小;用擁擠,cost越大
  • BGP (Border Gateway Protocol): 業界標準 


沒有留言:

張貼留言