Use of ethernet frame without TCP/IP

Hi All,

I guess this question would be quite trivial but nevertheless I had a doubt.

I need to transfer some amount of data(1000 bytes) between 2 system running linux . each having its own NIC.

Though these are connected via LAN cable , they are not connected to Internet .

I need to encapsulte the data in the ethernet frame without using TCP/ IP . Only just the length parameter in the EtherType/Length field of ethernet frame . Is this possible ? If yes , how can it be done ?

Reply to
indermeet.gandhi
Loading thread data ...

You could setup a private IP network, using addresses from the private blocks detailed in [RFC1918].

Well, yes, altough the details depend on the software you're using. Under linux opening a raw ethernet socket (which probably requires root rights) is a possibility.

Question is, what made you conclude you need to bypass the IP stack and dispense with its services?

As noted above, there is a way to use IP addresses while not connected to the internet. I think doing that will likely be simpler and easier.

[RFC1918]
formatting link
Reply to
jpd

Read 'man 7 packet'.

best regards Patrick

Reply to
Patrick Schaaf

Well , if I want to talk between 2 ethernet devices directly ( both in same LAN) , won't the bypassing of IP stack provide me with better latency , avoiding overhead of IP header ( or maybe TCP header ) .

Reply to
indermeet.gandhi

Yes. Will your program be written in assembler? Otherwise, the overhead of your high level language probably eats any real advantage from the saved network processing.

best regards Patrick

Reply to
Patrick Schaaf

snipped-for-privacy@gmail.com wrote: (snip)

If you want to avoid latency, you will probably do better with UDP.

The UDP header isn't that big.

-- glen

Reply to
glen herrmannsfeldt

the same logic says "well my 2 machines just talk directly - why do i need those 48 bit MAC addresses - i will just send a stream of bits and sort it out myself".

and the answer is that yes you can - but you may find it more difficult that way.

protocols and using built in libraries are like using high level programming languages - the trade off in programmer productivity, "cleaner" abstraction models, and needing less explicit programming per project is worth in inefficencies that this tends to produce in the resulting code.

So do the sums before you decide.

using say 1000 byte "payload" and having TCP / IP / Ethernet to handle the low level protocol (and some more for your high level protocol of course).

very roughly, TCP costs you 20 bytes, IP another 20 and Ethernet frames 18. Gaps between the packets is at least 12 more bytes (but you dont care unless you plan to saturate the wire).

overhead is 40 bytes for TCP/IP, or 70 for everything - 7%.

if you cannot pack large payloads into packets then the overhead will drown you anyway - with the worst case of 1 byte payload, the minimum Ethernet packet of 64 bytes is going to hurt...

And if you need that last 7% then you are too close to the limit already - LANs are designed to work effectively at relatively low load so all that bursty traffic has room......

move up to the next fastest Ethernet card, because it is seriously difficult to make Ethernet run sustained at close to 100% load.

>
Reply to
stephen

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.