IP Packet and Ethernet "frame" questions

KarsinTheHutt

Golden Member
Jun 28, 2000
1,687
0
0
What is the difference between the two?

I'm looking at some documentation at cisco.com and I see that Ethernet "frames" have soure and destination fields, as well as fields for data.

So I looked at IP specifications, and the IP spec also has source/dest fields and data fields.

My 'guess' is that ethernet frames can only be read within the network, and have to be 'translated' to IP format before being unleashed on the internet. am I close? If I am wrong, what's really happening? If I'm right, what translates frames to IP?
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
Good question. You're into my bread and butter here.

First off some definitions:
A packet is from layer three and up. ie-including IP header and upto layer 7. This does not include the datalink layer (very important)

A frame is the actual bit level encapsulation of a packet. This is where the datalink layer comes into play. In order for any two nodes on a single network (ethernet, frame-relay, token-ring, hdlc, FDDI, what ever the actual network type is) to communicate they have to agree upon what datalink layer protocol to use. Again, plug in a token ring network card into an ethernet network and surprise...no talkie-talkie.

The real magic happens when a PACKET (ip header+tcp header+application data) crosses a router. The intelligence of the router is what allows this packet to traverse different network types. A router picks up a frame from token ring and reformats the datalink layer info (L2) to pass onto the destination or another router, whether that be ethernet or frame relay or ATM it doesn't matter. This is why you can communicate with a web server in Hong Kong and not care about the intermediate systems in between. Your IP PACKET remains the same. The only thing a router will modify within the layer 3 information is the Time To Live field (TTL) and possibly source address if there is any kind of Network Address Translation involved.

So in answer to your question - ethernet frames can only be read by ethernet nodes. These "frames" are NOT translated into IP format before being unleashed on the internet, rather hey are already IP packets. These packets (L3 and above) are just "reframed" into different L2 hearders with L2 source and destination addresses changed.

hope this helps. I really need a white board for this.

spidey
 

Damaged

Diamond Member
Oct 11, 1999
3,020
0
0
And, if I may, elaborate a little here, L1, or Layer 1 is voltage (I'm over simplyfing here, but...it's a physcial thing, truly). L2, or Layer 2 is the ones and zeros (and they are directly proportional to the voltage., aka, the physical layer), and, finally, for this explanation, L3, or Layer 3, is framing, encapsulation, et al., or how the ones and zeros are interpreted.

The thing that fscks this explanation up is that ethernet is an L1, L2, protocol. Rather weird in a sense until you look at it.

Whereas IP is an L2, L3 protocol. Really I'd say IP, or TCP/IP is an L3 protocol, but IP itself is L3, and it's an unreliable protocol....believe it or not. It's a connectionless state. Meaning, it sends it's sh!t, and waits. Kinda like UDP, but it's not an L4 deal.

And, if I'm wrong I apologize, but I'm a bit buzzed right now so bear with me. Thanks. :)
 

Xanathar

Golden Member
Oct 14, 1999
1,435
0
0
Damaged, great summary, just one minor detail I wanted to point out. The Voltage is not directly perpotional (I suck at spelling) to the Ones and Zeros in binary. You will have encoding methods over the line itself, which are then converted into the Ones and Zeros. I belive Ethernet uses the Manchester Encoding, and Fast Ethernet and Gig Ethernet use a different form of encoding (I forget which one, might even be manchester) that are actually a 5 to 4 relationship, where 5 voltage differentials are equilivant to 4 zeros and ones.

This is best and commonly seem on T1 lines, where you can have AMI/D4 encoding that will steal 1 bit out of every 8 bits on the wire, or the ESF/8BZ1 that will add an addiotional bit every 192 bits. These are entirlely layer 1 issues.

Now of course, I may be completely wrong also :)
 

Dark

Senior member
Oct 24, 1999
639
0
0
Hem the three gurus have spoken ;) (I wonder where CTR is, it's been a long time since he posted something)
Xanathar: FastEthernet uses 4B/5B while flavors of GigEth will use 5-Level (UTP) 8B/10B (Fiber or copper). :)
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
Interesting note on the 5b/4b manchester encoding.

Did you know that 100 Base-T actually runs at 125 megabaud? Yep that 100 meg ethernet card of yours is actually clocked at 125 Megabit. Gig runs at 1250 megabaud.

you'll win some free drinks with your networking buddies on that trivia question :)
 

Damaged

Diamond Member
Oct 11, 1999
3,020
0
0
Xanathar...like I said I was buzzed. :) I'm not sure why I typed that, but beer and complex thinking don't seem to mix well.

Can someone make this board work like mutt with jed? I swear I want to do ctrl+x, ctrl+c, "s" (to send, or "y" for those of you who haven't remapped your key bindings).

Heh, I know why I said that. I think I was meaning to explain it can be a one-to-one relationship. At least in the case of DS-1 it is. 6 volts, + or - 3 volts. I forget the exact thresholds now for what's a one and what's a zero though. I'd have to go look it up.

And, finally, I'm still wrong on that count as the line is encoded using either ami or b8zs. <sigh> I think I need a nap now. :)
 

Ender78

Senior member
Feb 24, 2001
413
0
0
Sorry for any duplication here boys. Just wanted to add a few little tidbits.

Here is how the communication process works.

1) A TCP/IP aware application decides it wants to communicate with another TCP/IP aware application.

2) The application checks if the destination IP address is on its own subnet (it does this by looking at the subnet mask). If the host is on the same subnet, it will then use ARP to get the the MAC address of the machine. The data link layer packet will then be addressed to the MAC of the destination machine (the IP packet is encapsulated in the user data portion of the Data Link (Ethernet) frame). If the destination is not on the same subnet, the station ARP's for the MAC address of the router/default gateway. The data link layer frame is addressed to the router. The router, seeing that the frame is intened for itself, opens it up and makes a routing decision on what to do with it.

3) The IP packet will now travel to the destination router. This router, knowing that the destination IP is on its subnet will ARP for the data link (MAC address) of the destination machine. THe packet will be encapsulated in the native format of the LAN that the destination machine sits on (although ethernet is most common, the destination LAN could be running FDDI, Token Ring, or HSSI). A frame is then forwarded to the destination LAN. The receiving station, seeing a frame addressed to itself, opens the frame up and now examines the IP packet that was originally sent.