Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have server with 2 network cards with FreeBSD on it. 1 card used for internet (works fine) and another one for local network connection (to 192.168.227.0/24 net). When i try to ping gateway of local network with ip 192.168.227.1 i got message "ping: send to: host is down." The gateway is OK and online - all other servers (with Ubuntu) can easely connect to this network. So maybe i have some errors in my configuration files.

ifconfig:

igb0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=1bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,              TSO4>
        ether 3c:d9:2b:f2:d1:f6
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
igb1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=1bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,              TSO4>
        ether 3c:d9:2b:f2:d1:f7
        media: Ethernet autoselect
        status: no carrier
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_              MAGIC>
        ether 00:26:55:ea:e3:a6
        inet 77.195.133.102 netmask 0xffffffe0 broadcast 77.195.133.127
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
        ether 00:26:55:ea:e3:a7
        inet 192.168.227.24 netmask 0xffffff00 broadcast 192.168.227.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>

netstat -r

Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            77.195.133.97      UGS         9  2874633    em0
10.6.200.0         192.168.227.1      UGS         0        0    em1
77.195.133.96/27   link#3             U           3  3808304    em0
77.195.133.102     link#3             UHS         0        0    lo0
localhost          link#5             UH          0     2101    lo0
192.168.227.0      link#4             U           0       59    em1
192.168.227.24     link#4             UHS         0        0    lo0

Internet6:
Destination        Gateway            Flags      Netif Expire
localhost          localhost          UH          lo0
fe80::%lo0         link#5             U           lo0
fe80::1%lo0        link#5             UHS         lo0
ff01:5::           fe80::1%lo0        U           lo0
ff02::%lo0         fe80::1%lo0        U           lo0

/etc/rc.conf

defaultrouter="77.195.133.97"
hostname="bd-mor-online.myhost.ru"
ifconfig_em0="inet 77.195.133.102 netmask 255.255.255.224"
ifconfig_em1="inet 192.168.227.24 netmask 255.255.255.0"
static_routes="net1 net2"
route_net1="-net 192.168.227.0/24 192.168.227.1"
route_net2="-net 10.6.200.0/24 192.168.227.1"
keymap="ru.koi8-r"
sshd_enable="YES"
inetd_enable="YES"
linux_enable="YES"

ping -c5 192.168.227.24 is OK - 100%.

There also the network 10.6.200.0 where i need route this server via 192.168.227.1, but the main goal is to get PING's from gateway.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You need to turn on ip forwarding with the following setting in /etc/rc.conf

gateway_enable="YES"

share|improve this answer
    
Don't know can it help or not - our system administrator too silly to try it on working server, so she just reconfigured igb0 interface for that network and everything work fine now. Thanks for help anyway. –  LLAlive Mar 21 '13 at 13:17
    
You can also set it on the fly with sysctl. Set net.inet.ip.forwarding=1. Optionally to improve performance also set net.inet.ip.fastforwarding=1 –  Matt Mar 21 '13 at 22:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.