Re: Not able to ping two ethernet interfaces connected using cross cable in same PC.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, Nov 25, 2008 at 3:19 PM, Bhavesh Kamani <kamanibhavesh@xxxxxxxxx> wrote:
Hi Team,

    I want to test ethernet driver for NIC, I have only one PC with two different NICs(for both drivers are different), So I disabled loopback and connected both the NICs using cross cable. Output of "ifconfig" is displaying both the interfaces and ip address is also set for both the interfaces.
    I executed following to set ip address :
#ifconfig eth0 192.168.0.1 netmask 255.255.255.0
#ifconfig eth1 192.168.0.5 netmask 255.255.255.0
#ifconfig lo down

    After that I tried to execute following commands,
    #route add -net 192.168.0.5 netmask 255.255.255.0 gw 192.168.0.5 dev eth0
    #route add -net 192.168.0.1 netmask 255.255.255.0 gw 192.168.0.1 dev eth1
but those comands are giving error like :
" route: netmask doesn't match route address"

    I also put "1" in ip_forward file.

I am not able to ping anyone of those interfaces using ping command.

Can anyone give some inputs on this?

Thanks,
Bhavesh.



use netmask as 255.255.255.254 at both place.

--
Dinesh Bansal
The Law of Win says, "Let's not do it your way or my way; let's do it the best way."

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux