1. Trang chủ
  2. » Công Nghệ Thông Tin

C5 1page per sheet

94 1 0

Đ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

Chapter Link Layer and LANs 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 5: DataLink Layer 5-1 Chapter 5: The Data Link Layer Our goals:  understand principles behind data link layer services: • • • • error detection, correction sharing a broadcast channel: multiple access link layer addressing reliable data transfer, flow control: done!  instantiation and implementation of various link layer technologies 5: DataLink Layer 5-2 Link Layer  5.1 Introduction and     services 5.2 Error detection and correction 5.3Multiple access protocols 5.4 Link-layer Addressing 5.5 Ethernet  5.6 Link-layer switches  5.7 PPP  5.8 Link virtualization: MPLS  5.9 A day in the life of a web request 5: DataLink Layer 5-3 Link Layer: Introduction Vài thuật ngữ: hosts, routers gọi chung nút [nodes]  Kênh truyền thông kết nối nút kề theo đường truyền gọi liên-kết [links]  • • •  Liên-kết hữu tuyến [wired links] Liên-kết vô tuyến [wireless links] LANs Gói tin tầng gọi khung [frame], chứa datagram Tầng data-link chịu trách nhiệm chuyển giao datagram từ nút đến nút kế dọc theo liên-kết 5: DataLink Layer 5-4 Link layer: context  Các datagram chuyển giao theo giaothức-tầng-2 khác qua liên-kết khác • e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link  Mỗi giao-thức-tầng-2 cung cấp dịch vụ khác • Chẳng hạn, có/khơng cung cấp dịch vụ truyền liệu đáng tin cậy qua liênkết transportation analogy  trip from Princeton to Lausanne • limo: Princeton to JFK • plane: JFK to Geneva • train: Geneva to Lausanne  tourist = datagram  transport segment = communication link  transportation mode = link layer protocol  travel agent = routing algorithm 5: DataLink Layer 5-5 Link Layer Services  Đóng gói, truy cập kênh truyền: • • •  Đóng gói datagram vào frame, bổ sung header, trailer Truy cập kênh truyền môi trường truyền dẫn dùng chung Địa MAC sử dụng frame header để xác định nguồn gửi, đích nhận o Địa MAC khác với địa IP Chuyển giao đáng tin cậy nút kề • • • Đã đề cập chương (giao thức rdt) Hiếm sử dụng đường truyền lỗi bit (cáp quang, cáp xoắn đôi) Đường vô tuyến: mức độ lỗi cao o Q: why both link-level and end-end reliability? 5: DataLink Layer 5-6 Link Layer Services (more)  flow control: •  Phát lỗi [error detection]: • •  Lỗi phát sinh suy yếu tín hiệu, nhiễu tín hiệu Khi kên nhận phát có lỗi o Báo cho bên gửi truyền lại vứt bỏ frame Tự sửa lỗi [error correction]: •  Điều tiết tốc độ nút gửi/nhận kề Bên nhận nhận lỗi tự sửa lỗi mà không cần yêu cầu truyền lại half-duplex and full-duplex • Với haft duplex, nút đầu liên-kết truyền cho nhau, khơng thể lúc 5: DataLink Layer 5-7 Where is the link layer implemented?  Tên mạng: tầng link triển khai tất nút  Trên máy tính: tầng link triển khai cạc mạng (network interface card, NIC) • • Ethernet card, PCMCI card, 802.11 card Cạc mạng gắn vào hệ thống bus máy tính (VD PCI) dạng built-in  Chức tầng link cài đặt phần cứng, phần mềm firmware host schematic application transport network link cpu memory controller link physical host bus (e.g., PCI) physical transmission network adapter card 5: DataLink Layer 5-8 Adaptors Communicating datagram datagram controller controller receiving host sending host datagram frame  Bên gửi: • Bao bọc datagram frame • Bổ sung bit kiểm lỗi, rdt, flow control, …  Bên nhận • Xử lý lỗi, rdt, flow control • Trích datagram đẩy lên tầng 5: DataLink Layer 5-9 Link Layer  5.1 Introduction and     services 5.2 Error detection and correction 5.3Multiple access protocols 5.4 Link-layer Addressing 5.5 Ethernet  5.6 Link-layer switches  5.7 PPP  5.8 Link virtualization: MPLS  5.9 A day in the life of a web request 5: DataLink Layer 5-10 Byte Stuffing  Yêu cầu “data transparency” : vùng liệu phải cho phép chứa liệu giống flag, tức • Q: Khi nhận , liệu hay flag?  Bên gửi: thêm vào byte đặc biệt trước byte liệu dạng , , sau gửi  Bên nhận: • Nếu nhận , sau , vứt bỏ • Nếu nhận byte , vứt bỏ byte 5: DataLink Layer 5-80 Byte Stuffing Dữ liệu giống flag Gắn thêm byte 01111101 vào phía trước 5: DataLink Layer 5-81 PPP Data Control Protocol Trước trao đổi liệu tầng mạng, bên gửi/nhận tầng link phải:  Cấu hình liên-kết PPP (chiều dài tối đa frame, authentication)  Học/thiết lập cấu hình thơng tin tầng mạng • Với IP: sử dụng thông điệp giao thức IPCP (IP Control Protocol) để cấu hình /học địa IP 5: DataLink Layer 5-82 Link Layer  5.1 Introduction and     services 5.2 Error detection and correction 5.3Multiple access protocols 5.4 Link-Layer Addressing 5.5 Ethernet  5.6 Link-layer switches  5.7 PPP  5.8 Link virtualization: MPLS  5.9 A day in the life of a web request 5: DataLink Layer 5-83 Synthesis: a day in the life of a web request  Đã khảo sát đủ tầng chồng giao thức Internet • application, transport, network, link  Kết hợp tầng • Mục tiêu: nhận biết, ôn lại, hiểu giao thức (ở tất tầng) qua kịch đơn giản: mở trang web • Kịch bản: sinh viên gắng máy laptop vào mạng trường, mở trang web www.google.com 5: DataLink Layer 5-84 A day in the life: scenario DNS server browser Comcast network 68.80.0.0/13 school network 68.80.2.0/24 web page web server 64.233.169.105 Google’s network 64.233.160.0/19 5: DataLink Layer 5-85 A day in the life… connecting to the Internet DHCP UDP IP Eth Phy DHCP DHCP DHCP DHCP  Máy tính kết nối vào mạng, cần có đ/chỉ IP nó, đ/chỉ IP router đầu chặng, DNS server: sử dụng DHCP DHCP  DHCP request đóng gói DHCP DHCP DHCP DHCP DHCP UDP IP Eth Phy UDP datagram, đóng gói tiếp 802.1 Ethernet frame router (runs DHCP)  Ethernet frame gửi broadcast (đích FFFFFFFFFFFF) LAN Frame router có DHCP Server nhận  Tại đây, frame tách lấy phần IP datagram, UDP segment, DHCP request 5: DataLink Layer 5-86 A day in the life… connecting to the Internet DHCP UDP IP Eth Phy DHCP DHCP DHCP DHCP  DHCP Server hình thành DHCP ACK, chứa Đ/chỉ IP client, router đầu chặng, tên & Đ/chỉ IP DNS Server  DHCP ACK đóng gói DHCP DHCP DHCP DHCP DHCP DHCP UDP IP Eth Phy router (runs DHCP) frame, frame chuyển LAN đến client Quá trình tách chuyển lên tầng PDU diễn client  DHCP client nhận DHCP ACK reply Client cấp địa IP, biết tên địa DNS server Địa IP router đầu chặng 5: DataLink Layer 5-87 A day in the life… ARP (before DNS, before HTTP) DNS DNS DNS ARP query  Trước gửi DNS UDP IP ARP Eth Phy ARP ARP reply Eth Phy HTTP request, laptop cần biết địa IP www.google.com: sử dụng DNS  Một DNS query tạo ra, đóng gói IP, đóng gói tiếp Ethernet frame Để gửi frame đến router, cần biết địa MAC router (ở phía máy laptop) Sử dụng ARP  ARP query gửi broadcast LAN router nhận Router trả lời ARP reply, chứa đựng địa MAC router  Client biết địa MAC router đầu chặng, gửi frame chứa DNS query 5: DataLink Layer 5-88 A day in the life… using DNS DNS DNS DNS DNS DNS DNS DNS UDP IP Eth Phy DNS DNS DNS UDP IP Eth Phy DNS server DNS Comcast network 68.80.0.0/13  IP Datagram chuyển từ  IP datagram chứa đựng DNS query chuyển từ client qua switch để đến router đầu chặng mạng SV kết nối, vào mạng Comcast, định tuyến tới DNS Server thông giao thức định tuyến RIP, OSPF, ISIS và/hoặc BGP  IP Datagram trích/chuyển đến DNS server  DNS server trả lời địa IP www.google.com cho client 5: DataLink Layer 5-89 A day in the life… TCP connection carrying HTTP HTTP HTTP TCP IP Eth Phy SYNACK SYN SYNACK SYN SYNACK SYN  Để gửi HTTP request , SYNACK SYN SYNACK SYN SYNACK SYN TCP IP Eth Phy web server 64.233.169.105 trước tiên client phải mở TCP socket đến Web server  TCP SYN Segment chuyển đến Web server (bước trình bắt tay bước)  web server phản hồi bằngTCP SYNACK (bước cua3 trình bắt tay bước )  Kết nối TCP connection thiết lập! 5: DataLink Layer 5-90 A day in the life… HTTP request/reply HTTP HTTP HTTP TCP IP Eth Phy HTTP HTTP HTTP HTTP HTTP HTTP  web page displayed finally (!!!)  HTTP request gửi vào TCP Socket HTTP HTTP HTTP HTTP HTTP TCP IP Eth Phy web server 64.233.169.105  Một IP datagram chứa HTTP request chuyển đến www.google.com  web server phản hồi HTTP reply  IP datgram chứa HTTP reply hướng ngược client 5: DataLink Layer 5-91 Chapter 5: Summary  Các nguyên tắc bên dịch vụ tầng link • Phát lỗi, sửa lỗi • Dùng chung kênh truyền quảng bá: đa truy cập • Đánh địa tầng liên-kết  Sự thuyết minh cài đặt nhiều công nghệ khác tầng link • Ethernet • LANS dùng Switch, VLANs • PPP • Mạng ảo hóa tầng link: MPLS  Tổng hợp: Một ví dụ xuyên suốt truy cập Web 5: DataLink Layer 5-92 Chapter 5: let’s take a breath  Hoàn tất lượt khảo sát chồng giao thức Internet (ngoại trừ tầng Vật lý)  Hiểu biết chắn nguyên lý mạng, thực tế  … Có thể dừng đây… Tuy nhiên, cịn nhiều chủ đề lý thú! • • • • wireless multimedia security network management 5: DataLink Layer 5-93 HẾT 5: DataLink Layer 5-94

Ngày đăng: 11/04/2023, 10:47

Xem thêm:

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN

w