Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Travel router part 2



Some of you may remember that I was trying to set up a NetBSD machine to
do all of my routing in my trailer while we travel.  I hit a snag when
it turned out that my computer didn't have enough slots.  I now have a
HP 6300.  It is still tight on slots but it has three and that's all I
need for now.  Here are the assignments.

 - wm0: The onboard ethernet
 - re0: The add-on ethernet card
 - athn0: First wifi card
 - athn1: Second wifi card - not actually installed yet.

The idea is to use re0 as my DSL connection and later to use athn1 in
the campgrounds as I travel.  Here is the relevant portion of my rc.conf.

--------------------------- rc.conf ---------------------------------
colosseum=YES

auto_ifconfig=no
net_interfaces="wm0 athn0"
hostname=dilbert.druid.net
ifconfig_re0="inet 0.0.0.0/32 down"
ifconfig_wm0="inet 192.168.215.2/24"
ifconfig_athn0="192.168.225.1/24 ssid Druid mediaopt hostap"
ifconfig_pppoe0="inet 0.0.0.0 0.0.0.1 down"

if checkyesno colosseum
then
    net_interfaces="$net_interfaces re0 pppoe0"
    hostapd=YES hostapd_flags="-B /etc/hostapd.conf"
else
    defaultroute=192.168.215.1
fi
----------------------------------------------------------------------

And here is the sanitized rc.local

--------------------------------- rc.local ---------------------------
if checkyesno colosseum
then
    pppoectl -e re0 pppoe0
    pppoectl pppoe0 myauthproto=pap 'xxxxx' 'myauthsecret=yyyyy'
hisauthproto=none
    pppoectl pppoe0 max-auth-failure=1
    ifconfig pppoe0 up
    sleep 3
    /sbin/route add default 320.1.2.3
fi
-----------------------------------------------------------------------

So far so good.  If I set "colosseum" (my DSL provider) to "YES" and
reboot while connected to my DSL modem in bridge mode it comes up
connected to my provider and, if my local machines use this server as
its default route, all of the machines can talk to each other, even
between the wired and wireless networks.  Since this is also my DHCPD
server I can control the default route for the other servers.

I have a few issues still.  I will talk about NAT in a second email.

When the system connects to the provider the pppoe0 interface gets an IP
address.  However, it doesn't add it to the routing table.  Shouldn't
that happen automatically?  In this case I have a static IP and I can
just add it manually but I won't always have that.  How can I pull this
information out of the above?

I would also like to get the DNS servers since the providers often use
DNS tricks to direct you to their payment page.  I can usually work
around that but it would be nice to do it automatically.

Next steps are to set up tunneling to work and get the second Wifi card
configured as my Internet ingress.  I will also be using Hurricane to do
IPV6.

-- 
D'Arcy J.M. Cain <darcy%NetBSD.org@localhost>
http://www.NetBSD.org/ IM:darcy%Vex.Net@localhost


Home | Main Index | Thread Index | Old Index