شبکه هاي کامپيوتري فصل پنجم: لايه شبکه (NetworkLayer)

Slides:



Advertisements
Similar presentations
Multicast on the Internet CSE April 2015.
Advertisements

Network Layer4-1 Hierarchical Routing scale: with 200 million destinations: r can’t store all dest’s in routing tables! r routing table exchange would.
Lecture 9 Overview. Hierarchical Routing scale – with 200 million destinations – can’t store all dests in routing tables! – routing table exchange would.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 22 Omar Meqdadi Department of Computer Science and Software Engineering University.
Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol –Datagram format.
14 – Inter/Intra-AS Routing
Review r The Internet (IP) Protocol m Datagram format m IP fragmentation m ICMP: Internet Control Message Protocol m NAT: Network Address Translation r.
1 Chapter 27 Internetwork Routing (Static and automatic routing; route propagation; BGP, RIP, OSPF; multicast routing)
14 – Inter/Intra-AS Routing Network Layer Hierarchical Routing scale: with > 200 million destinations: can’t store all dest’s in routing tables!
Chapter 22 Network Layer: Delivery, Forwarding, and Routing
Routing and Routing Protocols Routing Protocols Overview.
1 Chapter 27 Internetwork Routing (Static and automatic routing; route propagation; BGP, RIP, OSPF; multicast routing)
Routing protocols Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF)
Objectives: Chapter 5: Network/Internet Layer  How Networks are connected Network/Internet Layer Routed Protocols Routing Protocols Autonomous Systems.
4: Network Layer4a-1 Hierarchical Routing r aggregate routers into regions, “autonomous systems” (AS) r routers in same AS run same routing protocol m.
Introduction 1 Lecture 19 Network Layer (Routing Protocols) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science &
Chapter 9 & 10 TCP/IP. TCP/IP Model Application Transport Internet Internet Access.
CS 3830 Day 29 Introduction 1-1. Announcements r Quiz 4 this Friday r Signup to demo prog4 (all group members must be present) r Written homework on chapter.
10-1 Last time □ Transitioning to IPv6 ♦ Tunneling ♦ Gateways □ Routing ♦ Graph abstraction ♦ Link-state routing Dijkstra's Algorithm ♦ Distance-vector.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
1 Internet Routing. 2 Terminology Forwarding –Refers to datagram transfer –Performed by host or router –Uses routing table Routing –Refers to propagation.
Network Layer4-1 Intra-AS Routing r Also known as Interior Gateway Protocols (IGP) r Most common Intra-AS routing protocols: m RIP: Routing Information.
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
Routing protocols. 1.Introduction A routing protocol is the communication used between routers. A routing protocol allows routers to share information.
Routing in the Inernet Outcomes: –What are routing protocols used for Intra-ASs Routing in the Internet? –The Working Principle of RIP and OSPF –What is.
Transport Layer3-1 Network Layer Every man dies. Not every man really lives.
Network Layer4-1 Routing Algorithm Classification Global or decentralized information? Global: r all routers have complete topology, link cost info r “link.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
The Internet Network layer
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Chapter 25 Internet Routing. Static Routing manually configured routes that do not change Used by hosts whose routing table contains one static route.
Network Layer introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4.
1 Computer Networks Chapter 5. Network layer The network layer is concerned with getting packets from the source all the way to the destination. Getting.
Routing in the Internet
14 – Inter/Intra-AS Routing
Homework 4 Out: Fri 2/24/2017 In: Fri 3/10/2017.
TRANSPORT LAYER BY, Parthasarathy.g.
Chapter 4: Network Layer
NAT – Network Address Translation
Working at a Small-to-Medium Business or ISP – Chapter 6
: An Introduction to Computer Networks
Routing BY, P.B.SHANMATHI.
(How the routers’ tables are filled in)
Homework 4 Out: Fri 2/26/2016 In: Fri 3/11/2016.
ICMP ICMP – Internet Control Message Protocol
Chapter 4: Network Layer
Chapter 4: outline 4.1 introduction
IP LAYER INTERNET PROTOCOL
Routing.
What’s “Inside” a Router?
شبکه هاي کامپيوتري فصل پنجم: لايه شبکه (NetworkLayer)
Computer Networking TCP/IP Part 2
Part 4: Network Layer Part B: The Internet Routing Protocols
Chapter 4: Network Layer
Networking CS 3470 Sarah Diesburg
Chapter 4: Network Layer
Chapter 4: Network Layer
Working at a Small-to-Medium Business or ISP – Chapter 6
COMP/ELEC 429/556 Introduction to Computer Networks
CMPE 252A : Computer Networks
COMPUTER NETWORKS CS610 Lecture-41 Hammad Khalid Khan.
Networking CS 3470 Sarah Diesburg
Chapter 4: Network Layer
Routing.
Network Layer: Internet Inter-Domain Routing
Presentation transcript:

