Chapter 2 - Communication
Networking
Local Area Network LAN - network covering a small area such as a single building
Wide Area Network WAN - network covering a very large geographical area
| LAN | WAN |
|---|---|
| A network that connects devices within a small geographical area, often within the same building. | A network that connects devices within a larger geographical area, such as a city, country, or globally. |
| Only private ownership. | Private or public ownership. |
| Transmission medium: Twisted Pair Cables , Coaxial Cables or Wi-Fi. | Transmission medium: Optic fibre |
| Higher data transfer rate. 传输速度更快 | Lower data transfer rate. |
| Less congestion. 不容易被堵塞 | Higher congestion. |
The advantages of using a network:
- allow the share of devices (resources)
- allow the share of data (files)
- greater storage spaces
Devices involved in LAN:
- switch 交换器 - Connects the devices in the LAN, directs incoming data
- server 服务器 - A specialised computer that provide services for other computers
- Network Interface Card NIC 网卡 - Allows the device to connect to a network, contains MAC address
- Wireless Network Interface Card WNIC 无线网卡 - Wireless version of NIC
- Wireless Access Point WAP 无线接入点 - Connects to the wired net at a fixed location
- Cables 连接电缆 - Wire
- Bridge 桥 - Connects LANs which use the same protocal
- Repeater 重复器 - boost the signal
- Router 路由器 - Enables data packets to be routed between different networks
<svg version=“1.1” xmlns=“http://www.w3.org/2000/svg” viewBox=“0 0 1994.3826528626178 737.0546875” width=“100%"">
LAN vs WLAN (wireless LAN)
- LAN has higher transmission speed
- LAN’s transmission is more stable
- WLAN is more convenient (devices are mobile, free to move around)
Functions of a Router in Networking
- Possible to connect different networks together (with similar protocols).
- A router forwards data packets between different computer networks.
- The router reads the network address information in the packet headers, determine the destination by using information in its routing table.
- Perform the traffic directing functions on the Internet.
Transmission Media
Transmission Media. — The pathway that carries information from a sender to receiver. Refers to the physical resources or techniques along which data travels from one point to another. Can be wired or wireless.
PHYSICAL TRANSMISSION.
- Twisted pair 双绞线
- Coaxial Cables 同轴电缆
- Fiber optic 光缆
WIRELESS TRANSMISSION.
- Radio wave 无线电波
- Microwave 微波
- Infrared 红外线
- Bluetooth 蓝牙
Guided Media — Data transmitted through a fixed path using cables.
Unguided Media — Data signals can move around various directions within range; No fixed pathway for travelling signals.
Copper cable.
- Excellent electrical conductivity, flexibility, and cost-effectiveness.
- Used in small office LANs to large data centers.
- Common form of copper cabling is twisted pair.
Fiber optic.
- Designed for long-distance, high-performance data networking, and telecommunications. But more expensive.
- Consists of one or more strands of glass.
- Has a higher bandwidth.
Radio wave.
- Bluetooth automatically detects and connect to each other, but they do not interfere with other devices.
- It covers large areas, and penetrates through walls.
- Great power consumption.
Microwave.
- Wide bandwidth.
- Line-of-sight will be disrupted if any obstacle, such as new buildings, are in the pathway.
- Signal absorption by the atmosphere.
- Towers are expensive to build.
Satellites.
- The communication between antennas and satellites is carried out by radio waves or microwave frequencies.
- Global coverage.
| Benefits | Drawbacks | |
|---|---|---|
| Copper Cable | Less expensive and easier to install. Flexible. Easier to make terminations. | Doesn’t perform well with small charges. Affected by electromagnetism. |
| Fiber-Optic Cables | Greater bandwidth, improved security, lightweight, easy to install, and less signal boosting are required; used in long-distance communications. | Needs expensive optical transmitters and receivers.\ |
| Benefits | Drawbacks | |
|---|---|---|
| Radio waves | Can travel over large distances with a wide range of wavelengths. Relatively inexpensive. Used for TV signals and mobile phone communications. | Low frequency means less data can be transmitted at one time. Affected by interference from radio stations with similar frequencies. |
| Microwaves | Larger bandwidth allows more data transfer. | Expensive to build emitting towers. Physical obstacles can interfere with signals. |
| Satellites | Cost-effective for long-distance communication, used in satellite phones and radio broadcasts. | Susceptible to interference. Expensive setup. |
Considering physical media
- Cost of the cables.
- Connecting devices.
- Bandwidth achievable (transmission rate).
- Likelihood of interference (干扰的可能性).
- Extent of attenuation (deterioration of signals) (衰减程度 (信号劣化)).
Summary of Physical Media
| Twisted Pair | Coaxial | Fibre-Optic | |
|---|---|---|---|
| Cost | Lowest. | Higher. | Highest. |
| Bandwidth | Lowest. | Higher. | Highest. |
| Attenuation | Affected. | Most Affected. | Least Affected. |
| Interference | Worst Affected. | Less Affected. | Least Affected. |
| Need for repeaters | More often. | More often. | Less often. |
Client-Server Model and P2P Model
Client Server Model
- There is a specialised device that provides services (server)
- All clients connect to the server
- The clients can access to the resources on the server
- The server determines which users are able to access which files
The reasons of using client-server model:
- The central server is controlled by one company / person / organisation
- Access to network resources needs to be properly controlled
- Good network security
- Data can be backed up
| THIN CLIENT | THICK CLIENT | |
|---|---|---|
| Definition | Software that relies on a remote server such as a cloud platform for its features. | Software that runs at least some features directly on your device. |
| Offline | Functions mostly don’t work. | Functions mostly work. |
| Local Resources | Generally consumes few local resources such as disk, computing power and memory. | Generally consumes more local resources. |
| Network | Functionality may depend on a fast network connection. | Functionality may work without a connection or with a slow connection. |
| Data | Data is typically stored on servers. | Data may be stored locally. |
Peer-to-peer Model (P2P)
- Every computer acts as a node
- All the peers are equal on the network
- Each node can share its file with all other nodes, and access the data from another node
- The available nodes are listed in a tracker server
相较于client-server模型,P2P网络通常更小、安全性也更低。
| Client-Server | Peer-to-Peer |
|---|---|
| Centralized backup. | Lesser initial setup cost. |
| Files & resources centralized in server: Prevents illegal resource usage. | Lesser network traffic: Each peer can simultaneously receive data from different sources. |
| Improved security: Files are stored on a central server, which would be regularly scanned for malware. | It can work even if a device goes down, but the client-server model can’t work if the server goes down. |
Network Topologies
Bus Netwrork - use a single centrl cable
好处:
- 一个节点坏了不影响其他节点
- Easy to expand, by adding additional nodes
坏处:
- 中心电缆坏了整个网络会瘫痪
- not secure
- low performance (frequent data collision)
Star Network
- uses a central hub / switch
- each computer connects to the hub / switch
- data packets are directed through the central hub / switch
好处:
- Data collisions are greatly reduced
- More secure
- Easy to improve by upgrading hub
- 一个节点/电缆坏了不影响其他的
坏处:
- extra expense on hub
- the whole network will down if the hub fails
Mesh network
- 在两个节点之间建立连接(routing)
- 直接对所有连接的节点广播信息(flooding)
好处:
- 容易定位错误
- 一个节点坏了不影响其他的
- good security and privacy
- relatively easy to expand
坏处:
- requires large amount of cable
- hard to maintain
当一个网络的连接方式包含了上面多个topologies的特征时,这个网络topology为hybrid。
考试的时候经常会要求讨论各个network topology的优缺点,每个网络的优缺点不用专门去死记硬背,可以通过以下方向去讨论:
- security 安全性
- data collision 数据冲突
- when one line goes down… 当有一个为激起坏了
- expand 扩展性
Cloud Computing
Public IP vs. Private IP.
- Public IP used to communicate outside your LAN.
- Private IP only used inside your own private LAN.
Dynamic IP vs. Static IP.
- Dynamic IP is assign by ISP it will may change when you reconnect to the network.
- Static IP is will not change on the network.
Cloud Computing – Private, Public and Hybrid.
-
Cloud storage - A method of data storage where data is stored on offsite servers.
-
Cloud computing - The delivery of computing services (including servers, storage, database, networking, software, analytics, and intelligence) over the Internet to offer faster innovation, flexible resources, and cost reduction. 通过 Internet 提供计算服务,以提供更快的创新、灵活的资源调配和降低成本。
-
Public cloud - Delivered via the Internet and shared across organisations.
-
Private cloud - Data dedicated solely to your own organisation.
-
Hybrid cloud - Any environment that uses both public and private clouds.
| Public cloud 公有 | Hybrid cloud 混合 | Private cloud 私有 |
|---|---|---|
| - Services are owned and operated by a third party provider. - 第三方拥有并提供服务. | - Often called as ‘the best of both worlds’ as it combines both public and private clouds. - 公有和私有的结合. | - Dedicated to a single organisation. - 专用于单个组织. |
| - The maintenance is handled by the service provider. - 由服务商提供维护服务. | - Greater flexibility and more deployment options. - 更灵活,更多部署的选择. | - Higher security as the resources are not shared. - 更高的安全性(资源不共享). |
| - Pay-as-you-go model. Thus the setting and operation cost is low. - 低设置和操作成本. | - Cloud bursting is also possible. - 允许云爆发. | - Greater flexibility to control the cloud environment. - 更具灵活性. |
| - Lesser security as the platform is shared. - 平台共享 → 不安全. | - Network complexities & compliance issues. - 网络复杂性和合规性问题. | - Purchase and maintenance has to be handled by the organisation. - 由组织负责采购和维护. |
| - Lesser flexibility and control over the cloud environment. - 云环境有更少灵活性和掌控性. | - Can be extremely expensive. - 贵. | - Expensive than public cloud. - 比公有云贵. |
Subnet
A subnet is a logical subdivision of an IP network.
The process of dividing a network into two or more networks is called subnetting.
The main purpose of subnetting:
- help relieve network congestion
- improve network performance
- provide high security
Key terms :
- subnet mask - 子网掩码
- network ID - 网络ID
- host ID - 主机ID
- broadcast ID - 广播ID
| Subnet No. | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 |
|---|---|---|---|---|---|---|---|---|---|
| Host No. | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Subnet Mask | /24 | /25 | /26 | /27 | /28 | /29 | /30 | /31 | /32 |
Subnet No, - 可分配出子网的数量
Host No. - 在单个子网中可分配的主机数量
EXAMPLE QUESTION
Company X has approximately 6 departments and one (1) main office with 150 employees spread out across each department.
Given the IP address 194.10.9.0, Determine how this IP address can be used to create the required network and departments.
- (a) Determine the appropriate network mask?
- (b) What is the network ID for each subnet.
- (c) How many Host IDs are usable for each subnet?
- (d) What is the range of each host on each subnet?
a) /27 is the most appropriate network mask because this company needs 7 total subnets only and /27 can provide maximum to 8 subnets.
b) ①. 194.10.9.0 ②. 194.10.9.32 ③. 194.10.9.64 ④. 194.10.9.96 ⑤. 194.10.9.128 ⑥. 194.10.9.160 ⑦. 194.10.9.192 ⑧. 194.10.9.224
c) There are 32 available IPs in each subnet. One 1 first IP is used for representing network ID, and the last IP used to represent broadcast ID. So there are 30 usable host IP in total.
d) ①. 194.10.9.1 ~ 194.10.9.30 ②. 194.10.9.33 ~ 194.10.9.62 ③. 194.10.9.65 ~ 194.10.9.94 ④. 194.10.9.97 ~ 194.10.9.126 ⑤. 194.10.9.129 ~ 194.10.9.158 ⑥. 194.10.9.161 ~ 194.10.9.190 ⑦. 194.10.9.193 ~ 194.10.9.222 ⑧. 194.10.9.225 ~ 194.10.9.254
Bit Streaming
Bit streaming在这个地方主要表示“流媒体”,众所周知当前流媒体的主要形式有“视频”和“直播”:
- 已发布的视频属于On-demand bit streaming
- 直播属于real-time bit streaming
Bit Streaming - Sequence of digital signals (bits) transferred over a communication path at high speeds, requiring a fast broadband connection and buffers.
Importance of High Broadband Speed/Bit-Rate
- The user has to download and display bits at the same time.
- Higher quality media requires faster speeds due to larger data frames as well.
- Real-time streaming needs higher speeds due to simultaneous data requests coming from multiple different users.
Bit streaming involves the use of buffer to make sure the video is not lagging:
| Real-time | On-demand |
|---|---|
| The event is captured live via a video camera that is connected to a computer. | Existing digital files are converted to encoded bit-streaming format for broadcasting on the internet by uploading to a dedicated server. |
| Video signal converted to an encoded streaming video signal. | A link for encoded video is placed on the website, and the user clicks on the link to view encoded streaming video. |
| Encoded video signal uploaded from computer to a dedicated streaming server via cables or high-speed wireless internet connection. | The data is streamed to a buffer in the user’s computer, and the buffer stops the video from being paused as the bits are streamed. |
| The server then sends live images to all users requesting them as a real-time video. | As the buffer is emptied, it’s filled again, thus providing continuous viewing. |
| It cannot be paused, fast-forwarded, etc. | Can be paused, fast-forwarded, etc. |
Internet Supporting Hardwares
Notes from this section are copied from Znotes: CAIE AS Level Computer Science Theory Free Notes & Study Groups - ZNotes
Modems:
- Allows a device to connect to the Internet via a telephone line.
- Function: A transmitter uses a modem to convert digital signals (from the transmitting device) to analogue signals sent down the telephone line. A receiver uses a modem on the other end to convert the analogue signals to digital signals so the receiving device can understand the data.
PSTN (Public Switched Telephone Network) 公共交换电话网:
- Refers to all telephone networks.
- Channel: Used between two endpoints for the call duration via circuit switching.
- Resilience: Lines are active even during a power outage.
- Communication: Bi-directional.
Dedicated Lines:
- Telecommunication path between endpoints.
- Not shared with multiple users; it’s bought/leased.
- Function: Able to host websites as well as carry phone calls. Allows continuous, uninterrupted access to the Web.
Cell Phone Network:
- Wireless networks spread over land areas divided into (hexagonal) cells.
- Base Stations: Each cell is served by at least one base station (transceiver), which uses a different frequency range compared to adjacent cells to transmit data.
- Capacity: Larger capacity is possible since the same frequencies can be used in non-adjacent cells.
- Transmission: Radio waves are usually used for transmission. Can be broadcast in all directions over a wide area.
- Portable Transceivers: Devices like mobile phones can communicate and access the internet via base stations.
Carrier Sense Multiple Access / Collision Detection.
Aim to avoid collisions.
Steps:
- when a frame is sent, it causes a voltage change on the Ethernet cable. 一个数据在传输时造成电缆上的电压变化.
- when a collision is detected, a node stops transmitting a frame.
- The node transmits a ‘Jam’ signal.
- waits for a random time interval before trying to resend.