Networking Forums

Networking Forums > Computer Networking > Linux Networking > how does ftp on single host works

Reply
Thread Tools Display Modes

how does ftp on single host works

 
 
Jaggu
Guest
Posts: n/a

 
      08-04-2005, 10:48 AM
Hi all,
Look this and I have one question regarding this...

root@ml310:/# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:52:50
inet addr:1.1.1.1 Bcast:1.255.255.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 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:31 Base address:0x7000

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:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:264 (264.0 b) TX bytes:264 (264.0 b)

root@ml310:/# ftp 1.1.1.1
Connected to 1.1.1.1 (1.1.1.1).
220 localhost.localdomain FTP server (Version
6.4/OpenBSD/Linux-ftpd-0.17) ready.
Name (1.1.1.1:root): red
331 Password required for red.
Password:
230- Linux (none) 2.4.20_mvl31-ml300 #2 Mon Jul 26 15:41:12 MDT 2004
ppc unknown
230 User red logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> get vmlinux
local: vmlinux remote: vmlinux
200 PORT command successful.
150 Opening BINARY mode data connection for 'vmlinux' (2764002 bytes).
226 Transfer complete.
2764002 bytes received in 13.95 secs (193.4 kB/s)
ftp> bye
221 Goodbye.

So, I have one Ethernet interface, I did an FTP logging into defferent
user...but same host and made file transfer as above.

quetsion 1: Do the packets actually travelled through the Ether PHY and
came back?

2. Do the packets loop back at the IP layer itself , just checking IP
address and as in my case the sender and receiver IP address is same?
do they travel to physical layer?

Please do clarify my doubt..

thank you for your time and consideration,

 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      08-04-2005, 11:17 AM
Jaggu wrote:
> Hi all,
> Look this and I have one question regarding this...
>
> root@ml310:/# ifconfig
> eth0 Link encap:Ethernet HWaddr 00:0A:35:00:52:50
> inet addr:1.1.1.1 Bcast:1.255.255.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 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
> Interrupt:31 Base address:0x7000
>


Your eth0 configuration is incorrect - the mask and
broadcast addresses do not match.

Besides, DO NOT use fabricated addresses, but DO use
the RFC 1918 addresses (e.g. 192.168.x.y) for private use.

There will be no secrity risks to show the RFC 1918
addresses publicly.

> So, I have one Ethernet interface, I did an FTP logging into defferent
> user...but same host and made file transfer as above.
>
> quetsion 1: Do the packets actually travelled through the Ether PHY and
> came back?


No. See below.

> 2. Do the packets loop back at the IP layer itself , just checking IP
> address and as in my case the sender and receiver IP address is same?
> do they travel to physical layer?


The IP stack is smart enough to route ALL packets
for local destination via the loopback interface, lo.

--

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
Jaggu
Guest
Posts: n/a

 
      08-04-2005, 12:06 PM
Dear Tauno Voipio ,
thanks a lot,

I am student, I have an ethernet IP core(development) which is
loopbacked in hardware(no PHY just core, where Txd pin is connected to
Rxd). Can you suggest me any good application to
make this port highly busy? Later I need to profile
processor-peripheral interaction.

Plz, your pings are expected...

 
Reply With Quote
 
Tauno Voipio
Guest
Posts: n/a

 
      08-04-2005, 12:26 PM
Jaggu wrote:
> Dear Tauno Voipio ,
> thanks a lot,
>
> I am student, I have an ethernet IP core(development) which is
> loopbacked in hardware(no PHY just core, where Txd pin is connected to
> Rxd). Can you suggest me any good application to
> make this port highly busy? Later I need to profile
> processor-peripheral interaction.
>


Let's first clear the terminology:

IP is Internet Protocol. It is the network layer protocol.

Ethernet is one of the data link layer protocols under the
network layer in the protocol stack. The IP network addresses
are translated to Ethernet MAC (Media Access Control) addresses
with the ARP protocol.

