Link to home
Start Free TrialLog in
Avatar of Zerox Hoop
Zerox HoopFlag for India

asked on

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
Avatar of Pepe2323
Pepe2323

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.
SOLUTION
Avatar of Rory Clerkin
Rory Clerkin
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!
Avatar of Zerox Hoop

ASKER

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......
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!
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.
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...
Hi xeroxzerox,

These are the details of your server, not the PC that you are using. Are you running the ping from the server?
my system ip address is 192.168.0.213 netmask 255.255.255.0 gateway 192.168.0.1
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
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.
i'm using ubuntu10.04
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Output is :

root@itadmin:~# ethtool eth0 |grep Link
      Link detected: yes
root@itadmin:~# ethtool eth1 |grep Link
      Link detected: no
issue soved by make bounding network.