We know the host needs to be within the same subnet as its gateway for the routing. However in PPPoE, the public IP has a subnet mask, it means that the IP is not in the same subnet as the gateway. I wonder how the host passes the packet to the gateway in this case? Many thanks!

  • Thanks guys. Say after the pppoe is established. My public ip is, the public default gateway is, I want to ping another public ip address, what is the data flow? -> -> ... -> -> ... -. -> Commented Sep 8, 2021 at 21:52
  • Need to correct myself... is not a public IP, it's in IANA private range, and private ranges cannot be visible to the Internet. There is no way packet could go directly from 172.x.x.x to 31.x.x.x; there's a NAT in between. Data flow from device to device is your workstation -> your gateway (router/modem) -> ISP PPPoE box -> some routers -> target; and back in the reverse order. Commented Sep 8, 2021 at 23:19

3 Answers 3


PPP generally establishes a point-to-point link (or session), with exactly two link partners. Everything one of them sends the other receives, no matter what addresses are used on top of the PPP level.

Since Ethernet requires valid MAC addressing (on the data link layer), PPPoE establishes a PPP session over Ethernet, ie. between two link partners. That PPPoE session is entirely independent from anything else that might be running on the Ethernet network - especially 'normal' IPv4 over Ethernet using ARP.

As to routing, the default route can simply point to the PPP interface, indicating that all packets are simply sent out of that interface. The default gateway is 'the next hop beyond'.

On Ethernet, the distinction (or multiplexing) is done using dedicated EtherType values for PPPoE (0x8863/0x8864) instead of IPv4's 0x0800. That way, the network stack doesn't pass the frames to the IP stack but to the PPPoE driver (which in turn may or may not pass extracted PPP frames to the IP stack or any other supported L3 stack).


Because it's POINT-TO-POINT. Traffic only has one place to go... the other side of the link. /32 routes are added to the route table indicating what is on the other side. One could also just use an interface route. (But a lot of host OSes have trouble with those. And it leads to confusion when people don't understand this.)

  • 3
    For the record, p-t-p links don't have to have addresses. I've setup many T1's as unnumbered interfaces. (internally, Cisco does assign them a number, but that's an artifact of how IOS does (did?) things.)
    – Ricky
    Commented Sep 8, 2021 at 19:07
  • 2
    P2P links may use addressing but they don't need to.
    – Zac67
    Commented Sep 8, 2021 at 19:19

I'm not sure if I understand your question. translates to "This device, and only this device". Or maybe "this interface" is a better expression. It's not part of any network, so it has no gateway. The IP isn't "public" either in the sense that you could reach it from the inertnets, it's exclusively used in a closed peer-to-peer circuit like DSL.

Let's say your ISP:s "public" address is ( They don't provide you an address range, they provide you a single IP address, let's say I don't have a PPPoE line, so I can't check, but logic says this is also a /32 address - there's really no reason for it not to be. That address would be assigned to the modem's PPPoE interface.

Your modem provides internal IP addressing in the range of and reserves for itself to be provided as a default gateway. Any traffic your PC wants to send to the internyet it will send to the modem. The modem NATs the traffic, so the ISP only receives traffic originating from a single host,

Whether your modem has a default route to or if is assigned as a default gateway doesn't change how it forwards the traffic. Anything destined outside of will be sent to The ISPs router likely does have a routing table entry; "send all traffic to directly to it" - it knows the host is reachable through the PPPoE link.

So the only place where "gateway" enters the picture in any meaningful sense is your home network.

I hope this helps a bit. I admit I'm not an expert on PPPoE, so I can only try to explain this on conceptual level as I understand it. I'm sure more knowledgeable members of the community will point out my mistakes :-)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.