Octet

Network security

0 of 37 nailed

Core16

  1. What is the difference between standard, extended and named ACLs?

    Say this first

    A standard ACL matches only the source IP address. An extended ACL matches the protocol, source and destination addresses, source and destination ports, and extras like TCP flags, ICMP type and DSCP. A named ACL is not a third kind: it is a standard or extended ACL with a name instead of a number, and it lets me insert and delete single lines by sequence number. On IOS the numbered ranges are 1 to 99 and 1300 to 1999 for standard, 100 to 199 and 2000 to 2699 for extended.

    Go deeper

    Numbering on IOS

    TypeNumbersMatches on
    Standard IPv41 to 99, 1300 to 1999source address only
    Extended IPv4100 to 199, 2000 to 2699protocol, source, destination, ports, flags
    Namedany name, standard or extended keywordsame as the type you pick

    The same intent in three styles

    Cisco IOS
    ! Standard, numbered: only the source can be matched
    access-list 10 permit 10.1.20.0 0.0.0.255
    !
    ! Extended, numbered
    access-list 110 permit tcp 10.1.20.0 0.0.0.255 host 10.2.50.10 eq 443
    !
    ! Extended, named, with sequence numbers
    ip access-list extended WEB-TO-SRV
     10 permit tcp 10.1.20.0 0.0.0.255 host 10.2.50.10 eq 443
     20 deny   ip 10.1.20.0 0.0.0.255 10.2.50.0 0.0.0.255 log
     30 permit ip any any
    !
    interface GigabitEthernet0/0/1
     ip access-group WEB-TO-SRV in

    Interface filters are applied with ip access-group NAME in|out. On VTY lines the command is access-class NAME in, usually with a standard ACL because only the source matters there.

    ACLs are also a matching tool

    The same ACL syntax selects traffic for NAT, route maps and PBR, QoS class maps, CoPP, crypto maps and debug filters. In those uses permit means "this matches" and deny means "this does not match", nothing is dropped by the ACL itself.

    Traps

    • Saying a standard ACL can match a destination. It sees only the source address.
    • Typing no access-list 110 ... in global config to remove one line. It removes the entire numbered list.
    How did you do?Book 8.5 Example SystemsOwn page
  2. Where do you place a standard ACL and where do you place an extended ACL, and why?

    Say this first

    Extended ACLs go close to the source. They can match the exact flow, so unwanted traffic is dropped at the first hop, before it uses WAN bandwidth, and nothing else is caught. Standard ACLs go close to the destination. They can only match the source address, so near the source they would block that host or subnet from everything behind the interface, not just the one destination I meant.

    Go deeper

    Worked example

    Branch router R1 has users on 10.1.20.0/24. HQ router R2 has servers on 10.2.50.0/24 and printers on 10.2.60.0/24. Goal: users must not reach the servers, but must still reach the printers and the internet.

    • Standard ACL on R1 inbound from the users: deny 10.1.20.0 0.0.0.255 blocks the users from the printers and the internet too. Wrong place.
    • Standard ACL on R2 outbound toward the server LAN: only traffic heading to the servers is checked. Correct, but the denied packets already crossed the WAN.
    • Extended ACL on R1 inbound from the users: deny ip 10.1.20.0 0.0.0.255 10.2.50.0 0.0.0.255 then permit ip any any. Dropped at the first router, nothing else affected. Best.

    The rule behind the rule

    Filter as close to the source as the match criteria allow without collateral damage. Two more factors decide placement in practice:

    • Administrative control. You can only filter on devices you own, which is why internet edge ACLs filter traffic arriving from sources you do not control.
    • Direction. Inbound ACLs drop packets before the routing lookup. Outbound ACLs catch traffic arriving from every other interface toward one segment, but they do not filter traffic the router generates itself.

    Traps

    • Reciting "standard near destination, extended near source" without the reason. The reason is what the interviewer wants.
    How did you do?Book 8.5 Example SystemsOwn page
  3. How do wildcard masks work? Give me the wildcard for a few subnets.

    Say this first

    A wildcard mask tells the ACL which bits of the address to check. A 0 bit means "must match", a 1 bit means "ignore". For a normal subnet it is the inverse of the subnet mask, so I subtract each mask octet from 255. A /24 is 0.0.0.255, a /27 is 0.0.0.31, a /20 is 0.0.15.255. host 10.1.1.5 means wildcard 0.0.0.0 and any means 0.0.0.0 255.255.255.255.

    Go deeper

    Worked examples

    MatchSubnet maskWildcardACL entry
    192.168.10.0/24255.255.255.00.0.0.255192.168.10.0 0.0.0.255
    10.1.4.0/22 (10.1.4.0 to 10.1.7.255)255.255.252.00.0.3.25510.1.4.0 0.0.3.255
    172.16.16.0/20255.255.240.00.0.15.255172.16.16.0 0.0.15.255
    10.10.10.32/27 (.32 to .63)255.255.255.2240.0.0.3110.10.10.32 0.0.0.31
    10.10.10.4/30255.255.255.2520.0.0.310.10.10.4 0.0.0.3
    one host 10.1.1.5255.255.255.2550.0.0.0host 10.1.1.5

    Turning a range into a wildcard

    "Match 10.1.4.0 to 10.1.7.255." Third octet 4 is 00000100, 7 is 00000111. Only the last two bits change, so the third octet of the wildcard is 00000011 = 3: 10.1.4.0 0.0.3.255.

    The range has to start on a boundary. 10.1.5.0 to 10.1.8.255 is not one block, so it takes three lines:

    Cisco IOS
    ip access-list extended RANGE-5-TO-8
     10 permit ip 10.1.5.0 0.0.0.255 any
     20 permit ip 10.1.6.0 0.0.1.255 any
     30 permit ip 10.1.8.0 0.0.0.255 any

    Where wildcards are used

    IOS ACLs, and OSPF and EIGRP network statements. Prefix lists use prefix lengths instead, Cisco ASA ACLs use normal subnet masks, and Junos firewall filters use prefix notation.

    Traps

    • Writing a subnet mask where a wildcard belongs. permit 10.1.1.0 255.255.255.0 ignores the first three octets and checks only that the last one is 0, so it matches every address ending in .0.
    How did you do?Book 3.3 Internet (IP)Own page
  4. What is the implicit deny, and how do you see what it is dropping?

    Say this first

    Every ACL ends with an invisible line that denies everything: deny ip any any in an extended ACL, deny any in a standard one. A packet that matches no line is dropped. That line has no hit counter, so to see what it drops I add an explicit deny ip any any log as the last line. It matches the same traffic, but now I get a counter and syslog messages.

    Go deeper

    Consequences people forget

    • An ACL with only deny lines blocks everything. It needs permits, often a final permit ip any any.
    • An inbound ACL on a routed interface also sees control traffic aimed at the router: OSPF (IP protocol 89), BGP (TCP 179), HSRP, DHCP. Forget to permit them and the adjacency drops when the dead timer expires.
    • On IOS, applying an ACL name that does not exist yet filters nothing. Deleting an ACL that is still applied also leaves the interface permitting everything.
    • Outbound ACLs do not filter packets the router itself originates.

    Seeing the drops

    Cisco IOS
    ip access-list extended WAN-IN
     10 permit ospf host 10.0.12.2 any
     20 permit tcp 10.1.0.0 0.0.255.255 10.2.50.0 0.0.0.255 eq 443
     999 deny ip any any log
    Output
    R2# show ip access-lists WAN-IN
    Extended IP access list WAN-IN
        10 permit ospf host 10.0.12.2 any (1204 matches)
        20 permit tcp 10.1.0.0 0.0.255.255 10.2.50.0 0.0.0.255 eq 443 (88512 matches)
        999 deny ip any any log (57 matches)
    
    %SEC-6-IPACCESSLOGP: list WAN-IN denied tcp 10.1.20.30(50522) -> 10.2.50.10(22), 1 packet

    IOS logs the first match right away and then summarizes repeat matches periodically (every five minutes by default). Logged packets are handled by the CPU, so log on a line with heavy traffic costs CPU. log-input also records the input interface and source MAC.

    Traps

    • Putting the explicit deny ip any any log anywhere but last. Every line below it becomes dead.
    • Leaving log on a high-volume permit line and then wondering why the CPU climbs.
    How did you do?Book 8.5 Example SystemsOwn page
  5. What is the difference between a stateful and a stateless firewall?

    Say this first

    A stateless filter, like a router ACL, judges every packet on its own against the rules, so I must write rules for both directions, including the return traffic. A stateful firewall keeps a connection table: when an allowed flow starts, it records the session (addresses, ports, protocol, TCP state) and automatically allows the replies that belong to it, while unsolicited packets from outside are dropped. Stateful goes at trust boundaries. Stateless ACLs are cheap and fast, good for infrastructure protection and edge cleanup.

    Go deeper

    Stateless return traffic is clumsy

    Cisco IOS
    ip access-list extended INTERNET-IN
     10 permit tcp any 10.1.0.0 0.0.255.255 established
     20 permit udp any eq domain 10.1.0.0 0.0.255.255

    established only checks for the ACK or RST flag in each packet, so a crafted ACK passes. Line 20 has to open every UDP port on every inside host to anything sourced from port 53. A stateful firewall instead allows only the reply to the exact DNS query that went out.

    What a stateful firewall tracks and checks

    • The 5-tuple, state and idle timer for each session. TCP sessions also get sanity checks: a session must start with a SYN, and segments must fit the expected sequence window.
    • Application inspection for protocols that open extra connections (FTP data channels, SIP media): the firewall reads the control channel and opens only the needed pinhole.
    • Idle timeouts, typically long for TCP and short for UDP and ICMP. Values are vendor specific.

    Same split in the cloud

    AWS security groups are stateful, AWS network ACLs are stateless, and the classic interview follow-up is that a NACL needs an outbound rule for the ephemeral return ports.

    Traps

    • Saying the established keyword makes an ACL stateful. It only looks at flags in each packet.
    How did you do?Book 8.5 Example SystemsOwn page
  6. What is AAA, and how do you turn it on for device administration on a Cisco router?

    Say this first

    Authentication answers who you are, authorization decides what you may do, and accounting records what you did and when. On IOS I enable it with aaa new-model, define the servers and a server group, then write method lists that say which group to ask first and what to fall back to, usually a local break-glass user. Central AAA gives every admin a personal login, instant revocation when someone leaves, and an audit trail of commands instead of a shared enable password.

    Go deeper

    Configuration with TACACS+

    Cisco IOS
    username breakglass privilege 15 algorithm-type scrypt secret Br3akGlass2026
    !
    aaa new-model
    !
    tacacs server ISE1
     address ipv4 10.10.50.11
     key Tac4csKey2026
    tacacs server ISE2
     address ipv4 10.10.50.12
     key Tac4csKey2026
    !
    aaa group server tacacs+ TAC-SERVERS
     server name ISE1
     server name ISE2
    !
    ip tacacs source-interface Loopback0
    !
    aaa authentication login default group TAC-SERVERS local
    aaa authorization exec default group TAC-SERVERS local if-authenticated
    aaa authorization commands 15 default group TAC-SERVERS local if-authenticated
    aaa accounting exec default start-stop group TAC-SERVERS
    aaa accounting commands 15 default start-stop group TAC-SERVERS

    The local user is created first, so the device is never left with AAA on and no way in.

    How method lists work

    • default applies to every line unless a line names its own list with login authentication NAME.
    • Methods are tried left to right. The next method is used only when the current one gives no answer (server down or unreachable). A reject is final.
    • exec authorization decides whether you get a shell and at what privilege level. commands 15 sends every level 15 command to the server for a yes or no.
    • Accounting start-stop sends a record when a session or command starts and when it ends.

    Why a source interface

    The server identifies network devices by IP. Pinning the source to a loopback means the request always comes from the address the server knows, whichever interface the packet leaves on.

    Traps

    • Typing aaa new-model on a remote device before creating a local user and method lists. New sessions may have no working login method.
    • Saying the router falls back to local when the server rejects the password. It only falls back when the server does not answer.
    How did you do?Book 8.4 Authentication ProtocolsOwn page
  7. RADIUS or TACACS+: what is the difference, and when do you use each?

    Say this first

    RADIUS runs over UDP 1812 for authentication and 1813 for accounting (older devices use 1645 and 1646), combines authentication and authorization in one reply, and hides only the password attribute. TACACS+ runs over TCP 49, encrypts the whole packet body, and keeps authentication, authorization and accounting as separate exchanges, which is what makes per-command authorization possible. I use RADIUS for network access (802.1X, MAB, VPN, Wi-Fi) and TACACS+ for engineers logging in to network devices.

    Go deeper

    Side by side

    RADIUSTACACS+
    TransportUDP 1812 auth, 1813 accountingTCP 49
    What is protectedonly the User-Password attributethe whole body (header in clear)
    AAA structureauthentication and authorization in one Access-Acceptthree separate exchanges
    Per-command authorizationnoyes
    StandardIETF, RFC 2865 and RFC 2866Cisco origin, documented in RFC 8907
    Extensionsvendor-specific attributes (attribute 26)attribute-value pairs
    Typical usenetwork access: 802.1X, MAB, VPN, wirelessdevice administration

    RADIUS message flow

    Access-Request, then any number of Access-Challenge and Access-Request rounds (EAP runs here), then Access-Accept or Access-Reject. The Accept can carry policy: a VLAN, a downloadable ACL, a session timeout, a security group tag. Accounting-Request start, interim and stop records go to port 1813.

    Why TACACS+ for administrators

    Each command can be authorized and logged on its own, and the command text is encrypted on the wire. TCP also tells the device at once when a server is down, instead of waiting for UDP timeouts and retries.

    Traps

    • Saying TACACS+ is Cisco only. Juniper, Arista, Palo Alto and Fortinet all support it.
    • Swapping which protocol encrypts what. RADIUS hides the password, TACACS+ encrypts the body.
    How did you do?Book 8.4 Authentication ProtocolsOwn page
  8. Walk me through 802.1X. What are the three roles, and what happens when a laptop plugs in?

    Say this first

    The supplicant is the client, the 802.1X software on the laptop. The authenticator is the switch or wireless controller. The authentication server is a RADIUS server such as Cisco ISE, Aruba ClearPass, FreeRADIUS or Microsoft NPS. The supplicant speaks EAP over LAN (EAPOL) to the switch, the switch carries the EAP messages inside RADIUS to the server, and until the server sends Access-Accept the port passes only EAPOL. After the accept the port opens, possibly with a VLAN or ACL the server chose.

    Go deeper

    Step by step on a wired port

    1. Link comes up. The port is unauthorized: only EAPOL (EtherType 0x888E, sent to 01:80:C2:00:00:03), plus link protocols like CDP, LLDP and STP, are allowed.
    2. The switch sends EAP-Request/Identity, or the client starts with EAPOL-Start. Cisco switches resend the request every 30 seconds by default (dot1x timeout tx-period).
    3. The client answers with EAP-Response/Identity. In tunneled methods this outer identity can be anonymous.
    4. The switch builds a RADIUS Access-Request with the EAP message plus its own details: NAS IP, port, and the client MAC in Calling-Station-Id.
    5. The client and server run the EAP method (for example a TLS handshake for EAP-TLS) through several Access-Challenge rounds. The switch only relays and never sees the credentials.
    6. The server sends Access-Accept with optional policy: VLAN (Tunnel-Private-Group-ID with Tunnel-Type VLAN and Tunnel-Medium-Type 802), a downloadable ACL, a security group tag, a reauthentication timer. The switch sends EAP-Success to the client.
    7. The port is authorized for that MAC and accounting starts.

    Minimum switch configuration

    Cisco IOS
    aaa new-model
    aaa authentication dot1x default group ISE-RADIUS
    aaa authorization network default group ISE-RADIUS
    dot1x system-auth-control
    !
    interface GigabitEthernet1/0/10
     switchport mode access
     authentication port-control auto
     dot1x pae authenticator

    aaa authorization network is what lets the switch apply a VLAN or ACL from the server.

    Traps

    • Saying the switch checks the user's password. It relays EAP and never sees the credentials in tunneled methods.
    • Forgetting dot1x system-auth-control. Without it the port commands do nothing.
    How did you do?Book 8.4 Authentication ProtocolsOwn page
  9. What does port security do, and what are its three violation modes?

    Say this first

    Port security limits how many, and optionally which, source MAC addresses an access port accepts. The default maximum is one MAC and the default violation mode is shutdown. Protect silently drops frames from the extra MACs. Restrict drops them, increments the violation counter and sends a syslog message and SNMP trap. Shutdown puts the port into err-disabled, which stops all traffic until the port is recovered.

    Go deeper

    Configuration

    Cisco IOS
    interface GigabitEthernet1/0/5
     switchport mode access
     switchport access vlan 10
     switchport port-security maximum 2
     switchport port-security mac-address sticky
     switchport port-security violation restrict
     switchport port-security

    The port must be a static access or trunk port. On a port left in a dynamic DTP mode the command is rejected. Sticky learning writes learned MACs into the running config, so save it to keep them.

    The modes

    ModeDrops the frameSyslog and SNMPViolation counterPort
    protectyesnonostays up
    restrictyesyesyesstays up
    shutdown (default)yesyesyeserr-disabled
    shutdown vlanyesyesyesonly the offending VLAN disabled
    Output
    %PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 0050.5689.0bad on port GigabitEthernet1/0/5.
    Output
    ASW1# show port-security interface GigabitEthernet1/0/5
    Port Security              : Enabled
    Port Status                : Secure-up
    Violation Mode             : Restrict
    Aging Time                 : 0 mins
    Aging Type                 : Absolute
    SecureStatic Address Aging : Disabled
    Maximum MAC Addresses      : 2
    Total MAC Addresses        : 2
    Configured MAC Addresses   : 0
    Sticky MAC Addresses       : 2
    Last Source Address:Vlan   : 0050.5689.0bad:10
    Security Violation Count   : 3

    Recovering from shutdown

    shutdown then no shutdown on the port, or automatic recovery with errdisable recovery cause psecure-violation (default interval 300 seconds).

    Traps

    • Mixing up protect and restrict. Restrict logs and counts, protect is silent.
    • Setting a maximum of 1 on a port with an IP phone and a PC behind it.
    How did you do?Book 3.2 Switched EthernetOwn page
  10. What is a MAC flooding attack, and how do you stop it?

    Say this first

    A switch learns source MACs into its MAC address table, which has a fixed size. The attacker sends a flood of frames with random source MACs until the table is full. New legitimate addresses can no longer be learned, so frames to them are unknown unicast and get flooded out of every port in the VLAN, where the attacker can capture them. The switch behaves like a hub for that traffic. Port security with a small MAC maximum stops it at the edge, and 802.1X keeps unknown devices off the port.

    Go deeper

    Mechanism in detail

    • The table is shared by all VLANs on the switch, so once it is full, learning stops everywhere and unknown unicast flooding rises in every VLAN. The attacker sees only the floods in its own VLAN.
    • Existing entries age out (300 seconds by default on Cisco) and cannot be relearned while the table stays full, so more and more traffic gets flooded.
    • The switch does not crash. It keeps forwarding, just like a hub for anything it cannot learn.

    Mitigation

    Cisco IOS
    interface range GigabitEthernet1/0/1 - 46
     switchport mode access
     switchport port-security maximum 3
     switchport port-security violation restrict
     switchport port-security

    Also 802.1X so only authenticated devices get a port, and MAC table monitoring.

    How you spot it

    show mac address-table count shows the table near its platform limit, and show mac address-table interface Gi1/0/7 shows thousands of addresses on one access port where you expect one or two. With port security on, the violation log names the port directly.

    Traps

    • Saying the switch crashes or fails closed. It fails open and floods.
    How did you do?Book 3.2 Switched EthernetOwn page
  11. How does ARP spoofing work, and what are the defenses?

    Say this first

    ARP has no authentication, and hosts accept ARP replies they never asked for. The attacker sends forged replies, often gratuitous ARPs, telling victims "the gateway's IP is at my MAC" and telling the gateway "the victim's IP is at my MAC". Both caches are poisoned, so traffic flows through the attacker, who can read or change it (man in the middle) or drop it (denial of service). The switch defense is Dynamic ARP Inspection backed by DHCP snooping, which drops ARPs whose IP and MAC pair does not match the binding table. Encryption such as TLS, SSH and IPsec limits what a man in the middle can read.

    Go deeper

    What it looks like

    • On a victim, arp -a shows the gateway 10.10.10.1 mapped to a workstation's MAC, often the same MAC as another IP in the table.
    • Users see certificate warnings when the attacker tries to intercept TLS.
    • DAI, if enabled, logs %SW_DAI-4-DHCP_SNOOPING_DENY with the attacker's MAC and the claimed IP.

    Defenses, in order of value

    1. Dynamic ARP Inspection with DHCP snooping on access VLANs.
    2. 802.1X so only known devices get a port at all.
    3. Port isolation or private VLANs where hosts never need to talk to each other.
    4. Static ARP entries for a few critical devices. Does not scale.
    5. Encryption everywhere, so interception gains little.
    6. Detection: tools that alert on IP to MAC changes, and IDS signatures for gratuitous ARP storms.

    Traps

    • Saying port security stops ARP spoofing. The attacker uses its own real MAC; only the ARP contents lie.
    How did you do?Book 3.3 Internet (IP)Own page
  12. What makes a next-generation firewall different from a traditional stateful firewall?

    Say this first

    A traditional stateful firewall decides on addresses, ports and session state. A next-generation firewall adds identity and content. It identifies the application from the traffic itself, whatever port it uses, maps IP addresses to users and groups from the directory, and runs intrusion prevention, URL category filtering and malware inspection in the same pass. It can also decrypt TLS to look inside. A rule can then say "finance may use this SaaS application but not upload files to it" instead of "allow TCP 443".

    Go deeper

    Features and typical names

    FeatureWhat it doesExamples
    Application identificationnames the app from payload and behavior, not portPalo Alto App-ID, FortiGate application control
    User identitymaps IPs to users and groupsPAN-OS User-ID, Fortinet FSSO, Cisco ISE integration
    Intrusion preventionsignature and protocol-anomaly blockingbuilt into all major NGFWs
    URL filteringallow or block by web category and reputationPAN-OS URL filtering, FortiGuard web filter
    TLS decryptionforward proxy for outbound, inbound inspection for your serversall major NGFWs
    File and malware analysisblocks file types, sends unknown files to a sandboxWildFire, FortiSandbox
    DNS security and threat feedsblocks known bad domains and IPs, sinkholesvendor clouds, external feeds

    A rule in PAN-OS terms

    Output
    set rulebase security rules Web-Out from trust to untrust source 10.10.0.0/16 destination any application [ ssl web-browsing ] service application-default action allow

    application-default means each app is allowed only on its standard ports, so SSH tunnelled over 443 is not allowed by this rule.

    TLS decryption limits

    Forward proxy decryption re-signs server certificates with an internal CA that clients must trust. Applications with certificate pinning or mutual TLS break, and many companies exclude health, finance and privacy categories for legal reasons. With TLS 1.3 and forward secrecy, passive decryption with a server's private key no longer works; the firewall must sit inline as a proxy.

    Traps

    • Writing NGFW rules as "allow TCP 443" and ignoring the application, which throws away the main feature.
    How did you do?Book 8.5 Example SystemsOwn page
  13. What is the difference between an IDS and an IPS?

    Say this first

    An IDS watches a copy of the traffic, from a SPAN port or a network TAP, and raises alerts. It is out of band, adds no latency, and cannot stop the packet that triggered the alert. An IPS sits inline, so every packet passes through it and it can drop, reset or rate-limit malicious traffic before it arrives. The price is latency, a new failure point (so you choose fail-open or fail-closed), and the fact that a false positive blocks real users instead of creating a ticket.

    Go deeper

    Detection methods

    • Signature: known patterns of exploits and malware. Precise for known threats, blind to new ones.
    • Anomaly or behavior: deviation from a learned baseline. Finds new things, more false positives.
    • Protocol analysis: traffic that breaks the protocol's rules.
    • Reputation: known bad IPs, domains and certificates.

    Deployment practice

    • Start an IPS in detect-only mode, tune out the false positives for your environment, then block on high-confidence signatures first.
    • Most IPS today lives inside the NGFW. Standalone sensors such as Snort, Suricata (both can run as IDS or IPS) and Zeek (network monitoring) are common for visibility.
    • Encrypted traffic hides payloads. Inspect after TLS decryption, or rely on metadata such as TLS fingerprints, certificates and flow behavior.
    • Host-based IDS and endpoint detection see what the network cannot, inside encrypted sessions.

    Traps

    • Confusing false positives (good traffic flagged) with false negatives (attacks missed).
    How did you do?Book 8.5 Example SystemsOwn page
  14. What is a DMZ, and how would you design one for a public web application?

    Say this first

    A DMZ is a separate network segment for servers that must be reachable from the internet, so that compromising one of them does not put the attacker on the internal network. Internet users can reach only the published services in the DMZ, for example TCP 443 to a reverse proxy. DMZ hosts can reach the inside only on specific ports to specific servers, such as the application tier to the database port, and the inside never trusts the DMZ by default. It is built with one firewall and three legs, or with two firewalls back to back.

    Go deeper

    Rule pattern

    FromToAllowed
    InternetDMZonly published services: TCP 443 to the reverse proxy
    DMZInsideonly named flows: app servers to the database port, nothing else
    InsideDMZadministration from a jump host on the management network
    DMZInternetdeny by default; updates through a proxy or named repositories
    AnythingFirewall itselfmanagement only from the management network

    Single firewall or two

    • Three-legged: one firewall with inside, outside and DMZ interfaces. Cheaper and simpler, but one device and one policy hold everything.
    • Back to back: an outer firewall between internet and DMZ, an inner firewall between DMZ and inside. Two layers to break through, sometimes from two vendors so one vulnerability does not open both. More cost and more rules to keep consistent.

    Details that separate good from average

    • Separate DMZ segments per service type (web, mail, partner), so one breach does not reach the others.
    • Private VLANs or host firewalls inside a DMZ, because web servers rarely need to talk to each other.
    • Keep application and data tiers on the inside or in their own zones; only the reverse proxy or load balancer sits in the DMZ.
    • A WAF or CDN in front of public web apps.
    • Logs from DMZ hosts and from the firewall go to a SIEM, since the DMZ is where attacks start. In the cloud the same idea is a public subnet holding only the load balancer, with the application in private subnets.

    Traps

    • Allowing broad DMZ to inside access "because the application needs it". That defeats the DMZ.
    How did you do?Book 8.5 Example SystemsOwn page
  15. What does defense in depth mean in a network?

    Say this first

    Layered controls, so that no single failure exposes the business. Each layer assumes the one before it can fail. In a network that means filtering and an NGFW at the edge, segmentation inside (VLANs, VRFs, internal firewalls), access control at the port with 802.1X, first hop protections like DHCP snooping and DAI, hardened network devices, endpoint protection, encryption in transit, and monitoring good enough to notice an attacker who got past all of it.

    Go deeper

    Walk an attack through the layers

    A user receives a phishing email.

    1. The mail filter catches most of these.
    2. The user clicks anyway. Endpoint protection blocks the payload, or not.
    3. The malware calls home. DNS security and URL filtering on the NGFW block the domain, or not.
    4. The attacker tries to move sideways. Segmentation means the user VLAN can reach only the applications it needs, not server management ports or other users.
    5. The attacker steals an admin password. MFA, TACACS+ with command authorization, and management reachable only from jump hosts stop it from becoming network control.
    6. Something unusual happens anyway. NetFlow, IDS and the SIEM notice the odd flows.

    Every step is a chance to stop or detect the attack. Without layers, step 2 is game over.

    Not only technology

    Patching, change control, backups that are tested and kept offline, least-privilege accounts, and training are layers too.

    Traps

    • Answering with a list of products. The interviewer wants the principle and an example of layers working together.
    How did you do?Book 8.1 Trust and ThreatsOwn page
  16. How do you set up SSH on a Cisco router and lock down management access?

    Say this first

    Set a hostname and a domain name, generate an RSA key of at least 2048 bits, force SSH version 2, and create a local user with a strong type 9 (scrypt) secret. On the VTY lines allow only transport input ssh, with an access-class that permits only the management subnet. Add an idle timeout, brute-force protection with login block-for, and turn off what I do not use, like Telnet and the HTTP server.

    Go deeper

    Configuration

    Cisco IOS
    hostname R1
    ip domain name corp.example.com
    crypto key generate rsa general-keys modulus 2048
    ip ssh version 2
    ip ssh time-out 60
    ip ssh authentication-retries 3
    !
    username netadmin privilege 15 algorithm-type scrypt secret Str0ng-Admin-2026
    enable algorithm-type scrypt secret Str0ng-Enable-2026
    !
    ip access-list standard MGMT-ONLY
     10 permit 10.99.0.0 0.0.0.255
     20 deny any log
    !
    line vty 0 15
     access-class MGMT-ONLY in
     transport input ssh
     login local
     exec-timeout 10 0
    !
    login block-for 120 attempts 5 within 60
    login on-failure log
    no ip http server
    no ip http secure-server

    With aaa new-model, the VTY lines use AAA method lists instead of login local.

    Output
    R1# show ip ssh
    SSH Enabled - version 2.0
    Authentication timeout: 60 secs; Authentication retries: 3

    Password types on IOS

    TypeMeaningUse
    0clear textnever
    7reversible (service password-encryption)only hides from shoulder surfing
    5salted MD5legacy
    8PBKDF2 with SHA-256good
    9scryptgood

    Traps

    • Calling service password-encryption encryption. Type 7 can be reversed instantly.
    • Forgetting transport input ssh, which leaves Telnet open on some releases.
    How did you do?Book 8.5 Example SystemsOwn page

