LinuxQuestions.org
Visit Jeremy's Blog.
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-24-2015, 05:01 AM   #1
blueSpirit25
LQ Newbie
 
Registered: Nov 2015
Posts: 2

Rep: Reputation: Disabled
Separate network traffic on NICs


Hello,

I'm working on a network device with 2 NICS:
  • eth0 for monitor & control (http, snmp, ssh, etc) with dhcp or static ip
  • eth1 for data traffic, with static ip
With the regular configuration, eth0 and eth1 are in separated physical networks. But the user is free to configure his network, so it should also work with both interfaces in the same network/subnet. For testing purposes I used this configuration:
Code:
eth0 192.168.32.10 netmask 255.255.255.0
eth1 192.168.32.11 netmask 255.255.255.0
As long as both network interfaces are connected, this configuration works fine. But when disconnecting one interface I noticed:
  • I can ping both IP addresses even if the secondly configured NIC is disconnected
  • Both IPs are not reachable when the firstly configured NIC is disconnected
My interpretation: When both NICs match, the (ping) response is sent via the first matching. If this is not connected - the response cannot be sent.

I ve followed a description, how to separate network interfaces - but without success:
Code:
echo "1 admin10" >> /etc/iproute2/rt_table
echo "2 admin11" >> /etc/iproute2/rt_table

ip route del default

route add default gw 192.168.32.3 dev eth1
route add default gw 192.168.32.3 dev eth0

ip route add 0/0 dev eth0 table admin10
ip rule add from 192.168.32.10 table admin10
ip rule add to 192.168.32.10 table admin10

ip route add 0/0 dev eth1 table admin11
ip rule add from 192.168.32.11 table admin11
ip rule add to 192.168.32.11 table admin11
The idea is, to force all traffic with source=eth0 to be sent via eth0 - and source=eth1 via eth1.

Last edited by blueSpirit25; 11-24-2015 at 07:36 AM. Reason: [SOLVED]
 
Old 11-24-2015, 07:35 AM   #2
blueSpirit25
LQ Newbie
 
Registered: Nov 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Update: it's working like written.

It seems that there are some other problem: From time to time I have to unplug and plug-in the cable to get the network working...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Forwarding DNS between two nics (separate networks) dave247 Linux - Networking 6 10-02-2011 01:09 PM
Run 2 NICs, separate networks liche24 Fedora 1 03-14-2009 11:20 PM
Two NICs network traffic goes only through one gemini728 Linux - Networking 6 07-08-2007 10:48 AM
Linux setup as router / DHCP w/3+ NICs, separate but shared connectivity - question MetaTechi3 Linux - Networking 3 11-17-2006 11:41 AM
Separate NICs to raise the bandwith ivanatora Linux - Networking 2 07-26-2004 03:52 AM

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

All times are GMT -5. The time now is 10:41 PM.

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