pexea12

Chapter 4 - Network Layer

Jun 1st, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.85 KB | None | 0 0
  1. Network layer:
  2. transport segment from sending to receiving host
  3.  
  4. Forwarding and routing:
  5. Forwarding: Packet arive at router's input link -> the router move the packet to the appropriate output link
  6. Example: Packet arrive from host H1 to router R1 must be forwarded to the next router on a path to H2
  7. Routing: The network layer must determine the route or path taken by packets as they flow from a sender to a receiver.
  8. Use Routing algorithms (determine the path along which packets flow from H1 to H2)
  9.  
  10. Forwarding: router-local action of transferring a packet from an input link interface to the appropriate output link interface
  11. Routing: network-wide process that determines the end-to-end paths that packets take from source to destination
  12.  
  13. Network service model:
  14. Guaranteed delivery
  15. Guaranteed delivery with bounded delay
  16.  
  17. Flow of packets:
  18. In-order packet delivery
  19. Guaranteed minimal bandwidth
  20. Guaranteed maximum jitter
  21. Security services
  22.  
  23. Internet = Best-effort service = no service at all
  24.  
  25. ATM network:
  26. Constant bit rate (CBR) ATM network service
  27. Available bit rate (ABR) ATM network service
  28.  
  29. Network layer connection and connectionless service:
  30. datagram network provide network connectionless service
  31. VC provide network connection servicee
  32. analogous to transport layer service, but:
  33. service: host-to-host
  34. no choice: network provide 1 or the other
  35. implementation: in network core
  36.  
  37. virtual-circuit (VC) networks:
  38. only a connection service at the network layer
  39. datagram networks:
  40. only a connectionless service at the network layer
  41.  
  42. Internet = datagram network
  43. ATM, frame relay = VC network
  44.  
  45. VC network:
  46. maintain connection state information for the ongoing connections
  47. each time a connection is established across a router, a new connection entry must be added to the router's forwarding table
  48. each time a connection is released, an entry must be removed from the table
  49.  
  50. call setup, teardown for each call before data can flow
  51. each packet carry VC identifier (not destination host addr)
  52. every router on source-dest maintain state for each passing connection
  53. link, router resources may be allocated to VC
  54.  
  55. consist of:
  56. path from src to dest
  57. VC number, 1 number for each link along the path
  58. entries in forwarding table in router along path
  59.  
  60. packet belong to VC carry VC number
  61. VC number can be change on each link
  62.  
  63. phases:
  64. VC setup
  65. Data transfer
  66. VC teardown
  67.  
  68. routers along the path between 2 end systems are involved in VC setup
  69. each router is fully aware of all the VCs passing through it
  70.  
  71. Initial call -> Incoming call -> Accept call -> Call connected -> Data flow begins -> Receive Data
  72.  
  73. signaling messages: set up the VC
  74. signaling protocols: exchanges signaling messages
  75.  
  76. forwarding table modified when an existing connection through the router is set up or torn down
  77.  
  78. Datagram network
  79. router matches a prefix of the packet's destination addr with the entries in the table
  80. longest prefix matching rule
  81.  
  82. no call setup at the network layer
  83. no state about end-to-end connections
  84.  
  85. packet forward using dest host addr
  86.  
  87. connectionless
  88. maintain forwarding state information in their forwarding tables
  89.  
  90. forwarding tables are modified by routing algorithm, update 1 - 5 min
  91.  
  92. Forwarding Table
  93. forwarding = switching
  94.  
  95. Input ports
  96. Switching fabric
  97. Switching via memory
  98. Switching via a bus
  99. Switching via an interconnection network
  100.  
  101. Output ports
  102. Routing processor
  103.  
  104. forwarding table = router forwarding plane
  105. router control plane
  106.  
  107. Queue
  108. packet loss, drop tail
  109. packet scheduler -> quality-of-service guarantees
  110. active queue management (AQM)
  111. random early detection (RED)
  112. head-of-the-line (HOL) blocking
  113.  
  114. Internet: datagram
  115. data exchange among computers
  116. elastic service, no strict timing
  117. smart end systems
  118. can adapt, perform control, error recovery
  119. simple inside network, complexity at edge
  120. many link types
  121. different characteristics
  122. uniform service difficult
  123.  
  124. ATM: VC
  125. evolve from telephony
  126. human conversation:
  127. strict timing, reliability requirements
  128. need for guaranteed service
  129. dumb end systems
  130. telephone
  131. complexity inside network
  132.  
  133. Router:
  134. run routing algorithm/protocol (RIP, OSPF, BGP)
  135. forwarding datagram from incoming to outgoing link
  136.  
  137. input port function:
  138. given datagram dest, look up output port using forwarding tabnle in input port memory
  139. goal: complete input port processing at line speed
  140. queuing if datagram arrive faster than forwarding rate into switch fabric
  141.  
  142. Switching fabric:
  143. memory, bus, crossbar
  144.  
  145. output port:
  146. buffering required when datagram arrive from fabric faster than the transmission rate
  147. scheduling discipline choose among queue datagram for transmission
  148.  
  149.  
  150.  
  151. IP
  152. datagram
  153. Version number
  154. Header length (20 bytes)
  155. Type of service
  156. Datagram length (16 bits)
  157. identifier, flags, fragmentation offset
  158. time-to-live
  159. upper layer protocol
  160. header checksum
  161. source and dest IP addr
  162. options
  163. payload
  164.  
  165. 20 bytes header
  166. IP/TCP: 40 bytes header
  167.  
  168. fragment
  169.  
  170. IPv4
  171. interface
  172. dotted-decimal notation
  173. subnet, subnet mask
  174.  
  175. IP addr:
  176. 32 bit for host, router interface
  177. interface:
  178. router have multiple interface
  179. host have 1 interface
  180. IP addr associate with each interface
  181.  
  182. Classless Interdomain Routing (CIDR)
  183. prefix
  184.  
  185. classful addressing
  186.  
  187. DHCP: Dynamic Host Configuration Protocol
  188. encapsulated in UDP, IP, 802.1 Ethernet
  189. temporary IP addressing
  190. plug-and-play protocol
  191.  
  192. DHCP server discovery: DHCP server message
  193. DHCP server offer: DHCP offer message, address leave time
  194. DHCP request: DHCP request message
  195. DHCP ACK: DHCP ACK message
  196.  
  197. can return more than just allocated IP addr on subnet
  198. addr of first-hop router for client
  199. name and IP addr of DNS server
  200. network mask (indicate network versus host portion of addr)
  201.  
  202. NAT (Network Address Translation)
  203. real with private addr
  204. NAT translation table
  205. connection reversal - NAT traversal
  206.  
  207. controversial:
  208. router should onlhy process up to layer 32
  209. violate end-to-end argument
  210. addr shortage should be solved by IPv6
  211.  
  212. UPnP: Universal Plug and Play
  213. allow NATed host to:
  214. learn public IP addr
  215. add, remove port mappings (with lease times)
  216.  
  217. ICMP: Internet Control Message Protocol
  218. error report, echo request/reply
  219. carry in IP datagram
  220.  
  221. IPv6
  222. expanded addressing capabilities: 128 bit addr
  223. anycast addr
  224. streamlined 40-byte header
  225. flow labeling and priority
  226.  
  227. datagram format
  228. version
  229. priority (traffic class)
  230. flow label
  231. payload length
  232. next header
  233. hop limit
  234. source and dest addr
  235. data
  236.  
  237. NO: fragmentation, reassembly, checksum, options
  238.  
  239. ICMPv6
  240.  
  241. Translation from IPv4 to IPv6
  242. dual-stack
  243. tunneling
  244.  
  245. IPsec: IP security
  246. cryptographic agreement
  247. encryption of IP datagram payloads
  248. data integrity
  249. origin authentication
  250.  
  251. Routing Algorithm
  252. Global:
  253. all routers have complete topology, link cost info
  254. link state algorithms
  255. Decentralized:
  256. router know physically connected neighbor, link cost to neighbor
  257. iterative process of computation, exchange of info with neighbor
  258. distance vector algorithm
  259.  
  260. Static:
  261. route change slowly over time
  262. Dynamic:
  263. routes change more quickly
  264. periodic update
  265. in response to link cost changes
  266.  
  267. Link-State Routing Algorithm
  268. Dijkstra algorithm
  269. net topology, link cost known to all nodes
  270. compute least cost path from 1 node to other node
  271. give forwarding table for that node
  272. iterative: after k iterations, know least cost path to k dest
  273.  
  274. Distance Vector Algorithm
  275. Bellman-Ford Equation
  276. from time-to-time, each node send its own distance vector estimate to neighbors
  277. asynchronous
  278.  
  279. iterative, asynchronous
  280. each local iteration caused by
  281. local link cost change
  282. update message from neighbor
  283. distributed
  284. each node notify neighbor when it change
  285. neighbor then notify their neighbor if need
  286.  
  287. each node:
  288. wait for change from neighbor
  289. recompute estimate
  290. if distance vector to any dest change, notify neighbor
  291.  
  292. Compare Link-State and Distance Vecotr:
  293. Message Complexity:
  294. LS: with n nodes, E links -> O(nE) message send
  295. DV: exchange between neighbor only (convergence time vary)
  296. Speed of Convergence:
  297. LS: O(n^2) require O(nE) messages
  298. DV: vary (routing loop, count-to-inf problem)
  299. Robustness
  300. LS: node can advertise incorrect link cost
  301. each node computes only its own tabnle
  302. DV: DV can advertise incorrect path cost
  303. each node table used by others
  304.  
  305. Hierarchical Routing:
  306. scale: with 200 million dest
  307. can't store all in routing table
  308. administrative autonomy
  309. each network admin may want to control routing in its own network
  310.  
  311. aggregate router into regions: autonomous system (AS)
  312. router in same AS run same routing protocol
  313. intra-AS routing protocol
  314.  
  315. forwarding table configured by both intra and inter AS routing algorithm
  316. intra AS set entry for internal dest
  317. inter AS and intra AS set entry for external dest
  318.  
  319. Intra AS routing:
  320. IGP: Interior Gateway Protocol
  321. RIP: Routing Information Protocol
  322. OSPF: Open Shortest Path First
  323. IGRP: Interior Gateway Routing Protocol (Cisco proprietary)
  324.  
  325. RIP: distance vector algorithm
  326. distance vector: exchange among neighbor every 30 sec via Response message (advertisment)
  327.  
  328. if no advertisment heard after 180sec
  329. neighbor/link declare dead
  330. routes via neighbor invalidate
  331. new ads sent to neighbors
  332. neighbor sed new ads (if table change)
  333. link failure info quickly propagate to entire net
  334. poison reverse use to prevent ping pong loop
  335.  
  336. manage by application-level called route-d (daemon)
  337. ads sent in UDP packet, periodically repeat
  338.  
  339. OSBF: link state
  340. carry 1 entry per neighbor router
  341. ads dissemninate to entire AS (via flooding)
  342. sent directly over IP
  343.  
  344. security: all message authenticate
  345. multiple same-cost path allow (RIP only 1 path)
  346. for each link, multiple cost metric for different TOS
  347. integrate uni and multicast support
  348. hierarchical OSPF in large domain
  349.  
  350. hierarchical OSPF:
  351. 2-level hierarchy: local area, backbone
  352. link state ads only in area
  353. each node has detail area topology, only now direction (shortest path) to net in other area
  354. area border router
  355. backbone router
  356. boundary router
  357.  
  358. BGP: Border Gateway Protocol: de facto standard
  359. TCP
  360. message:
  361. OPEN: open TCP connection to peer and authenticate sender
  362. UPDATE: advertise new path
  363. KEEPALIVE: keep connection alive in absence of UPDATE, also ACKs OPEN request
  364. NOTIFICATION: report error in previous message, also use to close connection
  365.  
  366. Difference between Intra and Inter AS routing:
  367. policy:
  368. inter: admin want control over how its traffic route, who route
  369. intra: singlel admin, no policy decision deed
  370. scale:
  371. hierarchical routing save table size, reduce update traffic
  372. performance:
  373. intra AS: can focus on performance
  374. inter: policy may dominate over performance
  375.  
  376. Broadcast routing:
  377. deliver packet from source to all other node
  378. source duplication is inefficient
  379.  
  380. flooding: when node receive broadcast packet, send copy to all neighbor
  381. -> circle and broadcast storm
  382. controlled flooding: node only broadcast if it hasn't broadcast same packet before
  383. keep track of packet already broadcast
  384. RPFL reverse path forwarding:
  385. only forward if it arrive on shorteest path between node and src
  386. spanning tree:
  387. no redundant packet receive by any node
  388.  
  389. Multicast Routing:
  390. find a tree connecting routers having local multicast group member
  391. source base tree: one tree per source
  392. shortest path tree
  393. reverse path forwarding
  394. group share tree: group use 1 tree
  395. minimal spanning (steiner)
  396. center base tree
Add Comment
Please, Sign In to add comment