FreeBSD routing
Björn König
bkoenig at cs.tu-berlin.de
Fri Oct 14 21:32:24 PDT 2005
Bob Hepple wrote:
> [...]
> I just want to add an arbitrary machine (eg. with IP 192.168.2.214) to my
> home network 192.168.254.0/24. Under Linux I just do a
>
> route add -host 192.168.2.214 eth0
>
> and I can ping it.
>
> On FreeBSD I tried both
>
> route add -host 192.168.2.214 192.168.254.245
> route add -host 192.168.2.214 -interface rl0
>
> but I'm getting some kind of redirect loop. Apparently my use of the
> FreeBSD route command is wrong.
>
> [...]
>
> Here's the detail: I'm issuing the "route add" commands on "raita" and
> trying to reach "rasam":
>
> internet
> |
> router
> .192.168.0.1
> .
> . wireless
> .
> .ath0/192.168.0.18
> raita
> |rl0/192.168.254.245
> |
> -------------------------- 10baseT
> |
> |
> |192.168.2.214
> rasam
>
> bash-2.05b# ifconfig -a
> rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> options=8<VLAN_MTU>
> inet 192.168.254.245 netmask 0xffffff00 broadcast 192.168.254.255
> inet6 fe80::201:29ff:fe74:99c2%rl0 prefixlen 64 scopeid 0x1
> ether 00:01:29:74:99:c2
> media: Ethernet autoselect (none)
> status: no carrier
> ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> inet 192.168.0.18 netmask 0xffffff00 broadcast 192.168.0.255
> inet6 fe80::209:5bff:fee8:b9d2%ath0 prefixlen 64 scopeid 0x3
> ether 00:09:5b:e8:b9:d2
> media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps)
> status: associated
> ssid Baroona 1:Baroona
> channel 6 authmode OPEN powersavemode OFF powersavesleep 100
> rtsthreshold 2312 protmode CTS
> wepmode MIXED weptxkey 1
> wepkey 1:40-bit
>
> [...]
Hello Bob,
welcome to FreeBSD.
I won't expect that this will work at all, even not with Linux, because
the IP 192.168.254.245 and 192.168.2.214 are of different subnets.
Either you use 192.168.254.0/24 or 192.168.2.0/24 in the 10baseT net,
but not both. I don't know if Linux makes it possible to do this; I
haven't tried it yet. At least I can reproduce your error message with a
similar setup. Just assign the IP 192.168.2.245 to rl0 for example; then
it should work without problems.
Regards
Björn
More information about the freebsd-questions
mailing list