DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
Old 15th December 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,148
Thanked 182 Times in 149 Posts
Default

Just like your laptop doesn't have to do NAT when directly connected to the D-Link router, your OBSD Atom board also doesn't.

The idea is to check whether OBSD 4.6 can handle the stream handed down by the router.

After a dhclient re0 you should have a valid '/etc/resolv.conf' with a nameserver line in it.
That will take care of the translation of hostnames -> IP addresses.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 16th December 2009
EverydayDiesel EverydayDiesel is offline
Shell Scout
 
Join Date: Jan 2009
Posts: 105
Thanked 0 Times in 0 Posts
Default

ok I did alot of testing tonight and here is the results.

All test below were from the ftp -4a command you suggested. I tried different sites (first with the bsd and when that was done i downloaded the exact same file with my laptop). All the test were done through the dlink so I didnt have to deal with pppoe authentication.

openbsd amd64: 300k avg
win xp laptop (same file a few seconds after the openbsd finished 1.7megs)

i tried several sites with similar results. openbsd got no greater then 300k...windows consistantly got 1+ meg

Then I took a old 3com 100mb card and created /etc/hostname.xl0 with dhcp in the file. I never could get a file to download. I kept getting watchdog messages.


Then I formatted and put windows vista on the atom machine.(flame suit on) After installing the network card drivers I got 1.7meg from the same file. I got the same results from both network cards.


Then I reformatted openbsd with i386 with no changes except for /etc/hostname.re0 == dhcp
Top speed on the same file was 300k.
I was able to get a different 3com card to work on this box but i only got about 200k though the pci slot.


I have saved my dmesg and hopefully that will help diagnose the problem
Reply With Quote
Old 16th December 2009
EverydayDiesel EverydayDiesel is offline
Shell Scout
 
Join Date: Jan 2009
Posts: 105
Thanked 0 Times in 0 Posts
Default

OpenBSD 4.6 (GENERIC.MP) #89: Thu Jul 9 21:32:39 MDT 2009
deraadt@i386.openbsd.org:/usr/src/sy...ile/GENERIC.MP
cpu0: Intel(R) Atom(TM) CPU 330 @ 1.60GHz ("GenuineIntel" 686-class) 1.61 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,P GE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,S S,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,TM2,CX16,xTPR
real mem = 1064505344 (1015MB)
avail mem = 1020481536 (973MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 07/10/09, BIOS32 rev. 0 @ 0xf0010, SMBIOS rev. 2.5 @ 0xfd170 (27 entries)
bios0: vendor American Megatrends Inc. version "1.0a" date 07/10/2009
bios0: Supermicro X7SLA
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC MCFG SLIC OEMB
acpi0: wakeup devices P0P2(S4) P0P1(S4) PS2K(S4) PS2M(S4) EUSB(S4) MC97(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4) P0P8(S4) LAN0(S1) P0P9(S4) LAN1(S1) USB0(S4) USB1(S4) USB2(S4) USB3(S4) SLPB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 133MHz
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Atom(TM) CPU 330 @ 1.60GHz ("GenuineIntel" 686-class) 1.61 GHz
cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,P GE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,S S,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,TM2,CX16,xTPR
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Atom(TM) CPU 330 @ 1.60GHz ("GenuineIntel" 686-class) 1.61 GHz
cpu2: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,P GE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,S S,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,TM2,CX16,xTPR
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Atom(TM) CPU 330 @ 1.60GHz ("GenuineIntel" 686-class) 1.61 GHz
cpu3: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,P GE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,S S,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,TM2,CX16,xTPR
ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 1, remapped to apid 4
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P2)
acpiprt2 at acpi0: bus 4 (P0P1)
acpiprt3 at acpi0: bus 1 (P0P4)
acpiprt4 at acpi0: bus -1 (P0P5)
acpiprt5 at acpi0: bus -1 (P0P6)
acpiprt6 at acpi0: bus -1 (P0P7)
acpiprt7 at acpi0: bus 2 (P0P8)
acpiprt8 at acpi0: bus 3 (P0P9)
acpicpu0 at acpi0
acpicpu1 at acpi0
acpicpu2 at acpi0
acpicpu3 at acpi0
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: PWRB
bios0: ROM list: 0xc0000/0xaa00! 0xcb000/0x5200
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945G Host" rev 0x02
vga1 at pci0 dev 2 function 0 "Intel 82945G Video" rev 0x02
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xe0000000, size 0x10000000
inteldrm0 at vga1: apic 4 int 16 (irq 10)
drm0 at inteldrm0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x01: apic 4 int 16 (irq 10)
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 4 "Intel 82801G PCIE" rev 0x01: apic 4 int 16 (irq 10)
pci2 at ppb1 bus 2
re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x02: RTL8168C/8111C (0x3c00), apic 4 int 16 (irq 10), address 00:30:48:de:ce:fa
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ppb2 at pci0 dev 28 function 5 "Intel 82801G PCIE" rev 0x01: apic 4 int 17 (irq 11)
pci3 at ppb2 bus 3
re1 at pci3 dev 0 function 0 "Realtek 8168" rev 0x02: RTL8168C/8111C (0x3c00), apic 4 int 17 (irq 11), address 00:30:48:de:ce:fb
rgephy1 at re1 phy 7: RTL8169S/8110S PHY, rev. 2
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x01: apic 4 int 23 (irq 5)
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x01: apic 4 int 19 (irq 7)
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x01: apic 4 int 18 (irq 6)
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x01: apic 4 int 16 (irq 10)
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x01: apic 4 int 23 (irq 5)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xe1
pci4 at ppb3 bus 4
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GB LPC" rev 0x01: PM disabled
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x01: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 31 function 2 "Intel 82801GR RAID" rev 0x01: DMA, channel 0 wired to native-PCI, channel 1 wired to native-PCI
pciide1: using apic 4 int 19 (irq 7) for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: <ST3500321CS>
wd0: 16-sector PIO, LBA48, 476940MB, 976773168 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x01: apic 4 int 19 (irq 7)
iic0 at ichiic0
lm1 at iic0 addr 0x2d: W83627DHG
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM ECC PC2-5300CL5
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
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
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lm0 at isa0 port 0x290/8: W83627DHG
lm1 detached
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
uhidev0 at uhub1 port 2 configuration 1 interface 0 "Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)" rev 1.10/3.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
umass0 at uhub0 port 1 configuration 1 interface 0 "Sony Storage Media" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Sony, Storage Media, 0100> SCSI0 0/direct removable
sd0: 7743MB, 512 bytes/sec, 15857664 sec total
Reply With Quote
Old 16th December 2009
EverydayDiesel EverydayDiesel is offline
Shell Scout
 
Join Date: Jan 2009
Posts: 105
Thanked 0 Times in 0 Posts
Default

maybe i should try openbsd 4.5 i386 instead of 4.6?
Reply With Quote
Old 16th December 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,148
Thanked 182 Times in 149 Posts
Default

First try to get a better performance through increasing the tcp receive space:
Code:
# sysctl net.inet.tcp.recvspace=65535 
net.inet.tcp.recvspace: 32768 -> 65535
You could try 4.5 and/or the latest and greatest snapshot.
What is the output of ifconfig -A? What do netstat -in and netstat -ss report after some downloads?

BTW an easy way to install another version is to download the bsd.rd file and do an ftp install. See http://openbsd.org/faq/faq4.html#bsd.rd
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 17th December 2009
EverydayDiesel EverydayDiesel is offline
Shell Scout
 
Join Date: Jan 2009
Posts: 105
Thanked 0 Times in 0 Posts
Default

were getting closer
sysctl net.inet.tcp.recvspace=65535

got me to 1mb!

Doubling that got me to 1.6mb and doubling it again netted me the same 1.6 meg.
The lappy got me 1.7mb on the same file/server.


ifconfig -A

Code:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33200
	priority: 0
	groups: lo
	inet 127.0.0.1 netmask 0xff000000
	inet6 ::1 prefixlen 128
	inet6 aa11::1%lo0 prefixlen 64 scopeid 0x4
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 11:11:11:aa:aa:aa
	priority: 0
	groups: egress
	media: Ethernet autoselect (1000baseT full-duplex,rxpause,txpause)
	status: active
	inet6 aa11::111:11aa:aaaa:aaaa%re0 prefixlen 64 scopeid 0x1
	inet 192.168.1.100 netmask 0xffffff00 broadcast 192.168.1.255
re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr 11:11:11:aa:aa:aa
	priority: 0
	media: Ethernet autoselect (none)
	status: no carrier
	inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
	inet6 aa11::111:11aa:aaaa:aaaa%re1 prefixlen 64 scopeid 0x2
enc0: flags=0<> mtu 1536
	priority: 0
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33200
	priority: 0
	groups: pflog
netstat -ss

Code:
ip:
	33684 total packets received
	33684 packets for this host
	22459 packets sent from this host
	33684 input datagrams checksum-processed by hardware
	22459 output datagrams checksum-processed by hardware
icmp:
igmp:
ipencap:
tcp:
	22452 packets sent
		11 data packets (125 bytes)
		11314 ack-only packets (22354 delayed)
		11123 window update packets
		4 control packets
		22452 packets hardware-checksummed
	33677 packets received
		13 acks (for 127 bytes)
		9 duplicate acks
		33617 packets (48387421 bytes) received in-sequence
		1 completely duplicate packet (0 bytes)
		46 out-of-order packets (64800 bytes)
		2 window update packets
		33677 packets hardware-checksummed
	2 connection requests
	2 connections established (including accepts)
	2 connections closed (including 0 drops)
	15 segments updated rtt (of 15 attempts)
	33605 correct data packet header predictions
	44 SACK options sent
udp:
	7 datagrams received
	7 input packets hardware-checksummed
	7 output packets hardware-checksummed
	7 delivered
	7 datagrams output
esp:
ah:
etherip:
ipcomp:
carp:
pfsync:
pflow:
ip6:
	12 packets sent from this host
	Mbuf statistics:
icmp6:
	Output packet histogram:
		multicast listener report: 10
		neighbor solicitation: 2
	Histogram of error messages to be generated:
pim6:
rip6:

netstat -iin
Code:
Name    Mtu   Network     Address              Ipkts Ierrs    Opkts Oerrs Colls
lo0     33200 <Link>                               0     0        0     0     0
lo0     33200 127/8       127.0.0.1                0     0        0     0     0
lo0     33200 ::1/128     ::1                      0     0        0     0     0
lo0     33200 aa80::%lo0/ aa80::1%lo0              0     0        0     0     0
re0     1500  <Link>      11:11:11:aa:aa:aa    33689     0    22465     0     0
re0     1500  aa80::%re0/ aa11::111:11aa:aa    33689     0    22465     0     0
re0     1500  192.168.1/2 192.168.1.100        33689     0    22465     0     0
re1     1500  <Link>      11:11:11:aa:aa:aa        0     0        0     0     0
re1     1500  10.0.0/2    10.0.0.1                 0     0        0     0     0
re1     1500  aa80::%re1/ aa11::111:11aa:aa        0     0        0     0     0
enc0*   1536  <Link>                               0     0        0     0     0
pflog0  33200 <Link>                               0     0        0     0     0
Reply With Quote
Old 17th December 2009
EverydayDiesel EverydayDiesel is offline
Shell Scout
 
Join Date: Jan 2009
Posts: 105
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by BSDfan666 View Post
Why would i386 be noticeably faster than amd64?
Im also curious on this question
Reply With Quote
Old 17th December 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,148
Thanked 182 Times in 149 Posts
Default

RE: tcp receive space of 131070

So this seems to be the optimal setting for getting 1.6 MB downloads, when the Atom board has been connected directly to your D-Link router, and doesn't have to do the PPPoE stuff.

The bad news is that increasing this value on OBSD as an router, has no influence whatsoever
It only has effect on a communication end-point, or a box which has setup a network or internet socket. A router only passes packets in and out and doesn't use network sockets, whose speed of operation can be optimized by increasing buffer space.

RE: the netstat diagnostics

The netstat -ss doesn't show any excessive retransmissions or other errors, so that is ok. Same applies to the netstat -in output.

Strategy to use OBSD on the Atom board as router

One simple way is to enable pf and instruct it to do NAT.

Why? Your external interface re0 gets a 192.168.0.0/24 address from the D-link, while your internal network, your laptop, is connected to re1, which has a 10.0.0.1/24 address.

The D-link will have no problem NATting the 10.0.0.0/24 address of the laptop to it's public address. When a return packet arrives for a connection initiated by the 10.0.0.0 network, the D-link will have no problem in properly converting, deNATting, the packet back to the initiating 10.0.0.0/24 address.

It has only one slight problem, it doesn't know where the hell to send this packet to. It only knows its internal 192.168.0.0/24 network.

It wouldn't have this problem if it could be told to route reply packets for the 10.0.0.0/24 network to 192.168.0.1 address. In other words for the D-link 192.168.0.1 is the gateway for the 10.0.0.0/24 network.

If the D-link doesn't allow to add this static route, you can circumvent it by doing NAT on the OBSD box.

My assignment to you:
  1. Refrain from doing PPPoE on the OBSD box for now,
  2. Create a simple pf which just does NAT and only allows traffic out, which has been initiated by your 10.0.0.0/24 and 192.168.0.0/24 network.

    Because pf makes these rules stateful, the return traffic will have allowed in without any problem
  3. Find out whether the D-link can be configured to accept static routes.

    If that is possible pf doesn't have to do NAT

Re: amd64 versus i386 speed

Because I wanted this thread to focus on the network speed issue, and not drift away to a why "OBSD i386 would be faster than amd64 " discussion I refrained from speaking out till now.
.
I have read several times on misc where Henning Brauer suggested to use OpenBSD i386 on AMD boxes, instead of the amd64 version if speed for a pf box was a concern. I only didn't manage to locate those messages in the misc mailing list archives

Feel free to open another thread for this issue, but in this thread let us focus on the network speed problem. Thanks
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 17th December 2009
EverydayDiesel EverydayDiesel is offline
Shell Scout
 
Join Date: Jan 2009
Posts: 105
Thanked 0 Times in 0 Posts
Default

I will just move from 10.0.0.X to 192.168.0.XXX to make things simpler for now.

I will keep the dlink doing pppoe and use re0 to interface with the router via dhcp like you suggested.
Then I will use these rules (for now)
Code:
ext_if="re0"
int_if="re1"

set block-policy drop

match in all scrub (no-df)

nat on $ext_if from !($ext_if) -> ($ext_if:0)

block in
block out

pass out keep state

antispoof quick for { lo $int_if }

pass out quick on $int_if from any to any
pass in quick on $int_if from any to any
pass out quick on $ext_if from any to any

If increasing the receive space doesnt affect the router then what can I do to increase the throughput? I know its the box itself that is the bottle neck so there has to be something that can be done to make this thing route fast?

Thanks again for answering all my noob questions.
Reply With Quote
Old 17th December 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,148
Thanked 182 Times in 149 Posts
Default

You cannot move the re1 interface from 10.0.0.0/24 to 192.168.0.0/24 when re0 is already using 192.168.0.0/24. That doesn't work in the BSDs

Both interfaces, re0 and re1 have to be on different networks. If the D-link hands out a 192.168.0.0/24 address by DHCP to re0 then using a 10.0.0.0 network for re1is a good choice.

Re: throughput

I suspect the userland PPPoE you used was the culprit. Just try this setup first and check which download speed your laptop gets now.
We still have other possibilities to explore, but first check whether my recommendation works. Then we always can fall back on it, when the other alternatives like kernel PPPoE don't work out

RE: your pf

J65nko's first rule for a pf ruleset:

Start with block log all as the default policy. This will block both in and outgoing traffic.
In a second terminal as root do:
Code:
tcpdump -eni pflog0
Any blocked packets will show up in the tcpdump output, which is a great help in fixing your ruleset.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 17th December 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Quote:
Originally Posted by J65nko View Post
I have read several times on misc where Henning Brauer suggested to use OpenBSD i386 on AMD boxes, instead of the amd64 version if speed for a pf box was a concern. I only didn't manage to locate those messages in the misc mailing list archives
Henning has told people not to use MP systems as routers because the kernel and pf do not take advantage of them.. but AFAIK he hasn't said anything about the i386 port being faster than the amd64 port.

As for cranking the {recv,send}space knobs, they typically don't recommend tweaking those either.. 65535/65536 are probably the highest you should set them if you ever do, any higher and you're wasting memory and bandwidth on every connection.

Your Atom router should be more then capable achieving full bandwidth if you generate enough traffic on your LAN systems, if you find the global TCP/UDP window sizes on your BSD systems too small then you're free to tweak them if you have the need.. the need for speed.

Sorry for going off-topic J65nko, but personally I would recommend against using SOHO router devices.. OpenBSD has 2 PPPoE clients, kernel and userland.
Reply With Quote
Old 18th December 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,148
Thanked 182 Times in 149 Posts
Default

Quote:
Originally Posted by BSDfan666 View Post
Henning has told people not to use MP systems as routers because the kernel and pf do not take advantage of them.. but AFAIK he hasn't said anything about the i386 port being faster than the amd64 port.
I found those misc posts, see http://www.daemonforums.org/showthread.php?t=4107 for a new thread about this

Quote:
As for cranking the {recv,send}space knobs, they typically don't recommend tweaking those either.. 65535/65536 are probably the highest you should set them if you ever do, any higher and you're wasting memory and bandwidth on every connection.
If using 2x65535 speed gives him the equivalent download speed of his laptop directly connected to his D-link router, that proves, it was neither a hardware issue nor an OpenBSD issue.

This was the only point of the exercise, because the size of the receive space will have nada effect when the Atom board will be used as a router.

Quote:
Sorry for going off-topic J65nko, but personally I would recommend against using SOHO router devices.. OpenBSD has 2 PPPoE clients, kernel and userland.
I mentioned in my previous post that kernel PPPoE would be the second option we would explore. But we first want to make sure his board performs well as a router using the most simple configuration.

Please remember that the OP figuratively speaking , just walked out of Uncle Bill Gates' kindergarden, so we go step by step
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 18th December 2009
EverydayDiesel EverydayDiesel is offline
Shell Scout
 
Join Date: Jan 2009
Posts: 105
Thanked 0 Times in 0 Posts
Default

Well I took your recommendation and hooked the dlink up to do pppoe authentication. re0 gets an ipaddress from the dlink via dhcp.

re1 is set to 192.168.2.1 which is hooked to a netgear switch.
the net gear switch goes out to my laptop.

Im using the basic pf.conf rules that i posted above.

My result was 1.5M download. (not at all what i was expecting)
Where should I go from here? Do we have a problem with pppoe?
Reply With Quote
Old 18th December 2009
EverydayDiesel EverydayDiesel is offline
Shell Scout
 
Join Date: Jan 2009
Posts: 105
Thanked 0 Times in 0 Posts
Default

just for grins....i decide to put my old ppp.conf back in, change rc.conf and pf.conf to reflect tun0

The speed went right down to 300k


What doesnt make sence is the fact that this is the same ppp.conf i have used for over 2 years with no problems in speed. After I upgrade the hardware (and the os to 4.6) all of a sudden I have these problems. (maybe the ISP changed their settings?)
Reply With Quote
Old 18th December 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,148
Thanked 182 Times in 149 Posts
Default