Are you creating a device driver for an Ethernet chip without
a physical layer interface? The physical layer is underneath
the data link layer in the protocol stack.

To by-pass the network stack logic, you need a raw
socket to the network interface. You have to program
the application. Also, you need superuser (root) privileges
to run a raw socket application.

Do you mean Intellectual Property (meaning a bought integrated
circuit design) with the IP abbreviation?

Please do not use the abbreviation in connection with Linux
networking: you'll confuse the other discussion participants.

HTH

--

Tauno Voipio
tauno voipio (at) iki fi

 
Reply With Quote
 
Jaggu
Guest
Posts: n/a

 
      08-04-2005, 12:46 PM
Hi Tauno,
let me put you clearly, I have an XILINX FPGA Ml310
board, giga byte ethernet transreceiver (Intellectual property from
different vendor) core and added to the existent design. I run linux
on the board, Montavista preview kit. Device driver for newly added
gigy býte ethernet is ported and it is fine.

At the moment we dont have PHY connected to giga byte core,
other student is involved in this and the data transmitting pin is
connected to data receiver pin(hardwired loopback).

In my linux I can see this new Interface as eth1, only when I
do 'ifconfig -a' .
So my question can I run some sort of application over this eth1
interface or not?

like some packets sending and receiving, such that they travel across
giga byte transreceiver. I have superuser privileges.

hope now you are clear with my question....

thank you...

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      08-04-2005, 02:55 PM
Jaggu wrote:

> Dear Tauno Voipio ,
> thanks a lot,
>
> I am student, I have an ethernet IP core(development) which is
> loopbacked in hardware(no PHY just core, where Txd pin is connected to
> Rxd). Can you suggest me any good application to
> make this port highly busy? Later I need to profile
> processor-peripheral interaction.


I think you'll find that Linux will recognize the the destination is on the
same box and not pass the packets through the NIC.

There is an echo port available, which will cause a computer to send back
all the data it receives, so you could connect to another computer with a
crossover cable and send whatever data you want.

 
Reply With Quote
 
Jaggu
Guest
Posts: n/a

 
      08-04-2005, 03:29 PM
Thank you James, I understand that if I do ftp on same host which has
single NIC, then the packets are loopbacked before reaching physical
layer(NIC).

but my problem is I dont have physical PHY inorder to connect to other
host via cross over cable.I have ethernet transreceiver core where its
transmission pins are connected to receiver pins instead to physical
PHY.

I have one question.....

let us consider ...I have two ethernet transreceivers with two
different MAC addresses.
I will connect transmission pin of 1 st one to receiver pin of 2nd one
and other pins as well . In such case can I do file tranfer using FTP
between them. No cross over cable between two tranreceivers instead
they are directly connected in hardwire?

could you think this works...I mean packets will travel through
ethernet transreceivers...?

thanks in advance

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      08-04-2005, 03:57 PM
Jaggu wrote:

> let us consider ...I have two ethernet transreceivers with two
> different MAC addresses.
> I will connect transmission pin of 1 st one to receiver pin of 2nd one
> and other pins as well . In such case can I do file tranfer using FTP
> between them. No cross over cable between two tranreceivers instead
> they are directly connected in hardwire?
>
> could you think this works...I mean packets will travel through
> ethernet transreceivers...?


If you're trying to use the Linux IP stack, I don't think so, as it will
recognize that the source & destination are on the same system. If you
write directly to the transceivers, then you can do what ever you want.

 
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
Single xp computer can't connect to a single server groups@brainin.com Windows Networking 0 09-12-2007 10:38 PM
Host to host NIC bonding works only in one direction ricketts.s@gmail.com Linux Networking 0 07-18-2007 09:57 PM
pptpd only works with a single client C3 Linux Networking 2 08-28-2004 05:21 AM
pptpd only works with a single client C3 Linux Networking 0 08-25-2004 04:14 AM
Question on single host with mutiple subnets/gateways Stanoo Chang Linux Networking 4 12-29-2003 01:38 PM



1 2 3 4 5 6 7 8 9 10 11