LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-18-2004, 10:20 AM   #1
kemplej
Member
 
Registered: Dec 2003
Posts: 235

Rep: Reputation: 30
Howto set up 2 different gateways for 2 different nics


I have a snort box I plan on testing by putting outside of our router for a few hours to see what it comes up with. It has 2 different NICS that are the same type. The box sees both nics fine. However the problem I am running into is I need to be able to set a different gateway for each nic card. One nic would go to my cable modem. The other nic would go to the router/hub which leads to the internal lan. I know you can set a default gateway in /etc/rc.d/rc.inet1.conf but can you set a seperate gateway for eth1?

Also would I use 2 cat5 cables or a cat5 cable and a x-over cable? If I use a x-over cable where do I use it? from the modem or to the router?


Thanks!
 
Old 05-18-2004, 11:53 AM   #2
tank728
Member
 
Registered: Sep 2003
Posts: 142

Rep: Reputation: 17
If I understand correctly you want to use your slack box w/2 nics to act as your router your your internal lan, correct? Connect your modem to eth0 on your slackbox. Eth1 should go to you router/switch/hub. All of these should be regular patch cables, not crossover. From eth1 you need to go into the uplink port on your router (not the port labeled internet). Now all of your clients on the lan point to the slackbox as their gateway, and the slackbox points to you ISP. Here is a little diagram.

modem>>eth0 (one patch cable)
eth1>>uplink port (one patch cable)
router/switch/hub>>clients (patch cables)

if you want to use dhcp you assign address to your client machines use dhcpd. this is the DHCP server that comes with slack, use either dhcpcd or dhcpclient on eth0 to accecpt from modem.

-tank
 
  


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
3 nics set up firewall box props666999 Slackware 2 09-11-2005 01:05 PM
Two NICS one web server and Two Gateways walk into a bar... dr_rockstar66 Linux - Networking 2 02-23-2005 04:23 PM
2 NICS, 2 IP adresses.... howto? derekn Linux - Networking 1 11-03-2004 02:55 PM
Linux Gateway+Two NICS+Router+HOWTO pin_bk Linux - Networking 11 09-07-2004 12:29 PM
2 NICs 2 networks 2 gateways birkinshawc Linux - Networking 1 05-29-2004 03:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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