วันอาทิตย์ที่ 27 กันยายน พ.ศ. 2552

Data Communication Project : Design the Augment Stadium

Design the Augment Stadium เป็นโปรเจคใหญ่ของประเทศอังกฤษ ที่เกี่ยวข้องกับการสื่อสารในระบบเครือข่าย Ad-Hoc เพื่อให้ผู้เข้าชมได้ทำการแบ่งปันข้อมูลต่างๆเช่น ความคิดเห็น รูปภาพ และคลิปวีดีโอ ผ่านกันทั่วทั้งสนามกีฬา โดยโปรเจคนี้ เป็นการวิจัยของนักศึกษามหาวิทยาลัยเมืองกลาสโกว์ และทุนของ EPSRC ซึ่งมีบริษัท Microsoft และ ARUP เป็นผู้สนับสนุน โดยที่โปรเจคนี้ มีกำหนดแล้วเสร็จในปี 2010

ความคิดหลักของโปรเจคนี้ คือการสร้างระบบเครือข่ายในสนามกีฬา เพื่อให้ผู้เข้าชมสามารถแบ่งปันข้อมูลกันผ่านเครือข่าย Ad-hoc ระหว่างโทรศัพท์กับโทรศัพท์ ด้วยการเชื่อมต่อแบบ Bluetooth ซึ่งจะทำให้ผู้ชมสามารถส่งข้อมูลถึงกันได้อย่างอิสระ และสามารถอัพโหลไฟล์ต่างๆขึ้นไปยังเว็บไซต์ออนไลน์ต่างๆได้ทันที ซึ่งสามารถแก้ไขปัญหาสัญญาณของโทรศัพท์มือถือในสถานที่ที่มีคนอยู่มากเช่น สนามกีฬา ซึ่งระบบนี้ จะเป็นเปิดให้ใช้สำหรับผู้ชมกีฬาโดยไม่คิดค่าใช้จ่าย โดยที่โปรเจคนี้คาดว่าหากทำได้สำเร็จและมีการใช้ได้จริง จะเพิ่มอัตราการเข้าชมและจำนวนครั้งในการเข้าชมกีฬาอีกค่อนข้างมากเลยทีเดียว

โดยปกติแล้ว การเชื่อมต่อระห่างโทรศัพท์และโทรศัพท์ โดยใช้ระบบ Ad-hoc ยังไม่เป็นที่ยอมรับกันในหมู่กว้างนักและยังไม่เคยมีการเอาออกมาใช้จริง ตัว Bluetooth นั้นเองก็นำมาใช้เพื่อส่งผ่านข้อมูลระหว่างมือถือไม่กี่เครื่อง และการเชื่อมต่อกับอุปกรณ์ต่างๆเช่นหูฟัง เป็นต้น แต่ในโปรเจคนี้ นักวิจัยจะทำการเพิ่มขีดความสามารถและทำให้การเชื่อมต่อนี้ สามารถเชื่อมต่อโทรศัพท์ได้พร้อมกัน 7 เครื่องโดยไม่ต้องอาศัยเสาสัญญาณ โดยเพียงติดตั้งโปรแกรมเล็กๆลงในโทรศัพท์มือถือซึ่งจะเพิ่มขีดความสามารถในการเชื่อมต่อของโทรศัพท์มือถือให้รวดเร็วและทำให้การส่ง่านข้อมูลลื่นไหลขึ้น

ผลพวงที่ได้จากโปรเจคนี้ในระยะยาว สามารถนำประยุกต์ใช้ได้ในเหตุการณ์ต่างๆ เช่น เมื่อเกิดอุบัติเหตุ หน่วยแพทย์และบุคคลที่อยู่ในเหตุการณ์ สามารถส่งขอความช่วยเหลือไปยังบุคคลหรือหน่วยงานที่ใกล้ที่สุด ในสถานการณ์ที่อยู่ในที่อับสัญญาณโทรศัพท์ไม่สามารถโทรศัพท์หรือส่งข้อความแบบปกติได้

วันอังคารที่ 22 กันยายน พ.ศ. 2552

week 13 : Application layer

Application Architectures
- Client and server
- Peer to peer
- Hybrid of client server

Host-based Architectures - everything is in one machine(mainframe)

Problems with Host-based Architecture
- Host becoming a bottleneck : Everything is on a server, server has to do all processing
- Upgrade typically expensive and "lumpy"

Client-based Architectures
- Client need a high performance
- Server keep data but no processing
- When client want information of someone, Server can send just whole data and Client need to find by themself

Client-Server Architectures (Used by most network today)
- Client no need very high performance (don't have to spend a lot of money)
- When Client want information of someone, Server can send just that information to Client

Advantage of Client-Server Architectures
- Advantages
- More efficient because of distributed processing
- Allow hardware and software from different vendors to be used together
- Disadvantage
- Difficulty in getting software from different vendors to work together smoothy
- May require Middleware, a third category software

Fat vs. Thin Clients
- Fat clients do a lot of work in client based Architecture
- Thin client is an easy machine(low cost machine) which can control user not to use unlicensed program

Criteria for choosing Architecture
- Infrastructure Cost : Cost of hardware
- Development Cost : Develop on mainframe, cheaper than develop on Client, Server
- Scalability : Can add new server is cheaper cost than mainframe

3-Tier Architecture
- Client (microcomputer)
- Application server (microcomputer)
- Database server (microcomputer, minicomputer or mainframe)
- Application server and Database server are divided to do part of logic but both of them don't have to do much work

N-tier Architecture
- Data have to travel along network from client side to server side
- Database server can divide in more than 1 tier (having another tier), if Database server reply something, it needed to pass to every server

Multi-tier Architectures
- Advantages
- Better load balancing
- More stable(if server work hard, just add more server)
- Disadvantages
- Heavily loaded network
- Difficult to program and test due to increased complexity

DNS - Domain Name Services - Use to translate URL (DNS) to IP address

How DNS works
1. Assume that Susie asks for a web page on Indiana University's server by access in www.susie.indiana.edu from University of Torronto
2. Client will ask DNS server that know Susie or not
3. If no, Ask Root that know Susie or not
4. If no but know Indiana, Send request to Indiana
5. Then send result back to Susie at Torronto


วันจันทร์ที่ 21 กันยายน พ.ศ. 2552

week 12 : Network and Transpot Layer cont.

In IPv4 addressing, a block of address can be defined as x.y.z.t/n (/n is a number of mask)
The first address (network address) in the block can be found by setting the rightmost 32 - n bits to 0s
The last address in the block can be found by setting the rightmost 32 - n bits to 1s
The number of addresses in the block can be found by using the formula 2 power 32 - n

The first address can be found by ANDing the given addresses with the mask
The last address can be found by ORing the given addresses with the complement of the mask
The number of address can be found by complementing the mask, interpreting it as a decimal number, and adding 1 to it

Private address
- easy in the future if want to connect to internet
- security(hide machine from internet)
- can use only 1 public IP for many user

Translation table (for router) use to convert IP and send data in to correct client
IPv6 uses 16 byte (128 bits) addresses but v4 use just 32 bits (problem of v4 is number of addresses)
Dual stack - OS or machine know 2 versions of IP address (If machine need to send data, version that want to send it up to destination - ask DNS first what version that destination can receive)

Dynamic address - not require fix address
Bootstrap protocol - Client will get same IP address (If machine doesn't turn on , no-one can use that IP)

Routing Protocol
Autonomous System - maintain whole system
Types of routing protocol
1.interior routing protocols - use inside 1 AS
2.Exterior routing protocol - use between AS
Types of Routing
1.centralized routing - one center computer
2.Decentralized routing (static routing, dynamic routing)




วันอังคารที่ 8 กันยายน พ.ศ. 2552

week 11 : Network and Transport layer cont.

Middleware - Don't have to worry about network
Ex. Open database connectivity(ODBC) - Middleware of database

Network layer
Connection - VC network
Connectionless - Datagram network
Analogous to the transport-layer services but,
- host to host
- No choice

Virtual circuit
choose the right path to application, need to call setup first

VC implementation (consist of:)
1.Path from source to destination
2.VC number
3.forwarding table(map of router) in routers along path

Signaling protocol
- use in ATM
- not used in today's internet

Datagram network
- no call setup (connectionless)
- routers

Network layer function
Addressing
- Assignment of address
- Translation (translation process is called address resolution)
Routing
Assignment of address
- Application layer address (URL)
- Data link layer address (MAC address, unique address)

IPv4 Address
- 4 byte, 32 bits address
- Dotted decimal notation (seperate by dot)

Classfull Adressing
Class A : 0 - 127
Class B : 128 -191
Class C : 192 - 223
Class D
Class E

Netid - just specific number
Network address - both Netid and Hostid






วันอาทิตย์ที่ 6 กันยายน พ.ศ. 2552

week 10 : Network and Transport Layers

Transport and Network Layers
Network Layers = source to destination
Transport Layers = program to program

Transport Layer
- Responsible for end-to-end delivery of messages
- Responsible for segmentation ( divide large data to small pieces ) and reassembly (make it be original data)

Internet transport-layer protocols
- Reliable (TCP) - Before it can send data it has to establish connection first
  • congestion control - If high traffic reduce speed of sending data
  • flow control - recieve data correctly by order
  • connection setup - need to connect first
- Unreliable (UDP) - It doesn't do anything that TCP does, just help sending program to destination (UDP works faster)
  • no-frills extension of "best-effort" IP
- Service not available
  • delay guarantees
  • bandwidth guarantees (Shared by a lot of users)
Network Layer
- Responsible for addressing (Assign unique address) and routing (Major task and find the best part from source to destination ) of messages

Transport vs. Network layers
- Network layer = between host
- Transprot layer = between process

Transport Layer function
- Establish connection
  • Connection Oriented
  • Connectionless
  • Quality of service

Linking to Application Layer
- Port number = use number to connect program to another program, 2 bytes is each source and destination

Packetization = Break a large message into a small pieces
Reassembly = Put them back together at the destination

Three ways handshake
1. Client host sends TCP SYN segment to server
2. Server host recieves SYN, replies with SYNACK segment
3. Client recieves SYNACK, replies with ACK segment

Closing connection
1. Client end system sends TCP FIN control segment to server
2. Server recieves FIN, replies with ACK
3. Client recieves FIN, replies with ACK
4. Connection closed

QoS - Try to guarantees something
- Timeliness - time to delivery of packets
- QoS routing ( realtime, choose parts that give the best bandwidth)

Socket programming - Allow to create network program without go deep in TCP

วันจันทร์ที่ 24 สิงหาคม พ.ศ. 2552

week 9 : Data link layer cont.

NRM - Normal response mode
Primary send command to secondary, secondary send response to Primary (It can send data, If Primary ask)
ABM - Asynchronous Balance mode
No Primary and Secondary (Problem : support just point to point)

HLCD
I-frame - first bit in control field is 0
(Pole and Final
If it send 1 and send from primary to secondary - call pole
If it send 1 and come from secondary - call final
but If it send 0 that mean don't want to use this bit)

S-frame - first 2 bit in control field is 1 0
(RR - receive ready, same as ASK
RNR - receiver not ready to receive next frame, just stop sending data
REJ(go-back-N ARQ) - reject
SREJ - selective reject)

U-frame - first 2 bit in control field is 1 1

Point to point Protocol (PPP)
use when access internet to house, use only U-frame
Byte stuffing - If want to send flag as a data have to use ESC to make that be data

Link Establishing - LCP
Authenticating - PAP, CHAP
Network layer establishment - IPCP
Network termination - IPCP
Link terminating - LCP

Factor affecting network efficiency
- circuit
- error control techniques
- protocol used
Efficiency of protocol in % = total number of info bits to be transmitted/total number of bits transmitted
(Bigger the message length, better the efficiency - If use very large frame, It will have more chance to get error/Maximum 1500)

วันจันทร์ที่ 17 สิงหาคม พ.ศ. 2552

week 8 : Data link layer cont.

Data link control
Automatic Repeat Request (ARQ)
- Stop and Wait ARQ(after sender send 1 frame of data then wait for receiver check it correct or not)
- Continuous ARQ (sender can send more than 1 frame, don't have to wait)

Stop and Wait ARQ
ACK - Acknowleadge (tell that data is correct and send the number of next frame)
NAK - Negative Acknowleage (tell that data is incorrect and tell the number of frame that sender need to send again)
If receiver lost data when it reply to sender and sender doesn't receive anything, it have to wait until time out and send data to receiver again.
In case delayed ACK, receiver can't reach sender before time out and sender send data again.
If receiver want to send data too, have to reply first then send it own data, use Piggybacking to fix it.

Go-Back-N ARQ
sender will send more than 1 frame at the time (1 2 3 4). If receiver tell sender that frame #2 error, sender have to send frame 2 3 4 again.
Can send just frame in window If no respond from receiver, it have to wait(can't send more frame) but receiver doesn't have to reply every frame
Size of the sender window must less than 2 power n (2 power n - 1), Size of the reciever window is always 1.

Data link protocol
- Message delineation (start of frame and end of frame)
- Frame length
- Frame field structure (How many field we use in frame?)

Synchronous Transmission photocols
- Bit oriented protocol (bit by bit)
- Byte count protocol (sender and receiver count number of byte)
- Byte oriented protocol (special character)

วันอังคารที่ 11 สิงหาคม พ.ศ. 2552

week 7 : Data link layer

Data link layer - moving data from one device to another device

Major functions of data link layer photocol
- Media Access Control (control that which computer can send data)
- Error Control (make sure that data send from node to another node correctly)
- Message Delineation (Identify the beginning and ending of message)

Media Access Control - make sure that 2 party not send at the same time
- Point to point half duplex links (can't send and receive at the same time)
- Multipoint configuration (more than 1 computer share link)

Main approaches
- controlled access
1 device that control point, to allow another device send data (Ex. token)
- contention based access
check medium that available or not before send data (collision : don't know that link free or not and send data. Have to wait the random of time if data get the small amount of number, can send data first )

Polling
- Roll call polling
use in mainframe computer, can send data when it is asked by server and send data to server. Don't have to call by order and spend a lot of time to polling.
- Hub polling
use token ring

Error Control
- Corrupted (data changed), the data reached the destination but incorrect
- Lost data, the data not reached the destination but loss data in somewhere

Major function
- Preventing errors (task of the human, have to check it by yourself)
- Detecting and Correcting errors (data link layer, use after human can't find error)

* In a single bit error, only one bit in the data unit has changed (noise just occur and disappear very fast)
* A burst error means that 2 or more bits in the data unit have changed (have to count error from starting point to ending point)

Error Detection
- Parity Checking (even and odd parity, parity not enough to check error) count number of 1 to check that it odd or even number

LRC - Longitudinal Redundancy Checking (98% error detection rate) the receiver may not know the error occur
1. find parity for each character
2. calculate LRC (except last line)
3. the last number of BCC calculate from all number in row BCC

Polynomial Checking
- checksum
- cyclic redundancy check (CRC)
if use n bit CRC, put n zero and divisor is n + 1 bits (more CRC bits, more detect the error)








วันอังคารที่ 21 กรกฎาคม พ.ศ. 2552

week 6 : Physical Layer cont.

ADSL is an asymmetric communication (asymmetric - not equal, download rate and upload rate is not equal)
Bitrate = N x baud rate

Splitter - if don't use splitter, can't use phone and internet at the same time

Multiplexer - to share link to many devices very high bandwidth channel
FDM - Analog multiplexing technique that combine analog signal
channel x bandwidth(kHz) + guard band x kHz for guard band = minimum bandwidth of the link

Guard band - if don't have it, will be cause a problem between channel
Ex. 5 channels use 4 guard band
For FDM can't use the all frequency, need to provide the gap that is Guard band
TDM don't need guard band (each slot reserve for 1 machine if machine don't want to send data, no-one can use it)

Complexities of STDM
- additional address
- reaponse time delay
Inverse Multiplexing(IMUX) - want to combine multiplex together to get a high bandwidth

Circuit - Switched networks(FDM, TDM)
- need to setup link first
- no-one can share link
Packet - switched networks(Network with VCs, Datagram Networks)
- if want to send data, can use slot
- will get the delay if slot is not enough, system have to wait
- will loss data cuz it doesn't have own link

week 5 : Data Link Layer, Physical Layer cont.

Data Link Layer
- Data Link Layer moving data from node to node
- Control the way data are sent
- Major function of a data link layer
- Media Access Control
=(Point to point half duplex links - can't send and receive not the same time,
Multipoint configuration - only one computer that can send at the time)=
- Error Control (need to check that no data wrong)
- Message Delineation

Controlled Access
1 device that control point, to allow another device send data (Ex. token)

Polling
- Roll call polling (waste time, have to ask every client)
- Hub polling or token passing

Physical Layer
Pulse Amplitude Modulation (PAM) - technic that use for sampling
=More sampling, more better signal/data=

Nyquist : Sampling rate must be at least 2 times the highest frequency
If increase quantize, will get more data

Quantizing by using sign and magnitude
0 - positive value
1 - negative value

Calculate!!
Sampling rate must be twice the highest frequency
but if signal is low part (start from 0) use bandwidth to calculate
Bit rate = sampling rate x number of bits per sample

Parallel Transmission - can send data more than 1 bit at the same time
Serial Transmission - can send 1 bit at a time (1 wire)

Asynchronous transmission - send start bit(0) and stop bits(1), may have a gap between each byte
= each byte of the data doesn't need to be send in the same period of time, but each bit will send in the same period of time =

Isochronous - not acceptable in real time video and audio(slower frame)

Bit rate is the number of bits per second
Baud rate is the number of signal per second

ASK - bit rate and baud rate will be same, use just 2 amplitudes(normal)
N = log2L (L - number of amplitude, N - level)
Minimum bandwidth of ASK = Nbaud
Ex. If send data of 1000, minimum bandwidth is 1000 Hz
Half-duplex can send data and receive data at the same time, but if full duplex need to x2 cuz for each direction

FSK - same idea as ASK but use frequency instead amplitude
*bit rate = baud rate
BW = baud rate + fc1 - fc0
BW = bit rate + fc1 - fc0
baud rate never greater than bandwidth

วันพุธที่ 24 มิถุนายน พ.ศ. 2552

week 4 : Physical Layer

Composite signal - a combination of sine waves with different frequencies, phases(the position of the wave at time 0) and amplitudes.
Bandwidth - the difference between the highest and lowest frequencies contained in that signal (the higher bandwidth, send faster)

log2L = N
L - number of level
N - number of bits that can send in period

8 Kbps - 8 kilo bits per sec
8 KBps - 8 kilo byte per sec
1 byte - 8 bits

Baseband transmission - use full capacity of channel to send data
low-pass channel - lowest frequency is 0
wide bandwidth - very high frequency
narrow bandwidth - not high frequency(send data very slow)
Bandpass channel - don't have to start from 0(the lowest can be any number, include 0)

Medium
analog bandwidth - hertz
digital bandwidth - bits per second

Nyquist Bit Rate
Bitrate = 2 * bandwidth * log2L
L = the number of signal level used to represent data

Shannon Capacity
capacity = bandwidth * log2(1 + SNR)
SNR = Signal to Noise Ratio

วันอังคารที่ 16 มิถุนายน พ.ศ. 2552

week 3 : Data and Signals

guided = wire
unguided = wireless

Radio link types
- terrestrial microwave (have microwave towel)
- LAN (WiMax)
- wide-area (cell phone)
- satellite (Geosynchronous orbit)

Data
- Analog data (continuous - voice)
- Digital data (discrete - data in computer (0 and 1))
Data(from computer) must be transformed to electromagnetic signals (use to carry along medium) and signals can also be analog(infinite number) and digital(limited number).

Can't send data without signal and cam combine to 4 combination
- analog data, analog signal
- analog data , digital signal
- digital data, analog signal
- digital data, digital signal

Periodic analog signals (look the same every period)
A sine wave is fundamental periodic analog signal that use in data comm.
- Peak amplitude
- frequencies (number of wave in 1 signal, number of wave in 1 sec. - Hz)
- period (represent time of 1 wave, sec)

วันพฤหัสบดีที่ 11 มิถุนายน พ.ศ. 2552

week 1 : Introduction to Data Communication

What is Data Communication?
The word Data Communication is come from Telecommunication and Data.
Meaning of Telecommunication is "The Communication at a distance", and the meaning of Data is "Information presented in whatever form is agreed upon by the parties creating and using the data".So, Data communication are the exchange of data between two devices via some form of transmission medium (like wire cable, fiber optics)

In Data Communication, We have mainly have 5 network type (base on scale) which is
1. Local Area network (LAN)
- LANs is a group of PCs that share a circuit. This type of network can be seen in computer room or building.
2. Backbone Networks
- A high speed backbone linking the LANS at various locations.
3. Metropolitan Area Network (MAN)
- This network type is optimized for a larger geographical area than a LAN, ranging from several blocks of buildings to entire cities.
4. Connects LANs and BNs at different locations
5. Wide Area Networks (WANs)
- Same as MAN but more wider scale.

Data Flow
Data flow is a group of traffic, identified by a combination of source address/mask, destination address/mask, IP next protocol field, and source and destination ports, where the protocol and port fields can have the values of any.

General type of Data flow
- Simplex (Data can be sent one way only, from Server to client.)
- Half-Duplex (Data can be sent from sender and receiver but can send only one at the time.)
- Full-Duplex (Data can be sent and received at the same time.)

week 2 : Introduction cont. & Network Models

Introduction cont.
Intranet vs. Extranet
Intranet is a LAN network that open only inside the organization
Extranet is a LAN network that open only for user outside the organization and allow user to access the network through the internet

Protocols and Standards (Protocols must have standards)
The key elements of protocol
- Syntax(language)
- Semantics
-Timing

Types of standards for Protocols
- Formal standards (developed by industy or goverment)
- De-facto standards(developed by big company)

Major Standard Bodies
- ISO (develop OSI)
- ITU-T (formal name - CCITT)
- ANSI (approve standard)
- IEEE
- IETF
-W3C

Network Models
Implementation of Communication Function
- Single layer
Put everything in one modul, if have something wrong and it already fix. The entire network need to be checked again
- Multi layer
Solve the problem that Single layer have, if it have something wrong in any layer it can modify and fix just the layer that has problem

OSI Model
- Application (providing service to user)
- Presentation (translation compression and encyption)
- Session (dialog control and synchronization)
- Transport (send program data from machine to another program on another machine)
- Network (send frame from source host to the destination host)
- Data link (moving frame from node to node)
- Physical (just send the data and move data from computer to target computer)