🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #6311

4/60c as gateway problems...

#6311
From: "J. Eric Townsend"
Date: Fri, 04 Jan 1991 02:38
55 lines
3077 bytes
I've invented the XOR gateway, can I patent it? :-(

Sun 4/60C, 4.0.3c, antares ethernet card.

I set up my two ethernet ports with:

ifconfig le0 karazm netmask 255.255.0.0 broadcast 129.7.255.255 -trailers
ifconfig le1 karazm-rt netmask 255.255.240.0 broadcast 129.7.128.255 -trailers

I'm running in.routed, and yp is not being used.

As long as le1 is ifconfig'd down, I can talk to anything on the le0 side
of the network.  If I ifconfig le1 to be up, I can talk to anything on its
side, but I can't talk to anything on the le0 side!

Grr.  Anybody have any sorts of hints or suggestions?  Is there perhaps a
known bug in the le device driver or some other such nonsense?  I'm not
going to go to 4.1 unless i *HAVE* to, since there's a cluster of ss-2's
on order that will arrive with 4.1.1 (and everything else will get
upgraded to 4.1.1 then).

J. Eric Townsend     Internet: jet@uh.edu    Bitnet: jet@UHOU
Systems Mangler - UH Dept. of Mathematics - (713) 749-2120
Skate UNIX, boyo.

[[Ed's Note: Followup message received. -bdg]]

Here's the quick answer: Use the same netmask on each interface.  Several
people explained this to me.  (I don't remember seeing it in the manual.
Grr) Here's the explination of *why* you need the same netmasks:

From: rjt@sedist.cray.com (Randy Thomas)

|Your problem is the netmask. Net 129.7 is assigned to both interfaces,
|so they both have to have the same netmask. It has to do with the way
|routing code works.
|
|When a packet is to be sent out, the routing code first looks at each running
|interface, picks out the subnet mask on that interface, and then compares the
|derived packet subnet against the subnet assigned to that interface (when you
|assigned the interface the IP address). If the subnets match, it goes out that
|interface.
|
|Because both interfaces on your machine share the same 'real' net, 129.7, 
|it is likely that most outbound packets are also destined for 129.7.xx.xx.
|When le0 is the only interface up, all traffic has to go out it. Likewise
|when le1 is the only running interface.
|
|When they are both up, however, anything destined for, say, 129.7.128.34,
|can go out either interface, because it matches BOTH subnets...and the interface
|the kernel chooses, by Randy's Corollary to Murphy's Law, is always going to be
|the interface that is not connected to the network you need.
|
|You can see this via the netstat -i command, and watch the packet counts
|when you ping a host. Notice how the counters go up on the 'wrong interface?'
Technical Details
Message-ID: <1048@brchh104.bnr.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request
From: jet@uh.edu ("J. Eric Townsend")
Newsgroups: comp.sys.sun
Subject: 4/60c as gateway problems...
Keywords: Networks
Message-ID: <1048@brchh104.bnr.ca>
Date: 4 Jan 91 02:38:55 GMT
Sender: news@brchh104.bnr.ca
Organization: Sun-Spots
Lines: 55
Approved: Sun-Spots@rice.edu
X-Sun-Spots-Digest: Volume 10, Issue 4, message 3
X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu