LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-20-2010, 10:12 AM   #1
tecbox
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Rep: Reputation: 0
Multiple NICs different subnets


I've got a Linux box on my network with multiple NIC cards. One of the network cards is in the 192.168.0.0 subnet and the other is in the 192.168.2.0 subnet. The router on my network (Dlink 655) has an IP of 192.168.0.2 and has network filtering enabled. The logs on my router are filled with "Access denied to LAN system with MAC address xx:xx:xx:xx:xx:xx" for the NIC on the 192.168.2.0 subnet.

Is this to be expected? Can I configure the NIC on the 192.168.2.0 subnet to prevent it from accessing the router? The NIC on the 192.168.2.0 subnet is connected to a switch and only needs access to another box on the same subnet and therefore, does not need access to the router.

This is the route table on the linux box:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.0     *               255.255.255.0   U     0      0        0 eth0
192.168.2.0     *               255.255.255.0   U     0      0        0 eth1
192.168.0.0     *               255.255.255.0   U     0      0        0 eth2
169.254.0.0     *               255.255.0.0     U     0      0        0 eth2
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth2
Thanks.

Last edited by tecbox; 03-20-2010 at 10:16 AM.
 
Old 03-20-2010, 11:19 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
If eth2 doesn't need access to the router, then I suppose it's connected to a switch where comp no2 also is connected? This should be no problem!
However, if you connect that switch to the router you'll have problems.
As far as I know, the only way to get the traffic for 192.168.2.x through router is to set 2 ip:s on the routers interface. In Linux no problem, don't know about your router.
 
Old 03-20-2010, 04:42 PM   #3
tecbox
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the reply.

Yes, both of the boxes that have the 192.168.2.0 subnet IP's are connected to the switch and the switch is connected to the router. These two boxes with the 192.168.2.0 subnet IP's do NOT need access to the router, they just need to talk to each other.

I'd just like to prevent the massive amount of access attempts that these boxes try to make with the router.
 
Old 03-21-2010, 05:56 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
To not access the router you remove gateway setting I'd think.
 
Old 03-22-2010, 03:30 AM   #5
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
No, that doesn't work - if you remove gateway for 192.168.2.x then all traffic to that subnet will be sent through eth2.
Actually, with switch connected to router traffic willbe sent to router as well. To stop that you would need a more advanced/managed switch. But why not simply either disconnect switch from router or connect the 2 boxes directly wo switch? (Guessing now you only have 2 computers on 192.168.2.x)
 
  


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
Multiple NICs, different subnets, wrong default gateway being set qwbillings Linux - Networking 1 07-02-2009 09:23 AM
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
Getting DHCP to allocate address for two different subnets on 2 nics GGlinux Linux - Networking 5 02-25-2009 08:10 PM
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 08:19 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