[Raspbian-devel] Testing AT&T, so routing setup
Pascal Hambourg
pascal at plouf.fr.eu.org
Fri May 6 08:43:02 UTC 2016
Le 05/05/2016 21:05, ken a écrit :
>
> Working on the Pi just from the bash prompt as root, how do I set the
> routing table (etc.) to connect directly to the DSL modem? The routing
> table on my router currently shows:
>
> # route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 77.219.160.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
> 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br0
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
> 0.0.0.0 77.219.160.1 0.0.0.0 UG 0 0 0 ppp0
>
> Here's the Pi's current routing table:
>
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
> 10.10.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>
> To plug the Pi directly into the modem, I think I'm going to need to run
> ppp and then run some commands to temporarily set the IP address of the
> ethernet port (eth0) and the routing table. I much prefer to do all
> this without changing config files so that when I reboot the Pi, the
> settings go back to their original. What do I need to 'apt-get' for the
> ppp executables?
The interface type is PPP so you need the package "ppp" providing pppd.
The DSL provider probably uses PPP over Ethernet (PPPoE). You can check
on your router. pppd can handle PPPoE direclty through a plugin and a
kernel module or in userland though the package "pppoe" (more overhead
and more options). The extra package "pppoeconf" eases the creation of a
PPPoE configuration file in /etc/ppp/peers. Once created, the connection
can be started and stopped manually with "pon" and "poff".
Some DSL providers may use the PPTP protocol instead. Then you need the
package "pptp-linux".
> And... I'm more accustomed to using the 'route'
> command to manually set up a routing table, but have used 'ip' commands
> too, if that's more familiar to you.
You should not need to issue any commands. Just make sure the PPP config
file has the options "defaultroute" to set the default route through the
PPP connection and "replacedefaultroute" to override the existing
default route.
More information about the Raspbian-devel
mailing list