Questions & explanations
1. How does a NETCONF transaction ensure reliable configuration?
NETCONF supports a candidate configuration that can be edited independently. When a controller sends an edit-config with the 'candidate' datastore, the device stores changes in the candidate without applying them. Then the controller sends a 'commit' operation to apply the candidate to the running configuration. If any part of the commit fails, the entire transaction is rolled back to the previous running state. Additionally, NETCONF supports confirmed commit: a rollback timer can be set so if no confirmation is received, the configuration reverts. This prevents partial or broken changes from causing network downtime. Transactions make NETCONF reliable for automated configuration management.
2. How does NETCONF differ from SNMP in network management?
NETCONF (Network Configuration Protocol) is a modern management protocol that uses XML encoding over SSH. It is designed for configuration management, offering operations like get-config, edit-config, and copy-config. SNMP (Simple Network Management Protocol) is older and focused on monitoring with less emphasis on configuration. SNMP uses MIBs (Management Information Bases) and is limited in transaction support. NETCONF supports transactions: if a change fails, the configuration is rolled back. NETCONF also uses YANG data models for structured, validated configuration. SNMP is still widely used for monitoring, but NETCONF is preferred for automated configuration in SDN and DevOps.
3. Suppose you receive the 7-bit Hamming(7,4) codeword '1011010'. Explain how you would check if there is an error and how to fix it if there is one.
First, compute the three parity checks using the received bits. For parity at P1 (position 1), check bits 1,3,5,7: 1+0+0+0=1 (odd, so error; we want even parity). P2 (pos2): bits 2,3,6,7: 0+0+1+0=1 (odd, error). P4 (pos4): bits 4,5,6,7: 1+0+1+0=0 (even, ok). The syndrome (P4,P2,P1) = (0,1,1) = binary 3, meaning bit 3 is wrong. Flip bit 3 (from 0 to 1) to get corrected codeword: '1011010' becomes '1011010'? Wait careful: bit3 is 0, flip to 1 gives '1011010' -> actually positions: 1=1,2=0,3=0->1,4=1,5=0,6=1,7=0 => '1101010'. The data bits are positions 3,5,6,7? In Hamming(7,4), data are bits 3,5,6,7: after correction: bit3=1, bit5=0, bit6=1, bit7=0 => data '1010'.
4. Explain the concept of flow table in OpenFlow.
An OpenFlow switch contains one or more flow tables. Each flow table consists of flow entries, each with match fields, counters, and instructions. Match fields can include ingress port, Ethernet addresses, IP addresses, TCP/UDP ports, etc. When a packet arrives, the switch looks at the first flow table; if a matching entry is found, the associated instructions are executed (e.g., forward to port, modify header, send to controller). If no match, the packet may be dropped or sent to the controller (depending on the table-miss entry). Flow tables allow flexible packet handling, enabling features like load balancing, firewall, and routing under controller control.
5. How does a DiffServ network provide different levels of service using Assured Forwarding?
Assured Forwarding (AF) defines four classes (AF1, AF2, AF3, AF4) each with three drop precedence levels (low, medium, high). A network operator can assign voice to AF4 with low drop precedence, data streaming to AF3 with medium drop precedence, and best effort to default. Routers treat packets within the same class: under congestion, they drop packets with higher drop precedence first. This gives relative assurance: for example, AF4 low drop gets better delivery than AF4 high drop within the same class. Different classes can have different weight in scheduling. AF allows service differentiation without hard guarantees, suitable for many enterprise networks.
6. What is TRILL and how does it differ from spanning tree?
TRILL (Transparent Interconnection of Lots of Links) is a protocol that replaces Spanning Tree Protocol (STP) in data center networks. STP blocks redundant links to prevent loops, wasting bandwidth. TRILL uses routing (IS-IS) to forward frames over multiple paths, allowing all links to be used. It introduces RBridges (Routing Bridges) that encapsulate frames with a TRILL header, including a hop count to prevent loops. Unlike STP, TRILL supports multipath load balancing and faster convergence. TRILL also preserves VLAN and MAC learning. It is designed for large Layer 2 networks in data centers, offering better scalability and bandwidth utilization than STP.
7. Give an example of how VXLAN enables virtual machine mobility across data centers.
Suppose a VM with IP 10.0.1.5 is initially in data center A on host H1. It belongs to VXLAN network VNI 100. The VTEP on H1 has an IP address 192.0.2.1. When the VM moves to data center B on host H2 (VTEP IP 198.51.100.1), the VM keeps its original IP and MAC. The network mapping must be updated so that other hosts know the VM is now behind H2. VXLAN uses a mapping database (e.g., BGP EVPN) to track which MAC addresses are behind which VTEPs. After migration, H1 sends an update that the VM's MAC is now reachable via H2. Traffic from other VMs in VNI 100 is then sent to H2 via VXLAN encapsulation, maintaining Layer 2 connectivity across data centers.
8. What is the difference between DiffServ and IntServ in Quality of Service?
DiffServ (Differentiated Services) classifies traffic into a small number of classes using DSCP (Differentiated Services Code Point) marked in the IP header. Each router applies per-hop behaviors (PHB) like expedited forwarding for low-delay traffic. DiffServ scales well for large networks because it does not maintain per-flow state. IntServ (Integrated Services) provides per-flow guarantees using resource reservation via RSVP (Resource Reservation Protocol). It maintains state for each flow, which does not scale to many flows. DiffServ is simpler and more widely used in the Internet core, while IntServ is used in smaller, controlled environments.
9. What is YANG and how is it used with NETCONF?
YANG (Yet Another Next Generation) is a data modeling language used to describe configuration and state data for network devices. It defines a hierarchical tree of nodes with types, constraints, and default values. NETCONF uses YANG models as the schema for its XML messages. For example, a YANG model for an interface might define 'name', 'ip-address', 'enabled'. When a controller sends a NETCONF edit-config with XML that conforms to the YANG model, the device validates the data. YANG makes network configuration human-readable and machine-verifiable. It is key for automation, as it provides a consistent interface across different vendors.
10. How does RSVP reserve resources for a flow?
RSVP (Resource Reservation Protocol) works by having a sender send PATH messages toward receivers, which describe the traffic characteristics. Each receiver then sends RESV messages back along the same path, requesting a specific bandwidth and delay guarantee. Routers along the path that support RSVP install a reservation state for that flow, allocating resources. If a router cannot allocate the requested resources, it sends an error and the reservation fails. RSVP uses soft state: reservations time out unless refreshed periodically. This ensures that resources are freed if the flow stops or changes. RSVP is an integral part of IntServ.
11. How does PIM-SM differ from PIM-DM?
PIM-SM (Protocol Independent Multicast - Sparse Mode) is designed for situations where few receivers exist. It builds shared trees from a Rendezvous Point (RP) and only sends multicast traffic to branches that explicitly request it. PIM-DM (Dense Mode) is for networks where many receivers exist; it floods multicast traffic everywhere and then prunes branches that have no receivers. PIM-SM is more efficient for wide-area networks because it conserves bandwidth by not flooding. PIM-DM works well in small, densely populated networks. Both are protocol independent because they use the unicast routing table for reverse path forwarding.
12. Compare VXLAN and NVGRE.
Both VXLAN and NVGRE are network virtualization overlays. VXLAN uses UDP encapsulation (port 4789) and a 24-bit VNI. NVGRE uses GRE (Generic Routing Encapsulation) with a 24-bit Tenant Network Identifier (TNI). VXLAN is more widely supported across vendors and has better hardware offload. NVGRE uses GRE, which may have less hardware support. Both allow up to 16 million logical networks. VXLAN uses multicast for flooding unknown unicast, broadcast, and multicast, while NVGRE can use multicast or unicast with a mapping service. VXLAN is the de facto standard in many data centers, while NVGRE is used in some Microsoft environments.