PERSONAL INTERFACE / TORONTO, ON
← MAIN MENUARCHIVE / BLOG
JOURNAL / EXPLORER
← ALL JOURNAL ENTRIES

42 published notes

Section 4 Generalized Forwarding, SDN an MiddleboxesREADING VIEW

JOURNAL / Coursework/COMP 437 Computer Networks/Unit 4 / NOTE

Section 4 Generalized Forwarding, SDN an Middleboxes

Computer Networks study notes · Unit 4

Author
Michel Deosaran
Published
Tags
#computer-networks

Text-to-Speech Q&A Document: Generalized Forwarding, SDN, and Middleboxes

Exam Preparation Companion Topic: Network Layer — Data Plane, Section 4.4–4.5


Q1: What is generalized forwarding?

A: Generalized forwarding is an abstraction that extends traditional destination-based forwarding to allow a router or switch to make forwarding decisions based on a wide variety of packet-header fields, not just the destination IP address. In generalized forwarding, each router contains a flow table that defines the router’s match-plus-action rules. The “match” component specifies patterns of values in packet-header fields, and the “action” component specifies what the router should do with a packet that matches those patterns .

Traditional forwarding uses only the destination IP address to look up an output port. Generalized forwarding, by contrast, can match on link-layer addresses, network-layer addresses, transport-layer port numbers, and even the ingress port on which the packet arrived. This makes it possible for a single device to behave simultaneously as a router, a switch, a firewall, a load balancer, or a network address translator, depending on the flow table entries that have been configured .


Q2: What is the match-plus-action paradigm, and what role does the match-plus-action table play?

A: The match-plus-action paradigm is the fundamental abstraction behind generalized forwarding. In this paradigm, a network device examines specific fields in an arriving packet’s headers. If those fields match a pattern specified in the flow table, the device performs the associated action or actions. The match-plus-action table — also called a flow table in OpenFlow terminology — is the data structure that stores these rules. Each entry in the table consists of three components: a set of header field values to match against, a set of counters that track how many packets and bytes have matched the entry, and a set of actions to execute when a match occurs .

The flow table is essentially an API through which a network device’s behavior can be programmed. A logically centralized controller computes and distributes flow table entries to the devices, enabling network-wide behaviors to be implemented by coordinating the flow tables across multiple switches and routers .


Q3: What fields can be matched in generalized forwarding?

A: In the OpenFlow 1.0 specification, twelve values can be matched. These span three protocol layers, which deliberately defies the traditional layering principle. The matchable fields include :

  • Ingress port: The input port on which the packet was received.
  • Link-layer (Layer 2) fields: Source MAC address, destination MAC address, Ethernet type, VLAN ID, and VLAN priority.
  • Network-layer (Layer 3) fields: IP source address, IP destination address, IP protocol field, IP type of service, and IP DSCP field.
  • Transport-layer (Layer 4) fields: TCP or UDP source port number and destination port number.

More recent versions of OpenFlow have expanded the set of matchable fields to forty-one values . Flow table entries may also include wildcards. For example, an IP address of 128.119.. will match any datagram whose first sixteen bits are 128.119. Each flow table entry also has an associated priority so that when a packet matches multiple entries, the entry with the highest priority determines the action .


Q4: What actions can be performed when a packet matches a flow table entry?

A: The most important possible actions in a match-plus-action table are :

  • Forwarding: An incoming packet may be forwarded to a particular physical output port, broadcast over all ports except the one on which it arrived, or multicast over a selected set of ports.
  • Dropping: A flow table entry with no action indicates that a matched packet should be dropped.
  • Modify-field: The values in ten packet-header fields — all Layer 2, 3, and 4 fields except the IP Protocol field — may be rewritten before the packet is forwarded to the chosen output port.
  • Send to controller: The packet may be encapsulated and sent to a remote controller for further processing. The controller may then install new flow table entries, take some other action, or return the packet to the device for forwarding under updated rules .

If multiple actions are specified in a flow table entry, they are performed in the order listed .


Q5: When should a matched packet be dropped?

A: A matched packet should be dropped when the flow table entry that matches it contains no action, or when the specified action is explicitly to drop the packet. This is a deliberate design choice: a flow table entry with no action indicates that the matched packet is to be discarded . In practice, dropping is used to implement firewall-like behavior. For example, a flow table entry might match all packets with a particular source address and specify the drop action, effectively blocking traffic from that source. Additionally, a packet that matches no flow table entry at all may be dropped by default in some implementations, depending on the configuration of the switch .


