Networking Forums

Networking Forums > Computer Networking > Linux Networking > Confusion about routing

Reply
Thread Tools Display Modes

Confusion about routing

 
 
Zach
Guest
Posts: n/a

 
      11-05-2005, 04:30 AM
Hi. I'm trying to ftp some files off of a laptop that I have. The os
(WinME) is borked so I'm trying to use my Slackware installation disk
to setup a network between the laptop and my iMac. So far I've been
able to load the driver for the pcmcia ethernet cardbus and load up the
eth0 interface with ifconfig... My problem is whenever I try to ftp my
iMac's ip address I get a "no route to host" error. My question is (1)
do have to have a physical router between the two computers or can I
just run an ethernet cable directly from the cardbus in the laptop to
the builtin ethernet on the iMac and (2) how should I set up the
routing tables on the laptop? Currently I have it set up like this

IP of laptop 192.168.0.100
IP of iMac 192.168.0.101

routing table on laptop:

1. dest: 192.168.0.101 getway: * netmask: 255.255.255.255 interface:
eth0

TCP/IP settings on mac set to "manual" w/ IP address as 192.168.0.101.

The thing I don't understand is why do I even need a routing table?
Can't the laptop just send out datagrams addressed to 192.168.0.100 and
expect the iMac on the other end to know what to do with them?

Thanks, Zach

 
Reply With Quote
 
 
 
 
Davide Bianchi
Guest
Posts: n/a

 
      11-05-2005, 04:57 AM
On 2005-11-05, Zach <(E-Mail Removed)> wrote:
> iMac's ip address I get a "no route to host" error. My question is (1)
> do have to have a physical router between the two computers or can I


No need for a router, but you need the correct cable, most old PCMCIA
card can't handle a straight cable (the network card is not
auto-sensing), you need a cross-over one.

> the builtin ethernet on the iMac and (2) how should I set up the
> routing tables on the laptop?


You shouldn't need a table, if both machine are in the same subnet
you get a default route to that network 'for free'.

Davide

--
Gentlemen, Chicolini here may look like an idiot, and talk like
an idiot, but don't let that fool you. He really /is/ an idiot.
-- Julius Henry "Groucho" Marx (http://en.wikiquote.org/wiki/Groucho_Marx)
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      11-05-2005, 04:19 PM
"Zach" <(E-Mail Removed)> writes:

>Hi. I'm trying to ftp some files off of a laptop that I have. The os
>(WinME) is borked so I'm trying to use my Slackware installation disk
>to setup a network between the laptop and my iMac. So far I've been
>able to load the driver for the pcmcia ethernet cardbus and load up the
>eth0 interface with ifconfig... My problem is whenever I try to ftp my
>iMac's ip address I get a "no route to host" error. My question is (1)
>do have to have a physical router between the two computers or can I
>just run an ethernet cable directly from the cardbus in the laptop to


You can just run a cable but it MUST be a null ethernet cable (wires
reversed in the cable).

>the builtin ethernet on the iMac and (2) how should I set up the
>routing tables on the laptop? Currently I have it set up like this


>IP of laptop 192.168.0.100
>IP of iMac 192.168.0.101


>routing table on laptop:


>1. dest: 192.168.0.101 getway: * netmask: 255.255.255.255 interface:
>eth0


>TCP/IP settings on mac set to "manual" w/ IP address as 192.168.0.101.


>The thing I don't understand is why do I even need a routing table?
>Can't the laptop just send out datagrams addressed to 192.168.0.100 and
>expect the iMac on the other end to know what to do with them?


Send out where? eth0? eth1? eth2? eth3? eth4? eth5?
eth6?eth7?eth8?eth9?wlan0?wlan1?wlan2?wlan3?wlan4? wlan5?wlan6?,........
You have to tell it what to do with packets. The computer
is not prescient.



>Thanks, Zach


 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      11-05-2005, 04:20 PM
Davide Bianchi <(E-Mail Removed)> writes:

>On 2005-11-05, Zach <(E-Mail Removed)> wrote:
>> iMac's ip address I get a "no route to host" error. My question is (1)
>> do have to have a physical router between the two computers or can I


>No need for a router, but you need the correct cable, most old PCMCIA
>card can't handle a straight cable (the network card is not
>auto-sensing), you need a cross-over one.


>> the builtin ethernet on the iMac and (2) how should I set up the
>> routing tables on the laptop?


>You shouldn't need a table, if both machine are in the same subnet
>you get a default route to that network 'for free'.


You DO need a table. It may get set up for you, but you do need it.

 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      11-05-2005, 05:47 PM
In the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>, Zach wrote:

>I'm trying to ftp some files off of a laptop that I have. The os
>(WinME) is borked so I'm trying to use my Slackware installation disk
>to setup a network between the laptop and my iMac.


Not really enough information - but assuming that the installation disk
allows you to get a Linux system running, and that you're able to mount
the windoze disk, and set up the Ethernet

>So far I've been able to load the driver for the pcmcia ethernet cardbus
>and load up the eth0 interface with ifconfig... My problem is whenever I
>try to ftp my iMac's ip address I get a "no route to host" error.


OK - let's see the output of '/sbin/ifconfig' and '/sbin/route -n'

"no route to host" is an FTP error message, and means that the FTP client
was unable to contact the remote host. This could be a routing issue,
but on the client I'm using it means that the route is OK, but the server
isn't responding in any way. (A routing issue would return the error
"network is unreachable".) This could mean a network cabling issue (most
probable) or a firewall issue.

>My question is (1) do have to have a physical router between the two
>computers or can I just run an ethernet cable directly from the cardbus
>in the laptop to the builtin ethernet on the iMac


router not required - but you DO need either _a_ cross-over network cable
or two normal cables and a hub or switch. On a twisted pair type
Ethernet, there are two pairs of wires one to transmit, one to receive.
You need to connect transmit on one host to receive on the other (and
vice versa). A hub or switch handles this, or you can use the cross-over
cable to connect just two systems.

>(2) how should I set up the routing tables on the laptop? Currently I
>have it set up like this
>
>IP of laptop 192.168.0.100
>IP of iMac 192.168.0.101


[example ~]$ /sbin/route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 95017 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 420 lo
[example ~]$

The loopback should come up automagically. The network route in a modern
Linux comes up automagically when you bring up the interface. On an iMac,
you may need to add it - I don't do Macs since MacOS 7.1.

>The thing I don't understand is why do I even need a routing table?


So that the kernel knows where to try to send the packet - or determine
that "you can't get there from here" and provide an error message to the
user.

>Can't the laptop just send out datagrams addressed to 192.168.0.100 and
>expect the iMac on the other end to know what to do with them?


That's an obvious typo - Linux would send packets addressed to itself via
the loopback interface - but any O/S has to know "how to get there", and
the routing table serves this purpose.

Old guy
 
Reply With Quote
 
Zach
Guest
Posts: n/a

 
      11-05-2005, 08:02 PM
Here's some more information.

The macintosh uses "routed", a network RIP and router discovery routing
daemon, to manage all routing tables. Here is the output of ifconfig
and "route -n" on the laptop (PC):

Output of ifconfig on laptop:

eth0
Link encap:Eternet HWaddr 00:10:60:5C:1A:43
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask: 255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overrurns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)
Interrupt:11 Base address:0x9000

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)

output of "route -n" on laptop [sorry bad formatting but you get the
idea]:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 l0

A few questions: so do I understand it that if I am on 192.168.0.100
(let's call this computer A) and I do a "ftp 192.168.0.101" (to
computer B, no typo this time) that computer A needs an entry in its
routing table to let it know which interface to send out the datagrams
necessary to complete the ftp request? Also, about the whole
cross-over, straight-thru eth-cable thing: I looked it up on the
internet and apparently I need a cross-over cable to connect a computer
to a router, yet I never use cross-over cables in my home network. So
what gives? Finally, assuming the above info is correct, do I need to
add another entry in the routing table on the laptop in order to ftp
192.168.0.101 (the iMac).

Thanks,
Zach

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      11-05-2005, 08:28 PM
Zach wrote:

