You are mixing up two concepts.
If you want to use ip_forwarding, then you're talking about a computer that is configured as a router/gateway and knows all the other computers in the LAN because they are directly connected. In this case youll also have to configure computer "B" as a NAT firewall/router.
If you want to route network packets from one network segment to another in a LAN where you have more than one router (in your case, "O" and "B" are both routing packets) then you have to enable the routing daemon on both.
In order to enable routing you have to edit /etc/rc.d/rc.inet2 on computer "B" (the one with the two NICs) and enable the routing daemon by removing the comment characters from these lines:
# # Start the network routing daemon:
# if [ -x /usr/sbin/routed ]; then
# echo "Starting network routing daemon: /usr/sbin/routed"
# /usr/sbin/routed -g -s
You'll need to enable routing because otherwise the default gateway in your network setup (computer "O") does not know that there is another computer behind "B".
In all these cases, computer "C" and the eth1 of "B" will have to get an address in a different subnet as O, A and the eth0 of B.
If you want to use the same LAN segment for all four computers (10.1.1/24) then you will have to configure a bridge
instead of routing or forwarding on computer "B". You can find comments about how to configure a bridge in /etc/rc.d/rc.inet1.conf .