LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-27-2009, 04:59 PM   #1
lodonnel
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Rep: Reputation: 0
configuring 2 nics to talk to two different subnets on a sles10sp3 server


I am new to this forum.

I am trying to setup a HP blade (BL460) server with 2 nics on sles10sp3.

I want one nic to connect to a management vlan and and second to connect to the standard network.

It should be possible for a desktop in the standard network to connect to either nic by providing the correct ip address.

My goal is to use this server as our first virtualisation hosts server using Xen. I dont want traffic used to upload / download images to the server through nic1 to effect the users traffic on the standard network on nic2. However any attempt at routing (which Im not good at) has led to the tx traffic all going out the default route (users subnet).

Each time I setup the nics via yast2 lan I can get the standard lan nic working ok. but cannot get the management nic working correctly. The server can ping a workstation on another vlan, but the workstation cannot ping the management nic.

The default route appears to be forcing all traffic on the host out through this route, which I presume is normal behaviour. Using tcpdump I can see the ping packets received by the server, the server then responds through the default gateway, which the workstation does not see.

However, this normal behaviour will result in extra traffic on the users network when image downloads are initiated from the management interface.



eg If I use a 172.24.1.0 network routed through 172.24.1.1 router setup as our management vlan , and 200.200.1.0 with router 200.200.1.1 as our lan for general users.

Where server ips are nic1 10.1.1.10 and nic2 200.200.1.10


My workstation would be 200.200.1.10. If I ping the server at 10.1.1.10
I get no response.
If I ping the server at 200.200.1.20 no problem.

====

I hope I have not gone on too long, and not confused anyone.


Basically I used the network setup recommended by vmware to manage a virtual server. I actually have 4 nics, I thought by just talking about 2 nics the problem would be easier to explain. vmware specify that two nics should be used for management and two for the Lan. This is what I am trying to achieve, but both subnets must operate independently.

Anyone got any good advice , or pointers to documentation which explains how to achieve this.

Thanks
Liam
 
Old 11-27-2009, 10:17 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Hi there, welcome to LQ!

While I do find your post a little confusing, I think I get the idea, at least in part. That said, I have more experience with the "networking" angle than with the VMware/Xen angle, so I'm going to look at this as a networking problem. If you (or someone) determine that this is more of a Virtualization problem, you can use the report button and ask for your thread to be moved to the Virtualization forum.

So.. There are a couple of statements in your post that I find conflicting. Assuming just 2 NICs:

1) One NIC connects to a vlan, and the other NIC to a regular network.
2) It should be possible for a desktop on one network, to connect to either NIC on the server
3) Both subnets should operate independently.

So, the above conditions, as far as I can tell, cannot exactly happen; subnets are by nature independent of one another, meaning that by default, traffic doesn't go from one subnet to the other. Read on:

If the two subnets are independent, then it's normal for desktops on one subnet to not be able to ping the other subnet NIC, because they aren't physically connected; if you want this to become possible, traffic needs to be routed from one NIC to the other internally by the server. For this, you'd need to have ip_forward enabled on the server and use iptables to create the necessary routes & network address translations (NATs) for incoming connections on NIC-A to be forwarded to NIC-B. I believe you'd need to use iptables SNAT (Source NAT) and/or DNAT (Destination NAT) to rewrite the source + destination addresses of traffic you want forwarded from one subnet to the other.

So, if you have desktop machine on 200.200.1.10 you can communicate only with 200.200.1.XXX by default.

If you want to use that desktop machine to (let's say) contact a service listening on 10.1.1.123 then the server needs to rewrite that source address (SNAT) 200.200.1.10 to something like 10.1.1.YYY and forward it along to the 10.1.1.0 subnet, to the listening service at 10.1.1.123. The process gets reversed on the return trip: established traffic coming back from the service at 10.1.1.123 TO 10.1.1.YYY gets un-SNATed, it's destination address rewritten to 200.200.1.10, and is forwarded onto the subnet from which it originally came, and returned to the desktop machine.

I'm just trying to explain how traffic gets from one subnet to the other and back again, and I believe that iptables is what you need, to get the routing you are looking for. Using iptables can be daunting at first, but there are LOADS of almost ready-to-go iptables (firewall) scripts which can be tailored to specific needs and put in place on a server, to do these network address translations (NAT routing). Now, as mentioned, I'm not familiar with the virtualization aspect, so how that affects this situation, if at all, is beyond my knowledge.

Until someone else comes in here and provides either more clarity/details, or more information, I recommend you have a look at the various documentation here: http://www.netfilter.org/documentation/index.html and at this excellent how-to site here: http://www.bec.at/support/iptables-tutorial/index.html which contains sample scripts and examples of how to do just about everything with iptables.

Best regards,
Sasha
 
Old 11-30-2009, 04:19 AM   #3
lodonnel
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Smile

I solved the problem... thanks for your help

The solution is probably not very elegant, but nonetheless, it was a relatively simple and workable solution. It does mean that other users on the 200.200.1.x vlan can access the 172 addresses, however, in our situatin , that wont be a problem...
====
The solution chosen...

On the management workstations ... create a secondary address in the 172.24.1.x vlan.
Eg: A management workstation will now have two ip addresses eg 200.200.1.50 and 172.24.1.50.
Only one nic in the workstation.

At the switch reconfigure the ports connecting to the server nics with 172... addresses to the 200.200.1.x vlan.

This works ... no additional scripting.

===

Again thanks for your help

Last edited by lodonnel; 11-30-2009 at 05:42 AM. Reason: Solution found
 
Old 11-30-2009, 09:22 AM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Hey that's great! Elegance though is not a prerequesite for "it works!" -- perhaps your solution is 'elegantly simple'

Glad you got a working solution either way,

Cheers!
Sasha
 
  


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
DHCP - 2 NICS & 2 Subnets daveginorge Linux - Networking 3 05-22-2009 01:59 AM
DHCP server having 2 subnets through 2 nics dils Linux - Newbie 2 05-21-2009 04:09 AM
How can two seemingly different subnets on the same segment talk toeach other? jdavis2 Linux - Networking 5 07-04-2008 11:42 PM
Making two subnets talk to each other. NetAX Linux - Networking 12 09-20-2004 02:41 AM
DHCP server with multiple nics and subnets hawkpaul Linux - Networking 6 12-20-2001 07:32 AM

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

All times are GMT -5. The time now is 04:18 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