4/60c as gateway problems...

J. Eric Townsend jet at uh.edu
Fri Jan 4 13:38:55 AEST 1991


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 at uh.edu    Bitnet: jet at 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 at 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?'



More information about the Comp.sys.sun mailing list