I want connect my two Linux PCs running in 2.6 kernel via cross over cable. To do this I have done the following settings after a Google search:
In PC1
ifconfig eth0 10.10.11.16 netmask 255.255.255.0 up
route add default gw 10.10.11.13 eth0
(default gateway which is ip of pc2 )
In PC2
ifconfig eth0 10.10.11.13 netmask 255.255.255.0 up
route add default gw 10.10.11.16 eth0
(default gateway which is ip of pc1 )
Then i tried pinging i could not able to connect.Are these above settings enough or any thing am i missing?
For your more information
In PC1
ifconfig output
eth0 Link encap:Ethernet HWaddr 00:16:76:A1:33:37
inet addr:10.10.11.16 Bcast:10.10.11.255 Mask:255.255.255.0
inet6 addr: fe80::216:76ff:fea1:3337/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:49984 errors:6 dropped:0 overruns:0 frame:6
TX packets:17221 errors:0 dropped:0 overruns:0 carrier:0
collisions:439 txqueuelen:1000
RX bytes:14295749 (13.6 MiB) TX bytes:2684625 (2.5 MiB)
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:511 errors:0 dropped:0 overruns:0 frame:0
TX packets:511 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:62780 (61.3 KiB) TX bytes:62780 (61.3 KiB)
route -n output
Destination Gateway Genmask Flags Metric Ref Us Iface
10.10.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
0.0.0.0 10.10.11.13 0.0.0.0 UG 0 0 0 eth0
In PC2
ifconfig output
eth0 Link encap:Ethernet HWaddr 00:40:CA:A1:C7:1B
inet addr:10.10.11.13 Bcast:10.10.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:705 errors:0 dropped:0 overruns:0 frame:0
TX packets:97 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:63557 (62.0 KiB) TX bytes:9973 (9.7 KiB)
Interrupt:11 Base address:0xa000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:112 errors:0 dropped:0 overruns:0 frame:0
TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12400 (12.1 KiB) TX bytes:12400 (12.1 KiB)
route -n output
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 10.10.11.16 0.0.0.0 UG 0 0 0 eth0