Question
What is a loopback interface on a Cisco router and what is it used for?
Answer
A logical, software-only interface with no physical port that stays "up" whenever the router is running — handy as a never-down test target or router ID.
Key characteristics:
- Not a physical port — cannot be connected to any device
- Automatically in an "up" state whenever the router is functioning
- Each loopback needs a unique IP (Internet Protocol) address not used by any other interface
Common uses:
- Testing and management: Guarantees at least one interface is always reachable
- Routing protocol identification: Often used as the Router ID for OSPF (Open Shortest Path First)
- Lab simulation: Create multiple loopback interfaces to simulate networks behind the router
Configuration:
Router(config)# interface loopback 0
Router(config-if)# ip address 10.0.0.1 255.255.255.255
Tip: In lab work, loopbacks are the cheap way to fake an internet connection or a handful of extra networks behind a router without buying more hardware. A /32 mask is typical for a loopback used as a router ID — it advertises exactly one address and wastes none.
Go deeper:
Loopback (Wikipedia) — the virtual-loopback section: why it never goes down and why routing protocols use it as a stable ID.
Note saved — thanks!
Question
How do you configure an SVI (Switch Virtual Interface) with IPv4/IPv6 addresses and a default gateway on a Cisco switch?
Answer
Enter the VLAN (Virtual Local Area Network) interface, assign the IPv4/IPv6 addresses, no shutdown it, then set the default gateway in global config.
Step 1: Configure the Management Interface
S1# configure terminal
S1(config)# interface vlan 99
S1(config-if)# ip address 172.17.99.11 255.255.255.0
S1(config-if)# ipv6 address 2001:db8:acad:99::1/64
S1(config-if)# no shutdown
S1(config-if)# end
S1# copy running-config startup-config
Step 2: Configure the Default Gateway
S1# configure terminal
S1(config)# ip default-gateway 172.17.99.1
S1(config)# end
S1# copy running-config startup-config
Key notes:
- The switch does not need an IPv6 default gateway — it learns it automatically via RA (Router Advertisement) messages
- For IPv6 on older Catalyst 2960 switches (IOS 15.0), first run:
sdm prefer dual-ipv4-and-ipv6 defaultthenreload - Always
copy running-config startup-configto persist changes across reboots
Go deeper:
Default gateway (Wikipedia) — why a L2 switch needs a gateway to reach managers on other subnets.
Neighbor Discovery Protocol (Wikipedia) — the Router Advertisement mechanism that lets the switch learn its IPv6 gateway automatically.
Note saved — thanks!