thank you, varindersingh.
for your quick reply. i have changed ip of my eth1, i used 192.168.1.1 range ip for my eth1.
i have edited:
Code:
etc/sysctl.conf
net.ipv4.ip_forward = 1
and i have edited iptables too
Code:
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# iptables --append FORWARD --in-interface eth1 -j ACCEPT
# iptables-save
this is my configuration of my desktop:
for eth0
Code:
address netmask gateway
10.10.10.101 255.0.0.0 10.10.10.254
dns servers 10.10.10.254
for eth1
Code:
address netmask gateway
192.168.1.1 255.255.255.0 10.10.10.101
dns servers 10.10.10.101
i have windows xp installed in my laptop:
local area network:
Code:
address netmask gateway
192.168.1.2 255.255.255.0 192.168.1.1
dns servers 192.168.1.1
when i enable eth0 and eth1:
Code:
eth0 Link encap:Ethernet HWaddr 00:E2:1C:D1:42:A3
inet addr:10.10.10.101 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::2e2:1cff:fed1:42a3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3058 errors:0 dropped:0 overruns:0 frame:0
TX packets:3222 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2719502 (2.5 MiB) TX bytes:430301 (420.2 KiB)
Interrupt:21 Base address:0xe000
eth1 Link encap:Ethernet HWaddr 00:C0:26:75:B2:D7
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2c0:26ff:fe75:b2d7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11 errors:0 dropped:0 overruns:0 frame:0
TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:676 (676.0 b) TX bytes:11555 (11.2 KiB)
Interrupt:22 Base address:0xa000
problem from my desktop (10.10.10.101) enabling eth0 and eth1
when i ping yahoo.com from my desktop (10.10.10.101)
Code:
$ ping yahoo.com
PING yahoo.com (209.191.122.70) 56(84) bytes of data.
From 192.168.1.1 icmp_seq=1 Destination Host Unreachable
From 192.168.1.1 icmp_seq=3 Destination Host Unreachable
From 192.168.1.1 icmp_seq=4 Destination Host Unreachable
From 192.168.1.1 icmp_seq=6 Destination Host Unreachable
From 192.168.1.1 icmp_seq=7 Destination Host Unreachable
i was not able to get reply
when i ping 10.10.10.254. 10.10.10.254 is my wireless router given from my isp.
Code:
$ ping 10.10.10.254
PING 10.10.10.254 (10.10.10.254) 56(84) bytes of data.
64 bytes from 10.10.10.254: icmp_seq=1 ttl=64 time=0.311 ms
64 bytes from 10.10.10.254: icmp_seq=2 ttl=64 time=0.279 ms
64 bytes from 10.10.10.254: icmp_seq=3 ttl=64 time=0.285 ms
64 bytes from 10.10.10.254: icmp_seq=4 ttl=64 time=0.309 ms
i get reply
problem from my laptop or 192.168.1.2
Code:
1 ) while ping 192.168.1.1 (eth1 on desktop) from 192.168.1.2 (from laptop) i get reply.
2 ) i was not able to browse internet form my 192.168.1.2 (laptop)
3 ) but when i disable eth1, i was able to browse internet on my desktop but no connection between eth1 (desktop) and my laptop
while disabling eth1:
Code:
eth0 Link encap:Ethernet HWaddr 00:E2:1C:D1:42:A3
inet addr:10.10.10.101 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::2e2:1cff:fed1:42a3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2721 errors:0 dropped:0 overruns:0 frame:0
TX packets:2817 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2285759 (2.1 MiB) TX bytes:381862 (372.9 KiB)
Interrupt:21
eth1 Link encap:Ethernet HWaddr 00:C0:26:75:B2:D7
inet6 addr: fe80::2c0:26ff:fe75:b2d7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1005 errors:0 dropped:0 overruns:0 frame:0
TX packets:1025 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:72323 (70.6 KiB) TX bytes:85135 (83.1 KiB)
Interrupt:22 Base address:0xc000
ping yahoo.com from my desktop (10.10.10.101)
Code:
PING yahoo.com (98.139.183.24) 56(84) bytes of data.
64 bytes from ir2.fp.vip.bf1.yahoo.com (98.139.183.24): icmp_seq=1 ttl=49 time=412 ms
64 bytes from ir2.fp.vip.bf1.yahoo.com (98.139.183.24): icmp_seq=2 ttl=49 time=405 ms
64 bytes from ir2.fp.vip.bf1.yahoo.com (98.139.183.24): icmp_seq=3 ttl=49 time=396 ms
64 bytes from ir2.fp.vip.bf1.yahoo.com (98.139.183.24): icmp_seq=4 ttl=49 time=421 m
iam so confused. what i need is i want to enable eth0 and eth1 and can browse internet from my desktop and laptop.