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
  #1   (View Single Post)  
Old 26th August 2013
sparker sparker is offline
New User
 
Join Date: Nov 2009
Posts: 4
Thanked 0 Times in 0 Posts
Default Force traffic over interface instead of loopback

I have setup an OpenBSD box with two nics (10.50.0.100 and 10.50.0.101).

I would like to send traffic between these interfaces, but would like to force the traffic over the wire and not over the loopback interface.

Any ideas on how this could be accomplished?
Reply With Quote
  #2   (View Single Post)  
Old 26th August 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,611
Thanked 214 Times in 189 Posts
Default

Welcome back.

I cannot recommend placing two NICs on the same subnet. What are you trying to accomplish?
Reply With Quote
  #3   (View Single Post)  
Old 26th August 2013
sparker sparker is offline
New User
 
Join Date: Nov 2009
Posts: 4
Thanked 0 Times in 0 Posts
Default

I'm trying to run both the client and server of tcpbench on the same host. But this won't be useful if the traffic is going over the loopback interface.
Reply With Quote
  #4   (View Single Post)  
Old 27th August 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,611
Thanked 214 Times in 189 Posts
Default

Network benchmarks

As a concept, I understand why you would want to test your NICs in this manner. With a cross-over cable there are no external devices that might inadvertantly skew performance results.

However... even if you could get a functional test, your results will not match any real network load. And, unles your test is able to peak CPU 0 at 100% load you will be unable to isolate the component that limits performance. (With this OS, the network stack is in-kernal and runs only on CPU 0.) And on OpenBSD, there's no way to set affinity to other CPUs for your tcpbench processes.

I believe you should test with at least three systems: the client, the server, and the system under test.

When benchmarking network performance, you should model your actual network. I will refer you to a recent discussion thread on the misc@ mailing list about 10Gbit Ethernet benchmarks. The discussion thread began here. You might find it helpful.

Two NICs on one subnet

You need to be very careful if you do this. As I mentioned above, I never recommend it. If you search (perhaps with Google) using the search terms two nics one subnet, you will find many recommendations to avoid this. You can have problems with ARP resolution and routing on the subnet. I will refer you to the first hit on Google with those search terms in that order, a brief white paper from National Instruments which may be helpful: Best Practices for Using Multiple Network Interfaces (NICs) with NI Products

Loopback routing via two NICs

Even if you are able to correctly configure two Ethernet NICs on one subnet, you cannot use a single layer 2 IP subnet in the manner you intend, due to how subnets on IP are defined and routed.

You might be able to establish and use a point-to-point tunnel on separate subnets, using gif(4) or gre(4), but then you would be testing the tunnel protocol's performance over Ethernet, rather than Ethernet, and you would still not be sure you were connecting via lo(4) or your NICs without further analysis.

Last edited by jggimi; 27th August 2013 at 12:38 AM. Reason: typos, clarity
Reply With Quote
Reply

Tags
loopback

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
Brute force attacks Dr-D OpenBSD Security 1 18th July 2011 04:06 PM
ssh brute force attacks sniper007 FreeBSD Security 21 12th June 2011 01:28 AM
Re: TCP acknowledgments on loopback interface nilsgecko OpenBSD General 0 24th May 2011 06:07 AM
pf.conf brute force rule ijk FreeBSD Security 6 11th August 2008 04:54 PM


All times are GMT. The time now is 11:11 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