OK, so we now have confirmation that the hardware is OK and that OpenBSD is not the bottleneck in routing and filtering packets to your laptop.
One problem solved

There are 2 implementation of pppoe in OpenBSD, one is part of the kernel and the other one is in userland.
The userland one has the advantage that it is somewhat easier to debug, but it is slower because data needs to be copied from/to kernel space to/from userland.

The kernel pppoe is described in the pppoe(4) man page. It is quite readable and even gives an example configuration.

Give it a try. Just make sure you know how to revert your setup in case things don't work out

One warning, I don't use PPPoE so any efforts of my side will be completely theoretical. Or maybe somebody with kernel pppoe experience can give a helping hand.

BTW My daughter lives in Eindhoven, her appartment block has 100mbit up/down. Unbelievable fast.
I live about 25 km more to the southeast, 1 km from the Belgian border. The town government is trying to get people interested in a glass fiber connection here too.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 18th December 2009
EverydayDiesel EverydayDiesel is offline
Shell Scout
 
Join Date: Jan 2009
Posts: 105
Thanked 0 Times in 0 Posts
Default

100mbit?? Thats crazy fast!



I changed my setup and the connection went right back down to 300k

this was my ppp.conf file

Code:
default:
     set log Phase Chat LCP IPCP CCP tun command
     set timeout 0
     set redial 15 0
     set reconnect 15 10000
     set server /var/run/ppp.sock "" 0177

    pppoe:
     set device "!/usr/sbin/pppoe -i re0"
     set mtu max 1492
     set mru max 1492
     set speed sync
     enable lqr
     disable acfcomp protocomp
     deny acfcomp
     add! default HISADDR
     set authname myusername
     set authkey mypwd

While I was googling the man pages for pppoe I came across this thread
http://forums.whirlpool.net.au/forum...fm/481579.html
Reply With Quote
Old 18th December 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

J65nko has just told you about pppoe(4), an alternative "non-userland" client.. i.e: no ppp.conf file.. configuration is done in hostname.if(5) files.
Reply With Quote
Old 18th December 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,148
Thanked 182 Times in 149 Posts
Default

From the command line:
Code:
$ man 4 pppoe
This will show the kernel PPP manual page.

The EXAMPLES section gives an example /etc/hostname.pppoe0 file.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 19th December 2009
EverydayDiesel EverydayDiesel is offline
Shell Scout
 
Join Date: Jan 2009
Posts: 105
Thanked 0 Times in 0 Posts
Default

Well it looks like that works. I am able to get 14mb down through using the kernel pppoe. Now I just need to figure out why vista doesnt work but xp works fine.


EDIT:

I found this while searching
http://www.daemonforums.org/showthre...ighlight=vista

Last edited by EverydayDiesel; 19th December 2009 at 05:21 AM.
Reply With Quote
Old 19th December 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,148
Thanked 182 Times in 149 Posts
Default

With pfctl you can check whether TCP window scaling is being used
Code:
# pfctl -vvss

all tcp 192.168.222.10:22 <- 192.168.222.20:32167       ESTABLISHED:ESTABLISHED
   [1530147851 + 65487] wscale 0  [761161648 + 17376] wscale 0
   age 00:06:59, expires in 24:00:00, 621:1038 pkts, 38500:213184 bytes, rule 22
   id: 8990c04a75d43300 creatorid: 9f30c773
So in this SSH connection from my desktop 192.*20 to my router 192.*10 both communication endpoints negotiated a window scaling factor of 0, so none
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Network Speed Issues Ernball OpenBSD General 3 12th December 2009 07:27 PM
Cannot connect to IRC (network issues within OBSD?) guitarscn OpenBSD General 10 4th September 2009 12:35 PM
Vista network issues behind PF Firewall cerulean Other OS 3 10th November 2008 10:36 PM
Yahoo! related Pidgin problems... BSDfan666 General software and network 10 28th September 2008 02:39 AM
OpenBSD-related websites bienc OpenBSD General 7 12th May 2008 09:15 PM


All times are GMT. The time now is 02:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick