Week 1: Introduction Review 1: Data Communications

Slides:



Advertisements
งานนำเสนอที่คล้ายกัน
การสื่อสารข้อมูลบนเครือข่าย
Advertisements

บทที่ 2 แบบจำลอง OSI OSI Model.
อาจารย์ผู้ร่วมประเมิน อ. ดร. กิตติ์ เธียรธโนปจัย อ. วาธิส ลีลาภัทร
การเรียนครั้งที่ 9 บทที่ 4: “Telecommunications, the Internet, Intranets, and Extranets” โดย อ.เพ็ญจิรา คันธวงศ์ อ.เพ็ญจิรา คันธวงศ์
อินเตอร์เน็ต.
TCP/IP.
ตัวอย่างการใช้ประโยชน์ของการสื่อสาร
ATM NETWORK.
Data Transmission Encoding Techniques and Transmission mode
Network Model Signal and Data transmission
หนังสืออ้างอิง Course Syllabus
TCP/IP Protocols IP Addressing
Switching Network Circuit Switching/Packet Switching
Multiplexing and Network Multiplexing
Network Model แบบจำลอง OSI
Network Model แบบจำลอง OSI
เครือข่ายการสื่อสารข้อมูลท้องถิ่น
ARP (Address Resolution Protocol)
Data Transferring.
ระบบเครือข่ายคอมพิวเตอร์
บทที่ 3 ในการเชื่อมต่อเครือข่าย
องค์ประกอบของระบบ Internet
เครือข่าย LAN แบบ IEEE 802 IEEE 802.X Network
Digital Data Communication Technique
Sharing Communication Lines
โดย อ.ปริญญา น้อยดอนไพร V
MAC Address. Short for Media Access Control address, a hardware address that uniquely identifies each node of a network. In IEEE 802 networks, the Data.
Data Communication Chapter 2 OSI Model.
4/4/2017 การสื่อสารข้อมูล เทคโนโลยีเพื่อการส่งสัญญานข้อมูลจากที่หนึ่งไปยังอีกที่หนึ่ง โดยมีองค์ประกอบพื้นฐาน 4 อย่าง คอมพิวเตอร์ หรือ หน่วยรับข้อมูล หรือ.
Mobile Wireless Communication
ระบบการสื่อสารข้อมูล (Data Communication System)
ระบบการสื่อสารข้อมูล (Data Communication System)
ระบบการสื่อสารข้อมูล (Data Communication System)
ระบบเครือข่ายคอมพิวเตอร์บทที่ 7 Local Area Network
บทที่ 2 แบบจำลอง OSI OSI Model.
บทที่ 3 การส่งผ่านข้อมูล และการอินเตอร์เฟซ
ERROR (Data Link Layer)
CPE 332 Computer Engineering Mathematics II
การสื่อสารข้อมูล Data Communication Chapter 10 วชิรธรรมสาธิต
อาจารย์นัณฑ์ศิตา ชูรัตน์
Computer Network.
Lab 1 – 2 Protocols Guideline.
ความรู้พื้นฐานการสื่อสารข้อมูล
Introduction to Network
ADSL คืออะไร.
Mathematical Model of Physical Systems. Mechanical, electrical, thermal, hydraulic, economic, biological, etc, systems, may be characterized by differential.
เครือข่ายคอมพิวเตอร์
NETWORK.
บทที่ 7 Networks and Data Communications
เครือข่ายคอมพิวเตอร์และ อินเทอร์เน็ต. LAN Overview LANs were created to save time, money, and enable users to share information and resources more easily.
1 LAN Implementation Sanchai Yeewiyom School of Information & Communication Technology Naresuan University, Phayao Campus.
แบบจำลอง OSI Model.
BY KIADTIPONG YORD. CHANDRA 2004 :: COMPUTER NETWORK ระบบเครือข่ายคอมพิวเตอร์ และการกระจาย Computer Network and Distributed การเชื่อมโยงเครือข่าย Making.
OSI 7 LAYER.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco PublicITE I Chapter 6 1 CCNA Cisco Certified Network Associate.
OSI Network Layer TCP/IP Internet Layer วิชาการสื่อสารข้อมูลและเครือข่าย นายวุฒิชัย คำมีสว่าง.
Concept and Terminology Guided media (wired) Twisted pair Coaxial cable Optical fiber Unguided media (wireless) Air Seawater Vacuum Direct link Point.
การสื่อสารข้อมูล.
การสื่อสารข้อมูลและเครือข่ายคอมพิวเตอร์
Wireless Network เครือข่ายไร้สาย
บทที่ 6 โลกของเครือข่าย.
แบบจำลองเครือข่าย (Network Models)
เครือข่ายคอมพิวเตอร์
พื้นฐานการอินเตอร์เฟส
อาจารย์อภิพงศ์ ปิงยศ บทที่ 6 : เครือข่ายแลนอีเทอร์เน็ต (Wired LANs : Ethernet) Part1 สธ313 การสื่อสารข้อมูลและเครือข่ายคอมพิวเตอร์ทางธุรกิจ.
เทคโนโลยี 3G อาจารย์ยืนยง กันทะเนตร
ระบบเครือข่ายคอมพิวเตอร์ (COMPUTER NETWORK)
การติดต่อสื่อสารของคอมพิวเตอร์
ระบบเครือข่าย คอมพิวเตอร์ เบื้องต้น
Multimedia Production
ใบสำเนางานนำเสนอ:

Week 1: Introduction Review 1: Data Communications CPE 426 Computer Networks Week 1: Introduction Review 1: Data Communications

