Mobile phone Internet can use Wifi, can also use 4G, what is the difference between the two, Wifi module with 4G unlimited communication module is the same kind of Internet media, a 4G mobile phone is two network cards? Whose MAC address is the phone talking about, for example, when you get the MAC address through the system API, what kind of MAC address are you getting? This article is based on the MAC address (as the unique identifier of the device) problem, simple analysis of the difference between the two Internet access methods, literacy, master do not beat the block:

  • Is Wifi using the same “network card” as 4G
  • Is the MAC address for Wifi and 4G Internet the same
  • What is the difference between the two implementations (TCP/IP)

The answer is no. Generally speaking, Wifi uses an Ethernet card, which has a 48-bit unique MAC address, while 4G uses a baseband module inside the phone for wireless Internet access.

The difference between mobile phone Wifi and 4G Internet hardware facilities

In terms of hardware environment, a mobile phone connects to a wireless router and accesses the Internet through Wifi, but it still goes through Ethernet. In the link layer, Ethernet protocol is used. That is to say, this Internet mode can be completely regarded as a mobile phone connected to a network cable, so its media can still be regarded as a network card in the traditional sense:

However, 4G Internet is a cellular network. The signal is transmitted in the air in the form of electromagnetic wave and sent to the nearest base station. The base station forwards the signal to the base station covering the target device through the switch, and notifies the target device and sends back the result. Point-to-point Protocol (PPP) is generally used, and its Internet access media is the wireless baseband communication module dedicated for wireless communication:

The difference of hardware determines that different adaptation methods must be adopted in software system.

The difference between Wifi Internet and 4G Internet in TCP/IP protocol

Wifi Internet access can be regarded as network adapter device Internet access, still follow IEEE 802, the link layer is Ethernet, supports ARP/RARP, at the same time, the link layer uses Ethernet protocol to encapsulate frame data, the front is 48 bits of target MAC address and source MAC address

However, WHEN 4G traffic is connected to the Internet, PPP protocol is adopted at the link layer, which does not have the concept of MAC address.

Is the MAC address for Wifi and 4G Internet the same

The answer is obvious: no, there is no MAC address at all, and every wireless module has an IMEI (International Mobile Equipment Identity) to identify it.

conclusion

This paper briefly introduces the differences between the two ways of accessing the Internet on mobile phones, mainly to clarify the concept of MAC address. The whole 4G Internet and phone involves the knowledge of Android RIL framework, which will be analyzed again when there is time in the future.

The difference between Android wifi and 4G Internet

For reference only, welcome correction