Scenario
The networking team reports intermittent connectivity issues on
several systems in the 192.168.1.0/24 subnet.
You’ve been asked to perform basic diagnostics on your host and
validate interface behavior. You will verify the local TCP/IP
stack, cycle an interface, inspect listening ports, and capture
ICMP packets for evidence.
This is baseline evidence collection before deeper routing, switchport, firewall, or MTU analysis. The goal is to prove local stack health, confirm interface transitions, and capture packet-level artifacts that support escalation.
Objective
- Verify local TCP/IP functionality by pinging loopback.
- Bring an interface down and back up to validate link transitions.
- Confirm assigned addressing after re-enable.
- Inspect listening ports to validate service availability.
- Capture ICMP traffic with
tcpdumpfor packet evidence.
Concepts
- Loopback tests isolate the host stack from the network and validate local IP/ICMP behavior.
- Interface cycling is a controlled way to prove link transitions and refresh DHCP/state.
- Listening socket inventory helps confirm expected exposure (e.g., SSH) and catch surprises.
- Packet capture is evidence. It answers “did it leave the box?” and “did anything return?”
- Evidence-first workflows reduce guesswork and speed escalation to networking teams.
Walkthrough
ping -c 2 127.0.0.1
A successful loopback ping validates local IP processing and ICMP handling on the host. If this fails, pause network debugging and focus on local stack issues.
2 packets transmitted, 2 received, 0% packet loss
enp0s3.
sudo ifdown enp0s3
Cycling an interface forces a state transition and can clear transient link issues. Coordinate this change on production hosts.
Bringing down interface enp0s3: [ OK ]
Network interface 'enp0s3' is now inactive.
sudo ifup enp0s3
Bringing the interface up should re-establish link and obtain addressing. Confirm IP, mask, and gateway assignment are consistent with expectations.
Assigned IP address: 192.168.1.42/24
Gateway: 192.168.1.1
ip addr show enp0s3
ip link show enp0s3
This is your post-change verification. You want to see
state UP and confirm the expected address is
present on the interface.
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet 192.168.1.42/24 brd 192.168.1.255 scope global dynamic enp0s3
valid_lft 86390sec preferred_lft 86390sec
netstat -tuln
This snapshot shows what the system is exposing on the network. Confirm expected services are listening and watch for unexpected open ports.
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::80 :::* LISTEN
sudo tcpdump -i enp0s3 -nn icmp
Packet capture confirms what actually traverses the interface. Filtering on ICMP provides a clean view of echo requests and replies, which is often enough to validate basic reachability.
listening on enp0s3, link-type EN10MB (Ethernet), capture size 262144 bytes
IP 192.168.1.42 > 192.168.1.1: ICMP echo request, id 1234, seq 1, length 64
IP 192.168.1.1 > 192.168.1.42: ICMP echo reply, id 1234, seq 1, length 64
^C
4 packets captured
0 packets dropped by kernel
Breakpoints
If ping 127.0.0.1 fails, stop and troubleshoot
the local host stack (permissions, firewall rules, kernel/ICMP settings).
Some distros do not ship ifdown/ifup
by default. Use ip link set dev enp0s3 down|up
or the system’s network manager tooling.
If the interface is up but no address is assigned, confirm
DHCP is reachable and check the interface config. Capture
evidence with ip addr, ip route,
and journalctl for escalation.
If echo requests leave but no replies return, you likely have a network path issue (ACL/firewall, routing, VLAN, switchport, MTU). Save the capture output as evidence.
Cleanup checklist
- Stop any running
tcpdumpcapture. - Confirm the interface is up.
- Confirm the expected address is present.
ip link show enp0s3
ip addr show enp0s3
enp0s3 is state UP and your expected
192.168.1.0/24 address is present.
Reference
-
ping -c <count> <host>: Send a fixed number of ICMP echo requests.-c: limit packet count
-
ifdown <iface>: Bring an interface down (legacy workflow; depends on distro/network stack). -
ifup <iface>: Bring an interface up and apply configuration. -
ip addr show <iface>: Show addressing on an interface. -
ip link show <iface>: Show link state (UP/DOWN) and flags. -
netstat -tuln: Show listening TCP/UDP sockets.-t: TCP-u: UDP-l: listening-n: numeric output
-
tcpdump -i <iface> -nn icmp: Capture ICMP traffic on an interface.-i: interface-nn: no DNS/service resolution