Course Outlines ดูใน Sheet สามารถ Download ได้ http://cpe.rsu.ac.th/ut

TOPICS 1. Communication/NW Model Ch.5.1-5.5 2. Communication Protocols OSI and TCP/IP Ch.1.1-1.10 3. Communication/NW Topology Ch. 13.8

TOPICS 4. Signal/Power/Loss 5. Data Coding(Line Coding) Ch.6.1-6.10 5. Data Coding(Line Coding) Ch.6.11-6.20 6. Trasmission Media/Noise/Channel Capacity Ch.7.1-7.10 & 7.20-7.22

TOPICS 7. Multiplexing & DSL 8. Asynchronous Communication

TOPICS 10. Flow Control/Error Control/ARQ Ch. 8.12-8.15 11. Circuit vs Packet Switching NW Ch. 3.1-3.5 % 13.1-13.5 ALSO Reference From CPE 326 (Stalling Book)

การสื่อสาร ประกอบด้วย 2 Entity Sender = Source ผู้ส่ง หรือแหล่งกำเนิดข้อมูล Destination ผู้รับ หรือ ปลายทางข้อมูล Transmitter Receiver DATA Signal = สัญญาณ DATA Transmission Medium

ผู้รับ หรือ ปลายทางข้อมูล Data comm.Model มี 5 ส่วน Sender = Source ผู้ส่ง หรือแหล่งกำเนิดข้อมูล Destination ผู้รับ หรือ ปลายทางข้อมูล Transmitter Receiver DATA Signal = สัญญาณ DATA ABC… ABC… 01011… 01011… ADC… Transmission Medium Plus Error File: ABCD…  Data Coding/Compression (ASCII, EBCDIC/ZIP) 010110001101…. Wire/Wireless Loss and Noise Decodine/Demodulation Demultiplexing Line Coding/Modulation Plus Multiplexing

ASCII Code American Standard Code for Information Interchange ASCII includes definitions for 128 characters: 33 are non-printing control characters (now mostly obsolete) that affect how text and space is processed; 94 are printable characters, and the space is considered an invisible graphic. The most commonly used character encoding on the World Wide Web was US-ASCII until December 2007, when it was surpassed by UTF-8

Mode ของการสื่อสาร Data Communication Model ที่กล่าวถึงใช้สำหรับการสื่อสารสองคน ถ้ามีวงจรรับและส่งแยกจากกัน โดยใช้ Transmission Medium คนละตัว Simplex ถ้าใช้ Transmission อันเดียวกัน Duplex ถ้าสื่อสารสองทางได้พร้อมกัน Full-Duplex ถ้าสื่อสารสองทางไม่พร้อมกัน Half-Duplex

Simplex บางครั้งเรียก 4-wire Duplex Destination Source Tx Rx Transmission Medium Source Destination Rx Tx Transmission Medium

Duplex Destination Source Tx Rx Source Destination Rx Tx Transmission Medium Half-Duplex Destination Source Tx/Rx Tx/Rx Source Destination Transmission Medium Full-Duplex

ถ้าเราต้องการสื่อสารมากกว่า 2 คน ใช้วงจร(Duplex)ดังกล่าวตามจำนวนคู่ของการสื่อสาร = Full Mesh Topology B C จำนวนวงจร = n(n-1)/2 =O(n2) A D ราคาแพงมากถ้า n มีค่าสูง = O(n2) F E Topology ในภาษา Network คือรูปแบบการเชื่อมต่อของอุปกรณ์ต่างๆเข้าด้วยกัน

วิธีแก้คือ Share Medium และทำ Multiple Access Control ใน LAN จะใช้ Topology 3 แบบที่สำคัญ Bus (และ Tree), Ring, Star hub

วิธีแก้คือ Share Medium และทำ Multiple Access Control ใน WAN มักจะเป็น Partial Mesh Medium จัดได้ว่าเป็น Statistical Time Division Multiplexing แบบหนึ่ง Intermediate Node = Switching/Routing Node C A D B End Node E H F G

การ Share Medium ต้องมีการควบคุม = Medium Access Control End Node จะต้องมีการกำหนดชื่อหรือ Address สำหรับอ้างอิง หรือกำหนด Circuit Number Intermediate Node จะใช้หมายเลขอ้างอิงดังกล่าวในการตัดสินใจส่งข้อมูลต่อออกไป(Forwarding) ดังนั้น 1. Data ที่ส่งจะต้องแปะส่วนหัว (Header) ด้วยข้อมูลต่างๆของ Address และการ Control เราเรียกว่าเป็นการทำ Encapsulation ผลลัพธ์ที่ได้เรียกว่า Frame 2. ที่ส่วนท้ายของ Frame จะมีการต่อด้วยข้อมูลช่วยตรวจจับความผิดพลาด (Error Detection) มักจะเป็น CRC Code เรียก Frame Check Sequence(FCS) 3. ก่อนหน้าส่วน Header และหลัง FCS อาจจะมีการเติมบิตสำหรับช่วยตรวจจับหัวและท้ายของ Frame (Frame Delimiter: Pre-amble/Post-amble) 4. สำคัญที่สุดต้องมีการกำหนดกฎเกณฑ์ต่างๆเหล่านี้ให้เป็นมาตรฐาน คือกำหนดเป็น Protocol ของการสื่อสาร

