Kyle Edwards

Networking Basics

The Internet is a worldwide wide-area network comprised of smaller WANs and LANs (local-area networks). Its origins began with ARPAnet and packet-switching experiments in the 1960s, and involved cross-network gateways joining CSnet, NSFnet, and other international networks. Over time, protocols like TCP/IP, SMTP, and HTTP standardized traffic across the web and allowed developers to bring high-level functionality to non-technical users.

Internet Backbone

The Internet backbone is an informal name for Tier 1 networks that have access to all other top-level networks on the web. This is usually because these networks have ownership of some amount of fiber-optic linkage between networks. For example, AT&T, Deutsche Telekom, and Verizon are Tier 1 networks.

Network Types

Point-to-point Networks

Multipoint/Broadcast Networks

TCP/IP

The TCP/IP protocol model consists of four layers (compare this with the seven OSI model layers): link, network, transport, and application.

Framing

Because a sequence of bits has no clear beginning or end, data transmissions are often delimited into sets called frames. In certain implementations like HDLC (High-Level Data Link Control), these frames are separated by a flag sequence like 01111100. Because of this, any sequence of five consecutive 1s is bit packed with a 0 that is ignored by the client. Ethernet uses a different strategy that uses a period of inactivity called a preamble for 56 bits of alternating 1s and 0s, and then a start of frame delimiter (10101011). Typical frames are between 64 and 1500 bytes.

OSI Model Layers

  1. Physical: The medium (wire, fiber, radio, etc…) for transmitting communications as raw bits
  2. Data Link: Facilitates the transfer between two physical addresses (usually MAC addresses) on the same network. Layer 2 commonly refers to Ethernet, but also includes other protocols like ARP and VLAN/VTP.
  3. Network: Determines the physical and logical (IP, ICMP), IP header, communication between identified end devices
  4. Transport: (TCP/UDP), segment, transfer and reassembly of messages (for reliability)
  5. Session: Determines connection sessions for communications
  6. Presentation: Usually for defining the format
  7. Application: (HTTP, HTTPS, DNS)

TCP

Small packets with sequence numbers and error detection.

Three-way Handshake

Terminology

Resources

protocol data units

http tcp/80 https tcp/443 dns (tcp OR udp) 53 ntp network time protocol udp/123 dhcp dynamic host configuration protocol udp/67

DHCP

  1. A device on the network broadcasts a Discover message to all devices on the subnet.
  2. The DHCP server responds with an Offer message. The requesting device may receive multiple offers, but will accept the first message it receives and take the IP of the DHCP server from it.
  3. The requesting device sends a Request message to the DHCP server using its newfound IP.
  4. The DHCP server returns an Acknowledgement message to provide the device with an IP, subnet mask, default gateway, and possibly other information.

If a DHCP server is on a separate subnet, any routers between it and the requesting device must be configured to be a relay agent.

IPv6 DHCP servers respond with the prefix and host portions of the IP, and possibly the IP address of the DNS server on the network. Alternatively, a host can receive network prefix information from the router using the Network Discovery Protocol (or NDP), and generate its own host IP portion from its MAC address using a process called EUI-64. In this case, the DHCP server would only be used for additional network information such as the DNS server address.

Network Address Translation

NAT

Routers maintain a NAT table that map local IP addresses to global IPs.

Dynamic NAT is many-to-many.

Port Address Translation (PAT), one global to many local IPs.

Network Time Protocol

UDP port 123 stratum number is the believability of a time source stratum numbers cannot be higher than 15

QoS

Quality of Service

“managed unfairness”

Ethernet

Carrier Since Multiple Access Collision Detection (CSMA/CD). On occasion data collides when multiple nodes attempt to send at the same time. If this happens, each node waits (I believe a random amount of time) before resending.