vicigeeksimple guides
Browse
All guides

Carriers & SIP · Start here · foundations

Networking basics for VoIP: IP, DNS, ports and NAT

Trace a connection from a hostname to an address and port before diagnosing SIP or browser audio.

Reader setup

Before you start

Run each step in order and move only when the outcome is confirmed.

  1. Linux terminal basics
  2. A lab hostname or address
  3. No firewall changes
What you will prove
You can distinguish DNS lookup, reachability and port access as separate checks.
Safety boundary
Do not scan public networks or alter firewalls from this lesson; test only authorized hosts.

Reader path

How to use this article

  • Use it when: You need a fixed sequence to make a deployment or configuration change now.
  • Expected result: Follow each step and verify the outcome before changing the next layer.
  • Start here: Start at the first section and complete every checkpoint before moving to the next.

Beginner curriculum

Stage 1 of 7: Linux and network basics

Lesson 7 of 7 · Step 7 of 34

01 / 05

An address and a port identify a conversation

An IP address identifies a network interface; a port number identifies one particular application endpoint on that interface, so the same address can host many independent conversations at once, each on its own port. TCP (Transmission Control Protocol) is connection-oriented — both sides agree to a stream and Linux keeps track of ordering and delivery — while UDP (User Datagram Protocol) simply sends independent datagrams with no such bookkeeping, trading reliability for lower overhead and lower latency.

SIP (Session Initiation Protocol — the signaling layer that sets up and tears down a call; covered fully next lesson) and RTP (Real-time Transport Protocol — the media stream that actually carries audio, also covered next) can use different transports and ports, which is exactly why a call can fail to connect for a signaling reason while the audio path is fine, or connect perfectly while one side hears nothing.

Port numbers are grouped by convention rather than by hard technical rule: 0–1023 are the well-known ports historically reserved for standard services, 1024–49151 are registered ports that a specific application can request, and the rest are ephemeral ports that a client borrows briefly for the lifetime of one connection. Knowing which range a number falls in is often enough to guess what kind of service is behind it, before you even look it up.

Trace path · read left to right
01Hostname02IP address and port03Network path

Visual walkthrough

Follow three real demo screens

Captured on an isolated VICIdial demo: Administration screens on September 24, 2026, and the idle Agent screen on August 11, 2026. Each caption states its own capture time, and every sanitized image helps you recognize a related screen; none proves that this article's call, command, or result occurred.
Step 1 · Locate Carriers

Find carrier administration

Sanitized VICIdial Administration menu showing phones, carriers, servers, system settings, and system statuses
Captured September 24, 2026 at 21:34:11 UTC on the authorized isolated demo. This menu is a navigation map only; it does not show that any system-wide setting was changed or verified.
Step 2 · Review the carrier list

Open Carrier Listings

Sanitized VICIdial Carrier Listings page showing only the stock example carriers
Captured September 24, 2026 at 21:53:32 UTC on the authorized isolated demo. Only stock example carrier rows are shown, with addresses replaced and registration values redacted; no real carrier is present. This does not prove registration, routing, audio quality, or a completed call.
Step 3 · Confirm system SIP context

Check the allowed SIP-stack setting

Sanitized VICIdial Modify System Settings page showing revision, schema, interface, SIP-stack, and API-related controls
Captured August 11, 2026 at 16:22:08 UTC on the authorized isolated demo. This is a read-only view of system-wide settings with no credentials or addresses; it does not prove that a setting was changed or that an API request succeeded.

02 / 05

DNS and NAT are different layers

DNS (the Domain Name System) translates a name into one or more numeric records; NAT (Network Address Translation) rewrites addresses, and sometimes ports, as traffic crosses between networks. A successful DNS answer only proves a name resolves — it says nothing about whether a service is actually listening on the address it returned, and a successful SIP registration says nothing by itself about whether two-way RTP audio will actually get through.

Treat name resolution, reachability and port access as three separate questions with three separate answers, and you will avoid the single most common beginner mistake in phone-system troubleshooting: assuming that because one layer works, the others must too.

NAT matters especially for VoIP because SIP and SDP messages can carry an internal address inside their own text, not just in the IP packet header — a device behind NAT can announce an address that only makes sense on its own private network, which is a frequent, specific cause of one-way audio that has nothing to do with DNS or a firewall rule at all.

03 / 05

Guided sample: resolve a documentation name

`getent hosts` asks the system's configured resolver to look up a name, exactly the way any other program on the host would, which makes it a realistic and low-impact first check. `getent ahostsv4` narrows that same lookup to IPv4 answers specifically. example.com is reserved for documentation by IANA (the Internet Assigned Numbers Authority, which allocates address blocks and protocol numbers globally), so looking it up cannot affect a real third party.

Resolve a safe example
getent hosts example.comgetent ahostsv4 example.com
Evidence · ViciBox 12 demo capture

