[nzlug] ADSL modem for pppoe bridge (half bridge)
Nick 'Zaf' Clifford
zaf at nrc.co.nz
Sun Jun 15 20:18:34 NZST 2008
Nick 'Zaf' Clifford wrote:
> As for more info on the static route hack, its only needed when the DHCP
> lease from the DSL router has its "default gateway" address it issues as
> an address that is NOT inside the ip/subnet that it issues.
>
>
And to reply to myself, but to clarify/explain one thing.
The reason why the DSL router would issue a default gateway address that
isn't in the same subnet as the IP issued is because the link between
the DSL and the ISP is a Point-To-Point link (PPP).
With a PPP link, either side of the link is given an IP address. (Not a
subnet, just an IP address). eg
ISP: 12.4.1.1
DSL: 12.4.34.241
The definition is its point to point, not network to network, so there
is no subnet needed or specified.
Most of the time in the PPP negotiation the ISP also informs the DSL
router to use it (12.4.1.1) as the "default route".
Again, no special routing is needed on the PPP link, as by definition
its point to point, so the kernel/routing knows how to reach 12.4.1.1,
and shoves everything down the wire to it.
In a traditional rig, the DSL router uses NAT, and gives the clients a
nice safe address (such as 192.168.1.5), and itself might be
192.168.1.1. NAT (or masquerading) should be well understood, so this
should make sense to everyone (but feel free to tune in next week for an
introductory to that too ;) ).
Now when you do half bridging, thats where the mess comes in.
The DSL router has to give the PC on the ethernet side the IP address
its been given by the ISP. The easiest way to do this is with the DHCP
protocol, the DSL router issues the address as a DHCP lease to the client.
The problem is the ethernet protocol is NOT point to point, it expects
there are many devices on the one segment, so we have this thing called
subnetting (ok, so for the pedantic I'm simplifying / incorrect). The IP
and subnet mask tells us what addresses are on the ethernet segment.
With the non bridging method above, the DSL router issues an address
such as 192.168.1.5 subnet 255.255.255.0, which says 192.168.1.0 -
192.168.1.255 are all on the same subnet (missing the network/broadcast
address I know, but again, simplifying)
So back to bridging, the DSL router has been given a single address from
the ISP, and now needs to give it to the client, but it needs to issued
with a subnet, as ethernet isn't point to point.
At this point, the answer varies depending on your model of DSL router.
Some do a class C cut, and would (in the case above), issue 12.4.34.241
subnet 255.255.255.0, some issue with a subnet of 255.255.255.255 (which
is technically the correct answer), and some do real odd stuff like
issue 12.4.34.241 subnet 0.0.0.0 (all balls). I don't know how the last
one could be anywhere near the correct answer, it would imply the whole
Internet is sitting on your ethernet segment (damn, there'd be some
collisions in that setup!)
The missing component is the DSL router needs to tell the client how to
send packets to the internet, so issues a default route in the DHCP
offer packet, so now if you jump back to the first email, thats where I
started.
Wow. I think I got that all right. If anyone things I've got any major
points above totally wrong or misleading, then let me know.
Nick
More information about the NZLUG
mailing list