Q6: What packet-header fields can be modified before a packet is forwarded, and why is this done?

A: The values in ten packet-header fields may be rewritten before the packet is forwarded to the chosen output port. These include all Layer 2, Layer 3, and Layer 4 fields shown in the OpenFlow match specification except for the IP Protocol field . The modifiable fields include source and destination MAC addresses, VLAN fields, IP source and destination addresses, IP type of service, and TCP or UDP source and destination port numbers.

Header modification is performed for several reasons. It enables network address translation, where a private IP address is rewritten to a public one before the packet leaves a network. It supports load balancing, where a destination address or port might be rewritten to direct traffic to a particular server. It also allows for the implementation of virtual networks, where packet headers are modified to create the illusion of isolated network topologies running over shared physical infrastructure .


Q7: Why are routers considered the workhorses of the network layer?

A: Routers are considered the workhorses of the network layer because they perform the essential function of forwarding datagrams from a router’s input link to the appropriate output link. Every packet that traverses the Internet passes through multiple routers, and each router must make a forwarding decision based on the packet’s destination address and its own forwarding table. This is the core function of the network layer’s data plane. Additionally, routers run routing protocols that compute the forwarding tables, maintain routing state, and adapt to topology changes. The combination of high-speed packet forwarding and participation in routing protocols makes routers the indispensable infrastructure of the Internet’s network layer .


Q8: Which network devices are called middleboxes, and what roles do they play?

A: According to RFC 3234, a middlebox is “any intermediary box performing functions apart from normal, standard functions of an IP router on the data path between a source host and destination host” . Middleboxes are pervasive in modern networks — in a typical enterprise network, their number is roughly equal to the number of routers .

Middleboxes include devices such as firewalls, intrusion detection systems, intrusion prevention systems, deep packet inspection systems, web proxies, caches, WAN accelerators, protocol accelerators, and load balancers. Each plays a distinct role. Firewalls control access by permitting or denying traffic based on header fields. Intrusion detection systems monitor traffic for malicious patterns. Web proxies and caches store frequently requested content to reduce bandwidth consumption and improve response times. Load balancers distribute incoming requests across multiple servers to prevent any single server from becoming overwhelmed .


Q9: What services are performed by network middleboxes?

A: Network middleboxes perform a wide range of services that can be broadly categorized into two groups: those that enhance security and those that enhance performance .

Security-related services include firewalling, which filters traffic based on header fields and connection state; intrusion detection and prevention, which examine packet payloads for known attack signatures or anomalous behavior; and deep packet inspection, which analyzes the contents of packets beyond their headers.

Performance-related services include caching, which stores copies of frequently accessed content closer to users; load balancing, which distributes traffic across multiple servers; WAN acceleration, which optimizes protocols to improve throughput over high-latency links; and protocol acceleration, which may involve compressing or reshaping traffic to improve performance. Additionally, middleboxes may perform network address translation, which conserves public IP addresses by allowing multiple hosts to share a single public address .


Q10: What is network function virtualization?

A: Network function virtualization, or NFV, is a technology that implements network functions based on virtualization technology and standard commercial servers, switches, and storage, rather than relying on dedicated proprietary hardware . NFV replaces traditional middleboxes — which are typically purpose-built appliances — with software-based virtual network functions running on commodity hardware.

The motivation for NFV is to reduce the construction and operational costs for network service providers, improve the flexibility and scalability of network services, and accelerate the development and deployment of new network functions . In an NFV environment, a single physical server can host multiple virtual network functions, each isolated from the others in its own virtual machine. This approach also enables portability, allowing virtual network functions to be loaded, executed, and moved across different but standard servers in multi-vendor environments .


Q11: What are the three architectural principles of the Internet?

A: The Internet’s architectural principles can be summarized in three key ideas. First is the network-of-networks principle: the Internet is designed to interconnect many existing, established networks rather than replace them. Each network functions as an autonomous system that decides its own internal organization and its rules for connecting to other autonomous systems. The internal workings of each network are largely hidden from the inter-domain routing protocols that move traffic between networks .

