Difference between ppp0 vs wwan0

1. What is the difference between wwan0 & ppp0 and why do I see ppp0 in addition to wwan0

wwan0 is a network interface exposed by the modem via usb. ppp0 is the PPP interface created by pppd when the modem gets connected using ATD call in the serial port.

2. Why is the IP address assigned to ppp0 and not wwan0 after a connection is established.

Your connection manager doesn't know how to use the wwan interface and just uses the 'legacy' method of doing everything over a TTY (both AT commands for control and PPP for data).

With some more detail...

Your modem exposes a WWAN network interface, but you're not using it. Instead, your connection manager is launching a PPP session over the same (or other) serial port where you send the AT commands (which is why you get the ppp0 interface only when connected). If you're targeting LTE speeds you do want to use the WWAN interface instead; so try to use a connection manager that knows how to use that interface (e.g. ModemManager).

Knowing which modem is it would help to define a better answer anyway...

If this is e.g. a Qualcomm-based modem (and your kernel is >= 3.4), you're likely getting not only a WWAN interface in addition to the ttys, but also a QMI control interface at /dev/cdc-wdm. If you want to use that wwan0 interface you cannot use AT commands, and instead need to launch the connection using the QMI protocol through e.g. libqmi.

If this is e.g. a MBIM-based modem (and your kernel is >= 3.8), then you'll also get a /dev/cdc-wdm interface, but will need to use the MBIM protocol to get the modem connected with the wwan0, through e.g. libmbim.

If this is e.g. a Huawei modem, you may instead be getting a wwan interface that needs AT^NDISDUP command to get connected.

If this is e.g. a Icera-based modem, the connection AT command may instead be AT%%IPDPACT...

And so on. Basically, as soon as you get a WWAN interface, you just need to use either a vendor-specific AT command, or a generic QMI or MBIM commmand. Again, ModemManager does this for you.

A bit more on modem management protocols can be found in these slides:

  • Mobile Internet in GNOME
  • Mobile Broadband Modem Protocols

Let me explain how this Works. I wish I could find a picture. I'll be typing this awhile, so I'm posting this now and will edit it as I go.


Lets say you have 4 Wireless Devices in your home, plus an ISP. You bring home your Aircard(GSM Modem) and it happens to have a Wireless Antenna on it, from Cellphone company Pizzazz. Pizzazz sold you 1,000 minutes for Cheaper than your ISP. You've gone over your BitCoin allowance on your ISP and don't want to pay overage fees on your bill...

You Decide To...

Use Your GSM modem as a Stopgap because you've used none of your 1,000 minutes. A GSM works like so:

Cellphone connects to GSM, Laptop Connects to GSM, Ipad Connects to GSM like so, using the Wireless Antenna:

++++++++++++++++ 
+  Cellphone   +  
+  IPad        +  => GSM  
+  Laptop      +    
++++++++++++++++ 

But You Ask...

How does the GSM, connect to the Internet:

++++++++++++++++++++++ 
+  GSM               +  
+  -----             +  => Internet  
+  Username/Password +    
++++++++++++++++++++++ 

Now when we Bridge both networks together we get:

++++++++++++++++     ++++++++++++++++++++++++++
+  Cellphone   +  => +   GSM                  +
+  IPad        +     +   -----------          + => Internet
+  Laptop      +     +   Username/Password    +
++++++++++++++++     ++++++++++++++++++++++++++

Now, the Interface names in Linux also tell what they are:

  • wwan0 - Wireless Wide Area Network Zero
  • ppp0 - Point to Point Protocol Zero

Updating my Stick Photo:

wwan0                 ppp0
++++++++++++++++     ++++++++++++++++++++++++++
+  Cellphone   +  => +   GSM                  +
+  IPad        +     +   ----------------     + => Internet
+  Laptop      +     +   Username/Password    +
++++++++++++++++     ++++++++++++++++++++++++++

In other words the GSM behaves just like any network would. The problem is that the GSM has no DNS Server to allow you to route, until after it negotiates with a Dial-up/PPPoE Authentication Server. Once connected to the negotiation server, your minutes are deducted from your 1,000 and you are billed. The IP Address is connected to ppp0 because the negotiation was sucessful, and the Point to Point Protocol manages the connectivity aspect:

  • Has this connection been Terminated?
  • Is it time for me to ask for a new IP Address from the DHCP Server?
  • Am I creating a new connection?
  • How long is my lease time?

The wwan0 on the other hand only manages the connected devices. It also asks itself questions like those above, but it isn't allowed to interfere with ppp0 because it knows "Hey I'm not the one in charge of that device. I should keep watch over my devices though. Since I dunno what it's for, I better leave it alone."


Of course, that last paragraph was the simplified version, but if you like I can list the Actual Standards and Protocols used by each device.