The package structure of PPPoE (classic: Explains the role of Virtual NIC in PPPoE)

Source: Internet
Author: User

Cause:

Yesterday, with a few graduate students to transfer access to the equipment network laboratory,
And then grabbed the next PPPoE package,
The discovery package is peculiar, similar to the following:



172.16.1.118 and 172.16.1.116 are the addresses to which the server is assigned after PPPoE dial-up for two machines.

Theoretically, a ping, the capture of the frame of the package should be like this:
Icmp
Ip
Ppp
PPPoE
Mac

It feels like this thing doesn't fit with the principle.

And because I had no intention of grasping once before, I saw the PPP layer.
The two addresses were different subnets,
So I got a conclusion that
said that packets on the same subnet do not go through the PPP package. Wrong

Principle discussion:

PPP should have an IP address before dialing,
Dial-up has an address IP (PPP).

If you are using the former to communicate,
Then the IP should go directly to the MAC layer.
The same intranet user is doing this,
Therefore, PPPoE in the network users lack of strong control.

If you are using the latter communication,
So regardless of the physical location of the two machines,
Have to establish a virtual connection with the server,
Loop back from the server to communicate.

In the example above,
Used is the PPPoE server to the two addresses to ping.
So it should be the right one with a PPP package.

I discussed it with my teacher in the morning,
That there is a real problem with the phenomenon,
So the afternoon again grabbed the next bag.

The operation problem of grasping the bag:

Thanks to Cong's sharp eyes,
One way to find out is the problem of choosing a NIC.
The original choice of physical network card can be grabbed such a package:



Note Wireshark This is lower level on top.
The result is exactly the same as the theory.

--

So the phenomenon of yesterday is purely a coincidence.
When grasping different subnets, the physical network card is selected exactly.
When grasping the same subnet, select the PPP virtual network card.
That's the awkward wrong conclusion that preceded it.

Deep-Seated Questions:

After dialing, a PPP virtual network card appears.
This should be regarded as the ingenious place in the system realization.

The default route points to the gateway to the PPP NIC.
So when the user interacts in the intranet,
You can go directly to the Mac,
In addition, they are handed over from the PPP side.

and the actual realization, not as we imagine,
Each entity is stacked from top to down.
The effect of stacking them sequentially will be,
An IP entity needs to know which lower level a package should be delivered to.
To be able to decide whether to give the Mac or PPP.
This will involve changing the implementation of the IP entity, not very scientifically.

The solution to the system is to have a new NIC,
From an IP point of view, he was handed over to a Mac entity.
It's like the first picture of a bag,
See here as a pair of MAC addresses.

The network card is PPP virtual out of the network card,
It's clear how to encapsulate PPP and PPPoE,
Then fill in your Mac and server Mac.
So when all is ready,
Then to the physical network card processing.

This is a good way to explain why the two network cards caught on the different.

This juxtaposition of structures should be a clever realization,
Compared to the stacked structure, it does not cause changes in the upper layer.


Cap file download.
Two kinds of card under the grab bag,
Comes with the PPPoE connection and disconnect process.

Reference: http://hi.baidu.com/hplonline/blog/item/0832b63e8f9c6cf6838b13fb.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.