ping through router

What I want to do is to be able to ping through freebsd as a router.

1. I have 3 NICS, one to the dsl router and two to workstations. I can ping to the NICS on the freebsd box from any node on the end of the wires but I cant ping to whatever is attached on the other end of the wire i.e. I cant pass through. I get Request time out.

Thanks.
 
Do you have IP forwarding turned on on the router? And if the public IP address of your DSL connection is bridged to the 'external' interface, do you have NAT configured?
 
if gateway_enable="YES" is IP forwarding then I do.

I dont know how to configure NAT.

Not only the DSL connection I cant ping the other workstation but I can ping anywhere from within the freebsd box.
 
Post the following to begin with:

/etc/rc.conf
[cmd=]netstat -r[/cmd]
[cmd=]ifconfig[/cmd]
 
rc.conf
Code:
# -- sysinstall generated deltas -- # Wed May 12 16:49:51 2010
# Created: Wed May 12 16:49:51 2010
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
gateway_enable="YES"
hostname="dell"
ifconfig_fxp0="DHCP"
moused_port="/dev/psm0"
moused_type="auto"
sshd_enable="YES"
defaultrouter="192.168.1.103"


# -- sysinstall generated deltas -- # Wed May 12 22:41:09 2010
#router_flags="-s"
#router="/sbin/routed"
#router_enable="YES"
# -- sysinstall generated deltas -- # Wed May 12 22:44:00 2010
ifconfig_bfe0="inet 10.0.0.10  netmask 255.255.255.0"
hostname="dell"
# -- sysinstall generated deltas -- # Wed May 12 22:58:18 2010
ifconfig_xl0="inet 172.0.0.1  netmask 255.255.255.0"
hostname="users.dell.com"
# -- sysinstall generated deltas -- # Thu May 13 03:30:37 2010
router_enable="NO"

netstat
Code:
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.1.254      UGS         0        0   fxp0
10.0.0.0           link#3             UC          0        0   bfe0
10.0.0.4           00:a0:d1:78:72:c9  UHLW        1        0   bfe0   1141
localhost          localhost          UH          0        2    lo0
172.0.0.0          link#2             UC          0        0    xl0
192.168.1.0        link#1             UC          0        0   fxp0
192.168.1.103      00:50:8b:04:71:0e  UHLW        1        0    lo0
192.168.1.254      link#1             UHLW        2       30   fxp0

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

ifconfig
Code:
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=2008<VLAN_MTU,WOL_MAGIC>
	ether 00:50:8b:04:71:0e
	inet 192.168.1.103 netmask 0xffffff00 broadcast 192.168.1.255
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=9<RXCSUM,VLAN_MTU>
	ether 00:00:86:4d:47:98
	inet 172.0.0.1 netmask 0xffffff00 broadcast 172.0.0.255
	media: Ethernet autoselect (none)
	status: no carrier
bfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 00:0d:56:53:65:79
	inet 10.0.0.10 netmask 0xffffff00 broadcast 10.0.0.255
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 
	inet6 ::1 prefixlen 128 
	inet 127.0.0.1 netmask 0xff000000
 
Why are your defaultrouter (192.168.1.103) and your default gateway (192.168.1.254) different? I'm assuming 254 is your DSL router and default gateway? Use that as defaultrouter then (it's probably already set by DHCP, so you can omit the defaultrouter setting altogether -- everything should already be handled by ifconfig_fxp0="DHCP").

You can also remove the router_enable setting, because the default is already 'no' (see /etc/defaults/rc.conf).

And you should only use one 'hostname'. Setting multiple will just overwrite the previous ones.

Other than that, the three directly connected networks should be able to reach each other.
 
I still cant reach outside the NICs on the box for example I cant ping 192.168.1.254 or the other workstation (10.0.0.4)
 
my issue is if I am at 10.0.0.4 and I ping 192.168.1.254 or 10.0.0.4 I get request time out. if I am the other work station (172.0.0.*) I cant get to the dsl router or other work station as well.
 
Make sure the default gateways inside those networks are set correctly, i.e. 10.0.0.10 inside the 10.0.0.0/24 network, 172.0.0.1 inside the 172.0.0.0/24 network (note that this is NOT an RFC1918 network! -- use something inside 172.16.0.0/12, e.g. 172.16.0.0/24), and also make sure you can ping those default gateways from within the relevant networks.
 
DutchDaemon said:
and also make sure you can ping those default gateways from within the relevant networks.
I can ping the NICS on the box from anywhere attached to the box but I cant ping outside the box from outside the box for example from 10.0.0.4 to 192.168.1.254 I get RTO, from 10.0.0.4 to 192.168.1.130 I get replies. From the box to any end I get replies.
 
Back
Top