Captured demo response · 2026-09-23 21:34 UTC. The displayed command is the command that ran; a safe subset label means it was filtered, redacted, or fixture-scoped. Replays only after you select Replay transcript.

Command output line: getent hosts example.com
[address] example.com
[address] example.com
Command output line: getent ahostsv4 example.com
[address] STREAM example.com
[address] DGRAM
[address] RAW
[address] STREAM
[address] DGRAM
[address] RAW
Before you run it
These commands perform DNS lookups only.
Success looks like
You receive one or more addresses returned by the resolver.
Stop if
Stop if your resolver returns an unexpected captive-portal or corporate-interception result; report it rather than changing DNS yourself.

04 / 05

Guided sample: inspect local listeners

`ss -lnt` lists TCP sockets your own host is currently listening on; `ss -lnu` does the same for UDP. Both show only what this machine is doing locally — neither tells you whether a cloud firewall, a router, or a remote carrier actually permits traffic to reach that port from outside.

The `n` in both flags matters: it prints numeric addresses and ports instead of resolving them to names, which is both faster and more honest, since a reverse-DNS lookup can itself fail or mislead in exactly the kind of environment where you are trying to diagnose a network problem in the first place.

Inspect local listeners
ss -lntss -lnu
Evidence · ViciBox 12 demo capture

Captured demo response · 2026-09-23 21:34 UTC. The displayed command is the command that ran; a safe subset label means it was filtered, redacted, or fixture-scoped. Replays only after you select Replay transcript.

Command output line: ss -lnt
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 127.0.0.1:9109 0.0.0.0:*
LISTEN 0 4096 127.0.0.1:9093 0.0.0.0:*
LISTEN 0 10 127.0.0.1:5038 0.0.0.0:*
LISTEN 0 1024 0.0.0.0:42569 0.0.0.0:*
LISTEN 0 128 127.0.0.1:9001 0.0.0.0:*
LISTEN 0 100 127.0.0.1:25 0.0.0.0:*
LISTEN 0 1024 0.0.0.0:41569 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 10 0.0.0.0:8089 0.0.0.0:*
LISTEN 0 10 0.0.0.0:8088 0.0.0.0:*
LISTEN 0 1024 0.0.0.0:40569 0.0.0.0:*
LISTEN 0 450 0.0.0.0:3306 0.0.0.0:*
LISTEN 0 4096 *:4577 *:*
LISTEN 0 4096 *:443 *:*
LISTEN 0 4096 *:8443 *:*
LISTEN 0 4096 *:80 *:*
LISTEN 0 128 [[address]]:22 [[address]]:*
LISTEN 0 100 [[address]]:25 [[address]]:*
LISTEN 0 4096 *:3000 *:*
Command output line: ss -lnu
State Recv-Q Send-Q Local Address:Port Peer Address:Port
UNCONN 0 0 0.0.0.0:40569 0.0.0.0:*
UNCONN 3584 0 0.0.0.0%eth0:68 0.0.0.0:*
UNCONN 0 0 0.0.0.0:123 0.0.0.0:*
UNCONN 0 0 127.0.0.1:323 0.0.0.0:*
UNCONN 0 0 0.0.0.0:4520 0.0.0.0:*
Before you run it
Run locally and read the address:port columns.
Success looks like
You see listening TCP and UDP sockets for this host.
Stop if
Stop before exposing, forwarding or firewalling any port merely because it appears in this list.

05 / 05

Use the call path to narrow faults

For any failed call, write down five things in order: whether the name resolved, whether signaling succeeded, which transport and port were actually used, what media address was negotiated, and the exact timestamps involved. That single habit turns a vague "no audio" report into a short list of the one or two layers that could possibly be at fault.

None of the tools in this lesson require a phone system to practice on. Run them against your own lab VM and a documentation-only name today, and the exact same habit — resolve, then reach, then confirm the port — transfers directly onto SIP and RTP once VICIdial is actually in the picture.

  • I can state the difference between TCP and UDP in one sentence.
  • I know that resolving a name is not the same as reaching a listening service.
  • I record timestamps and layer-by-layer results, not just a final symptom.

Evidence ledger

Verification basis

  • Both samples in this lesson are read-only network inspection: DNS lookups against a documentation-only name, and a listing of this host's own sockets. Neither one scans or contacts another party's network.

Primary references

Sources

  1. IETF RFC 1035: DNSIETF · accessed September 23, 2026
  2. IETF RFC 791: Internet ProtocolIETF · accessed September 23, 2026
  3. IETF RFC 8200: IPv6IETF · accessed September 23, 2026
  4. iproute2 ss manualLinux man-pages · accessed September 23, 2026

Follow without guesswork

Get the next article

RSS is live now. Email delivery below is an explicit local preview and sends nothing.Open the RSS feed
Email preview only. The address stays in this browser and is never transmitted.