Computer Networks 1
Combines Layers 7 (Application), 6 (Presentation) and 5 (Session).
| Feature | HTTP/1.0 | HTTP/1.1 | HTTP/2 | HTTP/3 |
|---|---|---|---|---|
| Connection Management | One request per connection | Persistent connections by default | Multiplexing allows multiple streams | Uses QUIC for multiplexing |
| Request Methods | Limited (GET, POST, HEAD) | Enhanced (PUT, DELETE, OPTIONS, etc.) | Same as 1.1 | Same as 1.1 |
| Caching | Basic caching support | Improved caching with validation | Advanced caching capabilities | Same as 2 but with improved mechanisms |
| Header Compression | None | None | HPACK (header compression) | QPACK (header compression) |
| Server Push | Not supported | Not supported | Supported (automatic resource pushing) | Enhanced support for server push |
| Performance Improvements | None | Minor improvements over 1.0 | Significant improvements in performance and latency | Further improvements in speed and efficiency |
| SSL/TLS Support | Not inherent | Not inherent, but commonly supported | Built-in support with ALPN (Application-Layer Protocol Negotiation) | Uses QUIC, which incorporates TLS 1.3 |
| Transport Protocol | TCP | TCP | TCP | QUIC |
| Protocol | Port | Layer 4 |
|---|---|---|
| DNS | 53 | UDP, TCP |
| HTTP | 80 | TCP |
| HTTPS | 443 | TCP |
| FTP | 20, 21 | TCP |
| SMTP | 25 (server) 587 (client) | TCP |
| POP3 | 110 | TCP |
| DHCP | 67 (server) 68 (client) | UDP |
Nameservers resolve domains to IP’s through a distributed, hierarchical database.
| Term | Definition |
|---|---|
| Iterated query | Local DNS server iteratively asks one server after the other, descending the domain name hierarchy step after step. |
| Recursive query | Local DNS server asks root server for domain, which in turn asks the TLD server, which in turn asks the authoritative server etc. until the “call stack” unwinds and returns the fully resolved domain to the query sender. |
| Caching | Client-side temporary storage of DNS lookup information. |
| Type | Name | Value |
|---|---|---|
| A | hostname | IPv4 address |
| AAAA | hostname | IPv6 address |
| CNAME | alias | canonical name |
| NS | domain | hostname of authoritateive NS for this domain |
| MX | domain | name of mailserver |
| PTR | IP | domain |
| Term | Definition |
|---|---|
| SMTP (Simple Mail Transfer Protocol) |
Used to send email messages from a client to a mail server or between mail servers |
| IMAP (Internet Message Access Protocol) |
Synchronizes email across multiple devices without downloading them |
| POP3 (Post Office Protocol version 3) |
Downloads email messages onto the user’s local device, often removing them from the server afterward |
| MIME (Multipurpose Internet Mail Extensions) |
An extension of the Internet email protocol that allows multimedia content to be transmitted via email |
| SPF (Sender Policy Framework) |
An email authentication method that helps prevent spoofing |
| MUA (Mail User Agent) | Allows users to send, receive, and organize their emails (eg. Mozilla Thunderbird) |
| MTA (Mail Transfer Agent) | Transfers email messages between servers (eg. Postfix) |
| MDA (Mail Delivery Agent) | Processes incoming messages from the MTA and places them in the user’s mailbox |
Segment size: 1440-1480b when using IPv4, <=1460b when using IPv6
- Process-to-process delivery (distinguish between multiple applications via ports)
- Ensure reliable transfer (acknowledgments, retransmissions & reordering)
- Flow control (sender does not overwhelm receiver)
- Congestion control (network is not overloaded)
| Term | Definition |
|---|---|
| Port | 16 bit long numbers (0-65535) for identifying applications to send packets to. Well-Known: 0-1023 for universal TCP/IP applications, managed by the IANA. Registered: 1024-49151 for known applications, also managed by the IANA. Private: 49152-65535 for custom applications, not managed by the IANA. |
| Socket | Combination of IP:Port. |
| Multiplexing | Sending data from multiple sockets at sender. |
| Demultiplexing | Delivering segments to correct socket at receiver. |
| Checksum | Detect errors (i.e., flipped bits) in transmitted segment. |
Connection-oriented, bidirectional, reliable, managed data flow.
| Source Port | Destination Port | ||||||||||||||||||||||||||||||
| Sequence Number | Acknowledgement Number | ||||||||||||||||||||||||||||||
| Offset | Reserved | U R G | A C K | P S H | R S T | S Y N | F I N | Window Size | |||||||||||||||||||||||
| Checksum | Urgent Pointer | ||||||||||||||||||||||||||||||
| Options | Padding | ||||||||||||||||||||||||||||||
| Data | |||||||||||||||||||||||||||||||
| Field | Definition |
|---|---|
| U R G (1 bit) | Urgent Pointer |
| A C K (1 bit) | Acknowledgement flag |
| P S H (1 bit) | Push flag |
| R S T (1 bit) | Reset flag |
| S Y N (1 bit) | synchronize flag |
| F I N (1 bit) | Finish flag |
| Window Size (16 bit) | Sender's receive window |
| Options (24 bit) | Variable length. MSS, Window scaling, etc. |
| Padding (8 bit) | Variable length |
| Data (32 bit) | Variable length |
|
| Term | Definition |
|---|---|
| Sequence numbers | SEQ ensures that the packets arrive or can be reassembled in order. |
| Acknowledgement | ACK ensures that the receiver gets all of the packets. |
| Retransmission timeout | If an acknowledgment is not received before the timer for a segment expires, a retransmission timeout occurs, and the segment is automatically retransmitted. |
| Packet loss rate | Measures how many packets of the ones being sent actually arrive. |
| Duplicate ACKs | A duplicate ACK occurs when a receiver receives a segment of data that is not the next expected segment, prompting it to send back the same acknowledgment of the last correctly received packet multiple times. This signals to the sender that some packets might be lost or that the data is arriving out of order. |
| Triple Duplicate ACKs | A triple duplicate ACK specifically refers to the situation where the receiver sends three duplicate ACKs in a row for the same segment. This particular signal indicates to the sender that a packet has likely been lost. In response, TCP will trigger a fast retransmission of the missing packet without waiting for a timeout. |
| Term | Definition |
|---|---|
| Throughput | Denoted by T, is the amount of data that can be transmitted during a specified time. |
| Continuous sending | Sender transmits a stream of data packets in the given window size without waiting for acknowledgments. |
| Delayed / Cumulative ACK |
Receiver waits for a short period to acknowledge multiple segments with a single ACK. |
| Selective ACK | Instead of asking for a retransmission of all missing segments, SACK (specified by the receiver) allows the sender to send only the lost segments, significantly improving efficiency. |
So that the sender does not overwhelm the receiver.
| Term | Definition |
|---|---|
| Window Size | Denoted by W, is a 16 bit number sent with each packet by the receiver inside of the rwnd header field, indicating the amount of data he still has space for. If sender receives a window size of 0, it starts a persistence timer. When the persistence timer goes off, the sending TCP sends a special segment called a window probe to query the receiver periodically and find out if the window has been increased. |
| Window scale | Used when the TCP window size needs to be increased beyond the traditional maximum of 65,535 bytes due to the demands of high-speed networks. If the handshake header includes the window scale option and the packet header includes the scaling factor (max value of 14) then the effective window size is calculated as such: |
| Receiver Window | Managed by the receiver, who sends out window sizes to the sender. The window sizes announce the number of bytes still free in the receiver buffer |
To prevent network congestion.
| Term | Definition |
|---|---|
| Congestion window | |
| Sliding Window | Describes the process of the congestion window sliding to the right after receiving ACKs. |
| Slow start | Gradual growth (doubling cwnd every RTT) within the congestion window size at the start of a connection or after a period of state of no activity. Purpose: Allows the sender to probe the available bandwidth in a controlled way. |
| Congestion avoidance | Transition from sluggish start to congestion avoidance segment after accomplishing a threshold. Purpose: Maintains a truthful share of the community bandwidth even as heading off excessive congestion. |
| Fast Retransmit | Detects packet loss through duplicate acknowledgments and triggers speedy retransmission without waiting for the retransmission timeout. Purpose: Speeds up the recuperation method with the aid of retransmitting lost packets without looking ahead to a timeout. |
| Fast Recovery | Enters a quick healing state after detecting packet loss, lowering congestion window and transitioning to congestion avoidance. Purpose: Accelerates healing from congestion by way of avoiding a complete go back to slow begin after packet loss. |
| AIMD | Adjusts the congestion window size based on network situations following the Additive Increase, Multiplicative Decrease principle. Purpose: Provides a balanced approach by way of linearly growing the window all through congestion avoidance and halving it on packet loss. |
| Source Port | Destination Port | ||||||||||||||||||||||||||||||
| Length | Checksum | ||||||||||||||||||||||||||||||
| Data | |||||||||||||||||||||||||||||||
Actually a layer 7 Protocol, running on top of UDP
Packet size: 1500b
Dividing a /X network into n amount of /Y subnets: .
| Version | Traffic class | Flow label | |||||||||||||||||||||||||||||
| Payload length | Next header | Hop limit | |||||||||||||||||||||||||||||
| Source address (128 bits) | |||||||||||||||||||||||||||||||
| Destination address (128 bits) | |||||||||||||||||||||||||||||||
| Field | Definition |
|---|---|
| Version (4 bit) | Version of IP Protocol (always 6) |
| Traffic class (8 bit) | Priority + Class. Used for differentiating level of service and packet types |
| Flow label (20 bit) | Used to identify packets belonging to the same flow |
| Payload length (16 bit) | Size of the data payload in bytes that follows the IPv6 header. max is 65'535 bytes |
| Next header (8 bit) | Type of optional header following the IPv6 header. |
| Hop limit (8 bit) | Maximum number of hops a packet can take before being discarded. |
| Term | Definition |
|---|---|
| Extension Header | Additional headers used in IPv6 to provide optional information. These can define aspects like payload size, routing, or fragmentation. |
| DHCPv6 | Dynamic Host Configuration Protocol for IPv6; this allows servers to assign IPv6 addresses dynamically from a pool, similar to DHCP for IPv4. |
| NAT64 | Network Address Translation from IPv6 to IPv4 and vice versa; it facilitates communication between IPv6 and IPv4 networks. |
| Neighbor Discovery Protocol (NDP) |
A protocol in IPv6 for discovering other network nodes, determining their link-layer addresses, and ensuring that addresses are valid and reachable. |
| Internet Control Message Protocol (ICMPv6) |
A crucial part of IPv6 that handles error messages and operational queries, with an expanded role compared to ICMP in IPv4. |
| MTU | Maximum Transmission Unit; the size of the largest packet that can be sent in a single frame over a network medium. IPv6 can handle larger MTUs compared to IPv4. Default is 1500b |
| Jumbo frame | MTU of 9000b |
| Multicast Listener Discovery (MLD) | IPv6 multicast routers can use MLD to discover multicast listeners on a directly attached link. |
| Path MTU Discovery (PMTUD) | Protocol for determining the Maximum Transmission Unit (MTU) size on the network path between two hosts, usually with the goal of avoiding IP fragmentation. |
| Term | Definition |
|---|---|
| Link-local Address | FE80::/10 Used for local communication between devices on the same network segment. |
| Global Unicast Address | 2000::/3 A globally routable address, these addresses are equivalent to public IPv4 addresses and can be reached over the internet. |
| Unique Local Address (ULA) | FC00::/7 An address for local communication that is not routable on the global internet, similar to private addresses in IPv4. |
| Multicast Address | FF00::/8 An address that enables a single packet to be sent to multiple destinations simultaneously. |
| Anycast Address | An address assigned to multiple interfaces, where a packet sent to an anycast address is routed to the nearest (in terms of routing distance) interface. |
| Reserved Address | Certain ranges in IPv6 are reserved for future use or specific functions. For example, addresses starting with ::/128 are reserved for unspecified addresses. |
| Documentation Address | 2001:DB8::/32 Designated specifically for use in documentation and examples, ensuring it does not conflict with real-world addresses. |
| Link-local Multicast Address | FF02::/16 Part of the link-local address range; it enables devices to communicate within a local network without requiring an external routing address. |
| Addresses | Range | Scope |
|---|---|---|
| Unspecified | ::/128 | n/a |
| Loopback | ::1 | Host |
| IPv4-Embedded | 64:ff9b::/96 | n/a |
| Discard-Only | 100::/64 | n/a |
| Link-Local | fe80::/10 | Link |
| Global Unicast | 2000::/3 | Global |
| Unique Local (ULA) | fc00::/7 | Global |
| Multicast | ff00::/8 | Variable |
| Term | Definition |
|---|---|
| ff02::1 | All nodes, within scope 2 (link-local). |
| ff02::2 | All routers, within scope 2 (link-local). |
| ff02::1:ffxx:xxxx | The IPv6 node joins a solicited multicast address group from all the interfaces where unicast and anycast addresses are configured. Its scope is the link-local. |
| Term | Definition |
|---|---|
| ff02::1:2 | A link-scoped multicast address used by a client to communicate with neighboring (i.e., on-link) relay agents and servers. All servers and relay agents are members of this multicast group. |
| ff05::1:3 | A site-scoped multicast address used by a relay agent to communicate with servers, either because the relay agent wants to send messages to all servers or because it does not know the unicast address of the servers. |
| Term | Definition |
|---|---|
| Routing | Used by an IPv6 source to list one or more intermediate nodes to be “visited” on the way to a packet’s destination. There are different types of routing headers defined for different uses. |
| Fragmentation | Used by an IPv6 source to send a packet larger than would fit in the path MTU to its destination. |
| Authentication | Used by IPsec to provide security services like integrity and data origin authentication to IPv6 traffic. |
| Encapsulating Security Payload |
Used by IPsec to provide security services like confidentiality and/or integrity to IPv6 packets. |
| Hop-by-Hop Option | Used to carry optional information that may be examined and processed by every node along a packet’s delivery path. |
| Destination Options | Optional information to be examined by the destination node |
| Term | Definition |
|---|---|
| Router discovery | Hosts can locate routers residing on attached links. |
| Prefix discovery | Hosts can discover address prefixes that are on-link for attached links. |
| Parameter discovery | Hosts can find parameters (e.g., MTU). |
| Address autoconfiguration | Stateless configuration of addresses of network interfaces. |
| Redirect | Provide a better next-hop route for certain destinations. |
| Term | Definition |
|---|---|
| Address resolution | Mapping between IP addresses and link-layer addresses. This is equivalent to ARP for IPv4. This function allows to resolve the link-layer address of another node in the link when only the IPv6 address of that node is known. |
| Next-hop determination | Hosts can find next-hop routers for a destination. |
| Neighbor unreachability detection (NUD) |
Determine that a neighbor is no longer reachable on the link. |
| Duplicate address detection (DAD) |
Nodes can check whether an address is already in use. |
| Name | Type | Description |
|---|---|---|
| Router Solicitation (RS) | 133 | To locate routers on an attached link. |
| Router Advertisement (RA) | 134 | Used by routers to advertise their presence periodically or in response to a RS message. |
| Neighbor Solicitation (NS) | 135 | To find the MAC-address of the neighbor or to check if the neighbor is still reachable. |
| Neighbor Advertisement (NA) | 136 | To respond to a Neighbor Solicitation message. |
| Redirect | 137 | To point the host to a better first hop router for a destination. |
A method for automatically configuring IPv6 addresses without a DHCP server, relying on local network information.
To make sure that the address is actually unique in the local segment.
Upon configuring an IPv6 address, every node joins a multicast group identified by the address FF02::1:FFxx:xxxx where xx:xxxx are the last 6 hexadecimal values in the IPv6 unicast address, eg. FF02::1:FF34:5678
- The host sends a Neighbor Solicitation message from the Unspecified Address (::) to the Solicited Node multicast address.
- If the generated address is in use, the host using that address sends a Neighbor Advertisement back. The sending host then knows the tentative address can not be used.
- The host then proceeds to generate a new address and sends a new Neighbor Solicitation message to the link.
- If there is no reply after some time, the host informs all the other hosts that it uses this address and it sends a Neighbor Advertisement message to the All Nodes address.
- The host assigns the address to the interface and now has an active IPv6 link. This is the so-called Link-local Address Assignment.
- Router solicitation
- Router advertisement
Based on the information from the Router Advertisement, the host generates a global unicast address and wants to know if it is available to use, so it does the DAD process again. If it is not a duplicate, the host will use it.
| Term | Definition |
|---|---|
| A | Host can perform SLAAC to generate its own IPv6 address based on the prefix(es) contained in the RA message. |
| O | Host can fetch additional options from the DHCPv6. The DHCPv6 does not provide IPv6 addresses in this case. |
| M | Host will get its IP address and additional options from a DHCPv6 server. |
| L | The prefix shared in the RA is reachable on the link. |
| Version | IHL | DSCP | ECN | Total Length | |||||||||||||||||||||||||||
| Identification | RS | DF | MF | Fragment Offset | |||||||||||||||||||||||||||
| Time to Live | Protocol | Header Checksum | |||||||||||||||||||||||||||||
| Source IP Address | |||||||||||||||||||||||||||||||
| Destination IP Address | |||||||||||||||||||||||||||||||
| Options (if IHL > 5) | |||||||||||||||||||||||||||||||
| Data | |||||||||||||||||||||||||||||||
| Field | Definition |
|---|---|
| Version (4 bit) | Version of IP Protocol (always 4) |
| IHL (4 bit) | Internet Header Length (in 32bit words. min 5) |
| DSCP (6 bit) | Differentiated Services Code Point |
| ECN (2 bit) | Explicit Congestion Notification |
| Total Length (16 bit) | Header + Data in bytes. max is 65'535 |
| Identification (16 bit) | Used to uniquely identify each packet sent from a source host. It helps in reassembling fragmented packets at the destination. |
| RS (1 bit) | Reserved (must be zero) |
| DF (1 bit) | Don't Fragment |
| MF (1 bit) | More Fragments |
| Fragment Offset (13 bit) | Position of the fragment. Must be multiplied by 8 to extrapolate the position of the fragment inside of a packet. |
| Time to Live (8 bit) | Hop limit |
| Protocol (8 bit) | Protocol of data portion |
| Options (if IHL > 5) (32 bit) | Variable in length. Can specify timestamps, record route or other settings |
| Data (32 bit) | Variable in length |
| Term | Definition |
|---|---|
| A | 10.0.0.0 - 10.255.255.255 (10/8 prefix) |
| B | 172.16.0.0 - 172.31.255.255 (172.16/12 prefix) |
| C | 192.168.0.0 - 192.168.255.255 (192.168/16 prefix) |
/24 = 1111 1111 . 1111 1111 . 1111 1111 . 0000 0000 = 255.255.255.0
/10 = 1111 1111 . 1100 0000 . 0000 0000 . 0000 0000 = 255.192.0.0
Address increment = or
Includes functions and processes that determine which path to use to send the packet or frame. The control plane is responsible for populating the routing table, drawing network topology, forwarding table, and hence enabling the data plane functions. This means here the router makes its decision.
- Network-wide logic
- Determines how datagram is routed among routers along end-to-end path from source to destination host
Includes functions and processes that forward packets/frames from one interface to another based on control plane logic. Routing table, forwarding table and the routing logic constitute the data plane function. Data plane packet goes through the router and incoming and outgoing of frames are done based on control plane logic.
- Local, per-router function
- Determines how datagram arriving on router input port is forwarded to router output port
| Step | N’ | D(v),p(v) | D(w),p(w) | D(x),p(x) | D(y),p(y) | D(z),p(z) |
|---|---|---|---|---|---|---|
| 0 | u | 2,u | 5,u | 1,u | ||
| 1 | ux | 2,u | 4,x | 2,x | ||
| 2 | uxy | 2,u | 3,y | 4,y | ||
| 3 | uxyv | 3,y | 4,y | |||
| 4 | uxyvw | 4,y | ||||
| 5 | uxyvwz | 4,y |
- Each router floods OSPF link-state advertisements (directly over IP rather than using TCP/UDP) to all other routers in entire AS
- Multiple link costs metrics possible: bandwidth, delay
- Each router has full topology, uses Dijkstra’s algorithm to compute forwarding table
Not used anymore, uses distance vector algorithm to calculate shortest route.
Functions:
- Error detection
- Flow control
- Addressing
Ethernet specifies and implements encoding and decoding schemes that enable frame bits to be carried as signals across both copper and fiber cables. Ethernet separates the functions of the data link layer into two sublayers: Logical Link Control and Media Access Control.
| Logical Link Control (LLC) | Media Access Control (MAC) |
|---|---|
| Handles communication between the network layer and the MAC sublayer. Provides a way to identify the protocol that is passed from the data link layer to the network layer. | Data encapsulation: Includes frame assembly before transmission, frame parsing upon reception of a frame, data link layer MAC addressing and error detection. |
Defines how the Ethernet logical bus is accessed. It is in effect within a collision domain and if a device’s network interface card (NIC) is operating in half-duplex mode. It helps prevent collisions and defines how to act when a collision does occur.
- Carrier Sense: Listen to the medium
- Multiple Access: Sending if medium is free, else waiting for a random time and try again
- Collision: The amplitude of the signal increases beacuse a collision occurs.
- Collision Detection / Backoff algorithm: The nodes stop transmitting for a random period of time, which is different for each device.
After 16 tries, the host gives up the transmission attempt and discards the frame. The network is overloaded or broken.
- A jam signal informs all devices that a collision occurred.
- The collision invokes a random backoff algorithm.
- Each device on the Ethernet segment stops transmitting until their backoff timers expire.
- All hosts have equal priority to transmit after the timers have expired.
Full-duplex requires point-to-point connection where only two nodes are present. The data is sent on a different set of wires than the received data, so no collisions will occur. When a NIC detects that it can operate in full-duplex mode, CSMA/CD is disabled. Half-duplex needs CSMA/CD for collision detection.
| <-- 64B (1518 Bytes) --> | ||||
| DA 6B | SA 6B | Type 2B | DATA (MAC SDU) 0 (+64 padding) … 1500B | FCS 4B |
| Term | Definition |
|---|---|
| DA | Destination Address |
| SA | Source Address |
| Type | EtherType protocol, eg. IPv4/ARP |
| FCS | Frame Check Sequence |
Most common type in use today. Also called the DIX frame.
MAC PDU must be at least 64B to guarantee that all collisions can be detected. If it’s smaller, the frame must be filled with Padding Bytes.
| <-- 64B (1518 Bytes) --> | |||||
| DA 6B | SA 6B | Length 2B | LLC 802.2 | LLC SDU | FCS 4B |
- The sender applies a math formula to the frame before sending it, storing the result in the FCS field.
- The receiver applies the same math formula to the received frame and compares with the sender’s result.
- If the results are the same, the frame did not change. If the results are different, an error occurred, and the receiver discards the frame. The Ethernet device does not attempt to recover the lost frame.
| Term | Definition |
|---|---|
| EDC (Error Detection Code) | A generic term for various methods used to identify errors in transmitted data. Various data communication protocols |
| CRC (Cyclic Redundancy Check) | A specific type of EDC that uses polynomial division to detect changes to raw data. |
| Organizationally Unique Identifier (OUI) |
NIC specific | ||||||||||||||||||||||||||||||||||||||||||||||
| Field | Definition |
|---|---|
| Organizationally Unique Identifier (OUI) (24 bit) |
It is assigned by the Institute of Electrical and Electronics Engineers (IEEE) to specific manufacturers or organizations. The OUI uniquely identifies the organization that produced the network interface. |
| NIC specific (24 bit) | This portion ensures that each device produced by the same organization has a unique MAC address. |
7th bit: Globally unique (0) or locally administered (1)
8th bit: Unicast (0) or multicast (1)
Maps network addresses to data link layer addresses / resolves IPv4 addresses to MAC addresses. Entries in the ARP table are time stamped and can time out.
Entries are added by monitoring the traffic and adding source IP and MAC addresses of the incoming packets to the table. If no entry is found inside of the ARP table, then the node launches an ARP discovery process by sending an ARP broadcast request and receiving an ARP reply from the requested MAC addresses’ host. When a node receives a packet with a destination IP address where no cached entry for the MAC address can be found, the encapsulation of the IPv4 packet fails and the packet gets dropped.
IPv6 does not need ARP because it uses the Neighnor Discovery Protocol (NDP).
|
- PC A sends a broadcast: “Who has the IP 10.10.10.30?”
- The ARP Request is flooded
- The PC with the sought IP sends his ARP Reply “I have the IP, here is my MAC Address”. This is sent as a unicast because the Switch already knows PC A.
- Now the PC A knows the MAC address of 10.10.10.30 and can send its Packet.
ARP has no validation if the sender of a frame is correct. ARP spoofing, also called ARP poisoning, refers to the method of inserting the wrong MAC address into ARP requests and responses by the node. An attacker can lead sent frames to the wrong destination and has the ability to read the traffic (MITM attack). Configuring static ARP entries is one way to prevent ARP spoofing.
- All devices connected to the switch ports form a broadcast domain
- All ports are full-duplex
When a switch gets a data packet, and it did not know the DA, it floods the information to all ports but the one where it received the data. (Unicast flooding)
When a switch gets a data packet, and already knows that the DA is on the same port as the SA, it filters the information and does not flood it, because the other switches do not need to know. This reduces traffic.
If the destination MAC address comes from another port within the switch, then the frame is sent to the identified port for transmission.
EtherChannel is a technology used in networking to group several physical Ethernet links into a single logical link. This approach increases bandwidth and provides redundancy.
IEEE specification (802.3ad) open-standard protocol for EtherChannel Configurations. It dynamically adds and manages ports in the EtherChannel.
The hashes created from source or destination IP addresses determine which link in the EtherChannel will carry the traffic.
| Term | Definition |
|---|---|
| src-ip | Use when: Many devices with different IPs send to one device with a single IP address |
| dst-ip | Use when: A device with a single IP sends to many devices with different IP addresses |
LAN: all devices in the same broadcast domain
VLAN: Virtual separation of LAN on a switch
Reasons for using VLANs:
- To reduce CPU overhead on each device by reducing the number of devices that receive each broadcast frame
- To reduce security risks by reducing the number of hosts that receive copies of frames that the switches flood (broadcasts, multicasts, and unknown unicasts)
- To improve security for hosts that send sensitive data by keeping those hosts on a sepa- rate VLAN
- To create more flexible designs that group users by department, or by groups that work together, instead of by physical location
- To solve problems more quickly, because the failure domain for many problems is the same set of devices as those in the same broadcast domain
- To reduce the workload for the Spanning Tree Protocol (STP) by limiting a VLAN to a single access switch
With trunking, only a single cable is needed to carry traffic for all VLANs. VLAN trunking works by applying VLAN tagging, where the sending switch adds an extra header to each frame before sending it across the trunk link. This trunking header contains a VLAN Identifier (VLAN ID), allowing the receiving switch to determine the VLAN to which each frame belongs. Switch ports that are assigned to a single VLAN and carry traffic for only that VLAN are referred to as access ports. Ports that carry traffic for multiple VLANs using VLAN tagging are called trunk ports.
The standard of how to tag an ethernet frame in a trunk is defined in IEEE 802.1Q. 802.1Q inserts an extra 4 byte 802.1Q VLAN header into the original frame’s Ethernet header.
A router can be added to a switch using multiple VLANs. The cable from the switch to the router gets configured as a trunk. The router then can simply perform its usual routing logic between the subnets. This concept is called Router-on-a-Stick.
With the use of a switch with layer 3 capabilities, the need for a separate router is omitted, as the switch brings the ability for routing by itself. Routing can be turned on that switch and packets between the VLANs get routed.
Prevents loops in the network (eg. broadcast).
| Term | Definition |
|---|---|
| Root device | Bridge on the network that serves as a central point in the spanning tree |
| Root port | Port on each device that provides the most efficient path to the device |
| Designated port | Lowest path cost when forwarding packets from that LAN to the spanning-tree root |
| Disabled port | Port is disabled to prevent loops |
| BPDU |
Bridge Protocol Data Unit. Destination address is multicast: 01:80:c2:00:00:00 Types:
|
| CAM table | MAC address table, maps MAC addresses to ports. Entries have an aging limit |
When the bridges in a network are powered up, each bridge functions as the STP root. The bridges send configuration BPDUs and compute the spanning-tree topology.
When a bridge receives a configuration BPDU that contains superior information (lower bridge ID, lower path cost, and so forth), it stores the information for that port. If this BPDU is received on the root port of the bridge, the bridge also forwards it with an updated message to all attached LANs for which it is the designated bridge.
If a bridge receives a configuration BPDU that contains inferior information to that currently stored for that port, it discards the BPDU.
- Lowest root bridge ID (BID) – Determines the root bridge.
- Lowest cost to the root bridge – Favors the upstream switch with the least cost to root
- Lowest sender bridge ID – Serves as a tiebreaker if multiple upstream switches have equal cost to root
-
Lowest sender port ID – Serves as a tiebreaker if a switch has multiple (non-EtherChannel) links to a single upstream switch, where:
- Bridge ID = priority (4 bits) + locally assigned system ID extension (12 bits) + ID [MAC address] (48 bits); the default bridge priority is 32,768, and
- Port ID = priority (4 bits) + ID (Interface number) (12 bits); the default port priority is 128.
- Identify the Root Bridge with the lowest BID (only one per network)
- Identify link costs (per link)
- Select root ports (1 per switch) with the lowest total cost to the Root Bridge
- Select designated ports (1 per link)
- Identify blocked ports (1 per redundant link)
| State | Definition |
|---|---|
| Disabled | Administratively disabled for various reasons. Does not participate in STP/PVST operation. |
| Blocking | After excluding disabled ports, the switch starts all ports in the blocking state. In this state, the port does not accept user frames. It accepts only BPDUs. |
| Listening | The first transitional state after the blocking state, in which the spanning tree determines that the interface should participate in frame forwarding |
| Learning | In this state, the switch builds the CAM table entries. The port accepts user frames but does not forward them. From the incoming frames, it learns the MAC addresses of the connected devices. It saves the learned MAC addresses in the CAM table. |
| Forwarding | Accepts and forwards user frames. |
| Timer | Definition |
|---|---|
| hello interval (2s) | The interval at which a bridge sends out configuration BPDUs. |
| forward delay (15s) | The time a port remains in the Listening and Learning states before transitioning to the Forwarding state. |
| max age (20s) | The maximum age of a received BPDU before it is considered stale. |
- Link goes down
- Switch with changed link will send a BPDU of type Topology Change Notification (TCN) on its root port
- Next switch in the hierarchy forwards the TCN to its root port and sends a configuration BPDU with the Topology Change Acknowledgement (TCA) flag set back to the previous bridge
- As soon as root bridge receives TCN it sends a configuration BPDU with the TCA and Topology Change (TC) flags set
- Root bridge continues to set TC flag on its configuration BPDUs for a duration of Max Age + Forward Delay (35s) and the other bridges forward them
- As soon as a switch receives a BPDU with TC set, it shortens its MAC address aging timer to Forward Delay (15s)
RSTP provides significantly faster spanning tree convergence after a topology change, introducing new convergence behaviors and bridge port roles to accomplish this. While STP can take 30 to 50 seconds to respond to a topology change, RSTP is typically able to respond to changes within 3 * hello times (default: 3 * 2 seconds) or within a few milliseconds of a physical link failure.
Uses different MAC address.
| Term | Definition |
|---|---|
| BSSID | Every AP has a unique BSSID |
| ESSID / SSID | Every WLAN has an ESSID. Isn’t unique. |
Two or more adjacent channels within a given frequency band are combined to increase throughput between two or more wireless devices.
|
In wireless, it is also possible to have collisions, because it is a shared medium.
|
| It is not possible to use CSMA/CD because we do not know if everyone receives everything. If there is a wall between to clients for example, the clients do not know if the other is sending at the same time. |
Function which creates the backoff time for CSMA/CA. CTS, ACK and Block ACK (SIFS) have the highest priority and the shortest backoff time. PIFS have a middle priority and DIFS the lowest.
Listening Stations can mark the medium as busy with the Network Allocation Vector (NAV), while another station is sending.
| <-- 34-2346B --> | ||||||||
| Frame ctrl (2B) | Duration ID (2B) | Addr. 1 (6B) | Addr. 2 (6B) | Addr. 3 (6B) | Seq. ctrl (2B) | Addr. 4 (6B) | Data | CRC (4B) |
| <-- 2B (16b) --> | ||||||||||
| Protocol ver. (2b) | Type (2b) | SubType (4b) | To DS (1b) | From DS (1b) | More Frag (1b) | Retry (1b) | Pwr Mgt (1b) | More Data (1b) | WEP (1b) | Rsvd (1b) |
| Term | Definition |
|---|---|
| To DS | Whether the frame is being sent to the Distribution System |
| From DS | Whether the frame originated from the Distribution System |
Frame types:
| Term | Definition |
|---|---|
| Probe Request | Frame sent by a client to discover available networks by querying nearby APs for their information. |
| Probe Response | Frame sent by an AP in reply to a Probe Request, providing details about the AP, including its network name (SSID) and capabilities. |
| Authentication Request/Response |
Frame used in the initial setup process, where a client requests authentication from the AP before being allowed to access the network. |
| Association Request | Frame sent by a client to a wireless access point (AP) requesting to join a specific network. |
| Association Response | Frame sent by the AP in response to the Association Request, indicating whether the association was successful and providing parameters for the connection. |
| Reassociation Request | Frame sent when a client moves from one AP to another within the same network, requesting to re-establish a connection. |
| Reassociation Response | Frame sent by the new AP in response to the Reassociation Request, confirming the re-establishment of the connection. |
| Timing Advertisement | Frame used in power-saving modes to inform clients about the timing of beacon frames, enabling better synchronization and energy efficiency. |
| Beacon | Periodic frame broadcasted by an AP that provides information about the network, including the SSID, supported data rates, and security protocols. |
| Disassociation | Frame sent by either the client or the AP to terminate an association, indicating that the client is leaving the network or the connection is lost. |
| Deauthentication | Frame used to terminate the authentication between the client and the AP, often when the client disconnects or is forcibly removed from the network. |
|
How does a client connect to an AP?
|
|
Switching to another AP with better signal strength. A client is connected to an AP. If there is an AP that is at least say 10dB better and the signal strength of the current AP is below a limit of say 75dB (handoff threshold), a handover occurs.
Roaming usually takes (too much) time because of the many steps listed above. There are ways to improve roaming, for example with direct handover from AP to AP without re-authentication (802.11r). |
Parameters that determine when a device should switch from one access point to another during movement. These might include:
| Term | Definition |
|---|---|
| Signal Strength Threshold | Sets a minimum signal level below which the device should consider roaming to another AP. |
| Quality of Service (QoS) Metrics | Based on the performance characteristics, like latency or packet loss, thresholds can dictate when to switch. |
Responsibilities
- Representing bits as physical signals (electrical voltage, light pulses, radio waves)
- Defining cables, connectors, modulation methods, and wireless frequencies
- Synchronization of transmitter and receiver
- Data rates and physical medium characteristics
Encoding converts the stream of bits into a format recognizable by the next device in the network path.
|
|
|
|
|
Maps 8-bit words to 10-bit symbols – prevents too many zeros or ones in a row (relevant for NRZ).
| Term | Definition |
|---|---|
| dB | decibel |
| dBm | decibel ratio to 1mW |
| dBi | antenna gain compared to isotropic radiator |
| RSSI | Received signal strength indication |
| SNR | Signal to Noise Ratio |
| Receiver Sensitivity | up to which level signals can be received successfully |
- A value of 3 dB means that the power value of interest is double the reference value
- A value of −3 dB means the power value of interest is half the reference
- A value of 10 dB means that the power value of interest is 10 times the reference value
- A value of −10 dB means the power value of interest is 1/10 of the reference
Altering the carrier signal.
| Single-Mode | Multimode |
|---|---|
| Very small core | Larger core |
| Expensive lasers | Less expensive LEDs |
| Long-distance applications ( more susceptible to chromatic dispersion) | up to 10Gbps over 500 meters |
| LEDs transmit at different angles |
|
- Absorption by the fiber material
- Scattering of the light from the fiber
| Term | Definition |
|---|---|
| Microbends | Caused by small distortions of the fiber in manufacturing |
| Macrobends | Caused by wrapping fiber around a corner with too small a bending radius |
| Back reflections | Caused by reflections at fiber ends, like connectors |
| Fiber splices | Caused by poor alignment or dirt |
| Mechanical connections | Physical gaps between fibers |
| Term | Definition |
|---|---|
| Chromatic Dispersion |
|
| Polarization Mode Dispersion (PMD) |
|
Fixes the dispersion.
|
|
In fiber glass, signals travel about 2/3 of the speed of light (200’000km/s).
The Time a Signal needs is calculated as follows:
Transmission power - Receiver sensitivity
Router> enableRouter# configure terminalRouter(config)#
Router> enableRouter# configure terminalRouter(config)#
Router(config)# interface GigabetEthernet 0/0/1Router(config-if)# ip address 172.16.0.0 255.255.255.252Router(config-if)# no shutdownRouter(config-if)# exit
Router(config)# interface GigabetEthernet 0/0/1Router(config-if)# ip address 172.16.0.0 255.255.255.252Router(config-if)# no shutdownRouter(config-if)# exit
Router(config)# interface GigabetEthernet 0/1/1Router(config-if)# ip address dhcpRouter(config-if)# no shutdownRouter(config-if)# exit
Router(config)# interface GigabetEthernet 0/1/1Router(config-if)# ip address dhcpRouter(config-if)# no shutdownRouter(config-if)# exit
Router(config)# do show ip interface briefRouter# show ip interface briefRouter# show ip interface GigabetEthernet 0/0/1
Router(config)# do show ip interface briefRouter# show ip interface briefRouter# show ip interface GigabetEthernet 0/0/1
Switch(config)# vlan 120Switch(config-if)# name vlan-serverSwitch(config-if)# exit
Switch(config)# vlan 120Switch(config-if)# name vlan-serverSwitch(config-if)# exit
Switch(config)# interface vlan 120Switch(config-if)# ip address 10.120.0.10 255.255.255.0
Switch(config)# interface vlan 120Switch(config-if)# ip address 10.120.0.10 255.255.255.0
Switch(config)# interface GigabitEthernet 0/0/1Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 120Switch(config-if)# exitSwitch(config)# interface GigabitEthernet 0/0/1-5Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 120Switch(config-if)# exit
Switch(config)# interface GigabitEthernet 0/0/1Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 120Switch(config-if)# exitSwitch(config)# interface GigabitEthernet 0/0/1-5Switch(config-if)# switchport mode accessSwitch(config-if)# switchport access vlan 120Switch(config-if)# exit
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport mode trunk
Switch(config)# vtp domain insSwitch(config)# vtp mode server
Switch(config)# vtp domain insSwitch(config)# vtp mode server
Switch(config)# vtp domain insSwitch(config)# vtp mode client
Switch(config)# vtp domain insSwitch(config)# vtp mode client
Switch(config-if)# channel-group 5 mode activeSwitch(config-if)# channel-group 5 mode passive
Switch(config-if)# channel-group 5 mode activeSwitch(config-if)# channel-group 5 mode passive
Switch(config)# port-channel load-balance <strategy>
Switch(config)# port-channel load-balance <strategy>
Switch(config)# spanning-tree vlan 1 priority <priority>
Switch(config)# spanning-tree vlan 1 priority <priority>
Switch(config-if)# spanning-tree cost 100
Switch(config-if)# spanning-tree cost 100
Switch(config-if)# spanning-tree portfast
Switch(config-if)# spanning-tree portfast
Switch# show spanning-treeSwitch# show spanning-tree root
Switch# show spanning-treeSwitch# show spanning-tree root
Router(config-if)# ip route <destination_network_id> <subnet_mask> <next_hop_router> <adminitrative_distance>?Router(config-if)# ip route 10.0.0.0 255.0.0.0 192.168.1.1
Router(config-if)# ip route <destination_network_id> <subnet_mask> <next_hop_router> <adminitrative_distance>?Router(config-if)# ip route 10.0.0.0 255.0.0.0 192.168.1.1
Router(config-if)# ip route <ipv6_prefix> <outgoing_interface> <next-hop> <administrative_distance>?Router(config-if)# ipv6 route 2001:db8:2103:a::/64 GigabitEthernet1/0/1 fe80::ba27:ebff:fea8:3e50
Router(config-if)# ip route <ipv6_prefix> <outgoing_interface> <next-hop> <administrative_distance>?Router(config-if)# ipv6 route 2001:db8:2103:a::/64 GigabitEthernet1/0/1 fe80::ba27:ebff:fea8:3e50
Router(config)# router ospf <process-id>Router(config-if)# ip ospf <process-id> area <area-nr>
Router(config)# router ospf <process-id>Router(config-if)# ip ospf <process-id> area <area-nr>
Router(config)# ipv6 router ospf <process-id>Router(config-if)# ipv6 ospf <process-id> area <area-nr>
Router(config)# ipv6 router ospf <process-id>Router(config-if)# ipv6 ospf <process-id> area <area-nr>
Router# show ip routeRouter# show ip ospf route
Router# show ip routeRouter# show ip ospf route
Router#(config-if) ip dhcp pool DEV network 192.168.1.0 255.255.255.0 default-router 192.168.1.1 dns-server 1.1.1.1 8.8.8.8 lease 5 domain-name enterprise.com
Router#(config-if) ip dhcp pool DEV network 192.168.1.0 255.255.255.0 default-router 192.168.1.1 dns-server 1.1.1.1 8.8.8.8 lease 5 domain-name enterprise.com
Router(config-if)# ip helper-address 176.16.12.10
Router(config-if)# ip helper-address 176.16.12.10
Router(config-if)# ip nat inside
Router(config-if)# ip nat inside
Router(config-if)# ip nat outside
Router(config-if)# ip nat outside
Router(config-if)# access-list 1 permit 192.168.1.0 0.0.0.255
Router(config-if)# access-list 1 permit 192.168.1.0 0.0.0.255
Router(config-if)# ip nat inside source list 1 interface GigabitEthernet0/1 overload
Router(config-if)# ip nat inside source list 1 interface GigabitEthernet0/1 overload
Router(config-if)# ipv6 enable
Router(config-if)# ipv6 enable
Router(config-if)# ipv6 dhcp client pd MY_PREFIXRouter(config-if)# ipv6 address autoconfig default
Router(config-if)# ipv6 dhcp client pd MY_PREFIXRouter(config-if)# ipv6 address autoconfig default
Router# ping <destination-ip> source <interface-name>
Router# ping <destination-ip> source <interface-name>
Router# traceroute <destination-ip> source <interface-name> numeric
Router# traceroute <destination-ip> source <interface-name> numeric