> Output of ifconfig on laptop:
>
> eth0
> Link encap:Eternet HWaddr 00:10:60:5C:1A:43
> inet addr:192.168.0.100 Bcast:192.168.0.255 Mask: 255.255.255.0
> UP BROADCAST MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overrurns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)
> Interrupt:11 Base address:0x9000
>
> 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:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)


This is correct.

> output of "route -n" on laptop [sorry bad formatting but you get the
> idea]:
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 l0


This is correct.

Can you ping the server from the laptop?

> A few questions: so do I understand it that if I am on 192.168.0.100
> (let's call this computer A) and I do a "ftp 192.168.0.101" (to
> computer B, no typo this time) that computer A needs an entry in its
> routing table to let it know which interface to send out the datagrams
> necessary to complete the ftp request?


The mask for the network is 24 bits, so all addresses
from 192.168.0.0 to 192.168.0.255 will be routed via eth0.

> Also, about the whole
> cross-over, straight-thru eth-cable thing: I looked it up on the
> internet and apparently I need a cross-over cable to connect a computer
> to a router, yet I never use cross-over cables in my home network. So
> what gives?


If the thing at one end is a computer and the other end
is a switch or hub, you need a straight cable. For connecting
two like pieces of equipment, you need a cross-over cable
to connect the transmitter of computer A to receiver of
computer B and vice versa. Many newer switches are smart
enough to sense which kind of device is at the other end
and adapt accordingly, so that here it does not matter
if the cable is straight or crossed.

>Finally, assuming the above info is correct, do I need to
> add another entry in the routing table on the laptop in order to ftp
> 192.168.0.101 (the iMac).


No. See above.

----

Are you sure that there is a FTP daemon running on
the server computer?

--

Tauno Voipio
tauno voipio (at) iki fi
 
Reply With Quote
 
Bit Twister
Guest
Posts: n/a

 
      11-05-2005, 08:32 PM
On Sat, 05 Nov 2005 21:28:06 GMT, Tauno Voipio wrote:
> Zach wrote:
>> Kernel IP routing table
>> Destination Gateway Genmask Flags Metric Ref Use Iface
>> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 l0

>
> This is correct.



If so where is Gatway flag with the default route.

$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 10 0 0 eth0
0.0.0.0 192.168.2.1 0.0.0.0 UG 10 0 0 eth0
^
|
-------------------------------------------------'
 
Reply With Quote
 
Zach
Guest
Posts: n/a

 
      11-05-2005, 10:00 PM
There is definitely an FTP daemon running on the server computer. I can
ftp my iMac from my normal home network without a problem. Pinging the
iMac from the laptop (with an ethernet cable running directly between
the two) leads to no response. I'm guessing the problem is the cable.
I'll pick up a cross-over cable and if this doesn't work I'll post
again. Thanks everyone for the help. I have a much better idea of what
I am working with now.

Zach

 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      11-05-2005, 11:52 PM
In the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed)>, Bit Twister wrote:

>Tauno Voipio wrote:
>> Zach wrote:
>>> Kernel IP routing table
>>> Destination Gateway Genmask Flags Metric Ref Use Iface
>>> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>>> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 l0

>>
>> This is correct.


>If so where is Gatway flag with the default route.


A gateway is a route to some OTHER network and a default route has
nothing to do with routing packets on "this" network. In spite of a
lot of people's misconception, you don't need a default gateway just
because microsoft depicts one in their routing tables. If he doesn't
have a route to the world, he doesn't need some non-existent gateway.
The routing table shown above is perfectly correct for a network that
doesn't have a connection to another route or to the world.

Old guy
 
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
Mac confusion RB Wireless Networks 4 03-11-2010 01:32 PM
ICS Confusion 1 of 1 Broadband Hardware 3 07-13-2006 06:33 PM
NTL confusion J Smith Broadband 5 03-15-2005 05:14 PM
Confusion over DNS resolution gary@noconsequence.com Windows Networking 2 01-22-2004 11:38 AM
ugh 802.11B confusion onslaught Wireless Internet 0 01-03-2004 10:34 PM



1 2 3 4 5 6 7 8 9 10 11