شبکه هاي کامپيوتري فصل پنجم: لايه شبکه (NetworkLayer) بخش دوم: مسیریابی سلسله مراتبی، مسیریابی چندپخشی وحید حقیقت دوست دانشکده فنی و مهندسی دانشگاه شاهد

مسیریابی سلسله مراتبی Hierarchical Routing

Internet-Map

مسیر یابی سلسله مراتبی مشکلات ابعاد: مشکلات مدیریتی با بزرگ شدن انداز ه شبکه، جداول مسیریابی در مسیریابها رشد پیدا میکنند رشد جداول مسیریابی نه تنها نیازمند حافظه بیشتر برای نگهداری جدول بلکه افزایش زمان جستجو میگردد از طرف دیگر تبادل جداول مسیریابی پهنای باند زیادی را مصرف خواهد کرد مشکلات مدیریتی شبکه اینترنت از شبکه ای از شبکه ها تشکیل شده مدیر هر شبکه ممکن است بخواهد مسیریابی را در شبکه خودش مدیریت نماید در مسیریابی سلسله مراتبی بدینصورت عمل میشود که در هر مسیریاب به ازای مجموعه ای از مسیریابها، یک وارده ثبت میشود.

Hierarchical Routing روترهای دروازه (gateway routers) روترها، روی ناحیه ها (regions) و ناحیه های مستقل (AS) (autonomous systems) با هم توافق میکنند روترهای واقع شده در هر AS از پروتکل مسیریابی (routing protocol) یکسان استفاده میکنند. (intra-AS routing protocol) برای ارتباط هر دو ناحیه با یکدیگر، یک روتر بعنوان روتر دروازه (gateway routers) تعیین میشود یک روتر خاص در AS پروتکل مسیریابی درون ناحیه ای (intra-AS routing) را با دیگر روترهای داخل AS اجرا میکند و نتایج آنرا به خارج از ناحیه انتقال میدهد بادیگر روترهای دروازه پروتکل میان ناحیه ای (inter-AS routing) را اجرا میکند

Hierarchical Routing

Routing in the Internet اینترنت به چندین سیستم مستقل (AS) تقسیم شده است برای مثال: Stanford (32), HP (71), Shahed(12880) با مراجعه به سایت nic.ir و ثبت query در بخش whois بصورت زیر میتوان به اطلاعات مربوط به AS هر IP که مدنظر است دست یافت: -h whois.cymru.com -v <IP address> Ex: -h whois.cymru.com -v 178.252.141.2 داخل یک AS، مدیر شبکه یک پروتکل درون ناحیه ایInterior Gateway Protocol (IGP) (Intra AS) را انتخاب میکند برای مثال: RIP (rfc 1058), OSPF (rfc 1247). بین AS ها، در اینترنت از پروتکل بین ناحیه ای Exterior Gateway Protocol (BGP) (Inter AS) استفاده میکند. AS ها امروز از Border Gateway Protocol، BGP-4 (rfc 1771) استفاده میکنند

مثالی از یافتن AS number دانشگاه شاهد آپ لینک مخابرات 217.218.141.2=ns1.shahed.ac.ir آپ لینک شرکت مبنا 178.252.141.2=ns3.shahed.ac.ir

مسیریابیIntra-AS و Inter-AS C.b B.a A.a b A.c c a a b C a B d دروازه ها: مهیا سازی مسیریابی درونی بین مسیریابهای داخل AS (Inter-AS Routing) مهیا سازی مسیریابی بین مسیریابهای دروازه (Intra-AS Routing ) c A b Intra-AS Routing Algorithm Inter-AS جدول مسیریابی DL PHL To/from B.a and A.a To/from A.b Inter/intra-AS routing در دروازه A.c To/from A.d

مسیر یابی درون ناحیه ای (Intra-AS) و بین ناحیه ای (Inter-As) C.b Inter-AS routing between A and B B.a A.a Host2 b A.c c a a b B C a d Intra-AS routing within AS B c A b Intra-AS routing within AS A Host1

جداول هدایت (Forwarding Tables) جداول هدایت، توسط الگوریتمهای مسیریابی درون ناحیه ای و بین ناحیه ای تولید میشوند الگوریتم مسیریابی درون ناحیه ای، وارده های مربوط به مقصدهای داخل ناحیه را تعیین میکند الگوریتم مسیریابی درون ناحیه ای و بین ناحیه ای هر دو وارده های مربوط به مقصدهای خارج از ناحیه را تعیین میکنند

Inter-AS Tasks AS1 باید: یاد بگیرد که کدام مقصد ها از طریق AS2 و کدام مقصدها از طریق AS3 قابل دسترس هستند اطلاعات بدست آمده را برای تمامی روترهای موجود در AS1 ارسال نماید فرض کنید روتری در AS1 یک دیتاگرام را که مقصدش خارج از AS1 است، دریافت کند: روتر باید این بسته را برای روتر دروازه (gateway router) ارسال نماید ولی کدامیک از روترهای دروازه؟ 3b 2c 3a 2a 2b AS3 1a AS2 1d 1c AS1 1b

مثال: تنظیم جدول هدایت در روتر 1d فرض کنید AS1 با استفاده از پروتکل درون ناحیه ای یادمیگیرد که زیر شبکه x از طریق AS3 (با استفاده از دروازه 1a) در دسترس است و از طریق AS2 به آن دسترسی وجود ندارد پروتکل بین ناحیه ای اطلاعات مربوط به دسترسی به تمامی روترهای داخلی را انتشار میدهد روتر 1d از طریق مسیریابی درون ناحیه ای متوجه میشود که از طریق واسط I کم هزینه ترین مسیر را تا 1a دارد. وارده (x,I) را در جدول خود اضافه میکند. … x 3b 2c 3a 2a 2b AS3 1a AS2 1d 1c AS1 1b

مثال: انتخاب از میان چندین AS حال فرض کنید که AS1 با استفاده از پروتکل درون ناحیه ای یاد میگیرد که زیر شبکه x از طریق AS3 و AS2 در دسترس است برای تنظیم جداول هدایت، روتر 1d باید تعیین کند که کدام دروازه باید برای هدایت بسته های مربوط به زیر شبکه x انتخاب شود. این مورد نیز از وظایف پروتکل مسیریابی بین ناحیه ای میباشد. مسیریابی سیب زمینی داغ (hot potato routing): بسته را به روتری که نزدیکتر است تحویل میدهیم … ….. x 3b 2c 3a 2a 2b AS3 1a AS2 1d 1c AS1 1b

hot potato routing ارسال بسته به روتر دروازه ای که نزدیکتر است 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

مسیر یابی در اینترنت (Routing in the Internet) (RC1812): ملزومات مسیریابهای IP.V4 اینترنت جهانی از تعدادی سیستم مستقلAutonomous Systems (AS) که به هم متصل هستند تشکیل شده است: AS انتهایی یا AS بن بست (Stub AS): مربوط به شرکتهای کوچک است که یک نقطه اتصال به دیگر AS ها دارد AS چند گانه (Multihomed AS): مربوط به شرکتهای بزرگ (بدون ترانزیت) میباشد که در آن چندین اتصال به دیگر AS ها دارد ولی امکان تبادل پیام بین دیگر AS ها را ندارد AS انتقال (Transit AS): چندین AS را به هم متصل میکند.

تبادل پیامها در مسیریابی سلسله مراتبی (1) Transit AS Transit AS Stub AS Stub AS Multihomed AS Stub AS provider customer IP traffic

پشته پروتکلی TCP/IP ftp http smtp telnet snmp tftp rtp dns … Transmission Control Pr. (TCP) User Datagram Pr. (UDP) Control protocols Routing protocols … igmp icmp rip ospf bgp … Internet Protocol (IP) arp rarp Ethernet, Wireless, token ring, FDDI, ATM, Frame relay, SNA, X25 ICMP: Internet Control Message Protocol, RFC792 IGMP: Internet Group Management Protocol, RFC 2236

پروتکلهای درون و بین ناحیه ای درون ناحیه ای (Intra-AS): مدیر شبکه در انتخاب الگوریتم مسیریابی مختار است با عنوان Interior Gateway Protocols (IGP) نیز شناخته میشود چند پروتکل درون ناحیه عبارتند از: RIP: Routing Information Protocol (RFCs1058,2453) از روش بردار فاصله (DV:distance vector) استفاده میکند اطلاعات مسیریابی بین همسایگان در 30 ثانیه تبادل میشود. OSPF: Open Shortest Path First (RFC2328) (Open Spec.) از روش حالت پیوند (LS: Link-State) استفاده میکند. IGRP: Interior Gateway Routing Protocol (Cisco proprietary) از ورش حالت پیوند استفاده میکند و مخصوص تجهیزات سیسکو میباشد. بین ناحیه ای (Inter-AS): استاندارد یکتا برای مسیریابی بین AS ها میباشد. پروتکل BGP : Border Gateway Protocol (RFC1771)

Border Gateway Protocol (BGP-4) BGP از مسیر یابی بردار مسیر (Path vector) استفاده میکند. BGP، تمامی مسیرها را تبلیغ (advertise) میکند (یک لیست از AS ها) مثالی از تبلیغ مسیر بصورت زیر است: “The network 171.64.0.0/16 can be reached via the path {AS1, AS5, AS13}”. مسیرهای با چرخه (loop) بصورت محلی شناسایی شده و نادیده گرفته میشوند سیاستهای محلی، مسیر بهینه را از بین تمامی مسیرها انتخاب میکند زمانی که یک لینک قطع شود، کل مسیرهایی که از آن لینک استفاده میکردند، نابود میشود

ASPATH Attribute AS 1129 AS 1755 AS 12654 AS 1239 AS 7018 AS 3549 135.207.0.0/16 AS Path = 1755 1239 7018 6341 Global Access AS 1755 135.207.0.0/16 AS Path = 1239 7018 6341 135.207.0.0/16 AS Path = 1129 1755 1239 7018 6341 Ebone AS 12654 AS 1239 Sprint Pick shorter AS path RIPE NCC RIS project 135.207.0.0/16 AS Path = 7018 6341 AS 7018 135.207.0.0/16 AS Path = 3549 7018 6341 135.207.0.0/16 AS Path = 6341 AT&T AS 3549 AS 6341 135.207.0.0/16 AS Path = 7018 6341 AT&T Research Global Crossing 135.207.0.0/16 Prefix Originated

مسیر یابی چند پخشی (Multicast Routing) برخی از برنامه های کاربردی نیازمند مسیریابی چندپخشی میباشند. مسائل این حوزه، ساخت درخت، آدرس دهی چندپخشی و نحوه هدایت بسته ها میباشد مسیر یابی چند پخشی مبتنی بر بردار فاصله (DVMRP, PIM-DM) مبتنی بر حالت پیوند (MOSPF) مبتنی بر تکنیک وعده گاه (Rendezvous-based) (PIM-SM, CBT)

درخت های چندپخشی (Multicast Trees) ایده پایه G Server G Server G G G G G G G G چندین تک ارسال (Multiple unicasts) یک چندپخشی (Single multicast)

برنامه هایی که به چند پخشی نیاز دارند یکطرفه، تک فرستنده (one-to-many): تلویزیون (TV) یادگیری غیر تعاملی (Non-interactive learning) به روز رسانی بانک اطلاعاتی (Database update) انتشار اطلاعات (Information dispersal) پچها و بروز رسانی های نرم افزار (Software updates/patches) بیش از دو فرستنده بصورت تعاملی (many-to-many): کنفرانس تلفنی (Teleconference) یادگیری تعاملی (Interactive learning)

مسیریابی چندپخشی یک درخت چندپخشی یک درخت پوشا (spanning tree) میباشد که فرستنده در ریشه و تمامی اعضای گروه را در بر میگیرد

درخت چند پخشی مثالی از کنفرانس تلفنی Sender/Speaker Multicast Group (S1,G) S1 Class D S1 R

IP Addresses: Class-full given notion of “network”, let’s re-examine IP addresses: “class-full” addressing: class format range 1.0.0.0 to 126.255.255.255 A Network Host N.H.H.H 128.0.0.0 to 191.255.255.255 B 10 Network Host N.N.H.H 192.0.0.0 to 223.255.255.255 C 110 Network Host N.N.N.H 224.0.0.0 to 239.255.255.255 D 1110 multicast address 240.0.0.0 to 247.255.255.255 E 11110 experimentation 32 bits

درخت چندپخشی و آدرس دهی همانطور که در شکل زیر نشان داده شده است، برای آدرسهای IP، پنج کلاس تعریف میشود. یک کلاس مربوط به ترافیک چندپخشی میباشد تمامی اعضای یک گروه ازآدرس “Class D” که آدرس گروه است را به اشتراک میگذارند یک ایستگاه انتهایی ممکن است میتواند عضو یک گروه شود با استفاده از پیامهای IGMP: Internet Group Management Protocol روترها وضعیت عضویت هر یک از ایستگاه های انتهایی را به گروهها بصورت وضعیت نرم (Soft-State) نگهداری میکنند در حالت Soft-State وضعیت باید بصورت دوره ای به روز شود Network Host 110 A 10 B C D class 1.0.0.0 to 126.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 32 bits 1110 multicast address E 240.0.0.0 to 247.255.255.255 11110 experimentation format range N.N.N.H N.N.H.H N.H.H.H

درخت چندپخشی چندین درخت: به ازای هر فرستنده یک درخت R S2 Class D S2 R S2 Sender/Speaker Multicast Group (S2,G)

هدایت چندپخشی، براساس فرستنده Group Address Src Address Src Interface Dst Interface G S1 1 2,3 S2 2 1,3 R 2 S1 G 1 3 1 S2 G 2 3