The internet
most well known WAN
a collection of interconnected networks routers cables satellites and other hardware spanning the world
the router is connected to an ISP which is then connected to a DNS and other routers that make up the backbone of the internet
those routers are also connected to devices on their own LANS other routers on the WAN and servers
What is router?
a device which decides which route communication should go
Concept of layers
divide the complex task of networking into smaller simpler tasks that work in tandem with each other
the hardware and/or software for each layer has a defined responsibility and each one provides a service to the layer above it
reduce complex problem into smaller sub problems
devices can be manufactured to operate at a particular level
products from different vendors will work together
TCP/IP protocols and use of layers
refers to a set of networking protocols consisting of four layers working together
all incoming and outgoing data packets pass up and down through te various layers
application -> transport -> network -> link
sending data is passed down
information being received is passed up the stack
if the two hosts are on the same network delivering is simple one host can simply send to the other
if two hosts are on different networks the data will be transmitted via a router
Four layer TCP/IP protocol model
application layer - network applications such as web browsers or email programs operate at this layer (FTP, HTTP, HTTPS, SMTP, IMAP)
transport layer - sets up communication between two hosts they agree settings such as language and packet size (TCP, UDP)
internet/network layer - addresses and packages data for transmission routes packets across the network (IP)
link layer - network hardware and connection post standards OS device drivers also sit here facilitates the transmission of binary via any media
Application layer
uses an appropriate protocol relating to whatever application is being used to transmit data
Transport layer
uses the TCP part of the stack as well as other conversation protocols like UDP
responsible for establishing an end to end connection and maintaining conversation between application processors
these protocols use port numbers to track sessions and add this information to the header
once the connection is made the transport layer splits the data into packets and adds to the packet its number the total number of packets and the port number is should use
packets are numbered so they can be reassembled in the correct order
Network layer
the internet layer use the IP part of the stack
adds to each packet source IP address and destination IP address
all routers operate at this layer use the IP address to find out where the packets are heading and now have a socket (IP address and port)
now know the device the packet is being sent to (IP address) and the application on that device that needs the packet (port)
Link layer
represents the actual physical connection between network devices
is responsible for adding the unique Media Access Control (MAC) address of the source device and destination device
when transmitting data between routers over a WAN the MAC address is changed at each hop on the route
need for MAC and IP addre4ss
communication between two devices on the same LAN may only require link layer which creates a frame using MAC address
communication between devices on different networks requires both network layer which uses IP addresses to create packets and link later frame
WWW and DNS
WWW is a collection of files with information stored in hypertext and other associated files hosted on web servers
these web servers host the files and handle client requests
a web page stored as text is sent to a web browser application which use rules to render it corrrectly
LANS
Local Access Network
any network that covers a small geographic area typically located on a single site
all hardware tends to be owned and controlled by the organisation using it
typically connected using UTP cable fibre optic cable and Wi-Fi
WANS
Wide Access Network
only network that covers a large geographical area
when multiple LANs physically located in different areas are connected they form a WAN
the infrastructure that connects LANs to form a WAN is leased from telecommunication companies who own and manage it
typically connected by telephone lines fibre optic cables and satellite links
Circuit switching
provides the basis for traditional telephone networks
creates a temporary and dedicated link of fixed bandwidth between the source and destination that only lasts until the transmission is complete
using this guarantees the quality of the transmission through dedicated bandwidth making it excellent for data that needs a constant link end to end such as real time videos
downside is that a lot of potential bandwidth can be wasted
Packet switching
breaks streams of data into smaller blocks each sent indepently of one another
at each node packets are sent via whichever route the node decides is the least congested which maximises bandwidth but does not guarantee the quality of the transmission
also means packets can take different routes to their destination and may arrive out of order
more affordable and efficient as all bandwidth can be used at least once
requires less complex infrastructure and can easily respond of parts of the network fails
Circuit and packet switching
circuit has physical path between source and destination while packet does not
for circuit all packets se the same path while for packets all packets travel independently
circuit can cause a lot of bandwidth wastage while packet has none
circuit reserves bandwidth in advance while packet does not
circuit has no store and forward transmission while packet supports store and forward transmission