LAN vs WAN Technologies LAN มักจะใช้การ Share Medium แบบ Contention ดังนั้นจะต้องมีขบวนการควบคุมการทำ Multiple Access Topology ที่เหมาะสมคือ Bus, Ring, Star WAN จะ Share Medium เช่นกัน แต่มักจะใช้วิธีของ Synchronous Multiplexing (TDM) ใน Circuit Switching Networkหรือ Statistical Multiplexing (ใช้ใน Packet Switching Network) Topology ที่เหมาะสมคือ Mesh Network และมักจะเป็น Partial Mesh Internetworking Technologies มักจะถูกใช้ในการเชื่อมต่อระหว่าง LAN ผ่าน WAN Network ที่นิยมคือ Internet (IP Network)

Protocol and Protocol Architecture ถ้ากำหนดเป็นมาตรฐาน หรือ Standard การสื่อสารจะทำได้ง่ายระหว่างอุปกรณ์ที่ต่างกัน ประกอบด้วย Syntax Data formats = รูปแบบของข้อมูล, เฟรม, การเข้ารหัส Signal levels=ลักษณะของสัญญาณที่แทนข้อมูล Semantics Control information=การควบคุมการสื่อสาร Error handling=การจัดการกับ Error Timing Speed matching=กำหนดอัตราการส่ง Sequencing=กำหนดลำดับของข้อมูล

Protocol Architecture (Protocol Stack) เนื่องจากการสื่อสารเป็นเรื่องที่สลับซับซ้อน เราแบ่งการสื่อสารทั้งหมดออกเป็น Module แต่ละ Module มีหน้าที่เฉพาะของมัน แต่ละ Module จะมีการสื่อสารระหว่าง Module อื่น แต่ละ Module มี Protocol กำกับ ปกติจะแบ่งเป็นลำดับชั้น เรียก Protocol Stack หรือ Protocol Architecture

Protocol Architecture (Protocol Stack) 7 Layer OSI Reference Model ของ ISO ปัจจุบันไม่ได้ใช้งานจริง แต่ใช้เป็น Reference TCP/IP Protocol Suite (มี 5 ชั้น) การสื่อสารเกือบจะทั้งหมด มาตรฐานของ Internet

7 Layer OSI Reference Model

7 Layer Layer 1: Physical Layer Layer 2: Data Link Layer ทำหน้าที่เชื่อมต่อผ่าน Physical Medium รับผิดชอบแปลงบิตเป็นสัญญาณ เรื่องของการ Interface, สายนำสัญญาณ ,มองเห็นข้อมูลในลักษณะ Bit Stream Layer 2: Data Link Layer ประกอบข้อมูลเป็น Frame, รับผิดชอบในการสื่อสารผ่าน แต่ละ Link ทำ Error Control, Flow Control ผ่าน Link Layer 3: Network Layer รับผิดชอบในการส่งข้อมูลผ่าน Network, หาทิศทางข้อมูล, เชื่อมต่อกับ Layer บนเข้ากับ Network หลายๆแบบ มองเห็นข้อมูลในลักษณะ Packet

7 Layer Layer 4: Transport Layer Layer 5: Session Layer รับผิดชอบการส่งข้อมูลให้ถูกต้องจากต้นทางถึงปลายทาง(End-to-End), จัดการในเรื่อง Error และ Flow Control ในระดับต้นทางถึงปลายทาง ข้อมูลที่ส่งจะถูกแบ่งเป็น Segment Layer 5: Session Layer ทำหน้าที่จัดตั้ง ดูแล การเชื่อมต่อ(Connection) ระหว่าง Applicationต้นทางและปลายทาง แบ่งการเชื่อมต่อสื่อสารออกเป็น Session

7 Layer Layer 6: Presentation Layer Layer 7: Application Layer รับผิดชอบในเรื่องรูปแบบและ Format ของข้อมูล การทำ Encryption รวมถึงการทำ Data Compression ให้อยู่ในรูปแบบที่สื่อสารได้ Layer 7: Application Layer ทำหน้าที่เชื่อมต่อกับ Application และผู้ใช้

OSI Environment

การเชื่อมต่อผ่าน Router

TCP/IP Protocol Architecture Developed by the US Defense Advanced Research Project Agency (DARPA) for its packet switched network (ARPANET) Used by the global Internet No official model but a working one. Application layer Host to host or transport layer Internet layer Network access layer Physical layer

TCP/IP Protocol Architecture Application INTERNET Transport Layer Internet Layer Network Access Physical

Physical Layer Physical interface between data transmission device (e.g. computer) and transmission medium or network Characteristics of transmission medium Signal levels Data rates etc.

Network Access Layer Exchange of data between end system and network Destination address provision Invoking services like priority ปกติมาตรฐานของ TCP/IP จะไม่ครอบคลุมถึง Layer 1-2 ทั่วไปเรานำ TCP/IP เป็น WAN และวางบน LAN คือ Ethernet

Internet Layer (IP) Systems may be attached to different networks Routing functions across multiple networks Implemented in end systems and routers คือ IP Protocol มีการทำงานแบบ Datagram

Transport Layer (TCP) Reliable delivery of data Ordering of delivery ที่สำคัญมี 2 Protocol TCP = Transport Control Protocol Connection Oriented Guarantee Delivery UDP = User Datagram Protocol Connectionless Best Effort

Application Layer Support for user applications e.g. http, SMPT

TCP/IP VS OSI Application Software NOS = Window NIC + Driver Physical Link

รูปแบบการเชื่อมต่อด้วย TCP/IP

Addressing ใน TCP/IP TCP Port หรือ UDP Port = 16 Bit IP Address, IPv4 = 32 Bit หมายเลขเครื่อง และหมายเลข Network Physical Hardware Address ถ้าใช้ TCP/IP บน Ethernet LAN อันนี้คือ Address ของ NIC หรือ MAC Address = 48 Bit

PDU = Protocol Data Unit TCP Segment IP Packet / IP Datagram Frame

