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]

 



2008/11/25 Bhavesh Kamani <kamanibhavesh@xxxxxxxxx>:

> #ifconfig eth0 192.168.0.1 netmask 255.255.255.0
> #ifconfig eth1 192.168.0.5 netmask 255.255.255.0

As Dinesh pointed out, netmask should be 255.255.255.254

>     #route add -net 192.168.0.5 netmask 255.255.255.0 gw 192.168.0.5 dev eth0
> but those comands are giving error like :
> " route: netmask doesn't match route address"

-net needs a network address after it. You might want to try -host.

  $ route add -host 192.168.0.5 dev eth0

>
>     I also put "1" in ip_forward file.
>
> I am not able to ping anyone of those interfaces using ping command.
>

You don't need to be a gateway here. So, ip_fw need not be set to 1.

-- 
Vimal

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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