September 29th, 2019
To create and run webservers we need to know about:
Need a bit of understanding of what it is built on and why
We have N computers that wish to communicate:
How many one directional channels do we need for them to communicate?
We need N(N-1) one directional channels!
The concepts behind packet switching are widely applicable:
A container “switch”, and container “link”
From IEEE 802.3 Standard:
From Wikipedia MAC addresses:
Multiple switch wired Ethernet network:
Ethernet Switches construct a table to tell them on which port to send a packet with a given destination address.
Every destination on the Ethernet network needs a table entry and there is no way to summarize the information since Ethernet addresses are given out based on manufacturers and not “network location”.
Ethernet by itself cannot scale to create a world wide Internet ==> this is why we have the Internet Protocol (IP)
There are two flavors of the Internet Protocol: IPv4 and IPv6
IPv6 is the newer version, however IPv4 is still widely used and simpler to understand at first.
We will only talk about and use IPv4 in this class.
Diagram from the Internet
The Destination Address
But Who at the destination? This is what the protocol field in the header is for.
Large list at Wikipedia: IP Protocol Numbers
Transmission Control Protocol (TCP) Hex 0x06, Decimal 6
User Datagram Protocol (UDP) Hex 0x11, Decimal 17
Your computers Ethernet adapter comes with a manufacturer assigned Ethernet address
Your computer does not come with an IP address for networking purposes, but is given one by the network.
There are different types of IP addresses for different contexts.
See Wikipedia: IPv4
Public IP Addresses: Your ISP would give one to your entire house or apartment.
Private IP Addresses: You get one of these from your home router or from the campus network.
Loopback (Machine Local) Addresses: Used within a machine, the range of addresses you can use is 127.0.0.0–127.255.255.255, i.e., over 16 million addresses. We will use these during webserver development.
Unique addresses assigned in a hierarchical manner starting with IANA, then allocated to regional authorities, down to ISPs.
Hierarchical, location based allocation of addresses allows for “summary routing”, that is routing based on only part of the IP address.
This drastically reduces the size of the forwarding table in IP based packet switches (known as “routers”, but this term is over used.)
The transport layer provides extra functionality over the network layer
TCP and UDP both provide multiplexing via source and destination port numbers. This allows multiple “conversations” between the same pair of IP addresses.
TCP also provides for reliable delivery of byte streams. This greatly increases its complexity over UDP.
User Datagram Protocol (UDP) packet header
Transport Control Protocol (TCP) packet header
When we work with multiple servers on our own machine we need to make sure the ports don’t collide
Development servers frequently use non-standard ports
Other types of services such as database servers, Redis, etc… will be accessed via non-standard ports.
The Domain Name System (DNS) is used to resolve domain names into IP addresses.
From Wikipedia DNS: The Domain Name System (DNS) is a hierarchical decentralized naming system for computers, services, or other resources connected to the Internet or a private network.
I can get a domain for CS3520 or any other class!