Protocol ที่สำคัญของ TCP/IP

Standard LAN: WAN TCP/IP IEEE 802 Ethernet IEEE 802.3 มีย่อยอีกหลายตัว WLAN IEEE 802.11, 802.11b, 802.11g, 802.11n,802.11i PAN-Bluetooth IEEE 802.15 www.ieee.org WAN มีหลายตัว ที่สำคัญมักจะถูกดูแลโดย OSI (ITU) TCP/IP RFC = Request for Comments มีประมาณ 4000 RFCs www.faqs.org/rfcs

Physical Layer Basics Signal, Power, Noise Bandwidth ที่ใช้ในการสื่อสาร Channel Capacity NyQuist Shannon SNR, Eb/No BER

Signal, Power และ Loss ข้อมูลจะต้องเปลี่ยนให้อยู่ในรูปแบบทางฟิสิกค์ที่สามารถส่งผ่าน Medium ได้ Medium Copper Wire = Electrical Signal Medium Air/Vacuum = Radio Signal or Microwave or LASER Medium Fiber Optic = Light or LASER ระยะทางที่สามารถส่งได้ขึ้นอยู่กับกำลังของสัญญาณ(dBW, dBm) อัตราการส่งข้อมูลจะขึ้นกับค่า SNR(dB) หรือค่า Eb/No(dB)

ทำไมต้องใช้หน่วย Decibel กำลัง (W) คำนวณค่า Power ที่จุดต่างๆ ยาก ระยะทาง กำลัง (dBW) คำนวณจากสมการเส้นตรง คือใช้บัญญัติไตรยางค์ ระยะทาง

การคำนวณ แปลง dB: P(dBW) = 10log(P(W)) P(dBm) = 10log(P(mW)) กำหนด Power ที่ต้นทาง และอัตราค่า Loss(dB) ของ Medium สามารถหา Power ที่จุดใดๆใน Medium ได้จาก Power (dB) = Power ต้นทาง(dB)- Loss ใน Medium (dB) แปลง dB กลับเป็นค่า Power(Absolute) โดยใช้ Inverse Log หน่วย dB ของ Power จะมี dBW และ dBm หน่วย dB ของ Loss/Gain จะเป็น dB เท่านั้น ถ้ามีการขยาย หรือ Gain จะนำค่า Gain (dB) ไปบวกกับค่า Power (dB)

ตัวอย่าง สัญญาณ 5 W ส่งไปในสายที่มีค่า Loss 4 dB ต่อ 100 เมตร จงหาค่าสัญญาณในสายที่จุด 750 เมตร Power ต้นทาง = 10log5 = 6.9897 dBW Loss ในสายเท่ากับ 4x750/100 = 30 dB สัญญาณที่จุด 750 เมตร = 6.9897-30 = -23.0103 dBW แปลงกลับเป็นหน่วย Watt : P(W) = 10(-23.0103/10) = 5x10-3 W = 5mW

Exercise ไปคิดเอง จงหาค่า Power ที่ปลายสาย 620 m 1.5 km 480 m 6W P=?W Gain = 50 dB Gain = 45 dB 620 m 1.5 km 480 m 6W P=?W Loss = 3 dB/100 m Loss = 4 dB/100 m Loss = 3 dB/100 m

Transmission Impairment เป็นตัวขัดขวางการส่งสัญญาณ Attenuation (Loss) Distortion Delay Distortion Noise Crosstalk Thermal Noise Shot Noise Noise from Environment

Delay Distortion Only in guided media Propagation velocity varies with frequency

Noise (1) Additional signals inserted between transmitter and receiver Thermal Due to thermal agitation of electrons Uniformly distributed White noise Intermodulation Signals that are the sum and difference of original frequencies sharing a medium

Noise (2) Crosstalk Impulse A signal from one line is picked up by another Impulse Irregular pulses or spikes e.g. External electromagnetic interference Short duration High amplitude

Thermal Noise, Thermal Equivalent, Effective Noise Temperature เกิดจากการสั่นของ Molecule(Electron, Proton) เป็นคลื่นแม่เหล็กไฟฟ้ารบกวน สสารที่อุณหภูมิสูงกว่า ศูนย์องศาสมบูรณ์(0 degree Kelvin = -273.16 degree Celcius), แปรผันโดยตรง เป็น White Noise, Gaussian Noise ดังนั้น Noise Power Density, เนื่องจากเป็น White Noise, จะมี Density เท่ากันทุกความถี่ แต่ Noise จะถูกจำกัดที่ Bandwidth ของระบบเช่นกัน ดังนั้น Noise Power, Ex. ที่ Room Temp.(25 C)

Channel Capacity Data rate Bandwidth In bits per second Rate at which data can be communicated Bandwidth In cycles per second of Hertz Constrained by transmitter and medium NyQuist Bandwidth and Shannon Channel Capacity

NyQuist Bandwidth If rate of signal transmission is 2B then signal with frequencies no greater than B is sufficient to carry signal rate Given bandwidth B, highest signal rate is 2B Given binary signal, data rate supported by B Hz is 2B bps Can be increased by using M signal levels C = 2B for Binary Signal(M=2), Baud Rate=Bit Rate C= 2B log2M ( M-ary Signal ), Baud Rate = R/log2M In case of No Noise C can be increased by increasing M

Shannon Capacity Formula Consider data rate, noise and error rate Faster data rate shortens each bit so burst of noise affects more bits At given noise level, high data rate means higher error rate Signal to noise ratio (in decibels, dB) SNRdb=10 log10 (signal power/noise power) Capacity C=B log2(1+SNR), Shannon channel capacity, SNR is not in dB This is error free capacity

Digital data rate and error rate ในระบบ Analog Communication ที่เราสนใจคือ SNR เพราะแสดงถึงคุณภาพของสัญญาณ ในระบบ Digital Communication เราสนใจ Data Rate ที่ส่งได้ และ Error Rate ที่เกิดขึ้น เพราะมีผลต่อประสิทธิภาพของระบบ ดังนั้น SNR จะไม่บอกทั้งหมดใน Digital System เราต้องหาตัววัดตัวอื่น ที่ใช้คือ Energy Per Bit/ Noise Energy(Eb/No) ค่านี้ สัมพันธ์กับ BER(Bit Error Rate) ในแต่ละระบบ B เท่าเดิม แต่เพิ่ม R เราเพิ่ม Bandwidth Efficiency แต่จะลด Eb/No ทำให้ BER เพิ่มขึ้น

BER and Eb/No

สรุปสูตรการคำนวณ Power in dBw = Power in dBm = Signal-to-Noise Ratio = power of signal/power of noise SNR(dB)= NyQuist Rate, Shannon Channel Capacity, Thermal Noise(Thermal Equivalent) Noise Energy, Noise Power,

Examples (ให้อ่านเอง) 1. เครื่องรับมีค่า Effective Noise Temperature เท่ากับ 100 องศาเคลวิน และมี Bandwidth = 10 MHz จงคำนวณหาค่า Thermal Noise เป็น dBW 2. ระบบการสื่อสารกระทำที่ Spectrum ระหว่าง 3 MHz และ 4 MHz และมีค่า SNR 24 dB จงหาว่าระบบนี้สามารถส่ง Data ในอัตราได้สูงที่สุดเท่าไร และในกรณีนี้ต้องส่งสัญญาณเป็นกี่ระดับ 3. ในระบบ BPSK(Binary Phase Shift Keying) ต้องการค่า Eb/No ไม่ต่ำกว่า 8.4 dB เพื่อให้ค่า BER อยู่ต่ำกว่า 1/10000 ถ้าค่า Effective Noise Temperature ของระบบเท่ากับ 290 K และ Data Rate ที่ส่งเท่ากับ 2400 bps จงคำนวณหาระดับของสัญญาณที่ต้องการที่เครื่องรับ

Example 1 1. เครื่องรับมีค่า Effective Noise Temperature เท่ากับ 100 องศาเคลวิน และมี Bandwidth = 10 MHz จงคำนวณหาค่า Thermal Noise เป็น dBW

Example 2 2. ระบบการสื่อสารกระทำที่ Spectrum ระหว่าง 3 MHz และ 4 MHz และมีค่า SNR 24 dB จงหาว่าระบบนี้สามารถส่ง Data ในอัตราได้สูงที่สุดเท่าไร และในกรณีนี้ต้องส่งสัญญาณเป็นกี่ระดับ Shannon Channel Capacity, B=1 MHz, a) ดังนั้น จาก เราได้ b)

Examples 3. ในระบบ BPSK(Binary Phase Shift Keying) ต้องการค่า Eb/No ไม่ต่ำกว่า 8.4 dB เพื่อให้ค่า BER อยู่ต่ำกว่า 1/10000 ถ้าค่า Effective Noise Temperature ของระบบเท่ากับ 290 K และ Data Rate ที่ส่งเท่ากับ 2400 bps จงคำนวณหาระดับของสัญญาณที่ต้องการที่เครื่องรับ

Line Coding การส่ง Pulse เพื่อที่จะแทน Data แต่ละบิต ข้อควรคำนึง Pulse 2 ระดับ = Binary Signal M-ary Signal จะใช้ M ระดับ ข้อควรคำนึง Average DC เป็นศูนย์หรือไม่ Signal Transition มากเพียงพอ

NRZ

Biphase

Biphase Manchester Transition in middle of each bit period Transition serves as clock and data Low to high represents one (ที่กึ่งกลาง Bit) High to low represents zero (ที่กึ่งกลาง Bit) Used by IEEE 802.3(Ethernet = 10 Mbps) Differential Manchester Midbit transition is clocking only Transition at start of a bit period represents zero No transition at start of a bit period represents one Note: this is a differential encoding scheme Used by IEEE 802.5(Token Ring)

Bipolar-AMI+Scrambling

Scrambling; B8ZS vs HDB3 High Density Bipolar 3 Zeros Bipolar With 8 Zeros Substitution Based on bipolar-AMI If octet of all zeros and last voltage pulse preceding was positive, encode as 000+-0-+ If octet of all zeros and last voltage pulse preceding was negative, encode as 000-+0+- Causes two violations of AMI code Unlikely to occur as a result of noise Receiver detects and interprets as octet of all zeros High Density Bipolar 3 Zeros String of four zeros replaced with one or two pulses Voltage ก่อนหน้า จำนวน ‘1’ คี่ จำนวน ‘1’ คู่ - 000- +00+ + 000+ -00-

Multiplexing เป็นวิธีการที่จะสามารถส่งสัญญาณได้หลายคู่บน Transmission Medium เดียวกัน FDM = Frequency Division Multiplexing สัญญาณแต่ละคู่ใน Bandwidth (ช่วงความถี่) ต่างกัน TDM = Time Division Multiplexing สัญญาณแต่ละคู่ส่งที่เวลาต่างกัน แบ่งเป็น Synchronous TDM: แบ่งเวลาเป็น Channel ตามจำนวนคู่ คู่หนึ่งจะใช้ Channel เบอร์ที่กำหนดเท่านั้น Statistical TDM แบ่งเป็น Channel เช่นกัน แต่ไม่กำหนด คู่ใดต้องการส่งข้อมูลให้จอง Channel เพื่อส่ง ดังนั้นในการส่งข้อมูลครั้งหนึ่งๆ อาจจะใช้ Channel แตกต่างกัน

