WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Multiple NIC set up  (Read 2578 times)

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Multiple NIC set up
« on: August 08, 2011, 01:09:32 PM »
This is a general networking question that's probably trivial to those who know what they're doing but its turning into a real time sink for me:

I have a PC with two NICs as eth0 and eth1.

I want to be able to network with my office LAN (IP addresses 10.0.X.X) on eth1 and a DSL router at 192.168.0.1 on eth0.  Internet traffic has to go through the DSL router and not through the LAN firewall at 10.0.2.1 as a large part of the project here is to test access to internal and DMZ hosts from an "external" host.

I do not need to route traffic from other hosts to the DSL router - I just need internet traffic originating on this host to go out on the DSL line and to be able to ssh to it from either side.

I have complete freedom in configuring the TC host as far as assigning static IPs or using DHCP.

The DSL gateway at 192.168.0.1 acts a a caching DNS server as does the gateway/firewall at 10.0.2.1.

I'm thinking a couple of "ifconfig"s and "route add" or two will do the job, but I have yet to get both interfaces working at the same time.

Can anyone help me with this?

32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Multiple NIC set up
« Reply #1 on: August 08, 2011, 01:20:23 PM »
Set eth0 as default route, done. Using static IPs would probably be best for a more complex setup like this.

edit: Start with everything down, no dhcp.

ifconfig eth0 blabla up
ifconfig eth1 blabla up
route add default gw 192.168.0.1 dev eth0
« Last Edit: August 08, 2011, 01:25:03 PM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: Multiple NIC set up
« Reply #2 on: August 10, 2011, 01:00:57 PM »
Thanks curaga!

I'm hoping to get some time to tinker with it today, but it already is working better than any of my previous attempts.
32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar