Computer Networks - Introduction
Computer Network Definition
- A computer network is a set of computers sharing resources located on or provided by network nodes.
- A node is either a redistribution point or a communication endpoint.
- The term "computer" includes laptops, PCs, servers, mobile phones, tablets, printers, IoT devices, sensors, and cameras, and its definition should be understood based on the context.
Use of Computer Networks
- The textbook content related to this topic might be outdated due to the rapid change in applications.
- The provided notes outline the core concepts related to the topic.
- Exploring current applications is an activity for the students.
Resource Sharing
- Computers interact with each other through:
- Client-Server model
- Peer-to-Peer model
Client-Server Model
- Service is provided by the Server.
- Resources are located on the server.
- The client initiates communication by sending a request.
- The client requests a resource.
- The server sends a response to the request.
- Potentially many clients can get service from the same server.
- The network is represented as a cloud, indicating that the exact structure is not of interest at that current abstraction.
- This communication model is defined based on how the end points in the network interact.
Client-Server Model - Example
- The interaction between a web browser (e.g., Firefox) and a web server (e.g., www.ucsc.cmb.ac.lk) is a classic example.
- Firefox acts as the client.
- The computer identified as www.ucsc.cmb.ac.lk is the server.
Peer-to-Peer Model
- There are no special entities; there are no dedicated servers.
- Peers contribute resources equally.
- All participating entities (nodes) are equal.
Peer-to-Peer Model - Example
- Bitcoin network
- The Bitcoin network protocol allows full nodes (peers) to collaboratively maintain a peer-to-peer network for block and transaction exchange.
Network - Some Applications
- Examples:
- Video Conferencing (Zoom)
- Social Networks (Facebook)
- Email
- Instant Messaging (WhatsApp)
- eCommerce (Uber, PickMe, etc.)
Mobile Users
- Connectivity:
- WiFi
- Telecom service providers (GSM, 3G, 4G, 5G)
- Bluetooth
- Devices:
- Smartphones
- Smartwatches (Wearables)
- Applications:
- Navigation
- Fitness monitoring
- Instant messaging
Sensor Networks
- Small sensors gather information about the physical world (temperature, humidity, position, speed, etc.).
- Usually have wireless network capability.
- Smartphones can act as nodes in a sensor network because of their embedded sensors (camera, GPS, accelerometer, gyroscope).
Smartphones as sensors
- Smartphones are packed with sensors
- Camera
- GPS
- Accelerometer
- Gyroscope
Social Issues
- Privacy violations
- Fake news
- Social Engineering (Phishing attacks)
Network Classification
- Transmission Technology Based Classification
- Point to Point
- One computer is connected to another.
- Unicast
- Fiber link from your home to the telecom provider
- Broadcast
- Communication channel is shared by all the computers in the network.
- WiFi networks
- Multicast
- Transmit to only a subset of the computers in the network
- Scale Based Classification
- Personal Area Networks (PAN)
- Local Area Networks (LAN)
- Metropolitan Area Networks (MAN)
- Wide Area Networks (WAN)
- The Internet (WAN)
Personal Area Network (PAN)
- Communication over the range of a person
- Wireless network that connects peripherals to a computer
- Example: Connecting a headset to a mobile phone via Bluetooth.
Local Area Network (LAN)
- Operates within a single building like a home or an office.
- If used by a business or a company, they are called enterprise networks.
- Wireless: WiFi (802.11), devices connect through an Access Point.
- Wired: Ethernet, devices are connected to a Hub or a Switch through ports.
- A computer connects to a port.
- A Hub receives a packet of data from one port and sends it to all the other ports.
- A Switch receives a packet from one port and relays it to another based on the destination address in the packet.
Virtual LAN (VLAN)
- Divides one large physical LAN into several logical LANs.
- Assign "colors" to ports in a switch.
- Ports with the same color act as if they are in one LAN.
- Use case: Different departments in an office can have their own VLANs despite the fact that computers are connected to a single physical LAN (switch).
Metropolitan Area Network (MAN)
- Covers a city.
- Connects LANs together, for example, multiple offices of a business within a city.
- Provides Internet access to individual LANs.
- Technology: Metro Ethernet.
Wide Area Network (WAN)
- Spans a large geographical area like a country or continent.
- Connects offices in different cities.
- Each office typically has a single LAN.
- Communication links of the WAN interconnect these LANs.
- Switches, Gateways, and Routers are required to connect them.
- Businesses lease these links from telecommunication providers (leased lines).
- WANs can internetwork networks – an internet (note the lower case “i”).
- The Internet can be considered as a WAN that uses a particular set of protocols to communicate.
- A protocol is an agreement between communicating parties and can be implemented in either hardware or software.
Virtual Private Network (VPN)
- Offices in different locations are connected to the Internet through an Internet Service Provider.
- These offices can establish a virtual link between them over the Internet.
- It is possible to encrypt data between these two sites using a VPN.
Protocols
- A protocol is an agreement between two (or more) parties who want to communicate with each other.
- Example: Sending a letter to a friend:
- Agreement on language (e.g., English).
- Standard format for writing the address.
- Agreements between postal systems.
- Agreements between airlines on how to route packages.
- Information hiding:
- When writing the letter, you don't need to know the details of how the postal system or airlines operate.
- Similarly, the postal system is not concerned with how packages are routed in the airline system.
- This air mail system can be thought of as having three layers:
- You and your friend (protocol between you).
- Post offices (protocols between post offices).
- Airline system (protocols between airlines).
- In summary:
- There are interfaces between immediate layers.
- There are protocols between peers.
Protocol Stack
- Protocol layers are stacked one on top of the other.
- A set of layers and protocols is called a Network Architecture.
Layers – Design Issues
- Error Detection and Correction
- If a letter is destroyed after you hand it over to the post office, the postal system cannot recreate the letter.
- This layer can detect the error and let you know, allowing you to rewrite and resend the letter.
- Routing
- If there are no direct flights to the destination, the airline must forward the package through another city (e.g., Singapore).
- This is called routing – finding a suitable path to the destination.
- Addressing and Naming
- There is a particular format to write the address to identify the recipient.
- The postal package containing your letter is handed over to an airline and sent to a central postal office in the destination country, using a different addressing format.
- Quality of Service
- The post office offers express, regular, and registered mail services.
- Airlines also have similar service levels.
Reference Models
- Standard reference models describe/design network architectures:
- Open System Interconnection (OSI) model (7 layers)
- TCP/IP model (4 layers)
- The model used in the textbook (5 layers)
OSI Model
- Physical Layer
- Concerned with transmitting raw bits over the physical channel.
- Data Link Layer
- Transforms a raw transmission facility into a line that appears free of undetected transmission errors.
- Frames.
- Network Layer
- Controls the operation of the subnet and determines how packets are routed from source to destination.
- Transport Layer
- Accepts data from the layer above, splits it up into smaller units if need be, passes these to the network layer, and ensures that the pieces all arrive correctly at the other end.
- Session Layer
- Establishes sessions between communicating parties.
- Dialog control & Synchronization.
- Presentation Layer
- Concerned with the syntax and semantics of the information transmitted, including data representation and data structures.
- Application Layer
- Contains a variety of protocols that are commonly needed by users, such as HTTP.
TCP/IP Model
- Link Layer
- Defines an interface to the upper layer – Internet Layer.
- Internet Layer
- Corresponds approximately to the Network Layer in the OSI model.
- Packet routing.
- Packets are moved towards the destination independently and may arrive out of order or not at all.
- Transport Layer
- Allows peer entities on the source and destination hosts to carry on a conversation.
- Similar to OSI transport layer.
- Transmission Control Protocol – TCP & User Datagram Protocol – UDP
- Application Layer
- Includes session and presentation functions of the OSI model in addition to application protocols.
Metric Units
- Networks Units
- Based on powers of 10
- 103 – kilo
- 106 – Mega
- Storage (Hard disks etc)
- Units are based on powers of 2
- 210 – Kilo
- 220 – Mega
- B – Bytes
- b - bits