something like "-net 192.168.0.0" and if you want to further divide this network something like 192.168.0.x and 192.168.0.y, you need to change the netmask 255.255.255.x, depending upon how you divide your network.
By the way, when both cards are on same network(assuming not dividing it any further), why u need two gateways?
Regards
Anuz
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.