AS1
AS3
3b
3c
3a
1a
1c
1b
1d
AS2
2a
2c
2b
Intra-AS routing
algorithm
Forwarding
table
Inter-AS routing
algorithm
Figure 4.32 An example of interconnected autonomous systems
two tasks—obtaining reachability information from neighboring ASs and propagating
the reachability information to all routers internal to the AS—are handled by the
inter-AS routing protocol. Since the inter-AS routing protocol involves communication
between two ASs, the two communicating ASs must run the same inter-AS
routing protocol. In fact, in the Internet all ASs run the same inter-AS routing protocol,
called BGP4, which is discussed in the next section. As shown in Figure 4.32,
each router receives information from an intra-AS routing protocol and an inter-AS
routing protocol, and uses the information from both protocols to configure its forwarding
table.
As an example, consider a subnet x (identified by its CIDRized address), and
suppose that AS1 learns from the inter-AS routing protocol that subnet x is reachable
from AS3 but is not reachable from AS2. AS1 then propagates this information
to all of its routers. When router 1d learns that subnet x is reachable from AS3, and
hence from gateway 1c, it then determines, from the information provided by the
intra-AS routing protocol, the router interface that is on the least-cost path from
router 1d to gateway router 1c. Say this is interface I. The router 1d can then put the
entry (x, I) into its forwarding table. (This example, and others presented in this section,
gets the general ideas across but is a simplification of what really happens in
the Internet. In the next section we’ll provide a more detailed description, albeit
more complicated, when we discuss BGP.)
Following up on the previous example, now suppose that AS2 and AS3 connect
to other ASs, which are not shown in the diagram. Also suppose that AS1
learns from the inter-AS routing protocol that subnet x is reachable both from AS2,
via gateway 1b, and from AS3, via gateway 1c. AS1 would then propagate this
information to all its routers, including router 1d. In order to configure its forwarding
table, router 1d would have to determine to which gateway router, 1b or 1c, it
should direct packets that are destined for subnet x. One approach, which is often
employed in practice, is to use hot-potato routing. In hot-potato routing, the AS
gets rid of the packet (the hot potato) as quickly as possible (more precisely, as
inexpensively as possible). This is done by having a router send the packet to the
gateway router that has the smallest router-to-gateway cost among all gateways
with a path to the destination. In the context of the current example, hot-potato
routing, running in 1d, would use information from the intra-AS routing protocol
to determine the path costs to 1b and 1c, and then choose the path with the least
cost. Once this path is chosen, router 1d adds an entry for subnet x in its forwarding
table. Figure 4.33 summarizes the actions taken at router 1d for adding the new
entry for x to the forwarding table.
When an AS learns about a destination from a neighboring AS, the AS can
advertise this routing information to some of its other neighboring ASs. For example,
suppose AS1 learns from AS2 that subnet x is reachable via AS2. AS1 could then tell
AS3 that x is reachable via AS1. In this manner, if AS3 needs to route a packet
destined to x, AS3 would forward the packet to AS1, which would in turn forward the
packet to AS2. As we’ll see in our discussion of BGP, an AS has quite a bit of
382 CHAPTER 4 • THE NETWORK LAYER
flexibility in deciding which destinations it advertises to its neighboring ASs. This
is a policy decision, typically depending more on economic issues than on technical
issues.
Recall from Section 1.5 that the Internet consists of a hierarchy of interconnected
ISPs. So what is the relationship between ISPs and ASs? You might think that
the routers in an ISP, and the links that interconnect them, constitute a single AS.
Although this is often the case, many ISPs partition their network into multiple ASs.
For example, some tier-1 ISPs use one AS for their entire network; others break up
their ISP into tens of interconnected ASs.
In summary, the problems of scale and administrative authority are solved by
defining autonomous systems. Within an AS, all routers run the same intra-AS routing
protocol. Among themselves, the ASs run the same inter-AS routing protocol.
The problem of scale is solved because an intra-AS router need only know about
routers within its AS. The problem of administrative authority is solved since an
organization can run whatever intra-AS routing protocol it chooses; however, each
pair of connected ASs needs to run the same inter-AS routing protocol to exchange
reachability information.
In the following section, we’ll examine two intra-AS routing protocols (RIP and
OSPF) and the inter-AS routing protocol (BGP) that are used in today’s Internet.
These case studies will nicely round out our study of hierarchical routing.
4.6 Routing in the Internet
Having studied Internet addressing and the IP protocol, we now turn our attention to
the Internet’s routing protocols; their job is to determine the path taken by a datagram
between source and destination. We’ll see that the Internet’s routing protocols
embody many of the principles we learned earlier in this chapter. The link-state and
distance-vector approaches studied in Sections 4.5.1 and 4.5.2 and the notion of an
autonomous system considered in Section 4.5.3 are all central to how routing is
done in today’s Internet.
4.6 • ROUTING IN THE INTERNET 383
Learn from inter-AS
protocol that subnet
x is reachable via
multiple gateways.
Use routing info from
intra-AS protocol to
determine costs of
least-cost paths to
each of the gateways.
Hot potato routing:
Choose the gateway
that has the
smallest least cost.
Determine from
forwarding table the
interface I that leads
to least-cost gateway.
Enter (x,I) in
forwarding table.
Figure 4.33 Steps in adding an outside-AS destination in a router’s forwarding
Table
Recall from Section 4.5.3 that an autonomous system (AS) is a collection of
routers under the same administrative and technical control, and that all run the
same routing protocol among themselves. Each AS, in turn, typically contains multiple
subnets (where we use the term subnet in the precise, addressing sense in Section
4.4.2).
4.6.1 Intra-AS Routing in the Internet: RIP
An intra-AS routing protocol is used to determine how routing is performed within
an autonomous system (AS). Intra-AS routing protocols are also known as interior
gateway protocols. Historically, two routing protocols have been used extensively
for routing within an autonomous system in the Internet: the Routing Information
Protocol (RIP) and Open Shortest Path First (OSPF). A routing protocol closely
related to OSPF is the IS-IS protocol [RFC 1142, Perlman 1999]. We first discuss
RIP and then consider OSPF.
RIP was one of the earliest intra-AS Internet routing protocols and is still in
widespread use today. It traces its origins and its name to the Xerox Network Systems
(XNS) architecture. The widespread deployment of RIP was due in great part
to its inclusion in 1982 in the Berkeley Software Distribution (BSD) version of
UNIX supporting TCP/IP. RIP version 1 is defined in [RFC 1058], with a backwardcompatible
as1
3A 3B 3C AS3
1B 1A 1C 1D
2A 2B 2C AS2
ส่งต่อภายในเป็นเส้นทางขั้นตอนวิธี
รูปที่โต๊ะระหว่างเส้นทางขั้นตอนวิธี
2 ตัวอย่างของระบบเชื่อมโยงอัตโนมัติ
สองงานได้รับข้อมูลจากเพื่อนบ้าน reachability ลา
ข้อมูลเผยแพร่ การ reachability ทั้งหมดเราเตอร์ภายในจะเป็นจัดการโดย
อินเตอร์เป็นเส้นทางโปรโตคอลตั้งแต่อินเตอร์ เป็นเส้นทางที่เกี่ยวข้องกับการสื่อสาร
ระหว่างสองตูด สองติดต่อก้นต้องวิ่งไปอินเตอร์เป็น
เส้นทางโปรโตคอล ในความเป็นจริงในอินเทอร์เน็ตทั้งหมดที่ก้นานเดียวกัน อินเตอร์ เป็นเส้นทางโปรโตคอล
เรียกว่า bgp4 ซึ่งจะกล่าวถึงในหัวข้อถัดไป ดังแสดงในรูปที่ 4.32 ,
แต่ละ Router ได้รับข้อมูลจากภายในเป็นเส้นทางและเป็นเส้นทางระหว่าง
,และใช้ข้อมูลจากทั้งระบบการกำหนดค่าของตารางการส่งต่อ
.
เป็นตัวอย่าง พิจารณาย่อย X ( ระบุที่อยู่ cidrized ของ ) , และ
สมมติว่า as1 เรียนรู้จาก อินเตอร์ เป็นเส้นทางที่สามารถย่อย X
จาก AS3 AS2 แต่ไม่สามารถเข้าถึงได้จาก . as1 แล้วแพร่กระจายข้อมูล
ทั้งหมดของและอื่นๆเมื่อเราเตอร์ 1D รู้ว่า subnet X สามารถเข้าถึงได้จาก AS3 และ
ดังนั้นจากประตู 1C , มันก็จะกำหนด จากข้อมูลที่ให้ไว้โดย
ภายในเป็นเส้นทางโปรโตคอลเราเตอร์อินเตอร์เฟซที่เป็นค่าใช้จ่ายน้อยที่สุด เส้นทางจาก 1D กับเกตเวย์เราเตอร์เราเตอร์
1c บอกว่านี้คืออินเตอร์เฟซ . เราเตอร์ 1D สามารถแล้ว ใส่
รายการ ( X ) ในการส่งต่อของโต๊ะ ( ตัวอย่างนี้และคนอื่น ๆที่นำเสนอในส่วนนี้
ได้รับความคิดทั่วไปข้ามแต่เป็นหนึ่งเดียวของสิ่งที่เกิดขึ้นจริงใน
อินเทอร์เน็ต ในตอนต่อไปเราจะให้รายละเอียดเพิ่มเติม แม้ว่า
ที่ซับซ้อนมากขึ้น เมื่อเรากล่าวถึง BGP )
ต่อไปนี้ขึ้นในตัวอย่างก่อนหน้านี้ ตอนนี้คิดว่า AS2 AS3
ก้นและเชื่อมต่ออื่น ๆ ซึ่งจะไม่แสดงในแผนภาพ ยังคิดว่า as1
เรียนรู้จาก อินเตอร์ เป็นเส้นทางที่ subnet x สามารถเข้าถึงได้ทั้งจาก AS2
ผ่านเกตเวย์ , 1B และ AS3 ผ่านเกตเวย์ 1c as1 จะเผยแพร่ข้อมูลนี้
เพื่อเราเตอร์ทั้งหมดของตน รวมถึงเราเตอร์ 1D เพื่อปรับแต่งของส่งต่อ
ตารางเราเตอร์ 1D จะต้องกำหนดที่เราเตอร์ เกตเวย์ , 1B หรือ 1C ,
ควรตรงแพ็คเก็ตที่ถูกกำหนดสำหรับ subnet X . หนึ่งวิธีซึ่งมัก
ใช้ในการปฏิบัติ จะต้องใช้มันฝรั่งร้อน Routing เส้นทางในมันฝรั่งร้อน เช่น
กำจัดแพ็คเก็ต ( มันฝรั่งร้อน ) ให้เร็วที่สุดเท่าที่เป็นไปได้ ( เพิ่มเติมแม่นยำ ,
ไม่แพงที่สุด ) นี้จะกระทำโดยการส่งแพ็คเก็ตไปยังเราเตอร์
เกตเวย์เราเตอร์ที่มีเราเตอร์น้อยที่สุดในบรรดาต้นทุน Gateway เกตเวย์
กับเส้นทางไปยังปลายทางในบริบทของตัวอย่างปัจจุบันมันฝรั่งร้อน
เส้นทางวิ่งใน 1D จะใช้ข้อมูลจากภายในเป็นเส้นทาง
เพื่อตรวจสอบค่าใช้จ่ายและเส้นทาง 1A 1C และจากนั้นเลือกเส้นทาง ที่มีค่าใช้จ่ายน้อยที่สุด
เมื่อเส้นทางนี้เลือกเราเตอร์ 1D เพิ่มรายการย่อยในการส่งต่อ
x ของโต๊ะ รูปที่ 4.33 สรุปการกระทำที่ดีสำหรับการเพิ่มใหม่
เราเตอร์รายการ x เพื่อส่งต่อโต๊ะ .
เมื่อเป็นเรียนรู้เกี่ยวกับปลายทางจากประเทศเพื่อนบ้านเป็นที่สามารถ
โฆษณาเส้นทางข้อมูลบางส่วนของอื่น ๆใกล้เคียงไว้ ตัวอย่างเช่น สมมติว่า as1
เรียนรู้จาก AS2 ที่ subnet X สามารถเข้าถึงได้ผ่านทาง AS2 . as1 แล้วสามารถบอก
AS3 X นั้นเข้าถึงได้ผ่านทาง as1 . ในลักษณะนี้ถ้า AS3 ต้องการเส้นทางแพ็คเก็ต
กำหนดให้ Xจะส่งต่อแพ็กเก็ตไปยัง as1 AS3 ซึ่งจะส่งต่อแพ็กเก็ตไปยัง AS2
. ที่เราจะเห็นในการสนทนาของเราของ BGP , ตามที่ได้ไม่น้อย
382 บทที่ 4 - เครือข่ายชั้น
มีความยืดหยุ่นในการตัดสินใจซึ่งจุดหมายปลายทางมันโฆษณาของประเทศเพื่อนบ้าน ตูดนี้
เป็นนโยบาย การตัดสินใจ มักจะขึ้นอยู่กับเพิ่มเติมเกี่ยวกับประเด็นทางเศรษฐกิจมากกว่าปัญหาทางเทคนิค
.
เรียกคืนจากข้อ 15 ที่อินเทอร์เน็ตประกอบด้วยลำดับขั้นของ interconnected
ผู้ให้บริการอินเทอร์เน็ต . ดังนั้น อะไรคือความสัมพันธ์ระหว่างผู้ให้บริการอินเทอร์เน็ตและก้น คุณอาจจะคิดว่า
เราเตอร์ใน ISP และการเชื่อมโยงที่เชื่อมพวกเขาเป็นเดียว .
แม้ว่านี้มักจะเป็นกรณี , ผู้ให้บริการอินเทอร์เน็ตหลายพาร์ทิชันเครือข่ายของพวกเขาเป็นหลายตูด
ตัวอย่างเช่นบาง 1 Isp ใช้สำหรับเครือข่ายทั้งหมดของพวกเขาเลิกกัน
; คนอื่น ๆของ ISP ในหลักสิบของ interconnected ตูด
สรุปปัญหาของขนาดและอำนาจในการบริหารจะแก้ไขโดย
กำหนดระบบอิสระ ภายในเป็นทั้งเราเตอร์ใช้ภายในเช่นเดียวกับเส้นทาง
โปรโตคอล ในตัวเอง , ก้นานเดียวกัน อินเตอร์ เป็นเส้นทาง .
ปัญหา ) จะแก้ไขเพราะภายในเป็นเราเตอร์ต้องรู้จัก
เราเตอร์ภายในเป็นปัญหาของอำนาจในการบริหารจะแก้ไขเนื่องจากองค์กรสามารถเรียกอะไรก็ตามภายใน
เป็นเส้นทางที่มันเลือก อย่างไรก็ตาม แต่ละคู่ที่เชื่อมต่อตูด
ต้องการวิ่งเหมือนกัน อินเตอร์ เป็นเส้นทางที่จะแลกเปลี่ยนข้อมูล reachability
.
ในส่วนต่อไปนี้ เราจะตรวจสอบภายในเป็นสองเส้นทางโปรโตคอล ( ตัดและ
OSPF ) และ อินเตอร์ เป็นเส้นทาง ( BGP ) ที่ใช้ในอินเทอร์เน็ตวันนี้
กรณีศึกษาเหล่านี้จะดีๆ ออกรอบ 2 ของลำดับชั้นการ เส้นทางในอินเทอร์เน็ต
เมื่อมีการศึกษาอินเทอร์เน็ตและ IP โปรโตคอล , ตอนนี้เราหันความสนใจของเรา
ของอินเทอร์เน็ตโพรโทคอลจัดเส้นทาง ; งานของพวกเขา คือการกำหนดเส้นทางที่ถ่ายโดยเอากำไร
ระหว่างต้นทางและปลายทางเราจะเห็นได้ว่าอินเทอร์เน็ตเป็นโพรโทคอลจัดเส้นทาง
รวบรวมหลายหลักการที่เราได้เรียนรู้ก่อนหน้านี้ในบทนี้ การเชื่อมโยงของรัฐและวิธีการเรียนทางไกล
เวกเตอร์และส่วน 4.5.1 การและความคิดของการพิจารณา ในส่วนของระบบ
4.5.3 ทั้งหมดกลางเส้นทางเป็นอย่างไร
ทำในอินเทอร์เน็ตวันนี้
4.6 - เส้นทางในอินเทอร์เน็ต ที่เรียนรู้จากอินเตอร์
เป็นโปรโตคอลที่ subnet
x สามารถเข้าถึงได้ผ่านทาง
หลายเกตเวย์ ใช้ข้อมูลจากภายในเป็นโปรโตคอลเส้นทาง
เส้นทางศึกษาต้นทุนค่าใช้จ่ายน้อยที่สุด
แต่ละเกตเวย์ มันฝรั่งร้อน :
การเลือกประตูที่มีขนาดเล็กที่สุด
อย่างน้อยค่าใช้จ่าย ตรวจสอบจากการส่งต่อโต๊ะ
อินเตอร์เฟซ ผมนำ
เพื่อค่าใช้จ่ายอย่างน้อยเกตเวย์
ระบุ ( x , i )
ส่งต่อในโต๊ะ รูปที่ 433 ขั้นตอนในการเพิ่มภายนอกเป็นปลายทางในเราเตอร์ของส่งต่อ
จำตารางจากส่วนที่เป็นอิสระ 4.5.3 ระบบ ( ) คือชุดของ
เราเตอร์สังกัดและเทคนิคเดียวกัน และที่ใช้
เดียวกันเส้นทางกันเอง แต่ละที่ จะ โดยทั่วไปจะประกอบด้วยหลาย
( ที่เราใช้คำว่า subnets subnet ในชัดเจนกับความรู้สึกในส่วน 4.4.2 )
.
ต่ำภายในเป็นเส้นทางในอินเทอร์เน็ต : ฉีก
เป็นภายในเป็นเส้นทางที่ใช้เพื่อตรวจสอบว่าเส้นทางจะดำเนินการภายใน
ระบบอิสระ ( เช่น ) ภายในเป็นโพรโทคอลจัดเส้นทางที่เป็นที่รู้จักกันเป็นโปรโตคอลประตูภายใน
ในอดีตสองเส้นทางโปรโตคอลที่ถูกใช้อย่างกว้างขวาง
สำหรับเส้นทางภายในระบบอิสระในอินเทอร์เน็ต :เส้นทางข้อมูล Protocol ( RIP )
และเปิดเส้นทางที่สั้นที่สุดก่อน ( OSPF ) การกำหนดเส้นทางโปรโตคอล OSPF จะเกี่ยวข้องอย่างใกล้ชิด
ตัวโปรโตคอล [ RFC 535 Perlman , 1999 ] ครั้งแรกที่เราคุยกัน
ฉีกแล้วพิจารณา OSPF .
ฉีกเป็นหนึ่งภายในที่สุดเป็นอินเทอร์เน็ตโพรโทคอลจัดเส้นทางและยัง
วันนี้ใช้แพร่หลาย ร่องรอยของต้นกำเนิดและชื่อของมันไปถ่ายเอกสารระบบเครือข่าย
( xns ) สถาปัตยกรรมการใช้งานอย่างแพร่หลายของฉีกเนื่องจากในส่วนที่ยอดเยี่ยม
ที่จะรวมอยู่ในการจัดจำหน่ายซอฟต์แวร์ 1982 ในเบิร์กลีย์ ( BSD ) รุ่น
UNIX สนับสนุน TCP / IP ฉีก รุ่นที่ 1 ที่กำหนดไว้ใน RFC บ้าง [ ] , กับ backwardcompatible
การแปล กรุณารอสักครู่..
