Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    multiple NICs, IPs

    I recently added a new IP address to a second NIC (eth1) on a RH Linux server using ifconfig. So, now I have two NICs and each has an IP address of it's own. Things seem to work pretty good.

    I was issuing some mysql commands from the command line and this resulted in an error that it couldn't connect. It referenced the IP on eth1. I went to the MYSQL server and opened up the firewall to allow access to that IP. It always allowed access from the IP on eth0, so I hadn't thought that this would change anything. So, I was able to achieve what I wanted.

    However, I am wondering how the server chooses the IP to identify itself?

  2. #2
    A server doesn't "identify" itself. Hostnames are tied to IP's - the hostname used resolves to an IP which is tied to a NIC.

    From a client machine, whatever name you use will determine the IP/NIC you reach on the server.

    For apps running server side, they can commonly be "listening" on all IP's or tied to only certain ones (MySQL included.)

    If you have one hostname that sometimes resolves to one IP and sometimes to another (and you didn't do this on purpose), you are inviting trouble.

Posting Permissions

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