Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Oct 1998 13:11:22 +0200
From:      mh <mh@muenster.net>
To:        "'questions@freebsd.org'" <questions@FreeBSD.ORG>
Subject:   Network interfaces on same subnet and static route via specified interface?
Message-ID:  <11410184AB98D111A85100A0C94C26CF075219@ente.muenster.net>

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

this is one of those questions asking if FreeBSD is able to do it or not.

I have two ethernet cards with IP numbers configured on the same subnet e.g.

# ifconfig -a
ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.108.132 netmask 0xffffffe0 broadcast 192.168.108.159
        ether 00:40:95:96:0c:c3
ep0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.168.108.151 netmask 0xffffffe0 broadcast 192.168.108.159
        ether 00:a0:24:10:e5:b4
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000

ed0 and ep0 are the two interfaces. Now I want to add a static route to host 
10.1.2.3
via interface ep0. All other traffic has to use ed0. The default gateway which 
is also the
gateway to 10.1.2.3 is 192.168.108.158.

I tried something like

	route add -interface ep0 -host 10.1.2.3 192.168.108.158

and it results in

	route: bad address: ep0.

Is it possible to achieve the routing I want? Do I have a syntax problem with 
route?
The machine does not do ipforwarding and firewalling, routed and gated are NOT 
running
but I could install/activate those if needed to achieve the routing. OS version 
is 2.2.7.

I know that I could put the second card onto another subnet and it will work 
just adding
a route to the gateway of that subnet.

The reason for this kind a tricky thing is to account the traffic to and from 
host 10.1.2.3
on the switch connected to the FreeBSD machine (it is one of the central 
accounting
machines).

Thanks in advance,

Marcus Haebler

---
ICS Internet Communication Systems GmbH
Soester Strasse 13    Tel.: 0251 60600     email:mh@muenster.net
48155 Muenster        Fax.: 0251 6060190   http://www.muenster.net



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?11410184AB98D111A85100A0C94C26CF075219>