Communication and Internet Technologies

Types of Wired connection

  • Copper Cable
    • Twisted Pair
    • Coaxial
  • Fibre-Optic

Factors affecting transmission media

  • Interference of signal
    • Data transmitted through transmission media maybe interfered (both internal/external) and get corrupted
    • The faster (bits per second), the easier it gets corrupted
    • The longer distance it travelled, the more interference it may receive

Twisted Pair

  • Pairs of wire twisted together to reduce interference from transmission
  • Found in Cat5/Cat6 Local Area Network Cable (High speed LAN)

Coaxial

  • Single center core cable with a metallic shield to reduce interference from outside
  • Use mostly on (cable) television

Fibre-Optics (Optical Fiber)

  • Transmit signals by laser beams
  • One cable can contains bundle of many cores (fiber)
  • Almost not affected by interference (both within cores and from outside) thus:
    • Bandwidth is much higher than copper wire
    • Very long distance
  • https://www.youtube.com/watch?v=DKHZKTRyzeg
Twisted Pair Coaxial Fiber-Optic
Cost
Attenuation at high frequency Affected Most affected Least affected
Interference Most affected Less affected Least affected
Need for repeaters
Bandwidth

Comparisons of cabled media

9608/11/O/N/15

Wireless connections

  • All wireless are transmitted by Electromagnetic wave
  • Only difference is the frequency
  • Refer to pg. 34 for the comparison
  • General rule:
    • EM in general travels in straight line
    • Higher frequency -> More transmission bandwidth
    • Higher frequency -> Less penetration power -> short range

Common applications

  • Radio
    • Radio and TV broadcast
  • Microwave
    • Cellphone network
    • Bluetooth, WiFi
    • Satellite

Satellite

  • Several types of orbits:
    • Low Earth Orbit (LEO) - closest to earth, around 90 minutes for each orbital period
    • Medium Earth Orbit (MEO)
    • Geostationary Earth Orbit (GEO) -
      • Orbital period is 24 hours - in sync with Earth
      • About 35,000 km from earth surface
  • General rules:
    • Closer to earth -> Less latency
    • Closer to earth -> more satellites required to cover the entire earth

Types of Network

  • Show understanding of the characteristics of a LAN
    (local area network) and a WAN (wide area network)
  • Explain the client-server and peer-to-peer models of
    networked computers
  • Show understanding of thin-client and thick-client and the differences between them

Local Area Network (LAN)

  • Connected computers to form network in a (relatively) small geographical area
  • E.g. A computer lab, company departments in same building, school campus
  • Typical usage:
    • Sharing files among devices using file server
    • Sharing printers (printer server)
    • Application maybe also shared instead of installing in every PC (application server)

Wide Area Network (WAN)

  • (Relatively) larger geographical area
    • E.g. Macau CTM can be a WAN, connecting many households LANs together with their Internet services
  • Form by many LANs or WANs
  • Some consider Internet is the largest WAN on earth

Internet

  • Internet is a global network which connects computers or devices together
  • By having all devices adapt to the same communication protocols (rules)
  • Note: Internet is not the same as WWW (websites), Internet is a network allows devices to communicate / exchange information, while WWW is one of those application built on top of it

Client-Server Model

  • Most communication on the Internet is using Client-Server Model
  • Server: A computer provides "service" on network
    • Usually server is a more powerful device
    • May serve many clients at a time
    • Server is supposed to be running 24/7
  • Client: Client is any application / computer requires particular services provided by server
  • In client-server model, communication usually initiate by client called request

e.g. In a WWW application, the user's browser (client) makes request to the HTTP server

Server response with the data that client is asking for

Thin-Client

Nowadays the network is powerful enough such that computer application can be run on server and client computers only require to input and display results.

e.g. Gamestream services, which the game is not downloaded but run on server. The client computer only displays the result and get user inputs. 

Thick-Client

The application is downloaded to client computer and only some of the data is stored and processed in the server. 

 

e.g. Traditional games is downloaded and maybe only online multiplayer or save data is stored in server

Peer-to-peer model

  • In contrast to client-server, which requires a centralized computer (server) to keep application running, p2p allows user computers to directly communicate with other user (peers)
  • e.g. in client server model, if you want to share files, you first upload the file to a file server, and people wants to download goes to the server to download
  • in p2p scenario, for example BitTorrent, the file is kept in sharer's computer and directly sent from one device to other

Ethernet Protocol

  • Show understanding of Ethernet and how collisions
    are detected and avoided
  • Including Carrier Sense Multiple Access / Collision
    Detection (CSMA / CD)

Ethernet

  • Standard for local wired network connection
  • Devices are connected and message are broadcasted
    • e.g. 5 devices are connected in an Ethernet, whenever each device is sending a message (called data frame), all other 4 devices will receive the same frame
    • The devices need to check the "address" to see if it was the intended recipient - MAC Address

CSMA/CD

  • Since the communication medium is shared , there is possible two (or more) devices transmit at the same time and thus corrupted the message - Collision
  • Carrier sense multiple access with collision detection (CSMA/CD) is a mechanism to deal with this
    • Before start transmitting, transmitter wait until the network is free
    • Start transmission
    • Continuously check if collision happens
    • If collision happens, stop and send out a jam signal
    • Wait for a random period of time, and if channel is clear, try transmitting again

Network Topology and LAN devices

  • Show understanding of the bus, star, mesh and hybrid topologies
  • Describe the hardware that is used to support a LAN

Bus

Work as a group of 4, give at least 2 advantages and disadvantages of the assigned network topology

Draw a diagram to connect the following devices in a home network:

Router, switch, modem, Wireless AP, Firewall

Printer Server, PS5, Nintendo Switch, iPad, Desktop computer

 

Make sure to label the type of cable / wireless connection used

Internet

  • Global system of interconnected computer networks
  • Uses TCP/IP to transmit data
  • Carries various resources and content, e.g.:
    • WWW
    • E-mail

World Wide Web (WWW)

  • WWW is a network of online content on the Internet
  • Resources are identified by URL, connected with Hyperlinks
  • Content are usually formatted in HTML (when it was designed) and served by HTTP

Hardware for Internet

  • Router - Forward packets of data between different networks
  • Gateway - Allows communicate between different types of network. Home router provides most function of a gateway. 
  • Server - provides (service) to network devices, e.g.
    • Application Server
    • Web server
    • Domain Name Server (DNS)
    • File Server
    • Proxy Server

Client-Server Model

  • Server provides resources / services to multiple clients
  • Client request from server, and server response to the request
  • Usually only client will initiate the connection
  • One example is HTTP Server and browsers are clients

Bit streaming

  • Streaming only the portion of data that the client is consuming
  • Usually use in Multimedia content, e.g. video / audio
  • Two types of streaming for server:
    • On demand streaming: Data is stored in server, and serve content to client when requested (e.g. Youtube video)
    • Real-time / live streaming: Data is encoded immediately once it is generated (e.g. Live Sports broadcast)
    • Real-time could be very demanding to server as many people may watch at the same time
    • For client there's no major difference for both type of streaming

Bit rate the number of bit per second (bps) of data flow

Buffer temporary store the data

Low water mark buffer running out soon and needed to be "refill" from the server - if not then the media might be paused

High water mark should stop from downloading as buffer will be full  

Classwork

  • Complete Task 2.02 on textbook (p.41)

Web programming

  • Client-side scripting Program codes that runs in client browser. Usually dealing with interaction and interface
  • Server-side scripting Program codes that runs in computer server. Codes usually generates HTML content and send to client computers.
  • Script language usually refers to computer programming language that are not compiled (by compiler) but use interpreter to run

Client

Web server

1. Request (e.g.
http://www.facebook.com/)

2. Server side script

Generate user specific content with data from database

3. Response
HTML content, images, CSS, Javascript

4. HTML content displayed, Client side script (usually js) executed

Request - Response for web client server

Client Script

  • Runs in client browser
  • Client computer will receive the full source code of the program
  • Most common language is Javascript

Server Script

  • Runs in the server computer
  • Client computer will not have the source code
  • Server create the content and send the result (e.g. HTML) to the client
  • Common languages include:
    • PHP, JSP, ASP.Net etc
Javascript (browser) PHP (server side) Python
Declare variable called tempC var tempC = 10; $tempC = 10; tempC = 10
Get input and assign to tempC tempC = prompt("please input something") $tempC = $_GET["celc"] tempC = input('please input something')
Note: Prompt is a popup box in browser GET from the parameter in URL, e.g. index.php?celc=10
Output something alert("The value is :" + tempC) echo ("The value is: ") echo $tempC; print('The value is: ', tempC)
Note: Popup box in browser Echo will output to the page result, i.e. as plain text (usually HTML document)
Script blocks declaration (in html)
<script>
  // javascript here
</script>
(.php file)
<?php
  // Lines of php codes
?>

Quick Reference for Scripting

IP Address

-learning objectives

  • explain the format of an IP address and how an IP address is associated with a device on a network
  • explain the difference between a public IP address and a private IP address and the implication for
    security
  • explain how a Uniform Resource Locator (URL) is used to locate a resource on the World Wide
    Web (WWW) and the role of the Domain Name Service

IP Address

  • Address of a device on the Internet
  • Contains geometric location information
  • IPv4: 32-bit address (currently using)
    • Usually written in dotted notation for easier documentation: e.g. 192.168.0.1
  • IPv6: 128-bit address (slowly transiting to)

Hierarchical scheme of IPv4

Hierarchy of IPv4

  • Network devices (such as router) only need to examined the first group of bits (netID) to deliver the data to the target network
    • e.g. suppose the first 3 bit is 110 (class C), the router will examine the next 21 bits and ignore the last 8 to deliver the message
  • Once data arrived to target network, only hostID is examined
  • The design was intended that every host (device) will have their unique IP address

CIDR

  • Classless inter-domain routing - removed the need of class
  • Original scheme (hierarchy) has problem when popularity of computer network rises
    • e.g. There's only 2^14 Class B organization allowed (in the world!) 
    • But many company requires more than what Class C can offer (only 2^8 devices)
  • An addition 8-bit suffix is added to IP Address to tell which bits are the netID
  • Still compatible with Class schemes, Class A, B, C will have 8, 16 and 24 suffixes respectively

CIDR Example

11000111 00110011 00000000 11111110 / 00001010

Suffix

10-bit netID

22-bit hostID

What is the dotted notation?

___ . ___ . 0 . ___ /10

Subnet

  • Helps to divide the network (usually LAN) to smaller, sub-networks (also LANs)
  • Refer to textbook p.28 (fig 2.08) for the diagram
    • A company may require more than 1 LAN (e.g. each LAN for one of the departments)
    • All department LANs connected together and form a company-wide LAN
    • *Note* for data transmitting within the same LAN, there's no router needed

Problem of IPv4

  • All devices need an unique address on the Internet
  • But growing number of devices makes IPv4 address not enough for every device 
    • 2^32 (about 4 Billions) addresses in theory
    • but in practice it is much less than that

Network address translation (NAT)

  • In large organizations, there's private networks (intranet) which uses same technology as Internet
  • Within the intranet, there will be private IP Addresses, for every single device in it
  • But the address in the private network is not accessible from outside (Internet) since they are not unique
  • NAT is to deal with translating private local IP addresses to public IP addresses
  • Example private address:
    • Class A: 10.0.0.0 /8
    • Class B: 172.16.0.0 /16
    • Class C: 192.168.0.0 /24

Private IP

  • Private, local addresses only recognizable within organization
  • Requires NAT to translate to a public IP to access outside resources
  • More Secure since computer outside org. cannot direct address those machines

Public IP

  • Public on Internet
  • NAT should at least have one public IP address

Static IP

  • IP Address that is pre-configured in the device
  • Usually used in Server where the IP address is required to be fixed
  • Prior understanding of the network is required
  • e.g. for a network printer, the IP address is fixed so all computers can locate that device within the same LAN

Dynamic IP

  • The IP Address is not pre-configured in the device
  • The address and configuration is obtained "dynamically" through DHCP (Dynamic Host Configuration Protocol) Server
  • User need not to understand how the network should setup

Domain Name Service (DNS)

  • IP Address is not easy to memorize compare to domain names (e.g. acm.edu.mo vs 202.175.35.25)
  • DNS (server) helps to resolve the domain names to IP Address
  • Since there are so many websites, there's no central record of all DNS entries; DNS entries are distributed to hierarchy of DNS servers

Example of DNS resolve sequence:

  1. User type www.acme.com.hk in browser
  2. User computer check if the address is stored, if not, ask the set DNS server (for instance, CTM DNS server)
  3. CTM DNS Server check if exists, if not, contact upper level server (and upper level will contact their upper if necessary)
  4. CTM DNS Server will record the entry (save future request) and return the entry to user
  5. User computer will also record the entry and the browser can continue the request with the IP Address

Example hierarchy of DNS Servers

Made with Slides.com