Friday, September 16, 2005

Cross-over connection between hosts

Cross-over connection between hosts

I have 2 Sun Fire V240 machines with a Gigabit card on each machine (we
are not using the onboard quad card). We need to transfer data between
these two machines. Since we dont have a Gigabit Switch we connected a
cross over cable between the 2 Gigabit card network interfaces. I have
done the following to make these 2 interfaces communicate but no luck.

On Machine A:

ifconfig ce0 plumb
ifconfig ce0 192.168.0.1 255.255.0.0 broadcast + up

route add net 192.168.0.0 192.168.0.1 1

On Machine B:

ifconfig ce0 plumb
ifconfig ce0 192.168.0.2 255.255.0.0 brodcast + up

route add net 192.168.0.0 192.168.0.2 1

But if I run the command 'ping 192.168.0.2' from Machine A it says host
unreachable. Same problem if I run the command 'ping 192.168.0.1' from
machine B.

What have I done wrong here. Any help would be appreciated.

Thanks.

Adding the routes is not necessary, since there is no router
between the machines. This may do bad rather than good.

Also, please post the output of:
/usr/sbin/ndd -set /dev/ce instance 0
/usr/sbin/ndd -get /dev/ce link_status
on both machines

The ability to communicate peer-to-peer over crossed UTP
may depend on "tpe-link-test?" variable in OBP
(althoug I am not quite sure if this still applies to "ce" interface.

Regards,

If I dont add routes it will use the default route to communicate which
is not 192.168.0.x. I can ping 192.168.0.1 from Machine A, so the
interface is up. Similarly I can ping 192.168.0.2 from Machine B.

Anyway I'll post the ndd output. Thanks.

> If I dont add routes it will use the default route to communicate which
> is not 192.168.0.x.

No, when the "ifconfig" command brings the interface up, it will
add a route to that network only based on the netmask, and since
that route is more specific than the default route, it will use
that route (and that interface) for traffic that goes directly
to that network.

> I can ping 192.168.0.1 from Machine A, so the
> interface is up. Similarly I can ping 192.168.0.2 from Machine B.

Yes, that means the kernel has associated an IP address with that
interface and will recognize packets with that destination IP address
as local packets. But that does not mean that the device driver
for your ethernet interface is able to do anything productive or
even that you have an electrical connection of any type on the
ethernet hardware. (The interface can be in the "up" state without
either of those things being true.)

My advice is to just go get a gigabit switch. It would be nice to
use professional grade equipment for a situation like this, but
even cheap consumer grade equipment is probably better (in the
sense of reliability and maintainability) than putting together
a system that obviously requires careful manual configuration just
to get the machines to talk to each other.

However, if a switch isn't possible for some reason, another idea
is to try the same crossover cable on the built-in ethernet instead
of the gigabit ethernet. I don't know all the intricacies and
quirks of autonegotiation on gigabit vs. fast ethernet, but it seems
possible that it might be easier with the slower interface type.
And, if you can get it to work there, then you have proved that
your cable is not totally defective, and you've proved that you
know the right configuration commands except for what to do
specifically on a pair of gigabit ports.

- Logan

Thanks a lot for your post. I don't have a Gigabit switch so that is
not an option. That is the reason we are using cross over cable between
the 2 machines. I'll try the same on the built-in ethernet card which
is also 10/100/1000 Base T ethernet quad card. I'll reomove the manual
routes and try this.

> Thanks a lot for your post. I don't have a Gigabit switch so that is
> not an option. That is the reason we are using cross over cable between
> the 2 machines.

Your crossover cable -- is it a crossover for 100base-T or is it
for 1000base-T? 100base-T doesn't require all 4 pairs to be
crossed while 1000base-T does, so it could be that the cable you
have don't have all pairs crossed.

/
I think your netmask is wrong, your using Class C privae address
192.x.x.x, your netmask should be 255.255.255.0

if this didn't work, to test network connection goto open boot prompt
use test-net command.

0 Comments:

Post a Comment

<< Home