Packet Switching
A router is a node that forwards packets from one network to another. A node is a connection point on a network, so a router is one of the places where networks meet.
When a packet arrives, the router reads the destination IP address in the packet. It looks in its routing table, which lists where packets for different addresses should go, and uses it to choose the next step. The router does not deliver every packet itself: it sends the packet on to the next router along the route, and that router repeats the process. A router does not plan the whole journey; it only chooses the next step.
A small office network is joined to the internet by a router. Packets leaving an office computer go to that router first, and packets arriving from the internet are forwarded by it to the correct computer in the office. It is the node where the office network meets the internet. A home router forwards packets to devices on a local network in the same way.
Internet routers forward packets between networks across the internet. The internet is not one single network; it is a set of interconnected networks. Routers are the nodes that link those networks together, so a packet can cross several networks on its journey.
Routers route using IP addresses, not MAC addresses. The IP address tells the router which network the packet needs to reach. A MAC address identifies a device on a local network, so it is not used to choose a route across the internet.
For example, a packet sent from a school computer to a website starts with the school's router. The router reads the destination IP address, checks its routing table and forwards the packet to the school's ISP. The ISP's router then forwards it on to another router, and so on, until the packet reaches the network holding the website.
Edexcel GCSE Computer Science · Packet Switching
Edexcel GCSE Computer Science · Addressing