[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-net
Subject: Re: Ethernet MTU and CRC questions.
From: Ben Greear <greearb () candelatech ! com>
Date: 2000-07-30 0:56:27
[Download RAW message or body]
Thanks for the info. Tcpdump is now reporting a pkt of 1518 leaving, but only
1514 received. Could it be that it's looking at a checksum?
17:59:38.231988 > 0:0:0:0:0:0 0:48:54:85:2f:b8 1111 1514:
17:59:38.232058 > 0:0:0:0:0:0 0:48:54:85:2f:b8 1111 1514:
17:59:38.356113 < 0:20:78:e0:24:fe 0:0:0:0:0:1 1111 1518:
17:59:38.356357 < 0:48:54:66:68:68 0:0:0:0:0:1 1111 1518:
NOTE: I only see this on RTL1839 cards, the other card reports
TX and RX to be 1514. I'm definately attempting to TX 1514,
not counting the CRC.
Matti Aarnio wrote:
>
> On Sat, Jul 29, 2000 at 04:39:59PM -0700, Ben Greear wrote:
> > I'm using a PF_PACKET, SOCK_RAW socket to send ethernet packets.
> >
> > I write the dst MAC address, src MAC address, and proto into a buffer,
> > then append my payload. I send the whole thing to the socket, using
> > a length that includes the ethernet header and my payload.
> >
> > But, I think I've been using MTU wrong the whole time.
> >
> > Assuming a 'normal' MTU of 1500 on an ethernet NIC. Does that mean
> > I have 14 bytes of ethernet payload, 1500 bytes of payload, and 4 bytes of
> > ethernet CRC (I don't specify the CRC, I assume the driver appends that?), or
> > does it mean I have 14 bytes of header, 1486 bytes of payload and a CRC?
>
> 1500 bytes of IP level payload. The MACs, type field and CRC
> are extra. For transmit you need 6+6+2+1500 bytes for max
> size IP frame.
>
> > Am I correct in assuming that the CRC is taken care of for me?
>
> For transmit it is generated by the hardware, for receive
> it is checked by the hardware, and if found invalid, usually
> the packet is discarded adding "frame" errors counter.
>
> > Can I see the CRC in user-space?
>
> Propably yes. The last 4 bytes of the received packet at the
> ethernet drivers typically carry the CRC. Not always, though!
>
> > Thanks,
> > Ben
> >
> > --
> > Ben Greear (greearb@candelatech.com) http://www.candelatech.com
> > Author of ScryMUD: scry.wanfear.com 4444 (Released under GPL)
> > http://scry.wanfear.com http://scry.wanfear.com/~greear
>
> /Matti Aarnio <matti.aarnio@zmailer.org>
--
Ben Greear (greearb@candelatech.com) http://www.candelatech.com
Author of ScryMUD: scry.wanfear.com 4444 (Released under GPL)
http://scry.wanfear.com http://scry.wanfear.com/~greear
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic