How to Set Up Dial-Up Networking in Linux

How to setup dial up networking in linux

Dial-up networking might seem like ancient history, but it’s still relevant — for legacy industrial equipment, remote telemetry, rural areas without broadband, backup connectivity for critical systems, and simply for understanding the fundamentals that later technologies (like DSL’s PPPoE) built upon. This article walks through how dial-up works and how to configure it end-to-end on Linux.

How Dial-Up Networking Works

Dial-up uses a modem (modulator-demodulator) to convert digital data from your computer into analog audio signals that can travel over a standard telephone line, and vice versa on the receiving end.

graph LR
    PC[Computer] -->|Serial or USB| Modem[Analog Modem]
    Modem -->|Analog Audio over Phone Line| PSTN[Telephone Network]
    PSTN --> ISPModem[ISP Modem Bank]
    ISPModem --> ISPRouter[ISP Router]
    ISPRouter --> INT((Internet))

The process, from power-on to a working connection, involves several distinct stages:

  1. Dialing: The modem dials the ISP’s phone number using AT commands.
  2. Handshake: The two modems negotiate a common modulation scheme and speed (the familiar screeching sound is this negotiation).
  3. PPP Link Establishment: Once the analog connection is up, PPP takes over to establish a data link.
  4. Authentication: The ISP authenticates the user via PAP or CHAP (see the companion article on CHAP/PAP authentication).
  5. Network Layer Configuration: IPCP (IP Control Protocol, part of PPP) assigns an IP address, DNS servers, and default route.
  6. Data Transfer: Normal IP traffic now flows over the PPP link.

Modem Types

TypeDescription
Internal (PCI/ISA)Installed inside the case, handled directly by the OS
External SerialConnects via RS-232 serial port, uses a full hardware UART
External USBConnects via USB, often requires specific drivers
Winmodem/SoftmodemRelies on host CPU/driver for signal processing; poor Linux support historically

For Linux, a hardware modem (true UART-based serial modem) is strongly preferred over “winmodems,” which depend on proprietary Windows drivers and have historically had poor or no Linux support.

Step-by-Step Dial-Up Setup on Linux

Step 1: Install Required Packages

sudo apt update
sudo apt install ppp wvdial minicom
  • ppp provides the pppd daemon for establishing the PPP link.
  • wvdial is a friendly wrapper that handles dialing and PPP invocation together.
  • minicom is useful for manually testing the modem with AT commands.

Step 2: Identify the Modem Device

dmesg | grep -i tty
ls /dev/ttyS* /dev/ttyUSB* 2>/dev/null

A serial modem typically appears as /dev/ttyS0, and a USB modem as /dev/ttyUSB0.

Step 3: Test the Modem Manually with Minicom

sudo minicom -s

Configure the serial port under “Serial port setup” to match your device, then test with basic AT commands:

AT
OK
ATDT5551234567
CONNECT 56000

AT confirms the modem responds. ATDT followed by a number dials it in tone mode; CONNECT confirms a successful handshake with the remote modem.

Step 4: Configure wvdial

Auto-detect modem settings:

sudo wvdialconf /etc/wvdial.conf

Then edit /etc/wvdial.conf to add your ISP’s details:

[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Phone = 5551234567
Username = myusername
Password = mypassword
Stupid Mode = 1

Step 5: Connect

sudo wvdial

Successful output looks like:

--> WvDial: Internet dialer version 1.61
--> Modem init string: ATQ0 V1 E1 S0=0 &C1 &D2
--> Connecting to 5551234567
--> Carrier detected. Waiting for prompt.
--> PPP negotiation detected.
--> local IP address 203.0.113.5
--> remote IP address 203.0.113.1
--> primary DNS address 203.0.113.10

Step 6: Verify Connectivity

ip addr show ppp0
ping -c 4 8.8.8.8

Alternative: Manual pppd + chat Script Setup

For finer control, you can bypass wvdial and use pppd with a chat script directly.

Create /etc/chatscripts/isp-connect:

ABORT   'BUSY'
ABORT   'NO CARRIER'
ABORT   'NO DIALTONE'
''      ATZ
OK      ATDT5551234567
CONNECT ''

Create /etc/ppp/peers/dialup:

/dev/ttyUSB0
115200
connect "/usr/sbin/chat -v -f /etc/chatscripts/isp-connect"
noauth
defaultroute
user "myusername"
persist

Bring it up:

sudo pon dialup
sudo plog
sudo poff dialup

Common AT Commands Reference

CommandPurpose
ATTest if modem responds
ATZReset modem to default settings
ATDTDial a number in tone mode
ATDPDial a number in pulse mode
ATHHang up
AT&FRestore factory defaults
ATIDisplay modem info

Best Practices

  • Use a hardware modem with genuine UART support; avoid unsupported softmodems on Linux.
  • Store dial-up credentials with restrictive file permissions (chmod 600) since wvdial.conf contains a plaintext password.
  • Prefer CHAP over PAP for authentication when the ISP supports it.
  • Set persist in your PPP peer file if you want automatic reconnection on drop.
  • Log connection attempts (plog) to diagnose intermittent line noise issues, which are common on analog lines.
  • Keep expectations realistic: dial-up tops out around 56 Kbps, and real-world throughput is often lower due to line quality.

Troubleshooting

SymptomLikely CauseFix
Modem doesn’t respond to ATWrong device path, cable issueCheck dmesg, try different /dev/ttyUSB*
Dials but no CONNECTLine noise, wrong number, ISP modem busyRetry, check line quality, verify number
Connects but authentication failsWrong username/passwordVerify credentials, check PAP/CHAP settings
Connects but drops randomlyPoor line quality, call waiting interferenceDisable call waiting (*70 prefix), check line for noise
Slow speeds even when connectedLine quality, modem negotiation fallbackCheck plog for negotiated baud rate

Further Reading

Conclusion

Dial-up networking looks simple from the outside but involves a surprisingly rich stack: analog modulation, PPP link negotiation, authentication, and IP configuration, all layered together. Even though broadband has replaced dial-up almost everywhere, understanding this stack gives you a much deeper appreciation for how PPP-based technologies like DSL and some VPNs still work today.

Total
0
Shares

Leave a Reply

Previous Post
what is cable modem and how to setup it

What Is a Cable Modem and How to Set It Up

Next Post
Configuring CHAP and PAP Authentication in Linux

Configuring CHAP and PAP Authentication in Linux

Related Posts