Two Network card in one samba server (linux)

Hi Expert,

I'm facing an issue regarding network...
I've configured two network card (eth0,eth1) in samba server..

eth0 ipaddress is 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1

eth1 ipaddress is 192.168.0.150
netmask 255.255.255.0
gateway 192.168.0.1

Now,  Only one lan cable connected to eth0 not eth1
When i'm ping eth0,It's giving me response and when i'm pinging eth1 it also giving me response without connect lan cable..

So Now my question why eth1 is pinging without attached cable.Please give a suggestion to solve issue.

Regards,
Xerox
LVL 6
xeroxzeroxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pepe2323Commented:
Hi

Put down the interface eth1 and try again to ping eth1 ip

ifconfig eth1 down

Just to double check that none other has the same ips configured  

Let me know what happens.
0
Red-KingIT ManagerCommented:
I assume you're 100% positive that nothing else is using the same IP address as eth1? Is your computer on the same network subnet? Run a Trace route to 192.168.0.150 to make sure you're getting the route you expect. If you're on the same subnet this will be only 1 hop.

This could be down to the Mac addresses.
Check the files in the following location on your linux server for the HWADDR, ensuring that they are different
/etc/sysconfig/networking/devices
(I'm assuming a Redhat type distro here i.e. Centos or Fedora maybe. I'm not sure if Debian based distros use the same location)
You can also run
ifconfig -a

Check that eth0 doesn't have any alias set up that use the same IP as eth1.
Check the arp table on your switch for the mac addresses of eth0 and eth1
Check the arp table on your computer


Run a trace from your PC Wireshark (or equivalent). While Wireshark is running fire off the ping to 192.168.0.150.
Filter the trace in Wireshark using the keyword 'icmp' and have a look at the packets you are sending and receiving.

With all that information in hand you should be able to determine where the issue is occurring at least.
0
My name is MudSystems EngineerCommented:
Assign static ip and ping it is like ping in 127.0.0.1 it is not needed a cable to ping, you are pinging the card it self... that's why it is ALIVE!
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

xeroxzeroxAuthor Commented:
Hi Pepe2323

I've down eth1 and after do it..ping stop because eth disable.But i want if we unplugged lan cable it will be automatically down interface and when i plugged cable then it will be up

Hi Red King

As per you advice, i've checked no alias configured in ubuntu server.
and i've checked the arp table on system..there is no arp table found in both interface..

I've unplugged the cable from eth2 and ran ifconfig -a  

eth1      Link encap:Ethernet  HWaddr 00:0c:29:ad:3a:3a  
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fead:3a3a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13952 errors:0 dropped:0 overruns:0 frame:0
          TX packets:406 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1472264 (1.4 MB)  TX bytes:50347 (50.3 KB)
          Interrupt:19 Base address:0x2000

eth2      Link encap:Ethernet  HWaddr 00:0c:29:ad:3a:44  
          inet addr:192.168.0.150  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fead:3a44/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:4306 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1332 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3315981 (3.3 MB)  TX bytes:159204 (159.2 KB)
          Interrupt:19 Base address:0x2080

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:529 errors:0 dropped:0 overruns:0 frame:0
          TX packets:529 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:35764 (35.7 KB)  TX bytes:35764 (35.7 KB)


Hi whatboy

As per your comment,It's pinging the card..so how can we resolve it...

I'm very thanks full to all person for contribute n it......
0
My name is MudSystems EngineerCommented:
If you do not want ping to occur when cable is disconnected, You should ping an outside device instead, you have two networks with same subnet (Weird but who am I to judge), place two devices one in each network, and ping them instead!
0
Red-KingIT ManagerCommented:
What is the IP address of your computer? Is it on the same subnet as the server?
Did you check the arp cache on your computer?

When you ping eth1 from your computer what is the command you are using?
Are you using the hostname?
If so flush your DNS cache and check for any entries in your hosts file.

Is this a physical or virtual server? If physical does it have 2 physical NICs? If virtual, what hypervisor are you using and are there 2 NICs assigned to the VM?

It's not a problem to have 2 NICs on the same subnet but you can only have 1 default gateway.
0
xeroxzeroxAuthor Commented:
ans:-
eth1------ inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
eth2------inet addr:192.168.0.150  Bcast:192.168.0.255  Mask:255.255.255.0
and arp cache list is blank....

ping -c 4 192.168.0.150....i'm not using hostname
I'm using 2 physical NIC card...
0
Red-KingIT ManagerCommented:
Hi xeroxzerox,

These are the details of your server, not the PC that you are using. Are you running the ping from the server?
0
xeroxzeroxAuthor Commented:
my system ip address is 192.168.0.213 netmask 255.255.255.0 gateway 192.168.0.1
0
xeroxzeroxAuthor Commented:
LEN-A70-198:~$ lshw -c network
WARNING: you should run this program as super-user.
  *-network              
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 2
       bus info: pci@0000:01:00.0
       logical name: eth0
       version: 03
       serial: c8:9c:dc:39:cc:46
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list rom ethernet physical
       configuration: broadcast=yes driver=r8169 driverversion=2.3LK-NAPI ip=192.168.0.213 latency=0 multicast=yes
       resources: irq:25 ioport:e800(size=256) memory:fdfff000-fdffffff(prefetchable) memory:fdff8000-fdffbfff(prefetchable) memory:febe0000-febfffff(prefetchable)

can we change physical id: 2 to physical id: 0
0
Red-KingIT ManagerCommented:
What operating system are you using for your own system?
That's definitely not windows, is that linux or Mac?
I'm not sure whether or not the physical id can be changed.
0
xeroxzeroxAuthor Commented:
i'm using ubuntu10.04
0
My name is MudSystems EngineerCommented:
Main question and suggestion was already gave...

So Now my question why eth1 is pinging without attached cable.Please give a suggestion to solve issue.


Because you're pinging the card itself, you need to ping an outside device... if you wanna know if a cable is plugged or not, you need to install ethtool, and then execute it like:
sudo ethtool eth0 | grep Link
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xeroxzeroxAuthor Commented:
Output is :

root@itadmin:~# ethtool eth0 |grep Link
      Link detected: yes
root@itadmin:~# ethtool eth1 |grep Link
      Link detected: no
0
xeroxzeroxAuthor Commented:
issue soved by make bounding network.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.