Networking Forums

Networking Forums > Computer Networking > Linux Networking > crossover network does not work

Reply
Thread Tools Display Modes

crossover network does not work

 
 
Q
Guest
Posts: n/a

 
      09-19-2003, 08:17 PM
I have a network with 2 linux computers:
________________ ____________ ____________
| INTERNETROUTER |---| COMPUTER 1 |---| COMPUTER 2 |
---------------- ------------ ------------
Both computers runs SuSE 8.2 (2.4 kernel).
Computer 1 & computer 2 are connected using a crossover cable.
I want to configure computer 1 to masquerade the internet connection
of computer 2, but it doesn't work. The connection between computer 1
and computer 2 just does nothing, not even a ping.

The network cards are a Realtek RTL-8029 (eth0 of computer 1, does
internet),
a VIA VT6102 (integrated on mobo) and a 3com 3CCFE575CT (pcmcia).
The ip address of eth1@pc1 is 172.31.01. The ip address of computer 2
is 172.31.0.2. I tried with 2 different crossover cables, but both
does not work. The LED on eth1 and the 3com network adapter are on.

More detailed information:
Machine 1:
$ echo 1>/proc/sys/net/ipv4/ip_forward
$ echo 1>/proc/sys/net/ipv4/conf/eth1/forwarding
$ echo 0>/proc/sys/net/ipv4/conf/eth0/forwarding
$ /etc/rc.d/SuSEfirewall2_init start
Starting Firewall Initialization (phase 1 of 3)
$ /etc/rc.d/SuSEfirewall2_setup start
Starting Firewall Initialization (phase 2 of 3)
Warning: interface vmnet1 is not (yet?) active.
$ /etc/rc.d/SuSEfirewall2_final start
Starting Firewall Initialization (phase 3 of 3)
Warning: interface vmnet1 is not (yet?) active.
$ route add 172.31.0.2 gw 172.31.0.1 eth1

lsmod (part of):
Module Size Used by Tainted: PF
ipv6 145108 -1 (autoclean)
ipt_TCPMSS 2392 1 (autoclean)
ipt_LOG 3384 2 (autoclean)
ipt_TOS 1048 18 (autoclean)
ipt_MASQUERADE 1368 1 (autoclean)
ipt_state 568 71 (autoclean)
ipt_REJECT 3160 3 (autoclean)
iptable_mangle 2200 1 (autoclean)
iptable_filter 1708 1 (autoclean)
ip_nat_ftp 2960 0 (unused)
iptable_nat 16366 2 [ipt_MASQUERADE ip_nat_ftp]
ip_conntrack_ftp 3888 1
ip_conntrack 16964 3 [ipt_MASQUERADE ipt_state ip_nat_ftp
iptable_nat ip_conntrack_ftp]
ip_tables 11200 11 [ipt_TCPMSS ipt_LOG ipt_TOS ipt_MASQUERADE
ipt_state ipt_REJECT iptable_mangle iptable_filter iptable_nat]
via-rhine 12912 1
mii 2528 0 [via-rhine]

ifconfig:
eth0 Link encap:Ethernet HWaddr 00:50:BF:68:07:B6
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::250:bfff:fe68:7b6/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6312 errors:0 dropped:0 overruns:0 frame:0
TX packets:5704 errors:0 dropped:0 overruns:0 carrier:0
collisions:436 txqueuelen:100
RX bytes:4133931 (3.9 Mb) TX bytes:653552 (638.2 Kb)
Interrupt:10 Base address:0xb800

eth1 Link encap:Ethernet HWaddr 00:0C:6E:6D:03:36
inet addr:172.31.0.1 Bcast:172.31.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:6eff:fe6d:336/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:55 errors:0 dropped:0 overruns:0 frame:0
TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:4646 (4.5 Kb) TX bytes:3666 (3.5 Kb)
Interrupt:9 Base address:0xa000

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:70 errors:0 dropped:0 overruns:0 frame:0
TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4564 (4.4 Kb) TX bytes:4564 (4.4 Kb)


route -n:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
172.31.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

Machine 2:
ipconfig of eth0 (ipv4)
Link encap:Ethernet
HWaddr 00:01:03:03:7CC:5F
inet addr: 172.31.0.2 bcast 172.31.0.255 mask 255.255.255.0
up broadcast running multicast mtu:1500 metric:1
rx packets:1 errors:0 dropped:0 overruns:0 frame:0
tx packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
rx bytes:60 (60.b) tx bytes: 912 (912.0 b)
interrupt: 10 base addres:0x4000

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
172.31.0.1 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 172.31.0.1 0.0.0.0 UG 0 0 0 eth0


 
Reply With Quote
 
 
 
 
Jeroen Geilman
Guest
Posts: n/a

 
      09-20-2003, 12:43 PM
Q wrote:

> I have a network with 2 linux computers:
> ________________ ____________ ____________
> | INTERNETROUTER |---| COMPUTER 1 |---| COMPUTER 2 |
> ---------------- ------------ ------------
> Both computers runs SuSE 8.2 (2.4 kernel).
> Computer 1 & computer 2 are connected using a crossover cable.
> I want to configure computer 1 to masquerade the internet connection
> of computer 2, but it doesn't work. The connection between computer 1
> and computer 2 just does nothing, not even a ping.
>
> The network cards are a Realtek RTL-8029 (eth0 of computer 1, does
> internet),
> a VIA VT6102 (integrated on mobo) and a 3com 3CCFE575CT (pcmcia).
> The ip address of eth1@pc1 is 172.31.01. The ip address of computer 2
> is 172.31.0.2. I tried with 2 different crossover cables, but both
> does not work.


