You are not logged in.

#1 2007-08-30 11:17:48

ADT
Member
Registered: 2007-04-02
Posts: 13

[***SOLVED***] How to use ArchLinux rc.conf setting in FreeBSD rc.conf

I am trying out FreeBSD but I can not get it working the same as my Arch setup in regards to networking.

Archlinux can ping both sides of a computer on with two NICs, FreeBSD can only ping one side.

My Arch setup is as follows:

Arch PC has two network interface cards.
eth0 = 192.168.1.25 and
eth1 = 192.168.1.200

The eth0 card is connected to a router that is connected to the Internet and some LAN PCs.
The eth1 card is connected directly with one PC with an IP of 192.168.1.100.

On the Arch PC I can ping everything the way I have rc.conf setup.
Note: I do not want eth0 to forward traffic to eth1. No bridging.

My rc.conf (the networking part)

HOSTNAME="arch-pc"
lo="lo 127.0.0.1"
eth0="eth0 192.168.1.25 netmask 255.255.255.0 broadcast 255.255.255.0"
eth1="eth1 192.168.1.200 netmask 255.255.255.0 broadcast 255.255.255.0"
INTERFACES=(lo eth0 eth1)
gateway="default gw 192.168.1.1"
client="192.168.1.100 gw 192.168.1.200"
server="192.168.1.50 gw 192.168.1.25"
windows="192.168.1.35 gw 192.168.1.25"
ROUTES=(gateway client server windows)

The networking part of the rc.conf for my FreeBSD install is:

defaultrouter="192.168.1.1"
hostname="bsd-pc.localhost"
ifconfig_xl0="inet 192.168.1.25 netmask 255.255.255.0"
ifconfig_dc0="inet 192.168.1.200 netmask 255.255.255.0"
static_routes="client server windows"
route_client="-host 192.168.1.100/24 192.168.1.200"
route_server="-host 192.168.1.50/24 192.168.1.25"
route_windows="-host 192.168.1.35/24 192.168.1.25"

Using this setup with FreeBSD I can ping everything except 192.168.1.200 (the dc0 interface is the eth1 interface in arch) and the client of IP 192.168.1.100.

When I comment out all of the above lines except

defaultrouter="192.168.1.1"
ifconfig_dc0="inet 192.168.1.200 netmask 255.255.255.0"

I can ping 192.168.1.200 and 192.168.1.100 but nothing else.

Sorry if this question should not be in this forum, but does anyone know how to get this rc.conf file to be able to ping all IP it contains?

Thanks.

Last edited by ADT (2007-08-30 14:54:10)

Offline

#2 2007-08-30 12:37:47

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [***SOLVED***] How to use ArchLinux rc.conf setting in FreeBSD rc.conf

You really should be asking FreeBSD people, as that's where the problem is. If you're lucky, someone here may know the answer, and may see this thread, but you would increase your chances a lot by asking in the right place.

Offline

#3 2007-08-30 12:40:11

ADT
Member
Registered: 2007-04-02
Posts: 13

Re: [***SOLVED***] How to use ArchLinux rc.conf setting in FreeBSD rc.conf

Will do. Thanks for the heads up.

Offline

#4 2007-08-30 14:53:26

ADT
Member
Registered: 2007-04-02
Posts: 13

Re: [***SOLVED***] How to use ArchLinux rc.conf setting in FreeBSD rc.conf

I found the an answer at www.bsdforums.org

Code:

eth0="eth0 192.168.1.25 netmask 255.255.255.0 broadcast 255.255.255.0"
eth1="eth1 192.168.1.200 netmask 255.255.255.0 broadcast 255.255.255.0"

You cannot do this in FreeBSD. Multiple NICs in one machine needs to be on separate subnets. In other words, each NIC needs it own subnet.

Cheers

Offline

Board footer

Powered by FluxBB