FDM vs TDM

Statistical TDM Frame Formats

Asymmetrical Digital Subscriber Line ADSL Link between subscriber and network Local loop Uses currently installed twisted pair cable Can carry broader spectrum 1 MHz or more

ADSL Design Asymmetric Frequency division multiplexing Range 5.5km Greater capacity downstream than upstream Frequency division multiplexing Lowest 25kHz for voice Plain old telephone service (POTS) Use echo cancellation or FDM to give two bands Use FDM within bands Range 5.5km

ADSL Channel Configuration

Discrete Multitone 15.36MHz DMT Multiple carrier signals at different frequencies Some bits on each channel 4kHz subchannels Send test signal and use subchannels with better signal to noise ratio 256 downstream subchannels at 4kHz (60kbps) 15.36MHz Impairments bring this down to 1.5Mbps to 9Mbps

DTM Bits Per Channel Allocation

Mode ของการส่งข้อมูล Digital Timing problems require a mechanism to synchronize the transmitter and receiver Two solutions Asynchronous Synchronous

Asynchronous Communicaton Data transmitted on character at a time 5 to 8 bits Timing only needs maintaining within each character Resynchronize with each character

Asynchronous (diagram)

Asynchronous - Behavior In a steady stream, interval between characters is uniform (length of stop element) In idle state, receiver looks for transition 1 to 0 Then samples next seven intervals (char length) Then looks for next 1 to 0 for next char Simple Cheap Overhead of 2 or 3 bits per char (~20%) Good for data with large gaps (keyboard)

Data Communications Interfacing

Characteristics of Interface Mechanical Connection plugs Electrical Voltage, timing, encoding Functional Data, control, timing, grounding Procedural Sequence of events

V.24/EIA-232-F ITU-T v.24 Only specifies functional and procedural References other standards for electrical and mechanical EIA-232-F (USA) RS-232 Mechanical ISO 2110 Electrical v.28 Functional v.24 Procedural v.24

Mechanical Specification

Electrical Specification Digital signals Values interpreted as data or control, depending on circuit Less than -3v is binary 1, more than +3v is binary 0 (NRZ-L) Signal rate < 20kbps Distance <15m For control, Less than-3v is off, +3v is on

3-wire and 5-wire RS-232 A minimal "3-wire" RS-232 connection consisting only of transmit data, receive data, and ground, is commonly used when the full facilities of RS-232 are not required. Even a two-wire connection (data and ground) can be used if the data flow is one way (for example, a digital postal scale that periodically sends a weight reading, or a GPS receiver that periodically sends position, if no configuration via RS-232 is necessary). When only hardware flow control is required in addition to two-way data, the RTS and CTS lines are added in a 5-wire version.

Null Modem: DTE to DTE RS-232-C Null Modem Cable (for Terminal/PC with 25-pin Connector) RS-232-C Null Modem Cable (for Terminal/PC with 9-pin Connector)

Null Modem

With Loop-Back Handshaking With Partial Handshaking Summary Null Modem Simple Null Modem without Handshaking Null Modem With Loop-Back Handshaking Null Modem With Partial Handshaking Null Modem With Full Handshaking

Synchronous - Bit Level Block of data transmitted without start or stop bits Clocks must be synchronized Can use separate clock line Good over short distances Subject to impairments Embed clock signal in data Manchester encoding Carrier frequency (analog)

Synchronous - Block Level Need to indicate start and end of block Use preamble and postamble e.g. series of SYN (hex 16) characters e.g. block of 11111111 patterns ending in 11111110 More efficient (lower overhead) than async

Synchronous (diagram)

Flow Control/Error Control เราควบคุมการใหลข้อมูลเพื่อไม่ให้ผู้ส่ง ส่งข้อมูลเกินกว่าผู้รับจะรับได้ เมื่อส่งข้อมูลแล้ว ให้รอสัญญาณพร้อมที่จะรับข้อมูลอันต่อไปจากผู้รับ ปกติ Mechanism นี้จะใช้ร่วมกับ Error Control โดยเมื่อมี Error จะใช้วิธีการ Retransmission เราเรียกรวมว่า ARQ = Automatic Repeat Request

Model of Frame Transmission

Stop and Wait Flow Control Efficiency = d/T x 100%

Sliding Window Diagram

Example Sliding Window

Stop and Wait - Diagram แต่ละ Frame ที่ส่ง กำหนด Timer Frame Sequence ใช้ 1 Bit สำหรับตรวจ Frame ซ้ำ ในทางปฎิบัติ การ Acknowledge จะใช้ Piggyback สำหรับใน Microprocessor อาจจะใช้สาย Ack แยกต่างหาก

ในทางปฎิบัติ การ Acknowledge จะใช้ Piggyback Go Back N - Diagram แต่ละ Frame ที่ส่ง กำหนด Timer ขนาด Window สูงสุดไม่เกิน 2n-1 เมื่อมี Error ให้เริ่มส่งใหม่ตั้งแต่ Frame นั้น ในทางปฎิบัติ การ Acknowledge จะใช้ Piggyback

Selective Reject - Diagram แต่ละ Frame ที่ส่ง กำหนด Timer ขนาด Window สูงสุดไม่เกิน 2n-1 เมื่อมี Error ส่งใหม่เฉพาะ Error Frame ในทางปฎิบัติ การ Acknowledge จะใช้ Piggyback

