LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Virtual NIC Strange Problem (https://www.linuxquestions.org/questions/linux-networking-3/virtual-nic-strange-problem-825208/)

roachware 08-09-2010 10:07 PM

Virtual NIC Strange Problem
 
I have an existing set of virtual apache sites that I run, and a TeamSpeak3 server running on port 9987. Everything works fine. I needed to set up a second SSL site, so I needed to set up a new IP on the same NIC. eth0 is my external card, so I issued the command "cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1" and then edited the device with the proper device name IP address and gateway (IP and gateway addresses were provided by my ISP and are different than my main IP).

Well...after a network restart, both would ping fine and web access was without issue. Strangely enough though, SOME users were having trouble connecting to TeamSpeak. Only a choice few could connect. The rest could not. I disable the eth0:1 card and BAM everyone can get onto TeamSpeak again.

Any ideas what is causing this? I posted the ifcfg files below. Almost everything (including the TeamSpeak server) is on the IP address under eth0. Only one site is on eth0:1. I cannot seem to figure out why one would affect the other, unless there is some sort of routing issue.

ifcfg-eth0
Code:

# nVidia Corporation Unknown (0x0760)
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:1f:d0:21:f5:ad
ONBOOT=yes
DHCP_HOSTNAME=server.site.com
NM_CONTROLLED=no
IPADDR=100.200.5.195
NETMASK=255.255.0.0
GATEWAY=100.200.5.1
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
DNS2=1.2.3.4
DNS1=2.4.6.8
SEARCH=site.com

**ifcfg-eth0:1
Code:

# nVidia Corporation Unknown (0x0760)
DEVICE=eth0:1
BOOTPROTO=none
HWADDR=00:1f:d0:21:f5:ad
ONBOOT=yes
DHCP_HOSTNAME=server.site.com
NM_CONTROLLED=no
IPADDR=100.200.8.138
NETMASK=255.255.0.0
GATEWAY=100.200.8.1
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
DNS2=1.2.3.4
DNS1=2.4.6.8
SEARCH=site.com

I have tried the following:
Edited DHCP names to be different
Removed the SEARCH line at bottom

scheidel21 08-10-2010 02:48 PM

Why didn't you just use virtual hosts to host another ssl site, I believe you can do that. Aside from that it sounds like your NIC was rejecting some traffic for some reason. Maybe a work around for this might be to create a tap device and bridge it with the NIC then assign the Tap device a different IP then to the machine it looks like two seperate adapters, and nothing is actually shared, all that will happen is the tap device will listen for traffic with its IP address.

roachware 08-10-2010 09:19 PM

AHA!! Okay, I have kernel 2.6.x and the whole ifcfg thing is seriously deprecated and apparently is known to act a bit goofy.

I used:
Code:

ipaddr add 100.200.8.138 label eth0:0 dev eth0
and it works great! To make it work after reboot however, I had to add this command to the /etc/rc.local file and now I am good to go.

Apparently this is the preferred method now. A lot easier at least.


All times are GMT -5. The time now is 01:09 AM.