Network Configuration of FreeBSD Software Routers

MikeyWines

New Member


Messages: 10

i,

I am new to FreeBSD, I have 4 PC, 2 are running on Windows XP and the other 2 are running on FreeBSD. I am trying to convert the FreeBSD into software routers. I have configured the NIC card on the FreeBSD's i.e the 2 interfaces bge0 and r10. The network is setup as follows the first PC(Windows XP) is considered to be a client with IP add: 192.168.11.1, default gateway 192.168.11.0, subnetmask 255.255.255.0, the second one is the first software router with NIC interface r10: 192.168.11.2 and bge0 192.168.10.1, the third PC is the software router number 2 with bge0: 192.168.10.2 and r10: 192.168.12.2 the last PC is considered to be a client PC with IP add: 192.168.12.1, DefaultGateway: 192.168.12.0. Could you tell me what I am doing wrong here as the Client and the PC does not ping each other. By the way how can I send you a picture of the network topology for more clarity? The PC's are over an unloaded network.

Many thanks and regards.

Michael
 
OP
M

MikeyWines

New Member


Messages: 10

Could you please tell me if I am doing something wrong here?

The following is the configuration on in the /etc/rc.conf

FreeBSD software router 1:

Code:
gateway_enable=”YES”
inetd_enable=”YES”
keymap=”uk.iso”
sshd enable=”YES”
linux_enable=”YES”

ifconfig_bge0=”inet 192.168.10.1 netmask 255.255.255.0”
ipv6_enable=”YES”
defaultrouter=”192.168.10.1”
hostname=”lab1.brunel.ac.uk”

ifconfig_r10=”inet 192.168.11.2 netmask 255.255.255.0”
ipv6_enable=”YES”
defaultrouter=”192.168.11.2”
hostname=”lab1.brunel.ac.uk”




FreeBSD software router 2:
Code:
gateway_enable=”YES”
inetd_enable=”YES”
keymap=”uk.iso”
sshd enable=”YES”
linux_enable=”YES”

ifconfig_bge0=”inet 192.168.10.2 netmask 255.255.255.0”
ipv6_enable=”YES”
defaultrouter=”192.168.10.2”
hostname=”lab2.brunel.ac.uk”

ifconfig_r10=”inet 192.168.12.2 netmask 255.255.255.0”
ipv6_enable=”YES”
defaultrouter=”192.168.12.2”
hostname=”lab2.brunel.ac.uk”
 

kpa

Beastie's Twin

Reaction score: 1,833
Messages: 6,318

You can't have multiple defaultrouter entries for a single host, last defaultrouter entry overrides any previous entries.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 10,108
Messages: 35,583

It's also quite useless to set the default gateway to an ip address that's on the same box.

You need to get some basic TCP/IP knowledge.
 

ecazamir

Active Member

Reaction score: 34
Messages: 219

MikeyWines said:
Could you please tell me if I am doing something wrong here?

The following is the configuration on in the /etc/rc.conf
/...trimmed.../
Code:
ifconfig_r10=”inet 192.168.11.2 netmask 255.255.255.0”
defaultrouter=”192.168.11.2”
You have two problems here:
1. The default router can't be the local machine.
2. FreeBSD device naming uses 'rl' (Uppercase is RL) for Realtek 100 MBps cards instead of 'r1' (letter R and numeric one). The first card using realtek 8139 is named rl0 (letter R, letter L, number zero), not r10 (letter R, number one, number zero).
Of course, it can be renamed later, but this is not the case on your setup.
 
Top