WAN WAN Public Network Network การเชื่อมต่อปกติจะผ่าน Network ของผู้ให้บริการ หรือ Service Provider เราไม่ได้เป็นเจ้าของ เป็นลักษณะการเช่า จ่ายตามจำนวนที่ใช้ เวลา/จำนวนข้อมูล ระยะทางไกลกว่า Technologies ที่ใช้ในการเชื่อมต่อ แตกต่างกัน Network Circuit Switching Network Packet Switching Network

Circuit Switching Network สำหรับเครือข่ายโทรศัพท์ ลักษณะข้อมูลและสัญญาณเป็น Real-Time ยอมให้มี Error ได้บ้าง ค่า Delay และ Delay Variation จะถูกจำกัดไม่ให้เกินค่าที่กำหนด ดังนั้นเพื่อให้ NW สามารถรองรับความต้องการได้ ทั้งผู้ส่งและผู้รับจะต้องมีวงจรเชื่อมต่อ (Circuit) ที่เป็นส่วนตัว จะใช้ร่วมกันไม่ได้ = Dedicate Circuit อย่างไรก็ตาม เพื่อประหยัด Resource ตัววงจรดังกล่าวจะแบ่งกันใช้ ถ้าผู้ใดไม่ใช้สามารถให้คนอื่นใช้ได้ และการใช้ต้องมีการจอง

Circuit Switching Network อย่างไรก็ตาม เพื่อประหยัด Resource ตัววงจรดังกล่าวจะแบ่งกันใช้ ถ้าผู้ใดไม่ใช้สามารถให้คนอื่นใช้ได้ และการใช้ต้องมีการจอง ดังนั้นการใช้งานจะแบ่งเป็น 3 Phase 1. Connection เพื่อขอ Circuit โดยการหมุนเลขหมายไปยังปลายทาง ตัว Network จะหาทิศทาง กำหนดว่าใช้ Link ไหน และผ่าน Node = Switch อะไรบ้าง ถ้าทิศทางว่าง และผู้รับทำการรับสาย วงจรนั้นจะถูกจองไว้ 2. Data Transfer ในกรณีโทรศัพท์คือเสียง 3. Disconnection เมื่อไม่ใช้แล้ว ส่วน Resource ต่างๆที่ถูกจองไว้จะถูกส่งคืน และ Network สามารถนำไปให้ผู้อื่นใช้ได้

Simple Switched Network

Simple Switched Network

Simple Switched Network

Simple Switched Network

Simple Switched Network

Simple Switched Network BLOCKING

Simple Switched Network B  D Finish BLOCKING

Simple Switched Network B  D Finish BLOCKING

Simple Switched Network B  D Finish

Public Circuit Switched Network ลักษณะการทำงานของตัว Switching ใน Circuit Switching Network

Circuit Switch เมื่อนำมาส่ง Data ผ่านอุปกรณ์ MODEM = Modulator/Demodulator พฤติกรรมการส่งข้อมูลปกติจะเป็น Burst คือนานๆจะส่ง แต่เมื่อส่งจะส่งข้อมูลทีละมากๆ การดู WEB Page เรา Load Web ในช่วงเวลาสั้นๆ ถ้า Page มีขนาดใหญ่ ข้อมูลจำนวนมากจะถูกส่งในเวลาสั้นๆนั้น เราอ่าน Web Page เราไม่ได้ใช้ Network Bandwidth ปกติเราจะใช้เวลาอ่านนานกว่าการ Load Circuit ที่จองไว้ เวลาส่วนใหญ่จะเสียไป ไม่ได้ใช้งาน แต่คนอื่นใช้ไม่ได้ ประสิทธิภาพจะต่ำ

Circuit Switch ใช้สำหรับการเชื่อมต่อระหว่าง Site ที่ไม่ต้องการส่งข้อมูลแบบ Real-Time แบบ Off Line เช่นการเชื่อมต่อระหว่างสาขา และส่งยอดขายประจำวันมายังสำนักงานใหญ่ วันละ 1 ครั้ง เมื่อจะส่ง ต่อ Modem ผ่านสายโทรศัพท์ ส่งข้อมูล หยุดการติดต่อ ราคาถูก จ่ายค่าโทรศัพท์ทางไกล ในเวลาสั้นๆ ปัจจุบัน Internet ราคาไม่แพง และต่อ Online ได้ ดังนั้นวิธีนี้นับวันจะหมดไป

Example Huahin Chiang Mai เครือข่ายโทรศัพท์ Bangkok Koraj Modem Modem

Packet Switching Network Circuit Switching ไม่เหมาะสมสำหรับการส่งข้อมูล เราใช้ Packet Switching ข้อมูลจะถูกตัดเป็น Packet ส่งออกไป ในหนึ่ง Circuit สามารถแชร์กันได้หลายคน ทำให้ประสิทธิภาพสูงกว่า Online จะใช้สามารถใช้ได้ทันที ไม่ถูก Block ประสิทธิภาพสูงกว่า ถ้าเรา Share กันเพียง Circuit เดียว เมื่อผู้ใดไม่ส่ง คนอื่นส่งได้ ถ้าส่งพร้อมกันหลายคนก็ทำได้ แต่ละคนจะใช้เวลาในการส่งมากขึ้น เรียกว่าเกิด Delay หลายข้อมูล ของหลายคนใช้ Circuit เดียว แต่ละคนคิดว่าตัวเองเป็นเจ้าของ Circuit คนเดียว = Transparency อย่างไรก็ตามข้อมูลจริงๆ วิ่งอยู่บน Circuit เดียวกัน ต้องมีวิธีบ่งบอก Address ผู้ส่งและผู้รับ แปะที่ส่วน Header ของข้อมูล หรือ ใช้ Virtual Circuit Number สำหรับแต่ละคน และแปะที่ส่วนหัวข้อมูล

