Bridging

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Tue Nov 11 08:15:09 PST 2003


John Oxley <oxo at rucus.ru.ac.za> writes:

> Hi, my scenario is:
> 
> onan (WinXP)  with realtek NIC MAC address: 00:0a:cd:02:be:8d
> 
> reknaw (FreeBSD 5.1-RELEASE-p10) with 2 realtek NIC's, rl0 (mac:
> 00:50:22:8d:f4:3f) and rl1 (mac: 00:40:f4:18:b1:0c).
> 
> reknaw:rl0 has a real world ip address (foo.bar.37.150)
> reknaw:rl1 has no ip address
> 
> onan has a real world ip address (foo.bar.37.190)
> 
> There is a crossover cable from onan to reknaw:rl1.

So onan is using reknaw as its default gateway?

> This is a two part question.
> 
> Part 1.
> =======
> I can access the rest of the world perfectly from reknaw and onan, and the
> rest of the world can see reknaw and onan without any trouble, but the two
> machines cannot see each other.
> 
> When I ping reknaw from onan, and then do an arp -a, i see a dynamic entry
> for reknaw:rl1.
> 
> When I ping onan from reknaw I get 3 packets transmitted, 0 packets
> received, 100% packet loss
> and an arp -a gives:
> onan.domain (foo.bar.37.190) at 00:0a:cd:02:be:8d on rl0 [ethernet]
> 
> I have tried 'arp -s foo.bar.37.150 reknaw:rl0` and that does abosolutely
> nothing to help me.  Please can someone help me get these machines talking
> to each other.
> 
> Another thing, my bridging setup:
> /etc/sysctl.conf:
> net.link.ether.bridge=1
> net.link.ether.bridge_cfg=rl1,rl0
> net.link.ether.bridge_ipfw=1
> 
> /etc/rc.conf:
> firewall_enable="YES"
> firewall_type="open"
> 
> defaultrouter="foo.bar.32.1"
> hostname="reknaw.domain"
> ifconfig_rl0="inet foo.bar.37.150  netmask 255.255.248.0"
> # there is no line for ifconfig_rl1, see next part of my question.

Okay, so you have a router here that isn't either of these systems.  
How is onan supposed to reach it?  How is onan supposed to resolve the
name of the other machine?  [It seems to be doing so; therefore, I
assume that you have this part configured properly, but you didn't
really show enough of the topology for others to follow.]

> Part 2.
> =======
> I have an 8 port switch.  Is it possible for me to give reknaw:rl1 a
> 192.168.0.1 address, and plug in another computer with a private ip as
> well, can I bridge and NAT at the same time with the one NIC, or will I
> need to get another NIC.

You could theoretically do it, by running separate subnets on the same
link, but you'd have to be careful not to leak any of the private
addresses via your gateway router.


More information about the freebsd-questions mailing list