Ethernet LAN's connected by an IP Network

This was the grand solution for companies spread out across the USA.  For years, they packaged data onto large disks and used couriers to travel between their sister sites on a daily or weekly basis.  Eventually IBM mainframes were connected via T1 circuits, but the Ethernet LAN's remained small, static enclaves  .  .  .

When it became feasible (and affordable) to connect disparate LAN's together with X.25 and then Frame Relay  .  .  .  the world of data communications exploded !!  

Speed - Ethernet is not 10 Mbps !!  It has a max of 10 Mbps !!

Virtually every resource states that Ethernet operates at 10 Mbps.  This does apply to the clocking speed of the transmissions, but Wrong - it has a maximum operating speed of 10 Mbps.

The initial Frame Relay solution was either DS0 (56k) or DS1 (T1 at 1.536 Mbps), with Fractional T1 speeds (n x DS0) made available later.  All of these speeds are substantially slower than the Ethernet max of 10 Mbps.  Fortunately, the entire path, from the source station to the destination - use IP, and IP has built-in flow control at the TCP layer.  The WAN connection was slow, but it did work !!  The LAN's have an Ethernet "max" of 10 Mbps, but have no "min".  IP is at a higher layer than Ethernet, and therefore is dictates and controls the speed.

Ethernet is viewed as a local networking protocol, and is at Layer 2 of the OSI model  IP is seen as a wide-area networking protocol, and is at Layer 3 of the OSI model.  LAN's can be connected together with either a single, long-distance serial link with 2 routers - or through an entire network of multiple routers.  

The IP packets start out in the LAN wrapped in Ethernet frames, and as they work their way through the WAN, they are transported between router with PPP frames, which like Ethernet, are Layer 2.  The LAN workstations use MAC addresses burned into their interfaces (NIC's), while the WAN routers use IP addresses assigned to their interfaces (WIC's).  The router WIC IP addresses are assigned in their configs.

PPP (Point-to-Point Protocol)

*** PPP is defined in RFC 1548

The Ethernet frames use the MAC layer 2 protocol to manage their transmission.  But for IP packets traveling between routers, an entirely different Layer 2 protocol is used - either PPP (3COM, Juniper, etc - non-Cisco routers) or HDLC (Cisco).  PPP is an extremely, extremely complex protocol.  It deals with management of the serial link, and uses LCP (Link Control Protocol) and NCP (Network Control Protocol) packets to bring the link up, down, report the link status, etc.

A summary of the PPP encapsulation is shown below. The Protocol field contains 2 bytes (4 Hex digits).  The fields are transmitted from left to right.  If he packet is an IP PPP frame it will be denoted as such - the protocol value will be 0021.  There are many other types of PPP frames, such as protocol C021, which is an LCP (Layer Control Protocol) frame, containing link info.

+----------+-------------+---------+
| Protocol | Information | Padding |
| 16 bits  |      *      |    *    |
+----------+-------------+---------+

Router WAN Port Addresses

Since the MAC protocol is not used, router WAN serial interfaces have no MAC addresses.  They use IP addresses, which are assigned to the interface in the router's config.  Actually, since they are direct connections between routers, they do not need addresses to simple send and receive data, but the IP protocol requires that every port has an IP address.

Encapsulation

Ethernet frames contain data passed down from the higher layers.  This can be any number of protocols and formats.  In the case of IP, the frame header is a wrapper for the IP packet.  The IP packet has it's own data and it's own IP addresses.  The Ethernet layer adds MAC addresses in front and a CRC in back of the IP packet.  So, basically, you have encapsulated the IP packet with an Ethernet frame.

Imagine two ethernet LAN's connected by an IP network, with a path between them that passes through 10 routers.  Initially it appears that IP is encapsulating the ethernet frames through the network and to the other side.  But actually, IP frames are moving through the network, and they are being encapsulated in Ethernet frames at the endpoints, and PPP frames between the routers.  

IP packets never move directly across a link !!!  
They must be framed first by a Layer 2 protocol !!!

How it Works

Here we details how an IP packet moves from one LAN to a far away remote LAN :

  1. at the local LAN, the source station assembles an IP packet - which is passed down to Layer 2, where it is wrapped in an Ethernet frame (MAC header & CRC added)
  2. the frame is sent to the first router's LAN interface (default router, or default gateway)
  3. the router strips off the Ethernet MAC header, to get the original IP packet
  4. the router passes the IP packet to Layer 2 LLC and it is wrapped in a PPP (or HDLC with Cisco) header
  5. the router sends the frame out it's WAN interface it to the next router via a serial link using PPP (or HDLC with Cisco)
  6. the next router receives the PPP frame, strips off the PPP header and the IP addresses - replaces the source IP address with it's own, adds a new PPP header and sends it to the next router
  7. for each router along the way, repeat step 6
  8. the last router is reached, which is connected to the remote LAN - it receives the PPP frame on it's serial WAN interface, strips off the PPP header, looks at the Destination IP address and gets the corresponding MAC address from it's ARP cache  (or sends out an ARP broadcast to get the MAC address if it is not in the ARP cache), adds a MAC header to the IP packet which creates an Ethernet frame, and sends it out on the LAN
  9. the Destination station receives the frame