Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jul 1999 08:32:21 -0400
From:      "Francisco Reyes" <francisco@natserv.com>
To:        "FreeBSD questions" <questions@freebsd.org>
Subject:   Routing with same subnet?
Message-ID:  <199907171231.IAA25076@vulcan.addy.com>

next in thread | raw e-mail | index | archive | help

My first shot at routing.
I saw many questions and responses in the archives, but there
are still  things I don't understand.

What I am trying to do is to setup my FreeBSD box as a Firewall.

The setup:
Computers-->hub1 -->ed0 -->FBSD -->de0 -->DSL Router -->Internet

IP Addresses:
Computers 216.44.153.70 to 216.44.153.72
router 216.44.153.65
de0 216.44.153.66
ed0 216.44.153.67
netmask 255.255.255.240

The FreeBSD, 2.2.7, can see the internet through de0.
The problem I am having is with the computers not seeing FreeBSD
through ed0.

The output of netstat is:
Internet:
Destination        Gateway            Flags     Refs     Use    
Netif Expire
default            216.44.153.65      UGSc       11      108    
  de0
localhost          localhost          UH         11      469    
  lo0
216.44.153/28      localhost          UGSc        0        0    
  de0 =>
216.44.153         link#2             UCSc        0        0
216.44.153.64/28   link#1             UC          0        0
216.44.153.65      0:0:c5:71:cb:ac    UHLW       12        0    
  de0   1182
75ml               localhost          UGHS        1       26    
  lo0 =>
75ml/32            0:c0:f0:21:14:45   ULS2c       0        0    
  lo0
localhost          localhost          UGHS        1        0    
  lo0 =>
216.44.153.67/32   0:e0:29:40:e8:ae   ULS2c       0        0    
  de0
216.44.153.70      link#1             UHLW        1      396
216.44.153.79      ff:ff:ff:ff:ff:ff  UHLSb       4      318    
  de0
                      
I tried several route lines such as:
route add net 216.44.153.0 216.44.153.67
route add net 216.44.153.0 216.44.153.67 -netmask
255.255.255.240
route add 216.44.153.70 216.44.153.67

Based on what I read on the archives it seemed as if it would
not be possible to route between the two interfaces with the
addresses I am using (216.44.153.67 and 216.44.153.66), but the
man page for route has:

"In a change or add command where the destination and gateway
are
not sufficient to specify the route (as in the ISO case where
several
interfaces may have the same address), the -ifp or -ifa
modifiers may
be used to de-termine the interface or interface address."

From that it seems it may be possible, however I tried adding
"-ifp 2" and that didn't help. Also tried "-ifa 216.44.153.67".
Both did not give errors
but didn't work either.

Will I need to change to/add a different IP address to one of
the cards?
I don't mind if the internal card, ed0, has a non-routable IP
such as 10.0.0.1. How about the internal computers? Will they
need to be switched to the 10.0.0.0 subnet?

Did I miss something in the syntax of the "ifp", "ifa" switches?



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907171231.IAA25076>