Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.ececs.uc.edu!newsfeeds.sol.net!news.maxwell.syr.edu!pumpkin.pangea.ca!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!news.syd.connect.com.au!news.bri.connect.com.au!fjholden.OntheNet.com.au!not-for-mail From: Tony Griffiths <tonyg@OntheNet.com.au> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: How to use two Ethernet cards in FreeBSD. Date: Fri, 18 Apr 1997 18:07:22 +1000 Organization: On the Net (ISP on the Gold Coast, Australia) Lines: 56 Message-ID: <33572BBA.753E@OntheNet.com.au> References: <01bc4bd0$4185cda0$31b9c5cd@cec.sanet.ge> Reply-To: tonyg@OntheNet.com.au NNTP-Posting-Host: swanee.nt.com.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (WinNT; I) To: Valentine Gogichashvili <valgog@hotmail.com> Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39274 Valentine Gogichashvili wrote: > > Hi, > > I have installed FreeBSD and connected my LAN into Internet whit it. > > But I have to connect another branch of our LAN throw another Ethernet card > (ed1). > > The problem is that i can not make route to hosts on ed1 branch, and, for > example, when host on ed1 gives the request to my FreeBSD box by ping or > telnet, the replay is going through ed0. A bit more info on the IP addressing you are using might help, however... Firstly, you need to make sure that the FreeBSD system is acting as a router (ie. IP forwarding is set to 1 via sysctl or your /etc/sysconfig setting). Secondly, whatever systems need to communicate with hosts on the other LAN need to have a route for that subnet that points to the FreeBSD box. If both LANs are in the SAME subnet, then you have real problems because the FreeBSD box would need to proxy arp each IP address on one LAN to the other LAN, and vice versa! It is much easier to simply subnet your network address block (if they are part of the same Class C or whatever) or run independent networks altogether (same difference actually from an IP routing point of view!). An example of a dual-ethernet FreeBSD box is- root @ xxxx:/usr/local/security> netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 203.10.89.20 UGSc 36 34885 ed0 127.0.0.1 127.0.0.1 UH 0 3165 lo0 203.10.89 link#1 UC 0 0 203.10.89.1 0:0:c:f6:97:c1 UHLW 0 602636 ed0 ... 203.14.201.1 8:0:2b:99:91:92 UHLW 1 565971 lo0 203.14.201.2 8:0:2b:e4:c2:3d UHLW 0 107770 le0 203.14.201.3 0:0:c0:65:84:d0 UHLW 0 104 le0 ... This system has 203.10.89.20 as it's default router on the 'ed0' Ethernet while the Cisco has the IP address of ed0 as the path to network 203.14.201.* on le0. Other hosts on the 203.10.89.* network initially forward to the Cisco which then issues an IP "redirect" back to the real gateway for the 203.14.201.* network (the FreeBSD box). Hope the above simplistic explanation solves your problem... Tony