LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Howto set up 2 different gateways for 2 different nics (https://www.linuxquestions.org/questions/slackware-14/howto-set-up-2-different-gateways-for-2-different-nics-182892/)

kemplej 05-18-2004 10:20 AM

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!

tank728 05-18-2004 11:53 AM

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


All times are GMT -5. The time now is 10:28 AM.