LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 04-08-2005, 02:55 PM   #1
Bwongar
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.1
Posts: 9

Rep: Reputation: 0
Eth0 and Eth1 config


First of all, thanks for even looking. This isn't so much of a problem as a request for confirmation.

The idea is that this 'intranet' box will be accessible internally as well as externally. The in-house DNS server points the URL to 192.168.0.24, but externally the DNS record is an external IP. As you can see this shortcuts directly to the box if you are in-house - seemingly a standard practice.

However, I had a slight problem with my setup. I have not setup more than one interface before so it was all trial and error. My first attempt worked breifly, till I realized that I could not resolve externally:
/etc/network/interfaces
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth1
iface eth1 inet static
  address *my-ip-here*
  netmask 255.255.255.240
  gateway *my-gateway-here*

auto eth0
iface eth0 inet static
  address 192.168.0.24
  netmask 255.255.255.0
  gateway 192.168.0.1
So I thought, "It has two gateways... maybe it's getting confused." I took out the second gateway (192.168.0.1) and it works! I can resolve externally and internally.

My question: Is this the proper way to have this set up? Thank you.
 
Old 04-09-2005, 09:18 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Yes that is correct.

By definition you can really only have one "default". Default in this case really means "if all else fails" - ie no other specific route could be matched.
 
  


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
how to use eth1 instead of eth0 WindozeFREE Linux - Networking 8 03-22-2005 04:04 AM
Wireless network on eth1 diabled Ethernet eth0 and eth0 never comes back tadatoshi Linux - Wireless Networking 4 09-23-2004 06:57 PM
Firewall WAN eth0 LAN eth1 self-bridges, eth0 does all routeing. Nichole_knc Linux - Networking 5 07-29-2004 03:33 PM
eth1 added, mysql connections FROM this machine are from eth1. Need bound to eth0??? kreese Linux - Networking 9 03-31-2004 01:12 PM
Kernel 2.4.22 finds eth0 and eth1 but 2.6.0 does not find eth1 coollink Linux - Networking 3 01-13-2004 08:32 PM


All times are GMT -5. The time now is 01:22 PM.

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