Second is packet switching: traffic is segmented into packets, which are individually forwarded toward their destination by routers along the path. Unlike circuit switching, where an end-to-end path must be signaled and resources reserved before communication begins, packet switching reduces signaling overhead, avoids per-flow state in the network, and efficiently shares network capacity under rapidly varying loads .

Third is the narrow waist or hourglass architecture: the Internet protocol stack is illustrated as an hourglass because the IP layer is deliberately narrow, offering minimal functionality. This narrowness is a strength: by assuming only the least common network functionality, IP maximizes the number of usable underlying networks and maximizes interoperability among them .


Q12: Why is the Internet protocol stack illustrated as a narrow waist?

A: The Internet protocol stack is illustrated as a narrow waist — or hourglass — because the IP layer at the center is deliberately minimal and simple, while the layers above and below it are wide and diverse. The narrow waist exists for three reasons :

First, a single internet protocol maximizes interoperability by minimizing the number of service interfaces that must be implemented. If every network technology had its own internet protocol, interoperability would be impossible. Second, a narrow protocol assumes the least common network functionality, which allows IP to run over a wide range of underlying networks — from Ethernet to Wi-Fi to fiber to satellite — without modification. Third, the narrow waist isolates end-to-end protocols from network details, so that transport-layer protocols like TCP and UDP do not need to know whether they are running over copper or fiber or radio.

The hourglass model has proven extraordinarily successful, but it is also subject to pressure. Middleboxes, network address translators, and protocol helpers can be seen as attempts to add functionality that the narrow waist deliberately omits, sometimes at the cost of breaking the end-to-end principle and reducing predictability .


Q13: How does OpenFlow implement the match-plus-action paradigm?

A: OpenFlow is a protocol and standard that implements the match-plus-action paradigm in real network devices. In an OpenFlow-enabled switch or router, each entry in the flow table includes a set of header field values to match, a set of counters that track matched packets and bytes, and a set of actions to take when a match occurs .

The flow table is the abstraction through which an individual packet switch’s behavior can be programmed. A logically centralized OpenFlow controller computes and distributes flow table entries to the switches it manages, enabling network-wide behaviors such as routing, layer-2 switching, firewalling, load balancing, and virtual networks to be implemented by appropriately configuring the flow tables across a collection of switches . Because hardware-based matching is most rapidly performed in TCAM memory, OpenFlow flow tables can support more than a million destination address entries in high-performance implementations .


Q14: How does generalized forwarding differ from destination-based forwarding?

A: Destination-based forwarding is a specific, restricted instance of generalized forwarding. In destination-based forwarding, the router matches only the destination IP address of an arriving packet against its forwarding table and forwards the packet to the output port associated with the longest matching prefix. The action is always the same: forward the packet out the specified port.

Generalized forwarding, by contrast, can match on many header fields simultaneously — ingress port, MAC addresses, IP source and destination addresses, IP protocol, TCP or UDP port numbers, and more. The actions available are also richer: forward, drop, modify fields, send to controller, or broadcast/multicast. This flexibility allows a single general-purpose forwarding device to implement functions that previously required multiple dedicated middleboxes. Destination-based forwarding can be expressed as a special case of generalized forwarding where the match is solely on destination IP address and the action is solely to forward .


Q15: What is the relationship between SDN and generalized forwarding?

A: Software-Defined Networking, or SDN, is an architecture that separates the network’s control plane from its data plane. In an SDN architecture, a logically centralized controller computes and distributes forwarding rules to the data-plane devices. Generalized forwarding is the data-plane mechanism that makes SDN possible. The match-plus-action flow tables in each device are the interface through which the SDN controller programs the network’s behavior .

In a traditional network, each router runs its own routing protocols and makes independent forwarding decisions. In an SDN-enabled network, the controller has a network-wide view and can compute flow table entries that implement complex policies — traffic engineering, access control, load balancing, virtual network isolation — across all the devices it manages. The controller communicates with the switches through a protocol like OpenFlow, installing flow table entries that realize the desired network-wide behavior .

INTERFACE CONFIGURATION

Settings

Make yourself comfortable.

Sound is off by default. Motion follows your device preference until you change it.

TORONTO NIGHT PHOTOGRAPHYMike Swigunski ↗alex° ↗Unsplash license ↗