The k6-2.weeble.com machine will be performing the routing functions and will act as a gateway to the internet.
Two ethernet cards are needed: one for connection to the DSL modem and another to connect to the hub. Install the cards and boot a GENERIC kernel (/boot/kernel.GENERIC). Custom kernels will need the drivers added for these devices.
Check the output of dmesg for the k6-2.weeble.com to make sure the ethernet cards were properly detected. The ed0 ethernet device connects to the dsl modem and is the interface to the internet.
ed0: port 0xec00-0xec1f irq 9 at device 10.0 on pci0 ed0: address 52:54:05:de:73:1b, type NE2000 (16 bit)
The dc0 ethernet device connects to the hub for the LAN.
dc0: port 0xe800-0xe8ff mem 0xeb000000-0xeb0003ff irq 11 at device 8.0 on pci0 dc0: Ethernet address: 00:04:5a:74:6b:b5
Backup the original /etc/ppp/ppp.conf:
# cp /etc/ppp/ppp.conf /etc/ppp/ppp.conf.original
The Handbook PPP over Ethernet (PPPoE) section was used as a guide for establishing the DSL connection. Use your favorite text editor and modify /etc/ppp/ppp.conf appropriately. Replace the instances of ******** in the example ppp.conf shown below with your specific information:
default:
set log Phase tun command
set ifaddr 10.0.0.1/0 10.0.0.2/0
allow users ********
set mru 1492
set mtu 1492
enable dns
set reconnect 3 5
set redial 10 4
ez:
set device PPPoE:ed0
set authname ********
set authkey ********
set dial
set login
set timeout 0
delete ALL
add default HISADDR
The /etc/rc.conf will need to have the hostname and the network interface parameters:
gateway_enable="YES"
hostname="k6-2.weeble.com"
ifconfig_ed0="inet 192.168.0.1 netmask 255.255.255.0"
ifconfig_dc0="inet 192.168.0.2 netmask 255.255.255.0"
Make sure that the entries for the network interfaces match the physical connections of the hardware. In this case, the ed0 will be connected to the DSL modem and the dc0 will connect to the 10BaseT hub.
The hosts file contains information regarding the known hosts on the network. Add the information for each host to the /etc/hosts in a similar manner to this example:
127.0.0.1 localhost.weeble.com localhost
192.168.0.2 k6-2.weeble.com k6-2
192.168.0.2 k6-2.weeble.com.
192.168.0.10 pentium.weeble.com pentium
192.168.0.10 pentium.weeble.com.
192.168.0.11 486.weeble.com gw
192.168.0.11 486.weeble.com
Refer to hosts(5) for further information on the format of this file.
The /etc/resolv.confis automatically generated by ppp if enable dns is included in /etc/ppp/ppp.conf. The ISP must support this option or it will need to be manually created. This is how it will appear after ppp is started:
domain weeble.com
nameserver 204.117.214.10
nameserver 199.2.252.10
If you need to create the /etc/resolv.conf manually, be sure to use your nameservers and not those shown in the example. Refer to resolv.conf(5) for more information.