Tag Archive: nics



One issue I ran into on one of my Ubuntu servers was that each time i put my nameserver into the /etc/resolv.conf it was being reset back to a blank page after a reboot. Well there is tons of information out there about if your using DHCP then you need to go into the dhcp config files and setup the nameserver in there. One problem, I was not using the DHCP. Most of us running Linux on a server use the static IP option so this nullifies the instruction sets Iwas finding on the net.

So here I thought I would pass along this quick little summary. The best way for you to get around this is to hard code you nameserver’s into your interface file for your ethernet card like below. For Ubuntu you can find this by going to /etc/network/interfaces and edit this file with nano or VIM or whichever you like.

As you can see on the last line using dns-nameservers with an ip is the same as using nameservers in your resolv.conf file. You can also add multiple ip’s by separating them with a space. If you have any questions or comments, feel free to drop me a line.

Advertisements

Multihomed Nics


A couple of weeks ago i had a client call to say that their homesite connection to the FTP server kept dropping or saying it could not connect to the server. When i went to their server everything seemed to work fine for me. As i was baffled by this i decided to wait to see if it was an ISP issue for them.

The next day i receive a call once again they are having problems. I decide to dig deeper into the nics to try and find the issue. To give you a summary of the configuration, the server has 2 nics, 1 that points to the load balancer, and one that is used for connecting directly to using RDC. I found each card had a default gateway assigned to it, but when i went into the command prompt to view the connection properties via IPCONFIG i found that the gateway for the 2nd nic was getting dropped and the routing table was using the gateway of the nic that pointed to the load balancer. This poses a problem because the packet is expected to go out the NIC in which it came in on so the load balancer gets random packets that it did not send to the server, so it rejects it. Causing the server to appear to not respond.

The Fix:

in order to get around this problem i did the following.

1. went into NIC 1 properties and removed the default gateway (load balancer NIC)

2. went to the command prompt and added a persistent route for that NIC in the routing table.

3. restarted server so that it would pic up the only default gateway again.

Windows has a tendency to not like different default gateways for multi homed device. so the way around is to add a persistent route for traffic you want directed somewhere else. Turns out this is not much of a problem usually unless a client is ftp to a site using homesite or dreamweaver. reason why?. high end web tools like those tend to constant contact the ftp server and bombard it with tons of requests, which normally are not a big deal, but if the server takes to long to contact the gateway to send the packet back, and there are 2 gateways defined. It will drop the first gateway assuming it does not work anymore and begin using the second gateway for all traffic.

Lesson:

on multi homed NIC, ALWAYS only define 1 gateway for the traffic. and use your routing table for the rest.

%d bloggers like this: