Routing confusion

Eric Anderson eric at on-e.com
Fri Feb 29 18:19:05 UTC 2008


Ok, as a Solaris (and Linux) guy, I'm thoroughly confused by some 
routing issues going on in this FreeBSD-based load balancer that I'm 
working on.

This box has one upstream NIC (fxp0) and a 4-port (hub?) as fxp1.

Currently, it has two cables plugged into it (server1 and server2), and 
two domains being load balanced:

192.168.254.128, 192.168.254.130 server1
192.168.254.129, 192.168.254.131 server2

I guess my first question is, why are these IP addresses even registered 
on the load balancer?  These IPs are plumbed and active on server1 and 
server2 respectively.  I'm assuming the below is some kind of routing 
deal, but why is a route defined on the routing server?

I'm trying to add another server (192.168.254.254) that can be accessed 
from the load balancer, server1 and server2.

Seems simple enough:

route add -host 192.168.254.254 192.168.254.1

but that didn't work.

I guess I need to figure out how to "define" 192.168.254.254 the same as 
.128, .129, .130, .131 but I just can't figure it out because FreeBSD's 
netstat output is so different from Solaris (or Linux).

Can anyone else?  Let me know if you need more clarification..

192.168.254.1:# netstat -nr

Destination        Gateway            Flags    Refs      Use  Netif Expire
default            x.y.187.1       UGSc   54607523 55161243   fxp0
x.y.187/24      link#1             UC          6        0   fxp0
x.y.187.1       00:07:b4:00:bb:01  UHLW        7        0   fxp0    918
x.y.187.2       00:11:5d:9c:d0:00  UHLW        0        0   fxp0    120
x.y.187.3       00:0f:f8:de:f4:00  UHLW        0        0   fxp0    1187
x.y.187.4       00:14:22:73:0a:20  UHLW        0     9254   fxp0    1196
x.y.187.8/32    link#1             UC          0        0   fxp0
x.y.187.10/32   link#1             UC          0        0   fxp0
x.y.187.243     link#1             UHLW        7        7   fxp0
x.y.187.246     00:17:31:ef:5f:f9  UHLW     7528     7528   fxp0   807
127.0.0.1          127.0.0.1          UH          0        8    lo0
192.168.254        link#2             UC          6        0   fxp1
192.168.254.1      00:40:d9:02:48:ff  UHLW        0        7    lo0
192.168.254.128    00:14:22:72:87:67  UHLW        7 13663296   fxp1   857
192.168.254.129    00:14:22:72:91:48  UHLW        7 12663561   fxp1   1138
192.168.254.130    00:14:22:72:87:67  UHLW        7   685454   fxp1   918
192.168.254.131    00:14:22:72:91:48  UHLW        8   560930   fxp1   918
192.168.254.255    ff:ff:ff:ff:ff:ff  UHLWb       0        4   fxp1


More information about the freebsd-net mailing list