Je veux connecter mes deux PC Linux fonctionnant dans un noyau 2.6 via un câble croisé. Pour ce faire, j'ai effectué les réglages suivants après une recherche Google:
Dans PC1
ifconfig eth0 10.10.11.16 netmask 255.255.255.0 uproute add default gw 10.10.11.13 eth0(passerelle par défaut qui est ip de pc2)
Dans PC2
ifconfig eth0 10.10.11.13 netmask 255.255.255.0 uproute add default gw 10.10.11.16 eth0(passerelle par défaut qui est ip de pc1)
Alors j'ai essayé de cingler je ne pourrais pas pouvoir me connecter. Est-ce que ces arrangements ci-dessus sont assez ou n'importe quelle chose me manque?
Pour votre plus d'information
Dans PC1
ifconfig sortie
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 sortie
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
Dans PC2
ifconfig sortie
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 sortie
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