Working15

  1. How does a router process an ACL, and how do you insert a line into one that is live in production?

    Say this first

    Top down, first match wins, and processing stops at that line. So specific lines go before general ones. To insert a line I use sequence numbers: ip access-list extended NAME, then 15 permit ... lands between 10 and 20. If I run out of gaps, ip access-list resequence NAME 10 10 renumbers the list. For risky changes on a remote device I protect myself with a scheduled rollback first.

    Go deeper

    Inserting a line

    Cisco IOS
    R1# show ip access-lists BRANCH-IN
    Extended IP access list BRANCH-IN
        10 permit tcp 10.1.20.0 0.0.0.255 host 10.2.50.10 eq 443
        20 deny ip 10.1.20.0 0.0.0.255 10.2.50.0 0.0.0.255
        30 permit ip any any
    R1# configure terminal
    R1(config)# ip access-list extended BRANCH-IN
    R1(config-ext-nacl)# 15 permit tcp host 10.1.20.5 10.2.50.0 0.0.0.255 eq 22
    R1(config-ext-nacl)# end
    R1# show ip access-lists BRANCH-IN
    Extended IP access list BRANCH-IN
        10 permit tcp 10.1.20.0 0.0.0.255 host 10.2.50.10 eq 443
        15 permit tcp host 10.1.20.5 10.2.50.0 0.0.0.255 eq 22
        20 deny ip 10.1.20.0 0.0.0.255 10.2.50.0 0.0.0.255
        30 permit ip any any

    A line added without a sequence number goes to the end, below any explicit deny, where it never matches.

    Changing ACLs safely on a remote router

    • reload in 10 before the change, reload cancel once you know you can still reach the box.
    • Build the new policy as a new ACL name, then swap it with one ip access-group NEW in command, which replaces the old binding in one step.
    • Never delete and retype an ACL that is applied. Between the no and the new lines, the interface either permits everything or, once the first line exists, denies everything else.
    • On Junos, commit confirmed 5 rolls back automatically unless you confirm.

    Order of evaluation details

    Switches evaluate ACLs in TCAM in parallel, but the result is the same as top down: the lowest sequence number that matches wins.

    Traps

    • Putting permit ip any any above a deny line. The deny never matches.
    • Adding a line without a sequence number and expecting it near the top.
    How did you do?Book 8.5 Example SystemsOwn page
  2. What is different about IPv6 ACLs on Cisco IOS?

    Say this first

    They are always named, use prefix lengths instead of wildcards, and are applied with ipv6 traffic-filter NAME in|out instead of ip access-group. The important difference is the end of the list: before the implicit deny ipv6 any any there are implicit permits for Neighbor Discovery neighbor solicitations and advertisements. If I add my own deny ipv6 any any log, I block ND and neighbors stop resolving, so I add the ND permits explicitly above it.

    Go deeper

    Example

    Cisco IOS
    ipv6 access-list V6-SERVERS-IN
     permit tcp 2001:db8:10::/64 host 2001:db8:50::10 eq 443
     permit icmp any any nd-ns
     permit icmp any any nd-na
     permit icmp any any packet-too-big
     deny ipv6 any any log
    !
    interface GigabitEthernet0/0/1
     ipv6 traffic-filter V6-SERVERS-IN in
    !
    line vty 0 15
     ipv6 access-class V6-MGMT in

    Why ICMPv6 needs more care than ICMP in IPv4

    • Neighbor Discovery replaces ARP and runs over ICMPv6.
    • Packet Too Big drives path MTU discovery. Routers never fragment IPv6, so blocking it causes black holes for large packets.
    • Router Advertisements carry the default gateway and prefixes for SLAAC. RFC 4890 gives recommendations for which ICMPv6 types to allow through firewalls.

    The dual stack hole

    An IPv4 ACL does not touch IPv6. A dual-stack interface with only ip access-group lets all IPv6 through. Every IPv4 policy needs an IPv6 twin.

    Traps

    • Adding an explicit deny ipv6 any any log and breaking Neighbor Discovery.
    • Filtering IPv4 carefully and forgetting IPv6 on the same interface.
    How did you do?Book 4.2 IP Version 6Own page
  3. How does the Cisco IOS zone-based firewall work?

    Say this first

    Interfaces are put into security zones. Traffic between two zones is dropped unless a zone-pair, which has a direction from a source zone to a destination zone, carries a policy. The policy is MQC with type inspect: class maps pick the traffic, and the action is inspect (stateful, replies allowed automatically), pass (stateless, one direction only) or drop. Traffic between interfaces in the same zone flows by default, and traffic to and from the router itself belongs to the built-in self zone, which is allowed until I configure zone-pairs for it.

    Go deeper

    Default behavior

    TrafficResult
    Between interfaces in the same zoneallowed
    Between two zones with no zone-pair policydropped
    Between a zoned interface and an interface in no zonedropped
    Between two interfaces in no zoneallowed, normal routing
    To or from the router (self zone)allowed until a zone-pair with self is configured

    Minimal policy: inside users to the internet

    Cisco IOS
    zone security INSIDE
    zone security OUTSIDE
    !
    class-map type inspect match-any CM-WEB-DNS
     match protocol https
     match protocol http
     match protocol dns
     match protocol icmp
    !
    policy-map type inspect PM-IN-TO-OUT
     class type inspect CM-WEB-DNS
      inspect
     class class-default
      drop log
    !
    zone-pair security ZP-IN-OUT source INSIDE destination OUTSIDE
     service-policy type inspect PM-IN-TO-OUT
    !
    interface GigabitEthernet0/0/1
     zone-member security INSIDE
    interface GigabitEthernet0/0/0
     zone-member security OUTSIDE

    No OUTSIDE to INSIDE zone-pair is needed for the replies: inspect creates the session and the return packets match it. class-default in an inspect policy drops by default; drop log makes it visible.

    ZBF replaced the older CBAC (ip inspect), and the two cannot be used on the same interface.

    Traps

    • Using pass and forgetting that the reply direction needs its own zone-pair and pass.
    • Expecting traffic between two interfaces in the same zone to be inspected. By default it is not.
    How did you do?Book 8.5 Example SystemsOwn page
  4. When does a router fall back from the TACACS+ servers to the local user database?

    Say this first

    Only when the servers do not answer: timeout, connection refused, no route. If a server answers and rejects the user, that is a final answer and the router does not try the local database. That is why the break-glass account works during a server outage, but not while the server is up. I also give the console its own method list that uses local only, so an AAA problem can never lock me out of the console.

    Go deeper

    Three results, not two

    Each method returns pass, fail or error. Pass logs you in, fail stops the list, and only error moves on to the next method. debug aaa authentication shows which method was tried and what it returned.

    Console safety net

    Cisco IOS
    aaa authentication login CONSOLE local
    line con 0
     login authentication CONSOLE

    Lockouts and odd fallbacks seen in real life

    • aaa new-model before a local user exists. New sessions have no working method.
    • Wrong source address. The server does not know the request's source IP, so it ignores it. The router sees no answer and falls back to local, which looks like "TACACS+ is not working, but local logins work".
    • Shared secret mismatch. The server cannot validate the request, or the device cannot decrypt the reply. Check the server's logs, which usually name the problem directly.
    • Command authorization with no fallback. With aaa authorization commands 15 default group TAC-SERVERS and nothing after it, a server outage means you can log in but not run commands. Add local or if-authenticated.

    Change discipline

    Keep a second session open while changing AAA, test a new login before closing it, and on remote devices schedule reload in 10 first.

    Traps

    • Expecting a rejected password to fall through to the local database.
    • Applying the default login list to the console with no local-only alternative.
    How did you do?Book 8.4 Authentication ProtocolsOwn page
  5. Which EAP methods do you know, and which would you pick for corporate laptops?

    Say this first

    EAP-TLS uses certificates on both sides, so it is mutual and there is no password to steal or phish: that is my pick for managed laptops. PEAP, usually with MSCHAPv2 inside, and EAP-TTLS build a TLS tunnel using only a server certificate and then send a password inside it. EAP-FAST is Cisco's tunnel method based on a protected access credential. TEAP is the newer standard tunnel method that can chain machine and user authentication. EAP-MD5 has no mutual authentication and no keys, so it should not be used.

    Go deeper

    Comparison

    MethodClient proves itself withServer certificateNotes
    EAP-TLScertificateyesstrongest; needs PKI and enrollment
    PEAP (MSCHAPv2)password inside the tunnelyeseasy; safe only if clients validate the server
    EAP-TTLSpassword or other inner methodyescommon on non-Windows clients
    EAP-FASTPAC, then inner methodoptionalCisco; supports chaining machine and user
    TEAPinner method, can chain severalyesRFC 7170
    EAP-MD5password hashnono mutual auth, no keys, no wireless

    The PEAP risk in one sentence

    If the supplicant does not validate the server certificate and name, an attacker's fake access point or port can terminate the tunnel and collect MSCHAPv2 exchanges, which can be cracked offline. Push the trusted CA and the expected server name to clients by policy.

    What EAP-TLS needs in practice

    An internal CA, automatic enrollment (AD Certificate Services autoenrollment, or SCEP from MDM), revocation checking on the RADIUS server, and monitoring of certificate expiry. Windows Credential Guard also blocks single sign-on with MSCHAPv2-based methods, another push toward certificates.

    Traps

    • Saying EAP-TLS uses a username and password.
    • Recommending PEAP without mentioning server certificate validation on the client.
  6. What is MAB, and why is it considered weak?

    Say this first

    MAC Authentication Bypass is the fallback for devices that cannot run 802.1X: printers, cameras, badge readers, some phones and medical devices. The switch learns the device's source MAC from its first frames and sends it to RADIUS as the identity. The server looks it up in an endpoint list and returns accept with a policy. It is weak because a MAC address is not a secret: it is printed on the label and visible on the wire, so anyone can copy it. MAB devices should get narrow access, and profiling should confirm the device still looks like a printer.

    Go deeper

    Order and timing

    Cisco IOS
    interface GigabitEthernet1/0/22
     authentication order dot1x mab
     authentication priority dot1x mab
     authentication port-control auto
     mab
     dot1x pae authenticator
     dot1x timeout tx-period 10

    With the default tx-period of 30 seconds and two retries, a device with no supplicant waits about 90 seconds before MAB starts, long enough for DHCP on some devices to give up. Lowering tx-period to 10 brings that to about 30 seconds. Another option is authentication order mab dot1x with priority dot1x mab: MAB runs first, and an 802.1X client can still take over when it sends EAPOL.

    What the server sees

    On Cisco switches a MAB request carries Service-Type Call-Check, and the MAC appears as the username and in Calling-Station-Id. The MAC format is configurable on the switch and normalized on most servers.

    Making it less weak

    • Narrow policy per device type: a printer gets a downloadable ACL that allows only the print servers, not the whole network.
    • Profiling with DHCP options, LLDP or CDP, HTTP user agent and active scans, so a laptop presenting a printer's MAC gets flagged when its profile changes.
    • Move devices to 802.1X with certificates whenever the device supports it.

    Traps

    • Calling MAB device authentication. It identifies a device by a value anyone can copy.
    • Forgetting the 90 second delay with default timers, which makes MAB devices fail DHCP after rollout.
    How did you do?Book 8.4 Authentication ProtocolsOwn page
  7. How does DHCP snooping work, and what do trusted and untrusted ports mean?

    Say this first

    DHCP snooping turns the switch into a DHCP filter. Every port is untrusted by default; I mark only the ports toward the real DHCP server or relay as trusted, usually the uplinks. On untrusted ports the switch drops DHCP server messages (OFFER, ACK, NAK), so a rogue server on an access port cannot hand out leases, and it can rate-limit DHCP to slow a starvation attack. From the ACKs it sees, it builds a binding table of MAC, IP, lease, VLAN and port. That table is what Dynamic ARP Inspection and IP Source Guard check against.

    Go deeper

    What it checks on untrusted ports

    • Drops server-to-client messages: DHCPOFFER, DHCPACK, DHCPNAK.
    • Drops DHCPRELEASE and DHCPDECLINE for a binding that lives on a different port, so one client cannot release another's lease.
    • Checks that the frame's source MAC equals the client hardware address inside the DHCP packet (ip dhcp snooping verify mac-address, on by default).
    • Optional rate limit in packets per second. Exceeding it err-disables the port.
    • Inserts DHCP option 82 by default on Catalyst switches, which can upset upstream relays (covered in the pitfalls question).

    Configuration

    Cisco IOS
    ip dhcp snooping vlan 10,20
    ip dhcp snooping
    ip dhcp snooping database flash:dhcp-snooping.db
    !
    interface GigabitEthernet1/0/48
     description Uplink to DSW1
     ip dhcp snooping trust
    !
    interface range GigabitEthernet1/0/1 - 46
     ip dhcp snooping limit rate 15

    Both the global command and the per-VLAN command are needed. For an EtherChannel uplink, put trust on the port-channel interface.

    The binding table

    Output
    ASW1# show ip dhcp snooping binding
    MacAddress          IpAddress        Lease(sec)  Type           VLAN  Interface
    ------------------  ---------------  ----------  -------------  ----  --------------------
    00:50:56:89:1A:2B   10.10.10.51      85740       dhcp-snooping   10    GigabitEthernet1/0/5
    Total number of bindings: 1

    The database line stores the table in flash so it survives a reload.

    Traps

    • Enabling ip dhcp snooping globally but not for any VLAN. Nothing is snooped.
    • Forgetting to trust the uplink. Every client in the VLAN stops getting leases.
    How did you do?Book 3.3 Internet (IP)Own page
  8. How does Dynamic ARP Inspection stop ARP spoofing?

    Say this first

    DAI intercepts every ARP request and reply arriving on untrusted ports in the VLANs where it is enabled, and checks the sender MAC and IP against the DHCP snooping binding table and any static ARP ACLs. If a host on Gi1/0/7 claims the gateway's IP and that pairing is not in the table for that port, the ARP is dropped and logged. Uplinks are set as trusted so ARPs from the gateway and other switches pass. Untrusted ports are limited to 15 ARP packets per second by default; going over err-disables the port.

    Go deeper

    Configuration

    Cisco IOS
    ip arp inspection vlan 10
    ip arp inspection validate src-mac dst-mac ip
    !
    arp access-list STATIC-HOSTS
     permit ip host 10.10.10.5 mac host 0050.5689.0005
    ip arp inspection filter STATIC-HOSTS vlan 10
    !
    interface GigabitEthernet1/0/48
     ip arp inspection trust

    Extra validation

    • src-mac: the Ethernet source MAC must equal the sender MAC inside the ARP packet.
    • dst-mac: in replies, the Ethernet destination must equal the target MAC inside the ARP packet.
    • ip: rejects nonsense addresses such as 0.0.0.0, 255.255.255.255 and multicast. Give all three in one command. Each ip arp inspection validate line replaces the previous one.

    What a drop looks like

    Output
    %SW_DAI-4-DHCP_SNOOPING_DENY: 1 Invalid ARPs (Res) on Gi1/0/7, vlan 10.([0050.5689.0bad/10.10.10.1/0050.5689.1a2b/10.10.10.51/09:12:44 UTC Tue Nov 10 2026])

    Reading the bracket: sender MAC, sender IP, target MAC, target IP, time. A host at 0050.5689.0bad told 10.10.10.51 that it owns the gateway address 10.10.10.1.

    Static ARP ACLs

    Hosts with fixed addresses have no DHCP binding. An ARP ACL lists their IP and MAC. With the static keyword on the filter, only the ACL is used and the binding table is not consulted for that VLAN.

    Traps

    • Enabling DAI before the binding table is populated. Hosts that got their lease earlier are not in the table yet and are cut off.
    • Forgetting to trust the uplink, which drops the gateway's own ARP replies.
    How did you do?Book 3.3 Internet (IP)Own page
  9. What does IP Source Guard add on top of DHCP snooping and DAI?

    Say this first

    IP Source Guard filters the data traffic itself, not only ARP. On an untrusted access port it installs a per-port filter that permits only packets sourced from the IP in that port's DHCP snooping binding, and optionally only from the bound MAC too. Everything else is dropped. A host that sets a static IP, or spoofs another host's address to hide an attack, cannot send. DAI stops lies inside ARP; IPSG stops spoofed source addresses in IP packets.

    Go deeper

    Configuration

    Cisco IOS
    interface GigabitEthernet1/0/5
     ip verify source
    !
    ip source binding 0050.5689.0005 vlan 10 10.10.10.5 interface GigabitEthernet1/0/6

    ip verify source filters on source IP. To filter on IP and MAC together, older Catalyst releases use ip verify source port-security, which needs port security on the port, and Catalyst 9000 uses ip verify source mac-check. The ip source binding line adds a static entry for a fixed-address host.

    Output
    ASW1# show ip verify source
    Interface  Filter-type  Filter-mode  IP-address       Mac-address        Vlan
    ---------  -----------  -----------  ---------------  -----------------  ----
    Gi1/0/5    ip           active       10.10.10.51                         10

    Before the client has a lease, the port drops all IP traffic except DHCP.

    Compared with uRPF

    uRPF is a router feature that checks the source against the routing table per interface, so it stops spoofing of whole subnets at the edge. IPSG is per host, at the access port, against the lease. For IPv6 the equivalent is IPv6 Source Guard, part of the switch's device-tracking feature set.

    Traps

    • Enabling IPSG on a VLAN where DHCP snooping is not enabled. There are no bindings, so everything is dropped.
    How did you do?Book 3.3 Internet (IP)Own page
  10. Explain the two VLAN hopping attacks and how you prevent each one.

    Say this first

    Switch spoofing: the attacker's device speaks DTP and talks a port left in dynamic auto or desirable into becoming a trunk, then sends and receives in every VLAN. Prevent it by hard-coding access ports with switchport mode access and turning off DTP with switchport nonegotiate on trunks. Double tagging: an attacker in the trunk's native VLAN sends a frame with two 802.1Q tags. The first switch removes the outer tag because it matches the native VLAN and forwards the frame over the trunk, where the next switch reads the inner tag and delivers it into the victim VLAN. It only works one way. Prevent it by keeping users out of the native VLAN and tagging the native VLAN.

    Go deeper

    Switch spoofing

    Many Catalyst models default to dynamic auto, which becomes a trunk if the other side asks. An attacker sends DTP frames asking for a trunk and gets one.

    Double tagging

    Only possible when the attacker's access VLAN equals the trunk's native VLAN. The reply from the victim is tagged normally and never comes back to the attacker's VLAN, so it suits one-way attacks such as a flood or a crafted UDP packet.

    Hardening template

    Cisco IOS
    vlan dot1q tag native
    !
    interface range GigabitEthernet1/0/1 - 46
     switchport mode access
     switchport access vlan 10
     switchport nonegotiate
     spanning-tree portfast
     spanning-tree bpduguard enable
    !
    interface range GigabitEthernet1/0/47 - 48
     switchport mode trunk
     switchport trunk native vlan 999
     switchport trunk allowed vlan 10,20,30
     switchport nonegotiate

    VLAN 999 has no access ports and is not in the allowed list. Unused ports are shut down and parked in an unused VLAN.

    Traps

    • Thinking VLANs alone are a security boundary. Misconfigured trunks and native VLANs undo them.
    • Believing double tagging gives two-way access.
    How did you do?Book 3.2 Switched EthernetOwn page
  11. What is DHCP starvation, and why is it usually paired with a rogue DHCP server?

    Say this first

    The attacker sends a flood of DHCPDISCOVERs, each with a different client hardware address, until the real server's pool is empty. Legitimate clients then get no lease. With the real server unable to answer, the attacker serves new clients from its own DHCP server and gives itself out as the default gateway or DNS server, which turns a denial of service into a man in the middle. DHCP snooping blocks the rogue server's offers on untrusted ports, and its rate limit and MAC check, together with port security, stop the starvation.

    Go deeper

    Which control stops which variant

    Attack variantControl that stops it
    New source MAC for every requestport security maximum
    One source MAC, random client hardware address inside DHCPsnooping verify mac-address (on by default)
    High request rate from one portip dhcp snooping limit rate, port err-disables
    Rogue server answering on an access portsnooping trust boundary drops the OFFER and ACK

    Detection

    • Pool utilization jumps to 100 percent in minutes. Alert on pool usage, not only on outages.
    • The DHCP server shows hundreds of new leases with random-looking MACs from one relay or circuit ID.
    • On the switch, the snooping rate limit err-disables the port and logs it, for example %PM-4-ERR_DISABLE: dhcp-rate-limit error detected on Gi1/0/7, putting Gi1/0/7 in err-disable state.

    For IPv6

    Rogue Router Advertisements and DHCPv6 servers do the same job, and RA Guard and DHCPv6 Guard are the matching controls.

    Traps

    • Assuming port security alone stops starvation. Tools that vary only the address inside DHCP pass it.
    How did you do?Book 3.3 Internet (IP)Own page
  12. How does a SYN flood work, and how do SYN cookies defend against it?

    Say this first

    The attacker sends a stream of TCP SYNs, usually from spoofed source addresses, and never completes the handshake. The server keeps a half-open entry for each SYN and sends a SYN-ACK that goes nowhere, so its queue of half-open connections fills and real clients are refused. With SYN cookies, once that queue is full the server stops storing anything for new SYNs. It encodes what it needs (a hash of the addresses, ports and a secret, a time counter and an MSS value) into the initial sequence number of its SYN-ACK. A real client's ACK carries that number plus one, the server verifies it, and only then creates the connection. Spoofed SYNs cost it no memory.

    Go deeper

    Server side

    Shell
    $ sysctl net.ipv4.tcp_syncookies
    net.ipv4.tcp_syncookies = 1
    $ ss -n state syn-recv | wc -l

    On Linux the value 1 (the default) means cookies are used only when the SYN queue overflows. The cost: the cookie can only carry a few MSS values, and options such as window scaling and SACK survive only when TCP timestamps are on, because Linux hides them in the timestamp.

    Network side

    • SYN proxy or SYN cookies on the firewall: the firewall answers the SYN itself and only opens a connection to the server after the client completes the handshake. PAN-OS zone protection, FortiGate DoS policies and Cisco firewalls all offer a form of this, triggered at a SYN rate you set.
    • Embryonic connection limits per server or per source.
    • Upstream help when the flood is large enough to fill the link. SYN cookies protect state, not bandwidth.

    Why spoofed sources

    The attacker does not need the replies, spoofing hides it, and the SYN-ACKs land on innocent hosts as backscatter. Ingress filtering (BCP 38) at networks everywhere is what makes spoofing harder.

    Traps

    • Saying SYN cookies stop a DDoS. They protect the server's memory, not your internet link.
    How did you do?Book 5.2 Reliable Byte Stream (TCP)Own page
  13. How would you protect a company's internet edge from a DDoS attack?

    Say this first

    First I classify the attack: volumetric floods, often reflection and amplification over UDP (DNS, NTP, CLDAP, memcached); state exhaustion attacks such as SYN floods aimed at firewalls and load balancers; or application-layer floods of HTTP requests. Anything bigger than my internet links must be stopped upstream, by the ISP or a cloud scrubbing service, with traffic diverted by BGP or DNS. Locally I protect state with SYN cookies and connection limits, protect the routers with CoPP, and drop reflection traffic that no service needs. As a last resort, remote triggered blackholing drops everything to the attacked address at the ISP to save the rest of the network.

    Go deeper

    Amplification in one paragraph

    The attacker sends small requests with the victim's address as the source to open servers that send much larger replies. The victim receives the replies from thousands of legitimate servers. That is why open resolvers and exposed UDP services are a problem for everyone, not only their owners.

    Upstream tools

    • Scrubbing: always-on or on demand. On attack, the scrubbing provider announces your prefix (often a /24), cleans the traffic and returns it over a tunnel or direct link.
    • RTBH: you tag the victim /32 to your ISP with the BLACKHOLE community 65535:666 (RFC 7999) or the ISP's own community, and the ISP drops it at its edge. The rest of your network survives; the victim address goes dark.
    • BGP Flowspec (RFC 8955): pushes match and action rules, such as "drop UDP from source port 123 to 203.0.113.10", to routers that support it.

    Local tools

    • ACLs at the edge that drop well-known reflection source ports toward services that never need them.
    • SYN cookies or SYN proxy, connection limits per source.
    • CoPP so the routers keep their BGP sessions during the attack.
    • CDN and anycast in front of public web services.

    Do not be a source

    BCP 38 (RFC 2827) ingress filtering so your customers and hosts cannot send spoofed sources, no open resolvers, no exposed amplifying services.

    Runbook

    Baseline traffic with NetFlow or sFlow, alert on deviations, keep ISP and scrubbing contacts and the agreed communities written down, and rehearse the diversion before you need it.

    Traps

    • Answering "buy a bigger firewall". Volumetric attacks are solved upstream.
    How did you do?Book 4.1 Global InternetOwn page
  14. Beyond SSH, what do you harden on a router or switch?

    Say this first

    I think in planes. Management plane: AAA with TACACS+, management only from a dedicated network or VRF, SNMPv3 with authentication and privacy instead of community strings, authenticated NTP, remote syslog, a login banner, and unused services off (HTTP server, Telnet, CDP and LLDP on untrusted edges). Control plane: routing protocol authentication, CoPP, and limits like BGP maximum-prefix. Data plane: ACLs and uRPF at the edges, no proxy ARP or ICMP redirects where they are not needed. Plus verified software images and config backups with change tracking.

    Go deeper

    Example lines

    Cisco IOS
    no ip http server
    no ip http secure-server
    no ip source-route
    service tcp-keepalives-in
    service timestamps log datetime msec localtime show-timezone
    !
    interface GigabitEthernet0/0/0
     description ISP1
     no ip proxy-arp
     no ip redirects
     no cdp enable
     no lldp transmit
     no lldp receive
    !
    snmp-server group NETOPS v3 priv
    snmp-server user nms1 NETOPS v3 auth sha Auth-Pass-2026 priv aes 128 Priv-Pass-2026
    !
    ntp authentication-key 1 md5 Ntp-Key-2026
    ntp authenticate
    ntp trusted-key 1
    ntp server 10.99.0.10 key 1
    !
    logging host 10.99.0.20
    logging trap informational

    Newer releases offer stronger NTP and SNMP hash options; use them where both ends support them.

    Why each matters

    • CDP or LLDP on an internet or untrusted edge leaks model, software version and addresses.
    • Time must be right for logs, certificates and correlation, and unauthenticated NTP can be spoofed.
    • SNMPv2c communities travel in clear and often give read access to the whole config.
    • Proxy ARP hides addressing mistakes and helps an attacker reach things through the router.
    • Remote syslog keeps evidence when a device is wiped or rebooted.

    Traps

    • Answering only "disable Telnet". Hardening is a checklist across management, control and data planes.
    How did you do?Book 8.5 Example SystemsOwn page
  15. What is zero trust, and how does it change network design?

    Say this first

    Zero trust drops the idea that being on the internal network makes you trusted. Every request to a resource is authenticated and authorized on its own, using user identity, device health and context, with least privilege, and the design assumes an attacker is already inside. In the network that means identity-based access (802.1X and NAC), microsegmentation so workloads reach only what they need, ZTNA brokers that give users access to one application instead of a full tunnel onto the LAN, encryption everywhere, and continuous monitoring. NIST SP 800-207 is the usual reference.

    Go deeper

    The parts, in NIST terms

    • Policy engine: decides whether a request is allowed, using identity, device posture, threat data.
    • Policy administrator: sets up or tears down the session based on that decision.
    • Policy enforcement point: the gateway, proxy, agent or firewall that lets the traffic through.

    VPN versus ZTNA

    Classic remote access VPNZTNA
    What the user getsan IP on the network, many subnets reachableaccess to named applications only
    ExposureVPN gateway listens on the internetapps are hidden; connectors dial out to a broker
    Decisiononce at loginevery session, with device posture

    Where to start

    1. Inventory users, devices, applications and flows.
    2. Strong identity: SSO with MFA everywhere.
    3. Device trust: managed devices, posture checks.
    4. Segment the crown jewels first, with group-based policy (TrustSec SGTs, cloud security groups, host firewalls) rather than IP-only rules.
    5. Replace broad VPN access for contractors and third parties with per-application access.
    6. Log every decision and watch for anomalies.

    Traps

    • Saying zero trust means "trust no one, block everything". It means verify explicitly, then allow the minimum.
    How did you do?Book 8.1 Trust and ThreatsOwn page

