Dokumen tersebut membahas tentang protokol routing BGP (Border Gateway Protocol) yang merupakan protokol routing antar domain otonom (autonomous system). Dokumen ini menjelaskan pengertian, karakteristik, kelebihan, kekurangan, implementasi, dan tuning atribut BGP.
Shellsort is a sorting algorithm invented by Donald Shell in 1959 that was the first to break the quadratic time barrier of simpler sorting algorithms like insertion sort. It works by sorting elements with increasing proximity over multiple passes rather than just adjacent elements. The algorithm uses an increment sequence to determine the spacing between elements to compare and sort in each pass until the final pass sorts adjacent elements like an insertion sort. While faster than older quadratic algorithms, shellsort is still outperformed by more efficient algorithms like merge, heap, and quicksort for larger data sets.
Decompressed vmlinux: linux kernel initialization from page table configurati...Adrian Huang
Talk about how Linux kernel initializes the page table.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
eBPF is an exciting new technology that is poised to transform Linux performance engineering. eBPF enables users to dynamically and programatically trace any kernel or user space code path, safely and efficiently. However, understanding eBPF is not so simple. The goal of this talk is to give audiences a fundamental understanding of eBPF, how it interconnects existing Linux tracing technologies, and provides a powerful aplatform to solve any Linux performance problem.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
The Linux kernel is undergoing the most fundamental architecture evolution in history and is becoming a microkernel. Why is the Linux kernel evolving into a microkernel? The potentially biggest fundamental change ever happening to the Linux kernel. This talk covers how companies like Facebook and Google use BPF to patch 0-day exploits, how BPF will change the way features are added to the kernel forever, and how BPF is introducing a new type of application deployment method for the Linux kernel.
Dokumen tersebut membahas tentang protokol routing BGP (Border Gateway Protocol) yang merupakan protokol routing antar domain otonom (autonomous system). Dokumen ini menjelaskan pengertian, karakteristik, kelebihan, kekurangan, implementasi, dan tuning atribut BGP.
Shellsort is a sorting algorithm invented by Donald Shell in 1959 that was the first to break the quadratic time barrier of simpler sorting algorithms like insertion sort. It works by sorting elements with increasing proximity over multiple passes rather than just adjacent elements. The algorithm uses an increment sequence to determine the spacing between elements to compare and sort in each pass until the final pass sorts adjacent elements like an insertion sort. While faster than older quadratic algorithms, shellsort is still outperformed by more efficient algorithms like merge, heap, and quicksort for larger data sets.
Decompressed vmlinux: linux kernel initialization from page table configurati...Adrian Huang
Talk about how Linux kernel initializes the page table.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
eBPF is an exciting new technology that is poised to transform Linux performance engineering. eBPF enables users to dynamically and programatically trace any kernel or user space code path, safely and efficiently. However, understanding eBPF is not so simple. The goal of this talk is to give audiences a fundamental understanding of eBPF, how it interconnects existing Linux tracing technologies, and provides a powerful aplatform to solve any Linux performance problem.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
The Linux kernel is undergoing the most fundamental architecture evolution in history and is becoming a microkernel. Why is the Linux kernel evolving into a microkernel? The potentially biggest fundamental change ever happening to the Linux kernel. This talk covers how companies like Facebook and Google use BPF to patch 0-day exploits, how BPF will change the way features are added to the kernel forever, and how BPF is introducing a new type of application deployment method for the Linux kernel.
The document provides an overview of eBPF maps and how they can be used to share data between eBPF programs running in the kernel and userspace applications. It describes how maps are created via the BPF syscall using the BPF_MAP_CREATE command. It also explains how keys and values can be looked up, updated, and deleted from maps using commands like BPF_MAP_LOOKUP_ELEM, BPF_MAP_UPDATE_ELEM, and BPF_MAP_DELETE_ELEM. Finally, it lists the different types of eBPF maps available.
This document provides an overview of cBPF and eBPF. It discusses the history and implementation of cBPF, including how it was originally used for packet filtering. It then covers eBPF in more depth, explaining what it is, its history, implementation including different program types and maps. It also discusses several uses of eBPF including networking, firewalls, DDoS mitigation, profiling, security, and chaos engineering. Finally, it introduces XDP and DPDK, comparing XDP's benefits over DPDK.
Anatomy of the loadable kernel module (lkm)Adrian Huang
Talk about how Linux kernel invokes your module's init function.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Refactoring: Improve the design of existing codeValerio Maggio
Refactoring: Improve the design of existing code
Software Engineering class on main refactoring techniques and bad smells reported in the famous Fawler's book on this topic!
Netronome's half-day tutorial on host data plane acceleration at ACM SIGCOMM 2018 introduced attendees to models for host data plane acceleration and provided an in-depth understanding of SmartNIC deployment models at hyperscale cloud vendors and telecom service providers.
Presenter Bios
Jakub Kicinski is a long term Linux kernel contributor, who has been leading the kernel team at Netronome for the last two years. Jakub’s major contributions include the creation of BPF hardware offload mechanisms in the kernel and bpftool user space utility, as well as work on the Linux kernel side of OVS offload.
David Beckett is a Software Engineer at Netronome with a strong technical background of computer networks including academic research with DDoS. David has expertise in the areas of Linux architecture and computer programming. David has a Masters Degree in Electrical, Electronic Engineering at Queen’s University Belfast and continues as a PhD student studying Emerging Application Layer DDoS threats.
USENIX Vault'19: Performance analysis in Linux storage stack with BPFTaeung Song
The document discusses BPF (Berkeley Packet Filter) and how it allows running custom code in the Linux kernel. It explains that BPF programs are written in C, compiled to BPF bytecode, loaded into the kernel via the BPF syscall. A key part of the process is the BPF verifier, which checks the safety of programs before injection by analyzing control flow and simulating execution.
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Valeriy Kravchuk
Bpftrace is a relatively new eBPF-based open source tracer for modern Linux versions (kernels 5.x.y) that is useful for analyzing production performance problems and troubleshooting software. Basic usage of the tool, as well as bpftrace one liners and advanced scripts useful for MariaDB DBAs are presented. Problems of MariaDB Server dynamic tracing with bpftrace and some possible solutions and alternative tracing tools are discussed.
This document provides an overview of the Enhanced Interior Gateway Routing Protocol (EIGRP). It describes the history and development of EIGRP, its basic operation and components, including reliable transport protocol, packet types, neighbor discovery via hello packets, and route updates using the diffusing update algorithm. It also covers basic EIGRP configuration such as enabling it with the router eigrp command, advertising networks, and verifying neighbor relationships.
The document discusses network services including network address translation (NAT), Dynamic Host Configuration Protocol (DHCP), and Domain Name Services (DNS). It describes how NAT allows private IP addresses to access the internet using public IP addresses through static NAT, dynamic NAT, or port address translation (PAT). DHCP automatically assigns IP addresses to devices on a network, while DNS translates names to IP addresses. The document also discusses configuring these services on Cisco routers using both CLI commands and the Cisco Security Device Manager web tool.
SOSCON 2019.10.17
What are the methods for packet processing on Linux? And how fast are each packet processing methods? In this presentation, we will learn how to handle packets on Linux (User space, socket filter, netfilter, tc), and compare performance with analysis of where each packet processing is done in the network stack (hook point). Also, we will discuss packet processing using XDP, an in-kernel fast-path recently added to the Linux kernel. eXpress Data Path (XDP) is a high-performance programmable network data-path within the Linux kernel. The XDP is located at the lowest level of access through SW in the network stack, the point at which driver receives the packet. By using the eBPF infrastructure at this hook point, the network stack can be expanded without modifying the kernel.
Daniel T. Lee (Hoyeon Lee)
@danieltimlee
Daniel T. Lee currently works as Software Engineer at Kosslab and contributing to Linux kernel BPF project. He has interest in cloud, Linux networking, and tracing technologies, and likes to analyze the kernel's internal using BPF technology.
Kdump and the kernel crash dump analysisBuland Singh
Kdump is a kernel crash dumping mechanism that uses kexec to load a separate crash kernel to capture a kernel memory dump (vmcore file) when the primary kernel crashes. It can be configured to dump the vmcore file to local storage or over the network. Testing involves triggering a kernel panic using SysRq keys which causes the crash kernel to load and dump diagnostic information to the configured target path for analysis.
Ean Sarath is a technical support specialist at MaxBIT ISP who is certified in MikroTik. The presentation discusses hotspots and how to configure them using MikroTik. It covers benefits of hotspots like providing secure login pages and bandwidth limiting. The document then explains how to set up a hotspot interface, IP pool, and DHCP server. It also discusses bypassing hotspots through IP binding, walled gardens, and limiting user bandwidth profiles. Shared user profiles are explained as well to allow multiple logins under one account.
A function is a reusable block of code that can be called from different parts of a program. Functions accept parameters as input and may return a value. When a function is called, its parameters and local variables are stored on the stack. Each function call creates a stack frame that contains its parameters, local variables, and return address. This allows functions to maintain separate variable scopes while sharing the call stack.
The document discusses several key data structures used in the Linux kernel - task lists, KFIFO queues, IDR maps, RB-trees, and prio-trees. It provides an overview of how each is implemented and lists functions to initialize and manipulate each structure, such as adding/removing entries from lists and queues, getting/removing IDs from maps, and operations on binary search and priority search trees.
Unifying Network Filtering Rules for the Linux Kernel with eBPFNetronome
At the core of fast network packet processing lies the ability to filter packets, or in other words, to apply a set of rules on packets, usually consisting of a pattern to match (L2 to L4 source and destination addresses and ports, protocols, etc.) and corresponding actions (redirect to a given queue, or drop the packet, etc.). Over the years, several filtering frameworks have been added to Linux. While at the lower level, ethtool can be used to configure N-tuple rules on the receive side for the hardware, the upper layers of the stack got equipped with rules for firewalling (Netfilter), traffic shaping (TC), or packet switching (Open vSwitch for example).
In this presentation, Quentin Monnet reviewed the needs for those filtering frameworks and the particularities of each one. Then focuses on the changes brought by eBPF and XDP in this landscape: as BPF programs allow for very flexible processing and can be attached very low in the stack—at the driver level, or even run on the NIC itself—they offer filtering capabilities with no precedent in terms of performance and versatility in the kernel. Lastly, the third part explores potential leads in order to create bridges between the different rule formats and to make it easier for users to build their filtering eBPF programs.
This document discusses using fastnetmon and ExaBGP to monitor and mitigate DDoS attacks at the University of Wisconsin-Platteville. Fastnetmon monitors network traffic in real-time and detects DDoS attacks based on packet, bandwidth, and flow thresholds. It then triggers ExaBGP to inject blackhole routes to drop attack traffic while allowing legitimate traffic to pass. This integrated solution allows the university to automatically detect and mitigate DDoS attacks in near real-time.
This document provides an introduction to eBPF and XDP. It discusses the history of BPF and how it evolved into eBPF. Key aspects of eBPF covered include the instruction set, JIT compilation, verifier, helper functions, and maps. XDP is introduced as a way to program the data plane using eBPF programs attached early in the receive path. Example use cases and performance benchmarks for XDP are also mentioned.
The document provides an overview of eBPF maps and how they can be used to share data between eBPF programs running in the kernel and userspace applications. It describes how maps are created via the BPF syscall using the BPF_MAP_CREATE command. It also explains how keys and values can be looked up, updated, and deleted from maps using commands like BPF_MAP_LOOKUP_ELEM, BPF_MAP_UPDATE_ELEM, and BPF_MAP_DELETE_ELEM. Finally, it lists the different types of eBPF maps available.
This document provides an overview of cBPF and eBPF. It discusses the history and implementation of cBPF, including how it was originally used for packet filtering. It then covers eBPF in more depth, explaining what it is, its history, implementation including different program types and maps. It also discusses several uses of eBPF including networking, firewalls, DDoS mitigation, profiling, security, and chaos engineering. Finally, it introduces XDP and DPDK, comparing XDP's benefits over DPDK.
Anatomy of the loadable kernel module (lkm)Adrian Huang
Talk about how Linux kernel invokes your module's init function.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Refactoring: Improve the design of existing codeValerio Maggio
Refactoring: Improve the design of existing code
Software Engineering class on main refactoring techniques and bad smells reported in the famous Fawler's book on this topic!
Netronome's half-day tutorial on host data plane acceleration at ACM SIGCOMM 2018 introduced attendees to models for host data plane acceleration and provided an in-depth understanding of SmartNIC deployment models at hyperscale cloud vendors and telecom service providers.
Presenter Bios
Jakub Kicinski is a long term Linux kernel contributor, who has been leading the kernel team at Netronome for the last two years. Jakub’s major contributions include the creation of BPF hardware offload mechanisms in the kernel and bpftool user space utility, as well as work on the Linux kernel side of OVS offload.
David Beckett is a Software Engineer at Netronome with a strong technical background of computer networks including academic research with DDoS. David has expertise in the areas of Linux architecture and computer programming. David has a Masters Degree in Electrical, Electronic Engineering at Queen’s University Belfast and continues as a PhD student studying Emerging Application Layer DDoS threats.
USENIX Vault'19: Performance analysis in Linux storage stack with BPFTaeung Song
The document discusses BPF (Berkeley Packet Filter) and how it allows running custom code in the Linux kernel. It explains that BPF programs are written in C, compiled to BPF bytecode, loaded into the kernel via the BPF syscall. A key part of the process is the BPF verifier, which checks the safety of programs before injection by analyzing control flow and simulating execution.
Tracing MariaDB server with bpftrace - MariaDB Server Fest 2021Valeriy Kravchuk
Bpftrace is a relatively new eBPF-based open source tracer for modern Linux versions (kernels 5.x.y) that is useful for analyzing production performance problems and troubleshooting software. Basic usage of the tool, as well as bpftrace one liners and advanced scripts useful for MariaDB DBAs are presented. Problems of MariaDB Server dynamic tracing with bpftrace and some possible solutions and alternative tracing tools are discussed.
This document provides an overview of the Enhanced Interior Gateway Routing Protocol (EIGRP). It describes the history and development of EIGRP, its basic operation and components, including reliable transport protocol, packet types, neighbor discovery via hello packets, and route updates using the diffusing update algorithm. It also covers basic EIGRP configuration such as enabling it with the router eigrp command, advertising networks, and verifying neighbor relationships.
The document discusses network services including network address translation (NAT), Dynamic Host Configuration Protocol (DHCP), and Domain Name Services (DNS). It describes how NAT allows private IP addresses to access the internet using public IP addresses through static NAT, dynamic NAT, or port address translation (PAT). DHCP automatically assigns IP addresses to devices on a network, while DNS translates names to IP addresses. The document also discusses configuring these services on Cisco routers using both CLI commands and the Cisco Security Device Manager web tool.
SOSCON 2019.10.17
What are the methods for packet processing on Linux? And how fast are each packet processing methods? In this presentation, we will learn how to handle packets on Linux (User space, socket filter, netfilter, tc), and compare performance with analysis of where each packet processing is done in the network stack (hook point). Also, we will discuss packet processing using XDP, an in-kernel fast-path recently added to the Linux kernel. eXpress Data Path (XDP) is a high-performance programmable network data-path within the Linux kernel. The XDP is located at the lowest level of access through SW in the network stack, the point at which driver receives the packet. By using the eBPF infrastructure at this hook point, the network stack can be expanded without modifying the kernel.
Daniel T. Lee (Hoyeon Lee)
@danieltimlee
Daniel T. Lee currently works as Software Engineer at Kosslab and contributing to Linux kernel BPF project. He has interest in cloud, Linux networking, and tracing technologies, and likes to analyze the kernel's internal using BPF technology.
Kdump and the kernel crash dump analysisBuland Singh
Kdump is a kernel crash dumping mechanism that uses kexec to load a separate crash kernel to capture a kernel memory dump (vmcore file) when the primary kernel crashes. It can be configured to dump the vmcore file to local storage or over the network. Testing involves triggering a kernel panic using SysRq keys which causes the crash kernel to load and dump diagnostic information to the configured target path for analysis.
Ean Sarath is a technical support specialist at MaxBIT ISP who is certified in MikroTik. The presentation discusses hotspots and how to configure them using MikroTik. It covers benefits of hotspots like providing secure login pages and bandwidth limiting. The document then explains how to set up a hotspot interface, IP pool, and DHCP server. It also discusses bypassing hotspots through IP binding, walled gardens, and limiting user bandwidth profiles. Shared user profiles are explained as well to allow multiple logins under one account.
A function is a reusable block of code that can be called from different parts of a program. Functions accept parameters as input and may return a value. When a function is called, its parameters and local variables are stored on the stack. Each function call creates a stack frame that contains its parameters, local variables, and return address. This allows functions to maintain separate variable scopes while sharing the call stack.
The document discusses several key data structures used in the Linux kernel - task lists, KFIFO queues, IDR maps, RB-trees, and prio-trees. It provides an overview of how each is implemented and lists functions to initialize and manipulate each structure, such as adding/removing entries from lists and queues, getting/removing IDs from maps, and operations on binary search and priority search trees.
Unifying Network Filtering Rules for the Linux Kernel with eBPFNetronome
At the core of fast network packet processing lies the ability to filter packets, or in other words, to apply a set of rules on packets, usually consisting of a pattern to match (L2 to L4 source and destination addresses and ports, protocols, etc.) and corresponding actions (redirect to a given queue, or drop the packet, etc.). Over the years, several filtering frameworks have been added to Linux. While at the lower level, ethtool can be used to configure N-tuple rules on the receive side for the hardware, the upper layers of the stack got equipped with rules for firewalling (Netfilter), traffic shaping (TC), or packet switching (Open vSwitch for example).
In this presentation, Quentin Monnet reviewed the needs for those filtering frameworks and the particularities of each one. Then focuses on the changes brought by eBPF and XDP in this landscape: as BPF programs allow for very flexible processing and can be attached very low in the stack—at the driver level, or even run on the NIC itself—they offer filtering capabilities with no precedent in terms of performance and versatility in the kernel. Lastly, the third part explores potential leads in order to create bridges between the different rule formats and to make it easier for users to build their filtering eBPF programs.
This document discusses using fastnetmon and ExaBGP to monitor and mitigate DDoS attacks at the University of Wisconsin-Platteville. Fastnetmon monitors network traffic in real-time and detects DDoS attacks based on packet, bandwidth, and flow thresholds. It then triggers ExaBGP to inject blackhole routes to drop attack traffic while allowing legitimate traffic to pass. This integrated solution allows the university to automatically detect and mitigate DDoS attacks in near real-time.
This document provides an introduction to eBPF and XDP. It discusses the history of BPF and how it evolved into eBPF. Key aspects of eBPF covered include the instruction set, JIT compilation, verifier, helper functions, and maps. XDP is introduced as a way to program the data plane using eBPF programs attached early in the receive path. Example use cases and performance benchmarks for XDP are also mentioned.
1. BIL 434 Bilgisayar Ağları II
Bağlantı Katmanı ve Veri Bağlantı Katmanı
LAN’lar Amaçlar:
Veri bağlantı katmanı servisleri ardındaki
prensipleri anlamak :
Hata tespiti, düzeltme (error detection, correction)
Bir broadcast kanalını paylaşma: çoklu erişim (multiple
A note on the use of these ppt slides: access))
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 Computer Networking: Bağlantı katmanı adreslemesi (link layer addressing)
(including this one) and slide content to suit your needs. They obviously A Top Down Approach Güvenilir veri iletimi, akış kontrolü
represent a lot of work on our part. In return for use, we only ask the
Featuring the Internet,
Çeşitli bağlantı katmanı teknolojilerinin
following:
If you use these slides (e.g., in a class) in substantially unaltered form, 3rd edition.
uygulanması
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 Jim Kurose, Keith Ross
you note that they are adapted from (or perhaps identical to) our slides, and Addison-Wesley, July
note our copyright of this material.
2004.
Thanks and enjoy! JFK/KWR
All material copyright 1996-2004
J.F Kurose and K.W. Ross, All Rights Reserved
Veri-bağlantı katmanı 2-1 Veri-bağlantı katmanı 2-2
Bağlantı Katmanı Bağlantı Katmanı: Giriş “hat”
Biraz terminoloji:
Uç sistemler ve
5.1 Giriş ve Servisler 5.6 Hublar and yönlendiriciler düğümler
5.2 Hata tespiti ve switch’ler (nodes)
İletişim hattı boyunca bitişik
düzeltme 5.7 PPP düğümleri bağlayan iletişim
5.3Çoklu erişim 5.8 Hat Sanallaştırma: kanalları hatlar
Kablolu hatlar
protokolleri ATM and MPLS Kablosuz hatlar
5.4 Bağlantı katmanı LANlar
Katman-2 paketine çerçeve
adreslemesi (frame) denir, datagramı
5.5 Ethernet sarmalar
Veri-bağlantı katmanı, bir hat boyunca datagramı
bitişik iki düğüm arasında iletmekle sorumludur
Veri-bağlantı katmanı 2-3 Veri-bağlantı katmanı 2-4
Bağlantı katmanı: bağlam Bağlantı Katmanı Servisleri
Datagramlar farklı hatlar Taşıma benzeşimi
İzmit’ten Lozan’a Çerçeveleme, hatta erişim:
üzerinden farklı bağlantı Datagramı başlık ve kuyruk (trailer) ekleyerek çerçeve
protokolleri ile taşınırlar: Havaş: İzmit’ten Atatürk içine sarmalar
Havalimanına Ortak bir ortam kullanılıyorsa kanal erişimi bir ortam
Örn., İl hatta Ethernet,
uçak: Atatürk erişim protokolü ile sağlanır
ortadaki hatlarda frame
Havalimanından Geneva Çerçeve başlıklarındaki “MAC” adresleri kaynak ve hedefi
relay, son hatta 802.11 gibi belirlemede kullanılır
havaalanına
Her bağlantı katmanı tren: Geneva’dan Lozan’a
• IP adresinden farklıdır!
farklı servisler sunar Bitişik düğümler arasında güvenilir iletim
turist = datagram Bunun nasıl sağlandığını taşıma katmanında öğrendik
Örn, hat üzerinde rdt
sağlayabilir ya da Taşıma segmenti = Düşük hata oranlı hatlarda nadiren kullanılır
sağlamayabilir iletişim hattı Kablosuz hatlarda: yüksek hata oranı
• Soru: Neden hem bağlantı katmanında hem de uçtan
Taşıma tipleri = bağlantı uca sağlanır?
katmanı protokolleri
Seyahat acentası =
yönlendirme Veri-bağlantı katmanı 2-5
algoritması Veri-bağlantı katmanı 2-6
0910 Bahar, Dr. Pınar Onay Durdu 1
2. BIL 434 Bilgisayar Ağları II
Link Layer Services (more) İletişen adaptörler
datagram
Akış kontrolü: Bağlantı katmanı protokolü Alıcı
Gönderici düğüm
Gönderen ve alan düğümler arasında hızı ayarlama düğüm
frame frame
Hata Tespiti:
Hatalar gürültü ya da sinyal zayıflamasından meydana adaptör adaptör
gelebilir Bağlantı katmanı
“adaptörlerde” uygulanır
adaptörlerde Alıcı taraf
Alıcı hataların varlığını tespit eder:
(aka NIC) Hatalara, rdt ve akış
• Göndericiyi yeniden iletim için uyarır ya da çerçeveyi kontrolüne bakar
atar Ethernet kartı, PCMCI
Datagramı açar ve alıcı
kartı, 802.11 kartı
Hata Düzeltme: düğüme aktarır
Gönderici taraf:
Alıcı bit hatalarını yeniden iletim gerektirmeden tespit Adaptörler yarı özerktir
eder ve düzeltir corrects Datagramı çerçeve içine
sarmalar Bağlantı ve fiziksel
Yarı dubleks ve tam dubleks Hata kontrol bitleri, rdt katmanda sayılır
Yarı dubleks ile, hattın iki ucundaki düğümler iletim ve hata kontrolü için
gerçekleştirebilir ancak aynı anda olmaksızın Veri-bağlantı katmanı 2-7
gerekenleri ekler Veri-bağlantı katmanı 2-8
Bağlantı Katmanı Hata Tespiti
EDC= Hata tespit ve düzeltme bitleri (Error Detection and
5.1 Giriş ve Servisler 5.6 Hublar and Correction bits)
switch’ler D = Hata tespiti ile korunan veri, başlık alanları da içerebilir
5.2 Hata tespiti ve
düzeltme 5.7 PPP • Hata tespiti %100 güvenli değildir!
5.3Çoklu erişim 5.8 Hat Sanallaştırma: • protokol naidern de olsa hataları kaçırabilir
protokolleri ATM and MPLS • daha büyük EDC alanı daha iyi hata tespiti ve düzeltimi sağlar
5.4 Bağlantı katmanı
adreslemesi
5.5 Ethernet
Veri-bağlantı katmanı 2-9 Veri-bağlantı katmanı 2-10
Eşlik kontrolü (Parity Checking) Internet kontrol toplamı
Tek Eşlik Biti İki boyutlu eşlik biti: Amaç: iletilen segmentteki “hataları” tespit etmek
Tek bit hatalarını tespit eder ve
(Single Bit Parity): düzeltir (e.g., değişen bitler) (not: sadece taşıma katmanında
Tek bit hatalarını tespit
eder
kullanılır)
Gönderici: Alıcı:
Alınan segment için checksum
Segment içeriğine 16 hesaplar
bitlik tamsayılar olarak
Hesaplanan checksum ın alandaki
davranır değere eşit olup olmadığını
Kontrol toplamı: Segment kontrol eder:
içeriğinin toplamı (1’in HAYIR – hata tespit edilir
tümleyicileri toplamı) EVET – hata tespit edilmez.
Gönderici UDP checksum Yine de hata olabilir?
0 0
alanına checksum değerini
koyar
Veri-bağlantı katmanı 2-11 Veri-bağlantı katmanı 2-12
0910 Bahar, Dr. Pınar Onay Durdu 2
3. BIL 434 Bilgisayar Ağları II
Kontrol toplamı: Döngüsel Tekrarlılık
Kontrolü (Cyclic Redundancy Check - CRC)
CRC Örneği
R değeri nasıl hesaplanır.?
Veri bitlerini D olarak görür, Aşağıdaki gibi bir n olması
durumunda :
r+1 bit örüntüsünü seçer (üreteç), G D.2r XOR R = nG
amaç: r CRC biti seç, = R; R değerinin D.2r XOR R değerine
kalan olmadan bölüneceği bir R
<D,R>, G ile (modül 2 aritmetiği) ile tam bölünebilsin seçmek istiyoruz. İki tarafa
XOR R eklersek:
Alıcı G yi önceden bilir ve <D,R> ‘yi Gile böler. Eğer sıfır
D.2r = nG XOR R
olmayan bir kalan varsa: Hata tespit edilmiştir! Bu eşitlik bize D.2r nin G ile
u şt z D. r n n
R+1 den az olan tüm patlamalı bit hatalarını tespit edebilir bölündüğünde kalan değerin
tam olarak R olacağını söyler
Pratikte geniş kullanım alanı bulur (ATM, HDCL)
D.2r
R = kalan [ ]
G
Veri-bağlantı katmanı 2-13 Veri-bağlantı katmanı 2-14
Multiple Access Links and Protocols
Bağlantı Katmanı
İki tip “ha”:
5.1 Giriş ve Servisler 5.6 Hublar and Noktadan noktaya (point-to-point)
5.2 Hata tespiti ve switch’ler çevirmeli erişim için PPP
düzeltme 5.7 PPP Ethernet anahtarı ve uç sistem arasındaki PPP hat
5.3Çoklu erişim 5.8 Hat Sanallaştırma: broadcast (paylaşımlı kablo ya da ortam)
protokolleri ATM and MPLS geleneksel Ethernet
HFC
5.4 Bağlantı katmanı
802.11 kablosuz LAN
adreslemesi
5.5 Ethernet
Veri-bağlantı katmanı 2-15 Veri-bağlantı katmanı 2-16
Çoklu Erişim Protokolleri İdeal Çoklu Erişim Protokolü
Tek paylaşımlı broadcast kanalı
Hızı R bps olan Broadcast kanalı için
Düğümler tarafından iki ya da daha fazla eşzamanlı
1. Sadece bir düğüm veri gönderecekse R hızında veri
iletim : girişim (interference )
gönderebilmelidir.
Çarpışma (collision) bir düğüm aynı anda birden fazla sinyal
alırsa yaşanır 2. M sayıda düğüm veri gönderecekse her biri R/M
Çoklu i i
Ç kl erişim protokolü
k lü hızında iletebilmelidir
Düğümlerin nasıl kanalı paylaşacaklarını belirleyen 3. Protokol tamamıyla dağıtıktır:
dağıtık bir algoritma, başka bir deyişle, düğümün ne iletişimi koordine edecek özel bir düğüm yoktur
zaman ileteceğinin belirlenmesi Zaman ya da yuva senkronizasyonu yoktur
Kanal paylaşımı ile ilgili iletişim yine kanalın kensini 4. basittir.
kullanmalıdır!
Veri-bağlantı katmanı 2-17 Veri-bağlantı katmanı 2-18
0910 Bahar, Dr. Pınar Onay Durdu 3
4. BIL 434 Bilgisayar Ağları II
MAC Protokolleri: çeşitleri Kanal bölme MAC protokolleri:
Üç geniş sınıf:
Kanal Bölümleme
Kanalı “küçük parçalara” (zaman yuvaları, frekans, kod) TDM (Zaman Bölme Çoklama): kanal N
bölme
Her bir parçayı bir düğümün kullanımına ayırma
zaman yuvasına bölünür, her kullanıcı için
Rastgele Erişim
bir tane, düşük yüklü az görevli döngü
y g g
Kanal bölünmez, çarpışmaya izin verilir kullanıcıları için verimsizdir.
Çarpışmaların “üstesinden gelinir” FDM (Frekans bölme çoklama): Bant
“Sıra bekleme” genişliği frekanslara bölünür.
Düğümler sıra bekler, fakat çok gönderecek düğümler
daha çok sıra alır
Veri-bağlantı katmanı 2-19 Veri-bağlantı katmanı 2-20
Kanal bölme MAC protokolleri: TDMA Kanal bölme MAC protokolleri : FDMA
TDMA: zaman bölme çoklu erişim FDMA: Frekans bölme çoklu erişim
Kanal frekanslara bölünür
Kanala erişim “turladır"
Her istasyon sabit bir frekans bandına atanır
Her düğüm her turda sabit uzunlukta bir yuva alır
(uzunluk = paket iletim zamanı) Kullanılmayan iletim zamanlarında frekans bandı boşta
kalır
Kullanılmayan yuvalar boş kalır
örnek: 6 istasyonluk LAN, 1,3,4 ün paketleri var, 2,5,6
Örn.: 6 istasyonluk LAN, 1,3,4 ün paketleri var,
ıncı frekans bantları boş kalır
2,5,6 ıncı yuvalar boş kalır
frequency bands
Veri-bağlantı katmanı 2-21 Veri-bağlantı katmanı 2-22
Rastgele Erişim Protokolleri Yuvalı ALOHA
Düğümün gönderecek paketi olduğunda Varsayımlar İşlem
Kanalın tam iletim hızı R ile iletir.
Tüm çerçeveler aynı boyutta Düğüm yeni çerçeve alınca
Düğümler arasında öncelik koordinasyonu yoktur
Zaman eşit zaman yuvalarına bir sonraki yuvada iletir
İki ya da fazla ileten düğüm olursa ➜ çarpışma bölünmüş ve zaman 1
“collision”, Çarpışma olmazsa, düğüm
çerçeveyi iletecek kadar
Rastgele erişim MAC protokolü : yeni çerçeveyi bir sonraki
Düğümler çerçeveleri sadece
Çarpışmaları tespit etmeyi yuvada iletir
yuva başlarında iletmeye
Çarpışmaların üstesinden gelmeyi
başlayabilir Çarpışma olursa, düğüm
tanımlar
Düğümler senkronize çerçeveyi başarıya ulaşana
Rastgele erişim MAC protokollerine örnek:
Eğer 2 ya da fazla düğüm dek bir sonraki yuvada p
yuvalı ALOHA
aynı yuvada iletirse tüm
ALOHA olasılıkla göndermeyi
düğümler çarpışmayı tespit
CSMA, CSMA/CD, CSMA/CA
edebilir dener
Veri-bağlantı katmanı 2-23 Veri-bağlantı katmanı 2-24
0910 Bahar, Dr. Pınar Onay Durdu 4
5. BIL 434 Bilgisayar Ağları II
Yuvalı ALOHA Yuvalı Aloha verimliliği
Verimlilik çok sayıda etkin
düğüm ve her birinin her zaman N düğüm için
gönderecek çok sayıda maksimum verimlilik,
çerçevesi olduğundan başarılı Np(1-p)N-1 i maksimize
yuvaların kesri olarak edecek p* bul
tanımlanabilir Pek çok düğüm için ,
Çok çerçeve gönderecek N Np*(1-p*)N-1 in limitini
p p
Avantajları
A t jl Dezavantajları
al, N sonsuza giderken
Çarpışmalar yuvaların boşa düğümün bir yuvada
Tek etkin düğüm iletmesi olasılığının p 1/e = .37
harcanmasıyla sonuçlanır
kanalın tüm kapasitesi olduğunu varsayalım
Boş yuvalar
ile süreli iletebilir En iyi durumda: kullanışlı
Düğümler paketi gönderme Düğüm 1 in yuvada başarılı
Tümüyle dağıtıktır: süresinden daha az olma olasılığı = p(1-p)N- İletimler için kanalın
sadece yuvalardaki zamanda çarpışmayı tespit 1
Kullanılması zamanın %37
düğümler senkronize edebilir Herhangibir düğümün sindedir!
olmalıdır Saat senkronizasyonu başarılı olma olasılığı = Np(1-
basittir Veri-bağlantı katmanı 2-25 p)N-1 Veri-bağlantı katmanı 2-26
CSMA (Taşıyıcı Duyarlı Çoklu Erişim -
Saf (yuvasız) ALOHA
Carrier Sense Multiple Access)
yuvasız Aloha: daha basit, senkronizasyon yok
Çerçeve gelir gelmez CSMA: iletmeden önce dinle:
anında ilet Kanal boş algılanırsa: tüm çerçeveyi ilet
Çarpışma olasılığı yükselir: Kanal meşgulse, iletimi ertele
t0 da gönderilen çerçeve [t0-1,t0+1] da gönderilen diğer
g ç ç [ ] g ğ
çerçeveler ile ile çarpışır İnsan benzeşimi: diğerlerinin sözünü kesme!
Veri-bağlantı katmanı 2-27 Veri-bağlantı katmanı 2-28
CSMA çarpışmaları layout of nodes
spatial
CSMA/CD (Çarpışma tespiti)
Çarpışmalar meydana CSMA/CD: taşıyıcı duyarlı, CSMA deki gibi
gelebilir: ertelemeli
Yayılma gecikmesi iki düğümün
Çarpışma kısa zamanda tespit edilir
birbirlerinin iletimini
duyamaması anlamına gelir Çarpışan iletimler durdurulur, kanal boşa kullanımı
çarpışma: azaltılmış olur
Tüm paket iletimi için geçen
zaman boşa harcanır
Hata tespiti:
Kablolu LAN’larda kolaydır: Sinyal kuvveti ölçülür,
not:
iletilen ve alınan sinyaller kıyaslanır
Uzaklık ve yayılma gecikmesinin
çarpışmanın belirlenmesindeki Kablosuz ağlarda daha zordur:alıcı iletim sırasında
rolü göz önünde bulundurulmalı kapanabilir
Veri-bağlantı katmanı 2-29 Veri-bağlantı katmanı 2-30
0910 Bahar, Dr. Pınar Onay Durdu 5
6. BIL 434 Bilgisayar Ağları II
CSMA/CD collision detection “Sıra bekleme” MAC proyokolleri
Kanal bölme MAC protokolleri:
Fazla yüklerde kanalı verimli ve adil olarak
paylaşır
Düşük yüklerde verimsizdir: sadece 1 tane etkin
düğüm olduğunda bile bant genişliği 1/N olarak
ğ ğ g ş ğ
ayrılır!
Rastgele erişim MAC protokolleri
Düşük yükte verimlidir: tek düğüm kanalın
tümünü kullanabilir
Fazla yükte: çarpışma yükü
“sıra bekleme” protokolleri
İki dünyanın en iyilerini arar!
Veri-bağlantı katmanı 2-31 Veri-bağlantı katmanı 2-32
“Taking Turns” MAC protocols MAC protokollerinin özeti
Sıralama: Jeton aktarma:
Kontrol jetono bir düğümden
Paylaşılan bir ortam ile ne yaparsın?
Ana düğüm “invites”
diğerine sıra ile geçer. Zaman, frekans ya da kod ile kanal bölme
diğer düğümleri
• Time Division, Frequency Division
sırayla iletmek için Jeton mesajı
“davet” eder Rastgele bölme (dinamik),
kısıtlar:
• ALOHA, S-ALOHA, CSMA, CSMA/CD
H H / D
kısıtlar: Jeton yükü
• Ortam dinleme: bazı teknolojilerde (kablolu) kolayken
Sıralama yükü gecikme
bazılarında zordur (kablosuz)
gecikme Tek hata noktası (jeton) • Ethernet’te CSMA/CD kullanılır
Tek hata noktası • 802.11’de CSMA/CA kullanılır
(master- ana düğüm)
Sıra bekleme
• Merkezden sıralama ya da jeton aktarma
Veri-bağlantı katmanı 2-33 Veri-bağlantı katmanı 2-34
LAN teknolojileri
Şimdiye kadar veri bağlantı katmanında
gördüklerimiz:
servisler, hata tespiti/düzeltimi, çoklu erişim
Sırada: LAN teknolojileri
adresleme
Ethernet
hublar, switchler
PPP
Veri-bağlantı katmanı 2-35
0910 Bahar, Dr. Pınar Onay Durdu 6