LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-10-2008, 08:30 AM   #1
b1f30
Member
 
Registered: Nov 2007
Location: GMT -5, who wants to know
Distribution: Gentoo, Debian, BSD, Slack
Posts: 119

Rep: Reputation: 15
[SOLVED] Multiple eth interfaces, gateways, SuSE 10


SOLUTION: There is a Java front end for the iSCSI cards in question. They are Q-Logic's, and they have their own networking tools available from their CD. Worked like a charm with the problem below.

SuSE 10 Advanced networking question:

I have 3 interfaces: 1 NIC, 2 iSCSI QLogic.

I want them each to have their own gateway, but I do *not* want a default gateway.

NIC: 10.15.50.10 --> Gateway: 10.15.50.1
iSCSI: 10.15.40.10 --> Gateway: 10.15.40.1
iSCSI: 10.15.30.10 --> Gateway: 10.15.30.1

How to statically assign each their respective gateway?

Thanks!

Last edited by b1f30; 08-12-2008 at 11:06 AM. Reason: It's first thing in the A.M., I'm sick as hell, forgot to make the scheme so that each interface has it's own subnet.
 
Old 07-10-2008, 09:46 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Simply use a netmask of 255.255.0.0 and set up routes for each subnet.

Read your documentation for your distro. I don't use debian, but there is probably a standard
configuration file where the routes are listed and then configured using either the "route" or
"ip" command. There is also the /etc/networks file where you
can give your networks aliases.

The route or ip command can be used to configure the routes directly, but it is usually best
to determine the standard method that your distro uses.

Also look at the www.tldp.org website. There is an O'Reily book there "Network Administrator's Guide" which has a lot of general networking information.

Last edited by jschiwal; 07-10-2008 at 09:47 AM.
 
Old 07-10-2008, 11:32 AM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Debian Linux static routes

# cat /etc/network/interface

auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.254
up route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
down route del -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1



Ack !! read Debian in the last response and provided that info instead of Suse.. lets try again..
http://www.susegeek.com/networking/h...-opensuse-110/
http://linuxmafia.com/pub/linux/suse...chapter10.html
http://www.novell.com/documentation/...l/ch14s05.html

Last edited by farslayer; 07-10-2008 at 11:38 AM.
 
Old 07-10-2008, 11:40 AM   #4
b1f30
Member
 
Registered: Nov 2007
Location: GMT -5, who wants to know
Distribution: Gentoo, Debian, BSD, Slack
Posts: 119

Original Poster
Rep: Reputation: 15
Guys, I'm talking about SuSE - not Debian. :-)
 
Old 07-10-2008, 11:31 PM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Yes and I put the links for Suse at the bottom of my post when I noticed the error...
 
Old 07-11-2008, 01:15 AM   #6
Vit77
Member
 
Registered: Jun 2008
Location: Toronto, Canada
Distribution: SuSE, RHEL, Mageia
Posts: 132

Rep: Reputation: 17
I don't know Suse specific, but I can say about general Unix routing, which works on each *nix.
Generally, system decide which interface should be used according to a single routing table. (Let's avoid discussing the multiple routes etc.)
So, for each destination you should use a certain router. Thus:

Initially, your routing table contains something like this:
Code:
$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.15.50.0      0.0.0.0         255.255.255.0   U         0 0          0 eth0
10.15.40.0      0.0.0.0         255.255.255.0   U         0 0          0 eth1
10.15.30.0      0.0.0.0         255.255.255.0   U         0 0          0 eth2
Some Unix systems will show something like this:
Code:
$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.15.50.0      10.15.50.10     255.255.255.0   U         0 0          0 eth0
10.15.40.0      10.15.40.10     255.255.255.0   U         0 0          0 eth1
10.15.30.0      10.15.30.10     255.255.255.0   U         0 0          0 eth2
Anyway, the interface which should be used to reach a certain router is already defined.

Then, just add routes for each destinations via necessary router:
Code:
ip route add 10.50.0.0/16 via 10.15.50.1
ip route add 10.40.1.0/24 via 10.15.40.1
ip route add 10.30.2.1/32 via 10.15.30.1
I think it must solve you problem.

Last edited by Vit77; 07-11-2008 at 01:19 AM.
 
Old 07-11-2008, 05:20 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can configure routes in YaST2 -> network devices. Also look in /etc/sysconfig/. That is where YaST saves the results, and there should be a commented script where you would enter your routes. The bootup scripts with use these values to set the routes.

There is also a sysconfig editor in YaST2. Enter the search term "route" and you should be able to modify the correct file there.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
2 Interfaces with different IP and gateways; clash? Swakoo Linux - Networking 2 04-23-2008 09:06 PM
squid configuration, multiple eth interfaces zeeshan12 Linux - Networking 8 03-25-2008 11:26 AM
Multiple Gateways Suse 10 Fordor Linux - Networking 9 06-25-2007 05:58 AM
Red Hat 7.3 and multiple gateways on multiple interfaces bluefmc Linux - Networking 2 11-19-2004 05:01 PM
Multiple Interfaces Seperate Gateways? byersjlpa Linux - Networking 10 01-09-2003 03:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration