Building home OpenBSD router - Part 2

July 29, 2008 7:40 pm

Start at Part 1

Configuring the Interfaces

First step is to configure the interfaces. My external interface is rl0 (”Realtek 8139″ - you can see dmesg below), my internal wired interface is xl0 (”3Com 3c905B 100Base-TX”), and my wireless interface is rum0 (”Ralink 802.11 bg WLAN”).

As I stated in Part 1 the external interface (rl0) will be a dhcp client to my cable ISP. To configure this, I created /etc/hostname.rl0 with the following information:

dhcp NONE NONE description "Global Uplink"

ifconfig rl0 looks like this:

rl0: flags=8843 mtu 1500
lladdr 00:0d:87:07:07:56
description: Global Uplink
groups: egress
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet6 fe80::20d:87ff:fe07:756%rl0 prefixlen 64 scopeid 0x2
inet  netmask 0xfffffe00 broadcast 255.255.255.255

Next the internal wired interface (xl0); will be statically configured with the address 192.168.0.1 with a 24 bit subnet mask, later this interface while be advertising DHCP service for the wired local network. I created /etc/hostname.xl0 like this:

inet 192.168.0.1 255.255.255.0 192.168.0.255 description "Local Wired"

ifconfig xl0:

xl0: flags=8843 mtu 1500
lladdr 00:10:5a:0e:da:9a
description: Local Wired
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::210:5aff:fe0e:da9a%xl0 prefixlen 64 scopeid 0x1

And lastly the wireless interface (rum0). This interface is being set up as a wireless access point (”hostap”) configured as follows:

  • Will be set to only support 802.11B for the time being
  • Utilizing channel 6
  • Use a hex WEP key
  • Configured as 192.168.1.1 with a 24 bit netmask
  • And later will be advertising DHCP for the local wireless network

My /etc/hostname.rum0 looks like this:

up mediaopt hostap mode 11b chan 6 nwid Puffy nwkey 0x
inet 192.168.1.1

ifconfig rum0:

rum0: flags=8843 mtu 1500
lladdr 00:1c:f0:90:82:22
groups: wlan
media: IEEE802.11 autoselect mode 11b hostap
status: active
ieee80211: nwid Puffy chan 6 bssid 00:1c:f0:90:82:22 nwkey 0x 100dBm
inet6 fe80::21c:f0ff:fe90:8222%rum0 prefixlen 64 scopeid 0x5
inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255

The ‘dmesg’ output:

OpenBSD 4.3 (GENERIC) #698: Wed Mar 12 11:07:05 MDT 2008
deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: VIA Ezra ("CentaurHauls" 686-class) 801 MHz
cpu0: FPU,DE,TSC,MSR,MTRR,PGE,MMX
real mem  = 259555328 (247MB)
avail mem = 242909184 (231MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 03/17/03, BIOS32 rev. 0 @ 0xfb390, SMBIOS rev. 2.2 @ 0xf0800 (43 entries)
bios0: vendor Phoenix Technologies, LTD version "6.00 PG" date 03/17/2003
bios0: VIA Technologies, Inc. VT8601
apm0 at bios0: Power Management spec V1.2 (slowidle)
apm0: AC on, battery charge unknown
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xf0000/0xdd54
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdce0/112 (5 entries)
pcibios0: PCI Exclusive IRQs: 5 10 11 12
pcibios0: PCI Interrupt Router at 000:07:0 ("VIA VT82C596A ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0xc000 0xcc000/0x4000! 0xd0000/0x4000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "VIA VT8601 PCI" rev 0x05
agp0 at pchb0: v2, aperture at 0xe0000000, size 0x10000000
ppb0 at pci0 dev 1 function 0 "VIA VT82C601 AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "Trident CyberBlade i1" rev 0x6a
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0 "VIA VT82C686 ISA" rev 0x40
pciide0 at pci0 dev 7 function 1 "VIA VT82C571 IDE" rev 0x06: ATA100, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 1: <QUANTUM FIREBALLlct15 15>
wd0: 16-sector PIO, LBA, 14324MB, 29336832 sectors
wd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 4
pciide0: channel 1 ignored (disabled)
uhci0 at pci0 dev 7 function 2 "VIA VT83C572 USB" rev 0x1a: irq 11
uhci1 at pci0 dev 7 function 3 "VIA VT83C572 USB" rev 0x1a: irq 11
viaenv0 at pci0 dev 7 function 4 "VIA VT82C686 SMBus" rev 0x40: 24-bit timer at 3579545Hz
xl0 at pci0 dev 8 function 0 "3Com 3c905B 100Base-TX" rev 0x24: irq 10, address 00:10:5a:0e:da:9a
exphy0 at xl0 phy 24: 3Com internal media interface
rl0 at pci0 dev 14 function 0 "Realtek 8139" rev 0x10: irq 11, address 00:0d:87:07:07:56
rlphy0 at rl0 phy 0: RTL internal PHY
cmpci0 at pci0 dev 15 function 0 "C-Media Electronics CMI8738/C3DX Audio" rev 0x10: irq 12
audio0 at cmpci0
opl0 at cmpci0: model OPL3
midi0 at opl0: <CMPCI Yamaha OPL3>
mpu at cmpci0 not configured
"C-Media Electronics HSP56 AMR" rev 0x20 at pci0 dev 15 function 1 not configured
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi1 at pcppi0: <PC speaker>
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
usb0 at uhci0: USB revision 1.0
uhub0 at usb0 "VIA UHCI root hub" rev 1.00/1.00 addr 1
usb1 at uhci1: USB revision 1.0
uhub1 at usb1 "VIA UHCI root hub" rev 1.00/1.00 addr 1
biomask ebed netmask efed ttymask efef
rum0 at uhub0 port 2 "Ralink 802.11 bg WLAN" rev 2.00/0.01 addr 2
rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, address 00:1c:f0:90:82:22
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

Continue to Step 3.

No Responses to “Building home OpenBSD router - Part 2”

Care to comment?

You must be logged in to post a comment.