Results 1 to 3 of 3

Thread: Config check for box with two nics

  1. #1

    Config check for box with two nics

    I am working with a box that has two nics. I want the PUBLIC interface
    to use two of my external DNS servers and the INTERNAL interface to
    use two of my internal DNS servers. This is not a router as I have not
    turned routing on. Not sure my resolv.conf is right. When I try to
    ping an internal host by just host name and FQDN it fails. Fine by IP.
    Ping by name on Internet side fine.

    My /etc/hosts:

    127.0.0.1 localhost.localdomain localhost
    10.192.0.200 windmere.internaldomain.com windmere
    208.x.x.x windmere.externaldomain.com windmere

    My /etc/resolv.conf:

    nameserver 208.x.x.x
    nameserver 208.x.x.x
    nameserver 10.192.0.3
    nameserver 10.192.0.2
    search internaldomain.com
    search externaldomain.com

    My /etc/sysconfig/network:

    NETWORKING=yes
    HOSTNAME=windmere.externaldomain.com
    GATEWAY=10.192.0.1
    GATEWAY=208.x.x.1

    (QUESTION: For internal queires should I also add the line
    HOSTNAME=windmere.internaldomain.com ?)

    My /etc/sysconfig/network-scripts/ifcfg-eth0:

    DEVICE=eth0
    ONBOOT=yes
    BOOTPROTO=none
    IPADDR=10.192.0.200
    NETMASK=255.255.255.0
    GATEWAY=10.192.0.1
    TYPE=Ethernet

    My /etc/sysconfig/network-scripts/ifcfg-eth1:

    # Please read /usr/share/doc/initscripts-*/sysconfig.txt
    # for the documentation of these parameters.
    IPV6INIT=no
    ONBOOT=yes
    USERCTL=no
    PEERDNS=yes
    TYPE=Ethernet
    DEVICE=eth1
    BOOTPROTO=none
    NETMASK=255.255.255.0
    IPADDR=208.x.x.x
    GATEWAY=208.x.x.1

    My routing table:

    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    208.x.x.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    10.192.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
    0.0.0.0 208.x.x.1 0.0.0.0 UG 0 0 0 eth1

    I assume this routing table looks up to spec with my setup above?

    Also, read in a tutorial about a /etc/sysconfig/static-routes. Was
    this only in previous versions of Fedora? I dont see it on this FC3.
    OR, if that a file that only exists ONCE I entered a route manually? I
    have not entered any manual routes.
    Suggestions? Tips? Experienced recommendations?

    Thank you.

  2. #2
    Administrator Moderator
    Member
    starfish's Avatar
    Join Date
    Apr 2004
    Posts
    141
    The first conflict I see is in the /etc/hosts file. You have the windmere alias twice, once for the internal and once for the external domain. This may be causing some confusion. The alias needs to be unique.

    The /etc/hosts file is also configured incorrectly for the 127.0.0.1 address. Check this link

    The resolv.conf should only have a single "search" entry followed by a string of all the domains, each separated by a space. Check this link

    The reason why pinging by host name doesn't work is probably because your internal DNS server isn't configured correctly or has a firewall like iptables running on it blocking the DNS queries. Use the Linux "host" command to point the DNS query to one of the DNS servers. For example:

    Code:
    [root@windmere root] # host windmere.internaldomain.com 10.192.0.3
    Are you sure DNS BIND named daemon is running on your DNS servers?

    Does your internal DNS server have Internet connectivity? If it does, you can have a single resolv.conf entry pointing to it and let the DNS server use DNS Views to give different results depending on whether the query is coming from the Internet or yuour local network.

    The static-routes file will soonbe deprecated in Fedora, you can either enter them in the /etc/rc.local file, or better in a specific route file for your NIC. Check this link

    Hope this helps

  3. #3
    Thank you for the help, sorry for the delay in the reply.
    OK, let me show you how I have adjusted my HOSTS file, and RESOLV.CONF file and go from there. I have read your response and gone back over the online readings (I HAVE THE PDF VERSIONS TOO) but I may be missing out on why something is the way it is. I am also trying to get sendmail working so I have an alias for mail.externaldomain.com too.


    [root@windmere ~]# cat /etc/hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    208.x.x.x windmere.externaldomain.com windmere mail
    10.192.0.200 windmere.internaldomain.esa windmere


    ******** I may be a little bit confused on this, since I have two IP's are you saying there is a problem giving it the same hostname like I do?



    [root@windmere ~]# cat /etc/resolv.conf
    domain externaldomain.com
    nameserver 10.192.0.2
    nameserver 208.x.x.x
    # nameserver 208.x.x.x
    search externaldomain.com internaldomain.com


    **** When I have the resolv.conf like above it seems to allow me to ping the external and internal hosts just by HOSTNAME (as well as FQDN) that are both in my externaldomain.com and internaldomain.com.

    The internal DNS and EXTERNAL DNS are both W2K servers. I am not running BIND yet (Have not read that PART yet.)

    ANYWAY, SEEMS to be better now, pings are working.

    My newest challenge revolves around sendmail. Not sure if my DNS situation is related to this issue but when I type in sendmail -v name@myisp.com I see lines like:

    <root@windmere.internaldomain.com>... Sender ok and...
    221 2.0.0 windmere.internaldomain.com closing connection


    Not sure it should be doing anything throwing out my internaldomain.com sine that is not a web registered name, might have something to do with why EMAILS ARE NOT GETTING to my test @myisp.com address.

    HAAAA learning linux... fun but time consuming... hehe

Similar Threads

  1. Multiple NICs on ubuntu 8.10
    By ramon82 in forum Linux - Hardware, Networking & Security
    Replies: 3
    Last Post: 12-20-2008, 04:41 AM
  2. Multiple NICs w/same Static IP
    By cgasmith in forum Linux - General Topics
    Replies: 4
    Last Post: 07-02-2007, 07:15 PM
  3. 3 NICs
    By elovkoff in forum Linux - General Topics
    Replies: 0
    Last Post: 03-25-2003, 08:37 PM
  4. Configuring Two Nics
    By Rastar in forum Linux - Hardware, Networking & Security
    Replies: 5
    Last Post: 03-07-2003, 05:19 PM
  5. 2 NICs
    By elovkoff in forum Linux - Hardware, Networking & Security
    Replies: 4
    Last Post: 03-03-2002, 12:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •