9618 Computer Science - Communication and Internet Technologies
The internet is similar to a road network in that it has rules (protocols) that you need to follow and only a certain number of vehicles (data) can get through at a time (bandwidth). If too many vehicles try to go down the same road you get congestion (reduced bandwidth)!
When two devices send messages to each other it is called handshaking. This is the process where:
Protocols establish how two computers send and receive a message. Data packets travel between source and destination from one router to the next. The process of exchanging data packets is known as packet switching.
| Term | Definition |
|---|---|
| Circuit Switching | Method of transmission in which a dedicated circuit/channel lasts throughout the duration of the communication |
| Packet Switching | Method of transmission where a message is broken into packets which can be sent along paths independently from each other |
| Hop Number | Number in the packet header used to stop packets which never reach their destination from 'clogging up' routes |
| Header | Part of a data packet containing key data such as destination IP address, sequence number, and so on |
| Routing Table | A data table that contains the information necessary to forward a packet along the shortest or best route to allow it to reach its destination |
Circuit Switching uses a dedicated channel/circuit which lasts throughout the connection - the communication line is effectively 'tied up'. This is the method used in the traditional telephone system.
When telephone lines were first invented, the lines had to be physically (and manually) routed between end points. These were done at central switchboards. Manual switch operators were gradually replaced by automatic electrical switches.
| Advantages ✓ | Disadvantages ✗ |
|---|---|
| The circuit used is dedicated to the single transmission only | It is not very flexible - it will send empty frames and has to use a single, dedicated line |
| The whole of the bandwidth is available | Nobody else can use the circuit/channel even when it is idle |
| The data transfer rate is faster than with packet switching | The circuit is always there whether or not it is used |
| The packets of data (frames) arrive at destination in the same order as they were sent | If there is a failure/fault on the dedicated line, there is no alternative routing available |
| A packet of data cannot get lost since all packets follow in sequence along the same single route | Dedicated channels require greater bandwidth |
| Works better than packet switching in real-time applications | Prior to actual transmission, the time required to establish a link can be long |
| No waiting time at switches | Resources are not utilized fully |
| Suitable for long continuous communication | Circuit switching is more expensive as a dedicated path must be established |
When discussing circuit switching, always mention that it creates a dedicated physical path that remains open throughout the communication. This is why it's ideal for voice calls but inefficient for bursty data traffic!
TCP/IP uses packet switching to send data across a network. In packet switching, messages are broken up into very small pieces called packets. Each packet consists of two parts:
Header: Contains key data including:
Payload: The actual part of the message being sent (the data)
Packet switching is a connectionless network switching technique. The message is divided and grouped into units called packets that are individually routed from source to destination. There is no need to establish a dedicated circuit for communication.
| Advantages ✓ | Disadvantages ✗ |
|---|---|
| No need to tie up a communication line | The protocols for packet switching can be more complex than those for circuit switching |
| It is possible to overcome failed or faulty lines by simply re-routing packets | If a packet is lost, the sender must re-send the packet (which wastes time) |
| It is easy to expand the traffic usage | Does not work well with real-time data streams (like VoIP) |
| High data transmission is possible with packet switching | There is a delay at the destination while packets are reassembled |
| Packet switching always uses digital networks - digital data transmitted directly | Network problems may introduce errors, delays, or loss of packets |
| Charges users only for the duration of connectivity, not distance | Requires large amounts of RAM to handle large amounts of data |
| Delay in delivery of packets is less since packets are sent as soon as available | High installation costs |
| Data delivery can continue even if parts of network fail - packets routed via other paths | Unsuitable for applications that cannot afford delays (high quality voice calls) |
Try to avoid talking about the speed of data transmission in an answer to a question on packet or circuit switching. This will not get you a mark in the exam! It is better to talk about higher bit rates or bandwidth (the number of bits sent per second) or the efficiency of the transmission.
| Feature | Circuit Switching | Packet Switching |
|---|---|---|
| Connection Type | Connection-oriented | Connectionless |
| OSI Layer | Implemented at Physical Layer | Implemented at Network Layer |
| Route Setup | Actual route needs to be set up before transmission can begin ✓ | No route setup required ✗ |
| Dedicated Path | Dedicated transmission path is required ✓ | No dedicated path ✗ |
| Packet Route | Each packet uses the same route ✓ | Each packet may take different routes ✗ |
| Arrival Order | Packets arrive at destination in correct order ✓ | Packets may arrive out of order - need reassembly ✗ |
| Bandwidth | All bandwidth reserved (even if not needed) ✓ | Bandwidth only used if required |
| Bandwidth Wasted? | Yes - resources remain reserved even when idle ✓ | No - efficient use of bandwidth ✗ |
| Designed For | Voice calls | Data transmission (also carries VoIP data) |
| Reliability | Less robust - if path fails, call dropped | Robust - packets can be rerouted if failure occurs |
| Scalability | Less scalable - more users require more physical paths | Highly scalable - handles large volumes |
| Cost | Higher - reserved bandwidth and infrastructure | Lower - shared infrastructure |
Circuit Switching = "C" = Connected, Continuous, Certain order
Packet Switching = "P" = Pieces, Parallel paths, Potential reordering
Think: Circuit is like a phone call (one continuous connection), Packet is like sending multiple letters (each takes its own route)!
Each packet contains a header with essential information for routing and reassembly. Here is the structure of a TCP/IP packet header:
Sometimes packets can get lost and keep 'bouncing' around from router to router and never actually reach their destination. Eventually, the network could grind to a halt as the number of 'lost' packets mounts up and clogs up the system!
Don't confuse hop number (prevents packets looping forever) with sequence number (used to reassemble packets in correct order). They serve different purposes!
Routing tables contain the information necessary to forward a packet along the shortest/best route to allow it to reach its destination.
| Field | Description |
|---|---|
| Number of hops | How many routers the packet must pass through |
| MAC address | Address of the next router where the packet is to be forwarded (hopped) |
| Metrics | A cost assigned to each available route so that the most efficient route/path is found |
| Network destination | Network ID or pathway |
| Gateway | Points to the gateway through which the target network can be reached |
| Netmask | Used to generate network ID |
| Interface | Indicates which locally available interface is responsible for reaching the gateway |
Answer:
Additional points for deeper understanding: Works well for real-time applications; ensures all data arrives in order; no packet loss since all data follows same route.
Answer:
Answer:
Answer:
Answer:
Problems that might occur:
Answer:
Advantages:
Disadvantages:
Role:
Contents:
Answer:
Answer:
Bandwidth → The maximum rate of data transfer across a network path, measured in bits per second.
Checksum → A value calculated from packet data used to detect errors during transmission.
Circuit Switching → A method of transmission where a dedicated communication channel is established and maintained throughout the connection.
Connectionless → A type of network communication where data is sent without establishing a dedicated connection first.
Connection-oriented → A type of network communication where a dedicated path must be established before data transfer begins.
Datagram → A self-contained, independent packet of data that carries enough information to be routed to its destination.
Gateway → A network node that connects two different networks, acting as an entry/exit point.
Handshaking → The process where two devices establish communication protocols before data transfer.
Header (Data Packet) → The part of a packet containing control information such as source/destination addresses and sequence numbers.
Hop → One portion of the path between source and destination; each router a packet passes through counts as one hop.
Hop Number → A value in the packet header that limits the number of routers a packet can pass through.
MAC Address → A unique hardware identifier assigned to network interfaces for communication at the data link layer.
Metrics → Values assigned to routes in a routing table to determine the most efficient path.
Netmask → A 32-bit number that divides an IP address into network and host portions.
Packet → A small unit of data formatted for transmission over a network, containing header and payload.
Packet Switching → A method of transmission where messages are broken into packets that can be sent independently via different routes.
Payload → The actual data content of a packet, as opposed to the header information.
Protocol → A set of rules that govern how data is transmitted over a network.
PSTN → Public Switched Telephone Network - the traditional circuit-switched telephone system.
Router → A networking device that forwards data packets between computer networks.
Routing Table → A data table stored in a router that contains information for forwarding packets to their destinations.
Sequence Number → A number in a packet header used to reorder packets at the destination.
TCP/IP → Transmission Control Protocol/Internet Protocol - the fundamental protocol suite for internet communication.
VoIP → Voice over Internet Protocol - technology for delivering voice communications over IP networks.
| Topic | Key Point |
|---|---|
| Packet Header | Source/Dest IP, Sequence #, Hop #, Checksum |
| Hop Number | Decreases by 1 at each router; if 0, packet deleted |
| Routing Table | Hops, MAC address, Metrics, Gateway, Interface |
| Checksum | Calculated at source, verified at destination |
| Real-time apps | Use circuit switching (guaranteed bandwidth) |