2006085104922Nw

Download Report

Transcript 2006085104922Nw

ITEC4610
Network Switching and Routing
ดร. ประวิทย์ ชุมชู
หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่ อสาร(ICE)
MUT
Email: [email protected]
ห้องทางาน: F402
เบอร์โทรศัพท์ที่ทางาน: (02)9883655 ต่อ 220
เบอร์โทรศัพท์เคลื่อนที่: 065343850
MUT
Class VIII
BGP
ดร. ประวิทย์ ชุมชู
หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่ อสาร(ICE)
MUT
Email: [email protected]
ห้องทางาน: F402
เบอร์โทรศัพท์ที่ทางาน: (02)9883655 ต่อ 220
เบอร์โทรศัพท์เคลื่อนที่: 065343850
MUT
หัวข้อที่จะบรรยาย
• กล่าวนาการค้นหาเส้นทางในระบบเครื อข่าย
• Path-Vector Routing
• BGP (Border Gateway Protocol)
MUT
กล่าวนาการค้นหาเส้นทางในระบบเครื อข่าย
MUT
กล่าวนาการค้นหาเส้นทางในระบบเครื อข่าย
Routing
Intradomain
MUT
Interdomain
Distance
Vector
Link
State
DUAL
Path Vector
Routing Algorithms
RIP
OSPF
EIGRP
BGP
Routing Protocols
Path-Vector Routing
• Path vector routing is similar to distance vector routing.
• There is at least one node, called the speaker node, in each AS that
creates a routing table and advertises it to speaker nodes in the
neighboring ASs..
MUT
Path Vector Algorithm
• Initialization = เริ่มต้ นสร้ างเส้ นภายใน AS
• Sharing = แลกเปลีย่ นตารางเส้ นทางกับ Speaker nodes ที่เชื่ อมต่ อ
โดยตรง
• Updating = การปรับปรุงตารางเส้ นทางเมื่อมีการเปลีย่ นของเครื อข่ าย
• Loop Prevention=ป้ องกันการเกิด LOOP
• Policy Routing = การกาหนดนโยบายการค้ นหาเส้ นทางโดยผู้ดูแล
ระบบ
• Optimum Path = หาเส้ นทางทีด่ ีทสี่ ุ ด, security, safety, Reliability etc.
MUT
ตัวอย่างการทางาน
Speaker Nodes
A1, B1, C1, and D1
MUT
Routing Table (after the system is stabilized)
-Initialization = เริ่มต้ นสร้ างเส้ นภานใน AS
-Sharing = แลกเปลีย่ นตารางเส้ นทางกับ Speaker nodes ทีเ่ ชื่ อมต่ อโดยตรง
-Updating = การปรับปรุงตารางเส้ นทางเมื่อมีการเปลีย่ นของเครื อข่ าย
-Loop Prevention=ป้ องกัน LOOP
-Policy Routing = การกาหนดการค้ นหาเส้ นทางโดยผู้ดูแลระบบ
-Optimum Path = หาเส้ นทางทีด่ ีทสี่ ุ ด, security, safety, Reliability etc.
MUT
ตัวอย่าง LOOP ของ DV
A
B
X failure
Unsolicited Response
(change in routing table)
Normal
B
X failure
Unstability
MUT
Unsolicited Response
(every 30s or change in routing table)
การแก้ LOOP ของ Path vector algorithm
• When a router receives a massage, it checks to see if its autonomous
system is in the path list to the destination. If it is, looping is involved
and the message is ignored.
MUT
BGP
• หลักการ
• รู ปแบบของข้อมูล (Messages) ที่ใช้ในการสื่ อสารระหว่างเร้าเตอร์
• ตัวอย่างการส่ งข้อมูลของ BGP
MUT
BGP
• Evolved from EGP (Exterior Gateway Protocol) - RFC 827 from the early 1980’s
• BGP is now in Version 4 (RFC 4271) and has evolved from RFC 1105, RFC
1163, RFC 1267 which is BGP -1, BGP-2 and BGP-3 respectively
• BGP-4 was introduced in 1995 in RFC 1771
• Key Difference is that BGP-4 is classless versus classful
• Classless - the prefix length is carried along with the routing update
• BGP used Path-vector routing
• BGP uses TCP as the transport protocol, on port 179.
MUT
Internal and external BGP sessions
MUT
BGP operation
• Interautonomous system routing occurs between two or more BGP
routers in different autonomous systems.
• Intra-autonomous system routing occurs between two or more BGP
routers located within the same autonomous system.
• Pass-through autonomous system routing occurs between two or more
BGP peer routers that exchange traffic across an autonomous system
that does not run BGP
MUT
BGP algorithms
• Use Path Vector algorithm
• Use an incremental update strategy to conserve bandwidth and
processing power
• Use TCP for reliability
• Route aggregation (CIDR)
• A self-container protocol
– E-BGP
– I-BGP
MUT
BGP
• BGP maintains routing tables, transmits routing updates, and bases routing decisions on routing
metrics.
• Exchange network-reachability information, including information about the list of autonomous
system paths, with other BGP systems.
• Each BGP router maintains a routing table that lists all feasible paths to a particular network.
• BGP devices exchange routing information upon initial data exchange and after incremental
updates.
• BGP uses a single routing metric to determine the best path to a given network.
• The BGP metric typically is assigned to each link by the network administrator.
• The metric value assigned to a link can be based on any number of criteria, including the
number of autonomous systems through which the path passes, stability, speed, delay, or cost.
MUT
Types of BGP messages
MUT
OPEN message
• OPEN
– The open message opens a BGP communications session between peers
– The first message sent by each side after a transport-protocol connection is
established.
– Open messages are confirmed using a keep-alive message sent by the peer
device
– must be confirmed before updates, notifications, and keep-alives can be
exchanged.
MUT
Update message
• An update message is used to provide routing updates to other BGP
systems, allowing routers to construct a consistent view of the network
topology.
• Updates are sent using the Transmission-Control Protocol (TCP) to
ensure reliable delivery.
• Update messages can withdraw one or more unfeasible routes from the
routing table and simultaneously can advertise a route while
withdrawing others.
MUT
Notification message
• The notification message is sent when an error condition is detected.
• Notifications are used to close an active session and to inform any
connected routers of why the session is being closed.
MUT
Keep-alive message
• The keep-alive message notifies BGP peers that a device is active
• Keep-alives are sent often enough to keep the sessions from expiring
(every 30 seconds)
MUT
BGP packet header
• Marker—Contains an authentication value that the message receiver can predict.
MUT
• Length—Indicates the total length of the message in bytes.
• Type—Type — Specifies the message type as one of the following:
— Open (1)
— Update (2)
— Notification (3)
— Keep-alive (4)
• Data—Contains upper-layer information in this optional field.
Open message
MUT
• Version— 4
• Autonomous System—Provides the autonomous system number of the sender.
• Hold-Time—Indicates the maximum number of seconds that can elapse without receipt of a
message before the transmitter is assumed to be nonfunctional.
• BGP Identifier—Provides the BGP identifier of the sender (an IP address)
• Optional Parameters Length—Indicates the length of the optional parameters field (if present).
• Optional Parameters—Contains a list of optional parameters (if any).
Only one optional parameter type is currently defined: authentication information.
Authentication information consists of the following two fields:
— Authentication code: Indicates the type of authentication being used.
— Authentication data: Contains data used by the authentication mechanism (if used).
Update message
MUT
Update Message
• Unfeasible Routes Length—Indicates the total length of the withdrawn
routes field or that the field is not present.
• Withdrawn Routes—Contains a list of IP address prefixes for route
being withdrawn from service.
• Total Path Attribute Length—Indicates the total length of the path
attributes field or that the field is not present.
MUT
Update Message
• Path Attributes—Describes the characteristics of the advertised path. The following are
possible attributes for a path:
– Origin: Mandatory attribute that defines the origin of the path information
– AS Path: Mandatory attribute composed of a sequence of autonomous system path segments
– Next Hop: Mandatory attribute that defines the IP address of the border router that should be used as the
next hop to destinations listed in the network layer reachability information field
– Mult Exit Disc: Optional attribute used to discriminate between multiple exit points to a neighboring
autonomous system
– Local Pref: Discretionary attribute used to specify the degree of preference for an advertised route
– Atomic Aggregate: Discretionary attribute used to disclose information about route selections
– Aggregator: Optional attribute that contains information about aggregate route
• Network Layer Reachability Information—Contains a list of IP address prefixes for the
advertised routes
MUT
Note:
BGP supports classless addressing and
CIDR.
MUT
Keep-alive message
Every 30 seconds
MUT
Notification message
MUT
• Error Code—Indicates the type of error that occurred.
• Error Subcode—Provides more specific information about the nature of
the reported error.
• Error Data—Contains data based on the error code and error subcode
fields. This field is used to diagnose the reason for the notification
message.
Error codes
MUT
BGP Finite State Machine (FSM)
• IDLE
– State when BGP peer refuses any incoming connections
• CONNECT
– State in which BGP peer is waiting for its TCP connection to be completed
• ACTIVE
– State in which BGP peer is trying to acquire a peer by listening and accepting TCP connection
• OPENSENT
– BGP pee waiting for OPEN message from its peer
• OPENCONFIRM
– BGP peer is wating for KEEPALIVE or NOTIFICATION messages from its peer
• ESTABLISHED
– BGP peer connection is established and exchanges UPDATE, NOTIFICATION, and KEEPALIVE
messages with its peer.
MUT
ตัวอย่าง
-จงแสดงการ BGP open Massage ของ router A1
-จงแสดงการ BGP update Massage ของ router A1
-จงแสดงการ BGP keepalive Massage ของ router A1
MUT
-จงแสดงการ BGP notification Massage ของ router A1
BGP open Massage ของ router A1
MUT
BGP update Massage ของ router A1
MUT
BGP keepalive Massage ของ router A1
MUT
BGP notification Massage ของ router A1
MUT
Summary
• PATH Vector Algorithm
• BGP
MUT
คาถามท้ายบทลองทาดู
(ช่วยกันทาส่ งรายบุคคล)
• ให้ศึกษาอธิบายความแตกต่างและการทางานของ Routing Algorithms ที่
ได้เรี ยนมาทั้งหมด
–
–
–
–
MUT
Distance Vector algorithm
Link State algorithm
Diffusing Update algorithm (DUAL)
Path Vector algorithm
ให้นกั ศึกษาแบ่งกลุ่มกันตามที่จะสอบ LAB
2 คนต่อ 1 กลุ่ม (5 %)
• ให้ศึกษาอธิบายความแตกต่างและการทางานของ Routing Protocols
พร้อมทั้งยกตัวอย่างการติดตั้ง (Configuration)
– RIPv2
– OSPF
– EIGRP
• ให้ศึกษานาเสนอในวันที่ 12 สิ งหาคม 2549
• ใช้เวลาในการนาเสนอ 15 นาที
MUT