Trying to set up FreeBSD machine as router/bridge between two others

Network related discussions (including general TCP/IP stuff, routing, etc).

Trying to set up FreeBSD machine as router/bridge between two others

Postby apenny » 27 Nov 2010, 01:24

Hi folks,

I want to set up my FreeBSD machine which I recently set up with 8.0 as a router/bridge to
go between two Windows machine and to act as a dummynet for them. It will ONLY be routing traffic between the other two machines. I should be able to set up the two Windows machines to have static IP addresses and be directly connected to the LAN cards on the Free BSD machien. Does anyone have
a good guide or suggestions on where to find the best set of instructions on how to do
this? I have a UNIX background but have never used FreeBSD before so I apologize in advance if I'm asking a rather stupid question or if it's been answered elsewhere.

Thanks so much.

Mary Salinas
apenny
Junior Member
 
Posts: 5
Joined: 27 Nov 2010, 01:11


Postby aragon » 27 Nov 2010, 13:19

aragon
Giant Locked
 
Posts: 2031
Joined: 16 Nov 2008, 17:04
Location: Cape Town, South Africa

Postby apenny » 29 Nov 2010, 02:41

Hi -

Thanks particularly to David for his useful post. The two links are quite useful. However, I'm still not able to set it up the way I'd like.I'm not hooking up to the internet just putting together a standalone system with two Windows Systems with static hardcoded IP addresses. I can ping the network card that the Windows machine is hooked up to but nothing else. Do I need to configure the FreeBSD router with DNS or put the Windows machines in /etc/hosts or any additional steps to recognize them? I may be missing something fairly basic here so any help would be appreciated.

Thanks a lot,

Mary
apenny
Junior Member
 
Posts: 5
Joined: 27 Nov 2010, 01:11

Postby wblock@ » 29 Nov 2010, 02:51

The Handbook bridging section linked by aragon looks pretty easy, although I admit I've never done it. Please describe your config: names of the Ethernet interfaces, IP addresses of all three systems, output of [man=8]ifconfig[/man] after you've set up the bridge.
User avatar
wblock@
Old Fart
 
Posts: 10167
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby apenny » 29 Nov 2010, 17:50

Hi -

I enclose my output of ifconfig here. Basically the two Windows 7 PCs have the
following values

PC #1
IPv4 Address: 10.1.1.1
Subnet: 255.255.255.0
Default gateway: 10.1.1.4
DNS server 10.1.1.4

PC #2
IPv4 Address 10.1.1.5
Subnet 255.255.255.0
Default gateway 10.1.1.4
DNS server 10.1.1.4

Doesn't seem to make much difference what I have for default gateway/DNS server.
Thanks for any help you can provide.

Mary
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

apenny
Junior Member
 
Posts: 5
Joined: 27 Nov 2010, 01:11

Postby wblock@ » 29 Nov 2010, 18:06

The Handbook says:
If the bridge host needs an IP address then the correct place to set this is on the bridge interface itself rather than one of the member interfaces.
User avatar
wblock@
Old Fart
 
Posts: 10167
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby apenny » 29 Nov 2010, 18:27

Hi folks,

Thanks to the last poster for the suggestion. I changed it so that bridge0 has
an IP of 10.1.1.4 and took the other two IPs away and unfortunately it did not
alter my problem. However, I did notice something while doing it. If I do an
ipfw flush (leaving only one rule allow ip from any to any) then I can ping ok from
10.1.1.1 to 10.1.1.5. However, if I attempt to add a dummynet style pipe by
doing say "ipfw add 500 pipe 1 ip from any to any" then I can no longer ping from 10.1.1.1
from 10.1.1.5. That seems to imply to me that I'm doing something wrong in my ipfw config but I don't know what. I'm using the dummynet instructions that the second poster suggested.

Thanks for any help.

Mary
apenny
Junior Member
 
Posts: 5
Joined: 27 Nov 2010, 01:11

Postby DutchDaemon » 29 Nov 2010, 18:31

How do you config the pipe? Bandwidth, etc.? I'm not sure what an 'unconfigured pipe' does, but it may disallow all traffic until some bandwidth is allocated to it.
User avatar
DutchDaemon
Old Fart
 
Posts: 10463
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby apenny » 29 Nov 2010, 20:39

Thanks - that actually seemed to be the problem I was having, when I put in
Code: Select all
ipfw pipe 1 config delay 20ms plr 0.001
I was able to ping from my machines still and changing the delay seemed to make a difference, thanks so much for your help!

Mary
apenny
Junior Member
 
Posts: 5
Joined: 27 Nov 2010, 01:11


Return to Networking

Who is online

Users browsing this forum: No registered users and 0 guests