How do you know this ?

> The LED on eth1 and the 3com network adapter are on.


So the physical connection *does* work, then.
The cables are fine - plug in a straight-through cable and see...

It pays to know exactly what that means.

> More detailed information:


<too detailed afaiac>

> Starting Firewall Initialization (phase 1 of 3)
> $ /etc/rc.d/SuSEfirewall2_setup start
> Starting Firewall Initialization (phase 2 of 3)
> Warning: interface vmnet1 is not (yet?) active.
> $ /etc/rc.d/SuSEfirewall2_final start
> Starting Firewall Initialization (phase 3 of 3)
> Warning: interface vmnet1 is not (yet?) active.


Forget the firewall when your network connections don't even work !
Disable it until you *know* the network operates correctly.

> $ route add 172.31.0.2 gw 172.31.0.1 eth1


No no no - the 172.31.0.0/24 network is directly connected to eth1 - you
*never* specify a route for a directly connected network.

The kernel will see that the directly connected 172.31.0.0/24 network is
always the shortest path to any 172.31.0.x address - so it will never use
the default gateway for any host on that network.

> lsmod (part of):
> Module Size Used by Tainted: PF
> ipv6 145108 -1 (autoclean)


Would you mind forgetting about that as well until you *know* ipv4 works?

<snipped irrelevant>>

> eth1 Link encap:Ethernet HWaddr 00:0C:6E:6D:03:36
> inet addr:172.31.0.1 Bcast:172.31.0.255 Mask:255.255.255.0
> inet6 addr: fe80::20c:6eff:fe6d:336/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:55 errors:0 dropped:0 overruns:0 frame:0
> TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100


Seems to be working per-fect-ly, dude... no errors, no collisions

> route -n:
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0


Ouch - wrapping misery...


> 172.31.0.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth1


This is the only one required, and it's fine.

> Machine 2:
> ipconfig of eth0 (ipv4)
> Link encap:Ethernet
> HWaddr 00:01:03:03:7CC:5F
> inet addr: 172.31.0.2 bcast 172.31.0.255 mask 255.255.255.0
> up broadcast running multicast mtu:1500 metric:1
> rx packets:1 errors:0 dropped:0 overruns:0 frame:0
> tx packets:11 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100


Hmm... not half as much traffic seen on this end - that's odd.

> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 172.31.0.1 0.0.0.0 255.255.255.0 U 0 0 0
> eth0


Also has the route needed.

Remedy the firewall and ipv6 nonsense and prove to yourself that the
*network* works, first...then experiment.

My guess would be the firewall stuff - Occam's razor an' all that.

--
Jeroen Geilman

Gentoo 1.4 rc4
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      09-20-2003, 02:25 PM
Q <(E-Mail Removed)> wrote:
> I have a network with 2 linux computers:
> ________________ ____________ ____________
> | INTERNETROUTER |---| COMPUTER 1 |---| COMPUTER 2 |
> ---------------- ------------ ------------
> Both computers runs SuSE 8.2 (2.4 kernel).
> Computer 1 & computer 2 are connected using a crossover cable.
> I want to configure computer 1 to masquerade the internet connection
> of computer 2, but it doesn't work. The connection between computer 1
> and computer 2 just does nothing, not even a ping.


> The network cards are a Realtek RTL-8029 (eth0 of computer 1, does
> internet), a VIA VT6102 (integrated on mobo) and a 3com 3CCFE575CT
> (pcmcia). The ip address of eth1@pc1 is 172.31.01. The ip address of
> computer 2 is 172.31.0.2. I tried with 2 different crossover cables,
> but both does not work. The LED on eth1 and the 3com network adapter
> are on.


> More detailed information:
> Machine 1:
> $ echo 1>/proc/sys/net/ipv4/ip_forward
> $ echo 1>/proc/sys/net/ipv4/conf/eth1/forwarding
> $ echo 0>/proc/sys/net/ipv4/conf/eth0/forwarding

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is the thing that seems strange to me. Here the "forwarding" proc
file for eth0 contains "1" by default, why did you put a "0" in it?

Not long ago I had a cross-over setup that was similar to yours,
differing only in that there was no router between computer 1 and
the ISP. Computer 1 connected directly to the ISP via PPP, received
a routable IP address, served as a firewall, and masqueraded for
computer 2.

That setup worked fine. Please note that that I don't really *know*
whether preventing forwarding to eth0 is the problem, it just seems
reasonable.

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
/* In my book, the first poster to resort to personal abuse in a Usenet
debate loses by default. - Rod Smith */

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Will crossover cable work ? Farcry Home Networking 3 11-18-2008 01:26 PM
crossover network with XP Ron Atkinson Home Networking 1 11-19-2004 11:02 PM
Help with home crossover network Gary Champion Home Networking 7 01-04-2004 06:41 PM
Can Gigabit work with a crossover cable CJT Windows Networking 1 09-12-2003 09:50 PM
linux <-> 2k crossover cable network cam Linux Networking 1 08-30-2003 08:27 PM



1 2 3 4 5 6 7 8 9 10 11