LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-03-2008, 11:14 AM   #1
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17

Rep: Reputation: 0
Question Multiple Network Interfaces - Force one to WAN and one to LAN?


Hello,

I have the following network structure:
Code:
    ISP --> Router --> Gb Switch |
                                 |
                                 | --> SlackBox (eth0: 192.168.1.11)
                                 | --> SlackBox (eth1: 192.168.1.10)
                                 | --> PC
I first had only one of the interfaces up on the SlackBox and decided to bring the extra one up just for LAN file transfers. I have the router's firewall forwarding to the .11 IP for all the WAN traffic, any internal traffic I connect through the .10 IP (i.e. ftp)...

The weird thing is that the connections are to the .11 IP but the traffic is being handled by eth1, which is the .10 IP.

ifconfig:
Code:
eth0      Link encap:Ethernet  HWaddr abc123
          inet addr:192.168.1.11  Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: abc123 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3053 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:255839 (249.8 KiB)  TX bytes:2284 (2.2 KiB)
          Interrupt:20 Base address:0x2000

eth1      Link encap:Ethernet  HWaddr abc123
          inet addr:192.168.1.10  Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: abc123 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13220730 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11627726 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1969552445 (1.8 GiB)  TX bytes:3599271101 (3.3 GiB)
          Interrupt:21
netstat shows a mix of .10 and .11, mostly .11 IP.

Here's a good example from a iptables log:
Code:
Jul  3 11:00:50 hostname kernel: RST DROPED IN=eth1
 OUT= MAC=abc123 SRC=xx.xx.xx.xx DST=192.168.1.11
 LEN=40 TOS=0x00 PREC=0x20 TTL=108 ID=5168 DF PROTO=TCP SPT=63318
 DPT=2682 WINDOW=0 RES=0x00 RST URGP=0
I'm going to have to learn this one...

So short version: how do I use two network interfaces and dedicate one to WAN traffic and one to LAN only (I would like it if LAN can connect to both).

My purpose is to prevent local file transfers from starving the WAN connections. Don't want to throttle any LAN traffic.

Slackware 12.1

EDIT: I'm currently looking into `route`...

Last edited by pricejm; 07-03-2008 at 11:27 AM. Reason: Researching...
 
Old 07-03-2008, 12:09 PM   #2
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17

Original Poster
Rep: Reputation: 0
Lightbulb `route` command...

OK

Looks like route solved my problem.

`route`
Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth1
localnet        *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         GW              0.0.0.0         UG    0      0        0 eth1
Ran:
route del default; route add default netmask 0.0.0.0 gw GW eth0

Code:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth1
localnet        *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         GW              0.0.0.0         UG    0      0        0 eth0

Last edited by pricejm; 07-03-2008 at 12:11 PM.
 
  


Reply

Tags
default, gateway, interface, multiple, network, route


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
Multiple, simultaneous network interfaces indienick Linux - Networking 4 07-31-2006 11:33 AM
Connectivity problem with network on Mandrake 10.1 LAN/WAN/Samba BiO|Happy Linux - Wireless Networking 0 04-29-2005 05:11 PM
Multiple WAN interfaces (FreeBSD Firewall) mxk *BSD 4 03-17-2005 12:21 PM
Iptables firewall in multiple lan interfaces Neelesh Linux - Security 3 07-31-2004 02:19 PM
multiple network interfaces -> getting card vendor for eth0... linen0ise Slackware 9 12-07-2003 09:16 PM


All times are GMT -5. The time now is 12:51 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration