Route continually changing

Suse 11.0 Amd 64bit System

I am having a hard time staying on the net. Routing on this system seems to change frequently. I am puzzled about what to do to make my route config permanent. The system has two network cards and a reboot will often result in eth0 and eth2 changing places in the routing table. The below table is working ok. But if you can imagine a new line above the lot using 192.168.1.0 and pointing to eth0 -that is my problem. A restart of networking or a reboot will cause this - despite having the gateway clearly defined. Any ideas on how to set a permanent route with 2 network cards ? One card is connected to the router while the other goes to a pc on the LAN. I have implemented static networking, as I had a very bad time trying to configure things with yast. It was a dog. If you have two network cards, I would be interested in your experience.

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth2

On Sun, 17 Aug 2008 21:26:03 GMT
cabernet <cabernet@no-mx.forums.opensuse.org> wrote:

>
> Suse 11.0 Amd 64bit System
>
> I am having a hard time staying on the net. Routing on this system
> seems to change frequently. I am puzzled about what to do to make my
> route config permanent. The system has two network cards and a reboot
> will often result in eth0 and eth2 changing places in the routing
> table. The below table is working ok. But if you can imagine a new line
> above the lot using 192.168.1.0 and pointing to eth0 -that is my
> problem. A restart of networking or a reboot will cause this - despite
> having the gateway clearly defined. Any ideas on how to set a permanent
> route with 2 network cards ? One card is connected to the router while
> the other goes to a pc on the LAN. I have implemented static
> networking, as I had a very bad time trying to configure things with
> yast. It was a dog. If you have two network cards, I would be
> interested in your experience.
>
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth2
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
> lo
> 0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0
> eth2
>
>

The problem is that you’ve got BOTH nics connected to the SAME network.
EITHER can obtain a valid address, and thus a valid route can be set up, so
the computer sets up whichever nic responds first as they’re brought up.

If you have TWO nics, they cannot be connected to the same network. Not to
say that you couldn’t connect the to the SAME switch as you’ve likely done
here… but that they need differing networks.

You’ve got them both set to 192.168.1.x … change things so one is on
192.168.1.x, and the other is 192.168.2.x or something.

But if they’re both on the same wire… you can do that with a single nic.
You won’t gain any speed using two nics on the same wire… the wire can only
pass ‘x’ amount of networking signals per second… you can’t get more water
out of a faucet by hooking up two hoses to it… same principle applies.

Could you describe what exactly you’re trying to accomplish? I (or others)
may be able to help you set up what you desire, or possibly suggest a better
solution.

Also, the IP addresses and netmasks being used too.

Loni


L R Nix
lornix@lornix.com

Thanks for pointing this out. Do you have an example of a Broadcast and Netmask for this ip address range ?

My router is connected by a long network cable to the pc. I have the router > Suse Box > bsd box. The two pcs are in the same office. I want to have internet on both. Now that it is working on Suse I hope to access it from bsd. I have set up basic Masquerading this far, but still have a way to go as I cannot ping the router from bsd. I can however ping suse from bsd.

On Mon, 18 Aug 2008 10:06:03 GMT
cabernet <cabernet@no-mx.forums.opensuse.org> wrote:

>
> Thanks for pointing this out. Do you have an example of a Broadcast and
> Netmask for this ip address range ?
>
> My router is connected by a long network cable to the pc. I have the
> router > Suse Box > bsd box. The two pcs are in the same office. I want
> to have internet on both. Now that it is working on Suse I hope to
> access it from bsd. I have set up basic Masquerading this far, but
> still have a way to go as I cannot ping the router from bsd. I can
> however ping suse from bsd.
>
>

Welcome.

Thinking in binary… broadcasts are all '0’s, netmasks are all '1’s.

So:

192.168.1.x address gives:

Broadcast: 192.168.1.0
Netmask: 192.168.1.255

192.168.1.x is usually talked about as a Class C network, most often having a
netmask of “24”… seems confusing, until you think about it binary again:

192.168.1.17 = (in binary…)

11000000.10101000.00000001.00010001, and “24” “1” bits gives you…
11111111.11111111.11111111.00000000 <= Netmask of 24 1’s, which in decimal is:
255.255.255.0

Sound familiar?

Ok, back to the problem…

Router <-> Suse works

Hmmm, I’m getting to deep end of pool here… you need to set up ICS using
suse. Easier for you since you have two nic’s, one going to router (would be
considered EXTERNAL), and one going to bsd (INTERNAL).

eth0 = external nic, external IP addresses (192.168.1.x)
eth1 = internal nic, internal IP addresses (192.168.2.x)

So maybe eth1 (suse) might be 192.168.2.254
and bsd would have 192.168.2.1 or something. This mimics the typical router
setup found.

To me, this isn’t that difficult, but it takes waaaaay longer to type out
than to explain or show. There is a page discussing Internet Connection
Sharing (ICS) at

http://en.opensuse.org/ICS

And I imagine if we ask nicely, someone will provide some other links which
might be more informative too.

Please guys? Any relevant links? Thank you.

Essentially, the router is the “internet” to suse-box, and suse-box is router
to bsd-box, and suse-box firewall sets up proper routing between bsd-box and
router. Make sense? (hope so)

I’ve pointed you in the right direction… Read through the privided links,
read some documentation and man pages, search the web some, and think a
lot… you’ll figure it out.

{Smile} Such is the way of the true path to enlightenment.

Loni

(Please feel free to ask more questions, I’m not abandoning you, just pushing
you out of the nest a little)


L R Nix
lornix@lornix.com