Bài giảng Mạng máy tính nâng cao: Chapter 4 - Lê Ngọc Sơn

127 75 0
Bài giảng Mạng máy tính nâng cao: Chapter 4 - Lê Ngọc Sơn

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Bài giảng Mạng máy tính nâng cao - Chapter 4: Network layer cung cấp cho người học các kiến thức: Virtual circuit and datagram networks, what’s inside a router, routing algorithms,... mời các bạn cùng tham khảo nội dung chi tiết.

Chapter Network Layer A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers) They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs They obviously represent a lot of work on our part In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material Computer Networking: A Top Down Approach 5th edition Jim Kurose, Keith Ross Addison-Wesley, April 2009 Thanks and enjoy! JFK/KWR All material copyright 1996-2009 J.F Kurose and K.W Ross, All Rights Reserved Network Layer CuuDuongThanCong.com https://fb.com/tailieudientucntt 4-1 Chapter 4: Network Layer Chapter goals: understand principles behind network layer services: network layer service models forwarding versus routing how a router works routing (path selection) dealing with scale advanced topics: IPv6, mobility instantiation, implementation in the Internet Network Layer CuuDuongThanCong.com https://fb.com/tailieudientucntt 4-2 Chapter 4: 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 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing Network Layer CuuDuongThanCong.com https://fb.com/tailieudientucntt 4-3 Network layer Vận chuyển segment từ host bên gửi đến host bên nhận Ở bên gửi, đóng gói segment datagram Ở bên nhận, trao lại segment cho tầng transport Các giao thức tầng mạng có host router Router kiểm tra field header tất datagram qua CuuDuongThanCong.com application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network network data link data link physical physical network data link physical network data link physical network data link physical network data link physical Network Layer https://fb.com/tailieudientucntt application transport network data link physical 4-4 Two Key Network-Layer Functions forwarding: q trình chuyển tiếp gói tin từ ngõ vào đến ngõ phù hợp router routing: trình tìm đường cho gói tin qua router để đến đích routing algorithms (thuật tốn định tuyến): thuật tốn tìm đường cho gói tin đến đích Network Layer CuuDuongThanCong.com https://fb.com/tailieudientucntt 4-5 Interplay between routing and forwarding Các thuật toán định tuyến cập nhật forwarding table Thuật toán định tuyến local forwarding table header value output link 0100 0101 0111 1001 2 Giá trị nằm header gói tin đến 0111 Network Layer CuuDuongThanCong.com https://fb.com/tailieudientucntt 4-6 Connection setup Ngoài chức quan trọng forwarding routing, thiết lập kết nối [connection setup] chức quan trọng thứ số kiến trúc mạng: ATM, frame relay, X.25 Trước datagram truyền đi, hai host gửi/nhận router trung gian thiết lập kết nối ảo Các router tham gia vào trình So sánh việc thiết lập kết nối tầng network tầng transport: network: kết nối host truyền nhận (cũng liên quan đến router trung gian trường hợp kết nối ảo (virtual connections) transport: kết nối tiến trình Network Layer CuuDuongThanCong.com https://fb.com/tailieudientucntt 4-7 Network service model Q: Tầng network có mơ hình dịch vụ nào? Ví dụ dịch vụ cho datagram: đảm bảo gói tin đến đích [guaranteed delivery] đảm bảo gói tin đến đích 40ms [guaranteed delivery with less than 40 msec delay] Ví dụ dịch vụ cho dịng datagram: Đảm bảo gói tin đến nơi thứ tự gửi [in-order datagram delivery] Đảm bảo băng thông tối thiểu [guaranteed minimum bandwidth to flow] … Network Layer CuuDuongThanCong.com https://fb.com/tailieudientucntt 4-8 Network layer service models: Network Architecture Internet Service Model Guarantees ? Congestion Bandwidth Loss Order Timing feedback best effort none ATM CBR ATM VBR ATM ABR ATM UBR constant rate guaranteed rate guaranteed minimum none no no no yes yes yes yes yes yes no yes no no (inferred via loss) no congestion no congestion yes no yes no no Network Layer CuuDuongThanCong.com https://fb.com/tailieudientucntt 4-9 Chapter 4: 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 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing Network Layer 4-10 CuuDuongThanCong.com https://fb.com/tailieudientucntt RIP Table processing UNIX: RIP routing tables tiến trình tầng application quản lý, gọi route-d (daemon) Các advertisements gửi định kỳ UDP routed routed Transprt (UDP) network (IP) Transprt (UDP) forwarding table link physical forwarding table network (IP) link physical Network Layer 4-113 CuuDuongThanCong.com https://fb.com/tailieudientucntt Chapter 4: 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 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing Network Layer 4-114 CuuDuongThanCong.com https://fb.com/tailieudientucntt OSPF (Open Shortest Path First) “open”: publicly available Sử dụng thuật toán Link State Gửi quảng bá gói tin LS đến đến tồn AS • Khi router phát thấy có thay đổi (chi phí, tình trạng mạng) • Định kỳ sau 30 giây dù tình trạng mạng (Link state) có thay đổi hay không Mỗi nút phải xây dựng đồ mạng cho riêng Tính tốn đường dựa vào giải thuật Dijkstra OSPF advertisement carries one entry per neighbor router Các advertisements phát tán đến toàn AS, ko router láng giềng Được thực nhờ OSPF message, IP (thay TCP hay UDP) Network Layer 4-115 CuuDuongThanCong.com https://fb.com/tailieudientucntt OSPF “advanced” features (not in RIP) security: tất OSPF message chứng thực (nhằm ngăn chặn xâm nhập phá hoại) Cho phép nhiều đường đến đích có chi phí (nhưng RIP có đường) Với đường truyền, có nhiều độ đo chi phí ứng với kiểu dịch vụ (TOS – type of service) khác (e.g., satellite link cost set “low” for best effort; high for real time) Cho phép tích hợp unicast multicast: Multicast OSPF (MOSPF) sử dụng liệu tình trạng mạng OSPF Cho phép AS cỡ lớn cấu trúc phân cấp (hierarchical) làm việc theo OSPF Network Layer 4-116 CuuDuongThanCong.com https://fb.com/tailieudientucntt Hierarchical OSPF Network Layer 4-117 CuuDuongThanCong.com https://fb.com/tailieudientucntt Hierarchical OSPF Phân cấp mức: vùng cục bộ, backbone Các link-state advertisement gửi vùng cục each nodes has detailed area topology; only know direction (shortest path) to nets in other areas area border routers: “summarize” distances to nets in own area, advertise to other Area Border routers backbone routers: run OSPF routing limited to backbone boundary routers: connect to other AS’s Network Layer 4-118 CuuDuongThanCong.com https://fb.com/tailieudientucntt Chapter 4: 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 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the Internet RIP OSPF BGP 4.7 Broadcast and multicast routing Network Layer 4-119 CuuDuongThanCong.com https://fb.com/tailieudientucntt Internet inter-AS routing: BGP BGP (Border Gateway Protocol): the de facto standard BGP cung cấp cho AS phương tiện để: Thu thập thông tin subnet liên lạc từ AS láng giềng Lan truyền thông tin subnet liên lạc cho tất router bên AS Xác định đường “tốt” đến subnet dựa thơng tin subnet liên lạc sách Cho phép subnet quảng cáo tồn đến phần cịn lại Internet: “Có tơi đây” Network Layer 4-120 CuuDuongThanCong.com https://fb.com/tailieudientucntt BGP basics Các cặp router (BGP peers) trao đổi thông tin định tuyến thông qua kết nối TCP “semi-permanent”: BGP sessions external BGP session vs internal BGP session Các BGP session không cần phải tương ứng với đường truyền vật lý Trong BGP: đích đến khơng phải host, mà subnet, biểu diễn prefix (Vd 138.16.64/24) Khi AS2 quảng cáo prefix đến AS1: AS2 cam kết chuyển tiếp datagram mạng ứng với prefix AS2 gộp prefix gói tin advertisements eBGP session 3c 3a 3b AS3 1a AS1 CuuDuongThanCong.com iBGP session 2c 2a 1c 1d 2b AS2 1b Network Layer 4-121 https://fb.com/tailieudientucntt Distributing reachability info Sử dụng eBGP session 3a 1c, AS3 gửi thông tin mạng mà liên lạc (reachable) cho AS1 Sau đó, 1c sử dụng iBGP để phân phối thơng tin đến tất router AS1 Sau đó, 1b quảng cáo tiếp thơng tin đến AS2, nhờ eBGP session từ 1b đến 2a Khi router biết thơng tin mới, tạo dịng cho prefix forwarding table eBGP session 3c 3a 3b AS3 1a AS1 CuuDuongThanCong.com iBGP session 2c 2a 1c 1d 2b AS2 1b Network Layer 4-122 https://fb.com/tailieudientucntt Path attributes & BGP routes Các prefix quảng cáo kèm theo thuộc tính BGP prefix + attributes = “route” Hai thuộc tính quan trọng: AS-PATH: chứa AS mà prefix advertisement qua, VD: AS 67, AS 17 NEXT-HOP: chứa địa IP interface gateway router (của AS subnet xác định prefix) Khi gateway router nhận advertisement, có sử dụng import policy để chấp nhận từ chối Network Layer 4-123 CuuDuongThanCong.com https://fb.com/tailieudientucntt BGP route selection Router học nhiều tuyến đường đến subnet ứng với vài prefix Router phải lựa chọn tuyến đường Quy tắc loại trừ: local preference value attribute: policy decision shortest AS-PATH closest NEXT-HOP router: hot potato routing additional criteria Network Layer 4-124 CuuDuongThanCong.com https://fb.com/tailieudientucntt BGP messages Các BGP messages trao đổi router, sử dụng TCP BGP messages: OPEN: mở kết nối TCP đến peer ủy quyền cho bên gửi UPDATE: quảng cáo tuyến đường (hoặc rút lại tuyến cũ) KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request NOTIFICATION: báo lỗi cho msg trước đó; dùng để đóng kết nối Network Layer 4-125 CuuDuongThanCong.com https://fb.com/tailieudientucntt BGP routing policy Ký hiệu: B W X A Mạng nhà cung cấp dịch vụ Mạng khách hàng C Y A,B,C mạng nhà cung cấp dịch vụ X,W,Y mạng khách hàng (của nhà cung cấp) X dual-homed: nối vào mạng • X khơng muốn tuyến từ B đến C qua • … X khơng quảng cáo đến B đường tới C Network Layer 4-126 CuuDuongThanCong.com https://fb.com/tailieudientucntt BGP routing policy (2) Ký hiệu: B W X A Mạng nhà cung cấp dịch vụ Mạng khách hàng C Y A quảng cáo đến B đường AW B quảng cáo đến X đường BAW B có nên quảng cáo đến C đường BAW? • No way! B khơng có “lợi nhuận” từ việc gánh luồng CBAW, W lẫn C khách hàng B • B muốn buộc C hướng luồng liệu đến w thơng qua A • B muốn phục vụ cho khách hàng nó! Network Layer 4-127 CuuDuongThanCong.com https://fb.com/tailieudientucntt ... (t= 54, l =4) Server Identifier = 192.168.1.1 Option: (t=1,l =4) Subnet Mask = 255.255.255.0 Option: (t=3,l =4) Router = 192.168.1.1 Option: (6) Domain Name Server Length: 12; Value: 44 5 747 E 244 5 749 F 244 5 740 92;... https://fb.com/tailieudientucntt 4- 9 Chapter 4: 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 addressing ICMP IPv6 4. 5 Routing... service Mạng datagram cung cấp dịch vụ phi-kếtnối tầng mạng Mạng mạch ảo [Virtual-circuit] cung cấp dịch vụ có-kết-nối tầng mạng Tương tự dịch vụ tầng transport, nhưng: Dịch vụ: host-to-host Không

Ngày đăng: 11/01/2020, 00:03

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan