The services provided by an IPsec session include:
• Cryptographic agreement. Mechanisms that allow the two communicating hosts
to agree on cryptographic algorithms and keys.
• Encryption of IP datagram payloads. When the sending host receives a segment
from the transport layer, IPsec encrypts the payload. The payload can only be
decrypted by IPsec in the receiving host.
• Data integrity. IPsec allows the receiving host to verify that the datagram’s
header fields and encrypted payload were not modified while the datagram was
en route from source to destination.
• Origin authentication. When a host receives an IPsec datagram from a trusted
source (with a trusted key—see Chapter 8), the host is assured that the source IP
address in the datagram is the actual source of the datagram.
When two hosts have an IPsec session established between them, all TCP and
UDP segments sent between them will be encrypted and authenticated. IPsec therefore
provides blanket coverage, securing all communication between the two hosts
for all network applications.
A company can use IPsec to communicate securely in the nonsecure public Internet.
For illustrative purposes, we’ll just look at a simple example here. Consider a
company that has a large number of traveling salespeople, each possessing a company
laptop computer. Suppose the salespeople need to frequently consult sensitive company
information (for example, pricing and product information) that is stored on a
server in the company’s headquarters. Further suppose that the salespeople also need
to send sensitive documents to each other. How can this be done with IPsec? As you
might guess, we install IPsec in the server and in all of the salespeople’s laptops. With
IPsec installed in these hosts, whenever a salesperson needs to communicate with the
server or with another salesperson, the communication session will be secure.
4.5 Routing Algorithms
So far in this chapter, we’ve mostly explored the network layer’s forwarding function.
We learned that when a packet arrives to a router, the router indexes a forwarding
table and determines the link interface to which the packet is to be directed. We
also learned that routing algorithms, operating in network routers, exchange and
4.5 • ROUTING ALGORITHMS 363
compute the information that is used to configure these forwarding tables. The interplay
between routing algorithms and forwarding tables was shown in Figure 4.2.
Having explored forwarding in some depth we now turn our attention to the other
major topic of this chapter, namely, the network layer’s critical routing function.
Whether the network layer provides a datagram service (in which case different packets
between a given source-destination pair may take different routes) or a VC service
(in which case all packets between a given source and destination will take the
same path), the network layer must nonetheless determine the path that packets take
from senders to receivers. We’ll see that the job of routing is to determine good paths
(equivalently, routes), from senders to receivers, through the network of routers.
Typically a host is attached directly to one router, the default router for the
host (also called the first-hop router for the host). Whenever a host sends a packet,
the packet is transferred to its default router. We refer to the default router of the
source host as the source router and the default router of the destination host as the
destination router. The problem of routing a packet from source host to destination
host clearly boils down to the problem of routing the packet from source router to
destination router, which is the focus of this section.
The purpose of a routing algorithm is then simple: given a set of routers, with
links connecting the routers, a routing algorithm finds a “good” path from source
router to destination router. Typically, a good path is one that has the least cost.
We’ll see, however, that in practice, real-world concerns such as policy issues (for
example, a rule such as “router x, belonging to organization Y, should not forward
any packets originating from the network owned by organization Z”) also come into
play to complicate the conceptually simple and elegant algorithms whose theory
underlies the practice of routing in today’s networks.
A graph is used to formulate routing problems. Recall that a graph G = (N,E)
is a set N of nodes and a collection E of edges, where each edge is a pair of nodes
from N. In the context of network-layer routing, the nodes in the graph represent
routers—the points at which packet-forwarding decisions are made—and the edges
connecting these nodes represent the physical links between these routers. Such a
graph abstraction of a computer network is shown in Figure 4.27. To view some
graphs representing real network maps, see [Dodge 2012, Cheswick 2000]; for a
discussion of how well different graph-based models model the Internet, see
[Zegura 1997, Faloutsos 1999, Li 2004].
As shown in Figure 4.27, an edge also has a value representing its cost. Typically,
an edge’s cost may reflect the physical length of the corresponding link (for
example, a transoceanic link might have a higher cost than a short-haul terrestrial
link), the link speed, or the monetary cost associated with a link. For our purposes,
we’ll simply take the edge costs as a given and won’t worry about how they are
determined. For any edge (x,y) in E, we denote c(x,y) as the cost of the edge between
nodes x and y. If the pair (x,y) does not belong to E, we set c(x,y) = ∞. Also, throughout
we consider only undirected graphs (i.e., graphs whose edges do not have a
direction), so that edge (x,y) is the same as edge (y,x) and that c(x,y) = c(y,x). Also, a
node y is said to be a neighbor of node x if (x,y) belongs to E.
364 CHAPTER 4 • THE NETWORK LAYER
Given that costs are assigned to the various edges in the graph abstraction, a natural
goal of a routing algorithm is to identify the least costly paths between sources and
destinations. To make this problem more precise, recall that a path in a graph G =
(N,E) is a sequence of nodes (x1, x2,..., xp) such that each of the pairs (x1,x2),
(x2,x3),...,(xp-1,xp) are edges in E. The cost of a path (x1,x2,..., xp) is simply the sum of
all the edge costs along the path, that is, c(x1,x2) + c(x2,x3) + ...+ c(xp-1,xp). Given any
two nodes x and y, there are typically many paths between the two nodes, with each
path having a cost. One or more of these paths is a least-cost path. The least-cost
problem is therefore clear: Find a path between the source and destination that has
least cost. In Figure 4.27, for example, the least-cost path between source node u and
destination node w is (u, x, y, w) with a path cost of 3. Note that if all edges in the
graph have the same cost, the least-cost path is also the shortest path (that is, the
path with the smallest number of links between the source and the destination).
As a simple exercise, try finding the least-cost path from node u to z in Figure
4.27 and reflect for a moment on how you calculated that path. If you are like most
people, you found the path from u to z by examining Figure 4.27, tracing a few routes
from u to z, and somehow convincing yourself that the path you had chosen had the
least cost among all possible paths. (Did you check all of the 17 possible paths
between u and z? Probably not!) Such a calculation is an example of a centralized
routing algorithm—the routing algorithm was run in one location, your brain, with
complete information about the network. Broadly, one way in which we can classify
routing algorithms is according to whether they are global or decentralized.
• A global routing algorithm computes the least-cost path between a source and
destination using complete, global knowledge about the network. That is, the
algorithm takes the connectivity between all nodes and all link costs as inputs.
This then requires that the algorithm somehow obtain this information before
actually performing the calculation. The calculation itself can be run at one site
4.5 • ROUTING ALGORITHMS 365
x y
v
3
5
2 5
2
3
1
1 2
1
u z
w
Figure 4.27 Abstract graph model of a computer network
(a centralized global routing algorithm) or replicated at multiple sites. The key
distinguishing feature here, however, is that a global algorithm has complete
information about connectivity and link costs. In practice, algorithms with global
state information are often referred to as link-state (LS) algorithms, since the
algorithm must be aware of the cost of each link in the network. We’ll study LS
algorithms in Section 4.5.1.
• In a decentralized routing algorithm, the calculation of the least-cost path is
carried out in an iterative, distributed manner. No node has complete information
about the costs of all network links. Instead, each node begins with only the
knowledge of the costs of its own directly attached links. Then, through an iterative
process of calculation and exchange of information with its neighboring
nodes (that is, nodes that are at the other end of links to which it itself is
attached), a node gradually calculates the least-cost path to a destination or set of
destinations. The decentralized routing algorithm we’ll study below in Section
บริการเซสชันของ IPsec การรวม:•ข้อตกลงการเข้ารหัสลับ กลไกที่ทำให้โฮสต์การสื่อสารที่สองการยอมรับอัลกอริทึมที่เข้ารหัสลับและคีย์•การเข้ารหัสลับของ payloads IP ดาต้าแกรม เมื่อโฮสต์ที่ส่งรับเซ็กเมนต์จากชั้นการขนส่ง IPsec เข้ารหัสลับของสิ่งที่เตรียมไว้ สิ่งที่เตรียมไว้ได้เท่านั้นถอดรหัสลับ โดย IPsec ในโฮสต์รับ•ความสมบูรณ์ของข้อมูล IPsec ให้โฮสต์ได้รับการตรวจสอบว่า ของดาต้าแกรมฟิลด์ส่วนหัวและส่วนของข้อมูลที่เข้ารหัสลับถูกไม่ปรับเปลี่ยนในขณะดาต้าแกรมเส้นทางน้ำจากต้นทางไปปลายทาง•จุดเริ่มต้นของการพิสูจน์ตัวจริง เมื่อโฮสต์รับเดตาแกรมที่ IPsec จากที่เชื่อถือได้แหล่งที่มา (คีย์เชื่อถือ — ดูบทที่ 8), โฮสต์จะมั่นใจได้ที่ IP แหล่งที่มาที่อยู่ในดาต้าแกรมเป็นต้นฉบับจริงของเดตาแกรมเมื่อโฮสต์สองมีรอบเวลาการ IPsec ที่ก่อตั้งขึ้นระหว่าง TCP ทั้งหมด และส่วน UDP ส่งระหว่างจะเข้ารหัส และรับรองความถูกต้อง IPsec ดังนั้นให้ความคุ้มครองแบบครอบคลุม การรักษาความปลอดภัยการสื่อสารทั้งหมดระหว่าง 2 โฮสต์สำหรับใช้งานเครือข่ายทั้งหมดบริษัทสามารถใช้ IPsec ในการสื่อสารอย่างปลอดภัยในอินเทอร์เน็ตสาธารณะที่ไม่ปลอดภัยสำหรับการแสดง เราเพียงจะดูที่ตัวอย่างได้ที่นี่ พิจารณาการบริษัทที่มีพนักงานขาย การเดินทางแต่ละที่มีบริษัทเป็นจำนวนมากคอมพิวเตอร์แล็ปท็อป สมมติว่า พนักงานขายต้องปรึกษาบ่อยครั้งสำคัญของบริษัทข้อมูล (ตัวอย่าง การกำหนดราคาและข้อมูลเกี่ยวกับผลิตภัณฑ์) ที่เก็บไว้ในเซิร์ฟเวอร์ในสำนักงานใหญ่ของบริษัท สมมติว่า พนักงานขายที่ต้องเพิ่มเติมการส่งเอกสารสำคัญต่าง ๆ วิธีนี้สามารถทำได้กับ IPsec เป็นคุณอาจคาดเดา เราติดตั้ง IPsec ในเซิร์ฟเวอร์ และ ในแล็ปท็อปของพนักงานทั้งหมด มีIPsec ที่ติดตั้งในโฮสต์เหล่านี้ เมื่อต้องสื่อสารกับพนักงานขายเซิร์ฟเวอร์หรือกับพนักงานขายคนอื่น งานสื่อสารทางการ4.5 อัลกอริทึมที่เส้นเพื่อให้ห่างไกลในบทนี้ เราได้ส่วนใหญ่สำรวจฟังก์ชันชั้นของเครือข่ายการส่งต่อเราได้เรียนรู้ว่า เมื่อแพคเก็ตมาเตอร์ เราเตอร์ดัชนีการส่งต่อตาราง และกำหนดอินเทอร์เฟซสำหรับเชื่อมโยงซึ่งจะนำแพคเก็ต เรานอกจากนี้ยัง ได้เรียนรู้ว่า เส้นทางอัลกอริทึม การทำงานในเครือข่ายเราเตอร์ แลกเปลี่ยน และ4.5 •เส้นทางอัลกอริทึม 363คำนวณข้อมูลที่ใช้ในการตั้งค่าคอนฟิกตารางเหล่านี้ส่งต่อ ล้อที่ระหว่างเส้นทางอัลกอริทึม และส่งตารางที่แสดงในรูป 4.2มีอุดมส่งลึกบางอย่างเราตอนนี้หันเหความสนใจไปอื่น ๆหัวข้อหลักของบทนี้ ได้แก่ ของเลเยอร์เครือข่ายฟังก์ชันสำคัญที่สายงานการผลิตว่าชั้นของเครือข่ายการให้บริการดาต้าแกรม (ในแพ็คเก็ตต่าง ๆ ซึ่งกรณีระหว่างต้นทางปลายทางกำหนด คู่อาจใช้เส้นทางอื่น) หรือบริการ VC(ซึ่ง จะนำส่งข้อมูลทั้งหมดระหว่างกำหนดต้นทางและปลายทางเส้นทางเดียวกัน), ชั้นเครือข่ายต้องกระนั้นกำหนดเส้นทางที่ใช้แพคเก็ตจากผู้ส่งถึงผู้รับ เราจะเห็นว่า งานของสายงานการผลิตคือการ กำหนดเส้นทางที่ดี(equivalently เส้นทาง), จากผู้ส่งไปผู้รับ ผ่านเครือข่ายของเราเตอร์โดยทั่วไปมีโฮสต์อยู่โดยตรงกับเราเตอร์หนึ่ง เราเตอร์เริ่มต้นสำหรับการโฮสต์ (เรียกว่าเราเตอร์แรก-hop โฮสต์) เมื่อใดก็ตามโฮสต์ส่งแพคเก็ตแพคเก็ตจะถูกโอนย้ายไปที่เราเตอร์เริ่มต้น เราหมายถึงเราเตอร์เริ่มต้นของการโฮสต์ต้นทางที่เป็นเราเตอร์ต้นทางและเราเตอร์เริ่มต้นของโฮสต์ปลายทางเป็นเราเตอร์ปลายทาง ปัญหาของสายแพคเก็ตจากโฮสต์ต้นทางไปปลายทางโฮสต์ชัดเจนเดือดลงปัญหาของสายแพคเก็ตจากเราเตอร์ต้นทางให้เตอร์ปลายทาง ซึ่งเป็นจุดเน้นของส่วนนี้วัตถุประสงค์ของขั้นตอนวิธีการสายงานการผลิตแล้วเป็นเรื่องง่าย: ให้ชุดของเราเตอร์ ด้วยเชื่อมโยงเชื่อมต่อเราเตอร์ อัลกอริทึมการสายงานการผลิตค้นหาเส้นทาง "ดี" จากแหล่งเราเตอร์เราเตอร์ปลายทาง โดยปกติ เส้นทางดีจะมีน้อยที่สุดต้นทุนเราจะเห็น อย่างไรก็ตาม ว่า ในทางปฏิบัติ จริงเกี่ยวข้องกับประเด็นนโยบาย(เช่นตัวอย่าง กฎเช่น "เราเตอร์ x, Y องค์กรที่เป็นสมาชิกควรส่งต่อมีแพคเก็ตที่เกิดจากเครือข่ายขององค์กร Z") ยังมาเล่น complicate อัลกอริทึมง่าย และฉลาดทางแนวคิดทฤษฎีที่มีunderlies การปฏิบัติของสายงานในเครือข่ายวันนี้กราฟจะใช้ในการกำหนดปัญหาการกำหนดเส้นทาง เรียกคืนที่กราฟ G = (N, E)คือชุด N โหนดและชุด E ขอบ ที่ขอบแต่ละ คู่ของโหนดจาก N. ในบริบทของสายเครือข่ายชั้น โหนดในกราฟแสดงเราเตอร์คือจุดที่ตัดสินใจส่ง packet จะ — และขอบการเชื่อมต่อแสดงถึงโหนเหล่านี้จริงที่เชื่อมโยงระหว่างเราเตอร์เหล่านี้ ดังกล่าวเป็นabstraction กราฟของเครือข่ายคอมพิวเตอร์จะแสดงในรูปที่ 4.27 ดูบางกราฟที่แสดงแผนผังเครือข่ายจริง เห็น [หลบ 2012, Cheswick 2000]; สำหรับการสนทนาด้วยวิธีต่าง ๆ ตามกราฟรูปแบบอินเทอร์เน็ต ดู[Zegura 1997, 1999, Faloutsos ปี 2004 ลี]ดังแสดงในรูปที่ 4.27 ขอบยังได้แสดงถึงต้นทุนค่า โดยทั่วไปขอบต้นทุนอาจสะท้อนความยาวทางกายภาพของการเชื่อมโยงที่เกี่ยวข้อง (สำหรับตัวอย่าง การเชื่อมโยง transoceanic อาจมีต้นทุนสูงกว่าการลากสั้นคล้ายเชื่อมโยง), ความเร็วในการเชื่อมโยง หรือต้นทุนทางการเงินที่เกี่ยวข้องกับการเชื่อมโยง สำหรับวัตถุประสงค์ของเราเราก็จะนำต้นทุนขอบเป็นตัวกำหนด และไม่ต้องกังวลว่าจะกำหนด สำหรับขอบใด ๆ (x, y) ใน E เราแสดง c(x,y) เป็นต้นทุนของขอบระหว่างโหนด x และ y ถ้าคู่ (x, y) ไม่ได้เป็นของ E เราตั้ง c(x,y) =∞ ยัง ตลอดเราพิจารณาเฉพาะ undirected กราฟ (เช่น กราฟที่ไม่มีขอบที่มีการทิศทาง), ที่ขอบ (x, y) เป็นเหมือนขอบ (y, x) และที่ c(x,y) = c(y,x) ยัง มีกล่าวว่า เป็น เพื่อนบ้านของโหนดโหนด y x ถ้า (x, y) เป็นของ E.364 CHAPTER 4 • THE NETWORK LAYERGiven that costs are assigned to the various edges in the graph abstraction, a naturalgoal of a routing algorithm is to identify the least costly paths between sources anddestinations. To make this problem more precise, recall that a path in a graph G =(N,E) is a sequence of nodes (x1, x2,..., xp) such that each of the pairs (x1,x2),(x2,x3),...,(xp-1,xp) are edges in E. The cost of a path (x1,x2,..., xp) is simply the sum ofall the edge costs along the path, that is, c(x1,x2) + c(x2,x3) + ...+ c(xp-1,xp). Given anytwo nodes x and y, there are typically many paths between the two nodes, with eachpath having a cost. One or more of these paths is a least-cost path. The least-costproblem is therefore clear: Find a path between the source and destination that hasleast cost. In Figure 4.27, for example, the least-cost path between source node u anddestination node w is (u, x, y, w) with a path cost of 3. Note that if all edges in thegraph have the same cost, the least-cost path is also the shortest path (that is, thepath with the smallest number of links between the source and the destination).As a simple exercise, try finding the least-cost path from node u to z in Figure4.27 and reflect for a moment on how you calculated that path. If you are like mostpeople, you found the path from u to z by examining Figure 4.27, tracing a few routesfrom u to z, and somehow convincing yourself that the path you had chosen had theleast cost among all possible paths. (Did you check all of the 17 possible pathsbetween u and z? Probably not!) Such a calculation is an example of a centralizedrouting algorithm—the routing algorithm was run in one location, your brain, withcomplete information about the network. Broadly, one way in which we can classifyrouting algorithms is according to whether they are global or decentralized.• A global routing algorithm computes the least-cost path between a source anddestination using complete, global knowledge about the network. That is, thealgorithm takes the connectivity between all nodes and all link costs as inputs.This then requires that the algorithm somehow obtain this information beforeactually performing the calculation. The calculation itself can be run at one site4.5 • ROUTING ALGORITHMS 365x yv352 52311 21u zwFigure 4.27 Abstract graph model of a computer network(a centralized global routing algorithm) or replicated at multiple sites. The keydistinguishing feature here, however, is that a global algorithm has completeinformation about connectivity and link costs. In practice, algorithms with globalstate information are often referred to as link-state (LS) algorithms, since thealgorithm must be aware of the cost of each link in the network. We’ll study LSalgorithms in Section 4.5.1.• In a decentralized routing algorithm, the calculation of the least-cost path iscarried out in an iterative, distributed manner. No node has complete informationabout the costs of all network links. Instead, each node begins with only theknowledge of the costs of its own directly attached links. Then, through an iterativeprocess of calculation and exchange of information with its neighboringnodes (that is, nodes that are at the other end of links to which it itself isattached), a node gradually calculates the least-cost path to a destination or set ofdestinations. The decentralized routing algorithm we’ll study below in Section
การแปล กรุณารอสักครู่..