Expert6

  1. Write one ACL line that matches only the odd-numbered /24 subnets in 10.1.0.0/16. How does it work?

    Say this first

    10.1.1.0 0.0.254.255. The third octet of the wildcard is 254, which is 11111110 in binary, so only the lowest bit of the third octet is checked, and the base address says that bit must be 1. Every odd third octet (1, 3, 5 up to 255) matches and every even one fails. Wildcard bits do not have to be contiguous, which is what makes this possible in one line.

    Go deeper

    The method

    1. Write the values you want to match in binary.
    2. Bits that are the same in all of them: wildcard 0, and copy that bit into the base address.
    3. Bits that differ: wildcard 1.
    4. Check the result: the line matches every combination of the "1" bits. If your set is not every combination, you will match extra subnets and need more than one line.

    Worked examples

    GoalLineWhy
    Odd /24s in 10.1.0.0/1610.1.1.0 0.0.254.255only bit value 1 of octet 3 checked, must be 1
    Even hosts in 192.168.1.0/24192.168.1.0 0.0.0.254last bit must be 0: .0, .2, up to .254
    192.168.4.0/24 and 192.168.6.0/24192.168.4.0 0.0.2.2554 = 00000100, 6 = 00000110, only bit value 2 differs
    10.1.1.0, .3.0, .5.0, .7.0 (/24s)10.1.1.0 0.0.6.2551, 3, 5, 7 = 00000xx1: bit values 2 and 4 vary
    VLAN 50 at every site, plan 10.site.vlan.0/2410.0.50.0 0.255.0.255second octet ignored, third must be 50

    The last one is the real-world use: when the addressing plan encodes site and function in fixed octets, one line matches "the voice subnet at every site" for QoS, PBR or a security policy.

    Where it breaks

    Subnets 1, 3 and 5 only cannot be one line, because the varying bits also produce 7. Non-contiguous wildcards are an IOS ACL feature: prefix lists, ASA ACLs and cloud security groups only take contiguous prefixes. Always add a remark line, because the next engineer will not decode 0.0.6.255 at a glance.

    Traps

    • Assuming any set of subnets fits in one line. Test every combination of the wildcard's 1 bits.
    How did you do?Book 3.3 Internet (IP)Own page
  2. Your stateful firewalls drop traffic when routing becomes asymmetric. Why, and how do you design around it?

    Say this first

    A stateful firewall only accepts packets that belong to a session it saw being created. If the SYN leaves through FW1 and the SYN-ACK comes back through FW2, FW2 has no session and drops it as out of state. The fix is either symmetric routing, so both directions of a flow cross the same firewall, or a cluster that shares state and forwards asymmetric packets to the member that owns the session. Turning off state checks is a last resort for specific flows only.

    Go deeper

    How it happens

    Two internet edges, each with its own firewall. Inside, the gateway (HSRP) is active on side A, so traffic leaves via FW1. On the outside, ISP B advertises your prefix with a better path, so replies come back via FW2.

    What it looks like on a Cisco ASA or Secure Firewall:

    Output
    %ASA-6-106015: Deny TCP (no connection) from 192.0.2.80/443 to 10.10.10.51/51544 flags SYN ACK on interface outside

    On PAN-OS the global counters show non-SYN TCP packets dropped for having no session, for example flow_tcp_non_syn_drop.

    Design options

    1. Make routing symmetric. Align the inside gateway with the outbound path, steer inbound with BGP (AS path prepending, more specific prefixes on the preferred link), or run the pair active/standby so only one path is live.
    2. Share state. Clustered or active/active firewalls synchronize sessions and redirect a packet that arrives at the wrong member over a cluster link to the session owner. This needs low-latency links between members and adds complexity.
    3. Place the firewall where paths converge, for example behind both edge routers instead of one per edge.
    4. Bypass state checks for named flows, for example ASA TCP state bypass. You lose inspection for those flows, so keep it narrow and documented.

    NAT makes symmetry even more important: the return packet must hit the same device that holds the translation.

    Traps

    • Disabling TCP state checking globally to "fix" the drops. That turns the firewall into a router with ACLs.
    How did you do?Book 8.5 Example SystemsOwn page
  3. How would you roll out 802.1X across a large campus without causing an outage?

    Say this first

    In phases. First monitor mode: the port runs 802.1X and MAB but lets all traffic through whatever the result, so I collect who passes and who fails without hurting anyone. Then low-impact mode: still open, but a pre-authentication port ACL allows only DHCP, DNS and boot services until a downloadable ACL from the server opens the rest. Closed mode only for areas that need it. Along the way I pick the right host mode, plan for RADIUS being unreachable with a critical VLAN, and enable change of authorization so the server can change a session's policy at any time.

    Go deeper

    The three phases

    ModeBefore or without authAfter successUse
    Monitoreverything (open authentication)everything, now loggeddiscovery, fix supplicants, build MAB lists
    Low impactonly what the pre-auth ACL allowsdACL from the servermost of the campus
    ClosedEAPOL onlyVLAN or dACL from the serverhigh-security areas
    Cisco IOS
    interface GigabitEthernet1/0/10
     ip access-group PRE-AUTH in
     authentication open
     authentication host-mode multi-auth
     authentication order dot1x mab
     authentication port-control auto
     mab
     dot1x pae authenticator

    A downloadable ACL written with source any gets the client's own IP substituted, which needs the switch's IP device tracking to know that IP.

    Host modes

    • single-host: one MAC per port, a second MAC is a violation.
    • multi-host: the first MAC authenticates and the port opens for everyone behind it. Weak.
    • multi-domain: one data device plus one voice device, the phone identified by the Cisco AV pair device-traffic-class=voice.
    • multi-auth: every MAC authenticates on its own; one voice device plus many data devices.

    When RADIUS is unreachable

    Cisco IOS
    interface GigabitEthernet1/0/10
     authentication event server dead action authorize vlan 10
     authentication event server alive action reinitialize

    Plus radius-server dead-criteria and deadtime so the switch decides quickly that a server is down.

    Change of authorization

    RADIUS CoA (RFC 5176) lets the server reauthenticate, bounce or end a session, which posture checks, profiling updates and quarantine all rely on. On the switch: aaa server radius dynamic-author with the server as a client.

    On current IOS-XE the same features are expressed in the newer policy style (IBNS 2.0) with access-session commands and control policies, and authentication convert-to new-style migrates.

    Traps

    • Going straight to closed mode. The first failed printer becomes the whole project's reputation.
    • Treating multi-host as secure. One authenticated device opens the port for everything behind it.
    • Having no plan for a RADIUS outage, which turns a server problem into a campus outage.
    How did you do?Book 8.4 Authentication ProtocolsOwn page
  4. You turn on DHCP snooping, DAI and IP Source Guard across a production access layer. What can go wrong, and how do you avoid it?

    Say this first

    Four classics. Clients stop getting leases because the access switch inserts option 82 with a zero gateway address and the upstream IOS relay or DHCP server drops it. Static-IP devices are cut off by DAI and IPSG because they have no binding. After a reload the binding table is empty and clients are blocked until they renew. And the 15 pps ARP limit err-disables ports that legitimately carry many hosts. The fixes are option 82 handling, static entries, the snooping database agent and rate tuning, rolled out in stages with snooping first and IPSG last.

    Go deeper

    Option 82

    The access switch is a layer 2 device, not a relay, so when it adds option 82 (circuit ID with VLAN and port, remote ID with the switch MAC) the giaddr field stays 0.0.0.0. Cisco IOS relays and DHCP servers treat option 82 with a zero giaddr as invalid and drop it by default. debug ip dhcp server packet on an IOS DHCP server shows DHCPD: inconsistent relay information. Three ways out:

    • Stop inserting it on the access switch: no ip dhcp snooping information option.
    • Accept it on the IOS relay or server: ip dhcp relay information trusted on the SVI, or ip dhcp relay information trust-all globally.
    • If an upstream switch also runs snooping and receives it on an untrusted port: ip dhcp snooping information option allow-untrusted there.

    Static hosts

    ARP ACLs for DAI (arp access-list plus ip arp inspection filter) and ip source binding for IPSG. Keep the list in the source of truth, because a printer replaced with a new MAC breaks again.

    Persistence

    Cisco IOS
    ip dhcp snooping database flash:dhcp-snooping.db

    Without it, a reload empties the table and DAI and IPSG block every client until it renews.

    Rate limits

    Raise ip arp inspection limit rate on ports with many hosts, and set errdisable recovery cause arp-inspection and dhcp-rate-limit so one burst does not leave a port down until someone notices.

    Rollout order

    1. DHCP snooping only, uplinks trusted. Watch the binding table fill.
    2. Wait at least half a lease time so every active client has renewed through the switch.
    3. Add static entries for fixed-address hosts.
    4. DAI on a pilot VLAN, check the drop counters, then expand.
    5. IP Source Guard last.

    Traps

    • Enabling all three features across a campus in one night.
    • Disabling snooping to fix option 82 drops, instead of fixing option 82 handling.
    How did you do?Book 3.3 Internet (IP)Own page
  5. What is unicast reverse path forwarding, and when do you use strict versus loose mode?

    Say this first

    uRPF drops packets whose source address fails a routing check, which stops spoofed traffic. Strict mode requires that the best route back to the source points out the same interface the packet arrived on. Loose mode only requires that some route to the source exists in the FIB, through any interface, and a route to Null0 counts as a failure. Strict fits single-homed edges, like customer or access links, where routing is symmetric. Loose fits multihomed and transit links, where asymmetric routing is normal, mainly to drop unroutable sources and to support source-based blackholing.

    Go deeper

    Configuration on IOS

    Cisco IOS
    interface GigabitEthernet0/0/1
     description Customer A, single-homed
     ip verify unicast source reachable-via rx
    !
    interface GigabitEthernet0/0/0
     description ISP1 transit
     ip verify unicast source reachable-via any

    uRPF needs CEF. By default the default route does not count as a valid path; allow-default changes that. IPv6 uses ipv6 verify unicast source reachable-via rx.

    Why strict breaks multihoming

    With two ISPs, traffic from a given source can arrive on ISP2 while your best route back to that source is through ISP1. Strict mode drops it. Loose mode accepts it as long as any route exists.

    Source-based RTBH

    During an attack from known sources, a BGP trigger installs routes for those sources pointing to Null0 on every edge router. Loose uRPF then drops packets from those sources, because their only route is Null0. The same trick that blackholes destinations can blackhole sources.

    Other platforms

    Junos uses rpf-check on the logical interface (strict by default, mode loose available). Linux has net.ipv4.conf.<if>.rp_filter: 1 is strict, 2 is loose.

    Traps

    • Enabling strict uRPF on a transit or multihomed link and blackholing legitimate traffic.
    How did you do?Book 4.1 Global InternetOwn page
  6. What is control plane policing, and how would you build a CoPP policy?

    Say this first

    CoPP is a QoS policy applied to the traffic punted to the device's CPU: routing protocols, management, ARP, ICMP to the box, packets with IP options or an expiring TTL. Without it, a flood aimed at the router or a misbehaving neighbor can starve the CPU, and I lose routing adjacencies and management at the worst moment. I classify punted traffic into classes (critical routing, management, ICMP and monitoring, everything else), police each class to a rate that fits normal levels with headroom, and apply it with service-policy input under control-plane.

    Go deeper

    Example on an IOS-XE router

    Cisco IOS
    ip access-list extended COPP-ROUTING
     permit tcp host 10.0.12.2 host 10.0.12.1 eq bgp
     permit tcp host 10.0.12.2 eq bgp host 10.0.12.1
     permit ospf any any
    ip access-list extended COPP-MGMT
     permit tcp 10.99.0.0 0.0.0.255 any eq 22
     permit udp 10.99.0.0 0.0.0.255 any eq snmp
     permit udp host 10.99.0.10 eq ntp any
    ip access-list extended COPP-ICMP
     permit icmp any any echo
     permit icmp any any echo-reply
     permit icmp any any ttl-exceeded
     permit icmp any any unreachable
    !
    class-map match-all CM-COPP-ROUTING
     match access-group name COPP-ROUTING
    class-map match-all CM-COPP-MGMT
     match access-group name COPP-MGMT
    class-map match-all CM-COPP-ICMP
     match access-group name COPP-ICMP
    !
    policy-map PM-COPP
     class CM-COPP-ROUTING
      police 2000000 conform-action transmit exceed-action transmit
     class CM-COPP-MGMT
      police 1000000 conform-action transmit exceed-action drop
     class CM-COPP-ICMP
      police 128000 conform-action transmit exceed-action drop
     class class-default
      police 256000 conform-action transmit exceed-action drop
    !
    control-plane
     service-policy input PM-COPP

    The routing class only measures (exceed is still transmitted), so a burst after a big BGP update is never dropped. Rates here are in bits per second.

    Things that catch people

    • In a CoPP class ACL, permit means "belongs to this class" and deny means "try the next class". Nothing is dropped by the ACL itself.
    • ARP is not IP, so IP ACLs never match it. It falls into class-default unless you add a class with match protocol arp. Police class-default too hard and ARP breaks.
    • Roll out with exceed-action transmit everywhere first, read show policy-map control-plane, then set drops.

    Platform notes

    • Catalyst 9000 switches ship with a system CoPP policy (system-cpp-policy) whose class rates you tune.
    • NX-OS applies a default CoPP profile (strict, moderate, lenient or dense) at setup.
    • Junos does the same job with a firewall filter applied as input on the lo0 interface.

    Traps

    • Policing routing protocols so tightly that a reconvergence drops hellos and the network flaps.
    • Reading deny lines in a CoPP ACL as "drop this traffic".
    How did you do?Book 8.5 Example SystemsOwn page