Packet Switching Network เนื่องจากต้อง Share วงจรกัน เพื่อป้องกันไม่ให้ผู้ใดผู้หนึ่งผูกขาดการใช้งาน ต้องกำหนดขนาดข้อมูลสูงสุดที่ผู้ส่ง ส่งได้ในแต่ละครั้ง = MTU, Maximum Transfer Unit ถ้าข้อมูลใหญ่กว่านั้น ต้องแบ่ง หรือตัดข้อมูลเป็น Packet ย่อยๆ แต่ละ Packet มีส่วนหัว นอกเหนือจาก Address/VC แล้ว จะต้องมี Sequence Number บ่งบอกลำดับของข้อมูล กระทำโดย Protocol ผู้ใช้ (Application) ไม่ต้องทำ นี่คือ Packet Switching Network

Packet Switched Network

Packet Switched Network

Packet Switched Network

Packet Switched Network

Advantages Line efficiency Data rate conversion แต่ละ Link สามารถจะ Share กันได้ Packets ที่เข้ามาแต่ละ Node จะถูกเข้า Queue เพื่อส่งออกไป Data rate conversion Each station เชื่อมต่อกับ Local Node ด้วยความเร็วที่ตัวเองกำหนด Packets are accepted even when network is busy โดยเก็บไว้ใน Queue Delivery may slow down = Delay Priorities can be used

Packet Switching Network 2 Concepts กำหนดการทำงานใน Network (Switching Technique) Datagram Virtual Circuit 2 Concepts กำหนดการเชื่อมต่อกับผู้ใช้ภายนอก (User Interface, Network Service) Connection Oriented Connectionless

Switching Technique Station breaks long message into packets Packets sent one at a time to the network Network จะจัดการ Packet สองแบบ (การทำงานของ Network = L3) Datagram Network รับข้อมูลจากผู้ใช้ได้โดยตรง และทำการส่งโดยดูจาก Address ปลายทางที่ส่วนหัวของข้อมูล ทิศทางของข้อมูลจะทำการหา เมื่อข้อมูลแต่ละ Packet ไปถึงในแต่ละ Node แต่ละ Packet อาจจะใช้ทิศทางไม่เหมือนกัน (Flexibility) Virtual circuit Network จะต้องทำ Connection หรือหาทิศทางก่อน โดยดูจาก Address ปลายทาง จากนั้นจะกำหนด Connection ด้วย Virtual Circuit Number, การส่งข้อมูลไม่ต้องกำหนด Address อีกต่อไป เพียงแต่อ้างอิงจาก Virtual Circuit Number ก็พอ ทุก Packet จะใช้ทิศทางเดียวกัน แม้ว่าไม่ Flexible เท่า Datagram แต่ข้อมูลจะส่งได้รวดเร็วกว่า เพราะการหาทิสทางทำครั้งเดียว เมื่อทำ Connection

Different Services of Network (Mostly Layer 4) เมื่อมองจากผู้ใช้ Connection Oriented Must perform connection to the network before sending data the result is a connection number to reference, reliable communication from end-to-end Connection Oriented on Virtual Circuit is used in packet switching network Connection Oriented on datagram is used in IP network (TCP/IP) Connectionless Do not guarantee delivery but fast and efficient for small data transmission Connectionless on VC ไม่พบการใช้งาน Connectionless on datagram is used in IP network (UDP/IP)

สรุป Packet Switching Network 2 Concepts กำหนดการทำงานใน Network(L3) Datagram Virtual Circuit 2 Concepts กำหนดการเชื่อมต่อกับผู้ใช้ภายนอก (ปกติจะอยู่ใน L4) Connection Oriented Connectionless

การทำงานของ Datagram Each packet treated independently Packets can take any practical route Packets may arrive out of order Packets may go missing Up to receiver(ปลายทาง) to re-order packets and recover from missing packets สรุปแล้ว การทำงานของ Network ประเภทนี้จะไม่ Guarantee การส่งข้อมูล

Datagram Diagram

Virtual Circuit Preplanned route established before any packets sent เส้นทางจะถูกกำหนดในช่วงการ Connection Call request and call accept packets establish connection (handshake) กำหนด Connection ด้วยตัวเลข คือ VC Number Each packet contains a virtual circuit identifier instead of destination address No routing decisions required for each packet ดูจาก VC # ก็เพียงพอ Clear request to drop circuit เมื่อจบ Not a dedicated path แต่มองจากผู้ใช้เหมือน Circuit Switching

Virtual Circuit Diagram

Virtual Circuits vs Datagram Network can provide sequencing and error control Packets are forwarded more quickly No routing decisions to make Less reliable Loss of a node looses all circuits through that node Datagram No call setup phase Better if few packets More flexible Routing can be used to avoid congested parts of the network

Circuit vs Packet Switching Performance Propagation delay Transmission time Node delay

Event Timing เปรียบเทียบ 3 NW

HW1 Due Next Week ให้นักศึกษา Download HW 1, Week 1 ลงในกระดาษที่พิมพ์ ด้วยการเขียนเท่านั้น(ห้ามพิมพ์) และส่งต้นชั่วโมง สัปดาห์ถัดไป อย่าลืมใส่ชื่อ รหัส และ Section ในหน้าแรก

End of Week 1 End of Review Part I Next Week Review Part II LAN and LAN Technologies