13-lan, packets, frames and topologies dr. john abraham professor utpa

25
13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Upload: claude-hill

Post on 06-Jan-2018

220 views

Category:

Documents


0 download

DESCRIPTION

Headers added nData (including application header, presentation header, and session header) nSegment Header – Data nNetwork Header – Segment Header – Data nFrame Header-Network Header- Segment Header – Data – Frame Trailer

TRANSCRIPT

Page 1: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

13-LAN, packets, frames and topologies

Dr. John AbrahamProfessor

UTPA

Page 2: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

What happens in data transfer?

For example an email message InformationData (alpha numeric

characters) DataSegment SegmentPacket PacketFrame FrameBits

Page 3: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Headers added

Data (including application header, presentation header, and session header)

Segment Header – Data Network Header – Segment Header –

Data Frame Header-Network Header- Segment

Header – Data – Frame Trailer

Page 4: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Circuit switching• Connection mechanism that establishes a path between

a sender and receiver, with guaranteed separation from other paths. Originally used electromechanical switching devices to make a physical circuit.

• Today use electronic devices to establish circuits, and multiple circuits are multiplexed over shared media. Three general properties to define a circuit switched paradigm:– Point-to-point communication– Separate steps for circuit creation, use and termination– Performance equivalent to an isolated physical path.

Page 5: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Circuit Switching

Page 6: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Packet Switching

Page 7: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Packet Switching• Basis of internet• Sender must divide the message into blocks of

data called packets.– The size of a packet varies depending on the packet

switching technology used.• Uses statistical multiplexing

– Communication from multiple sources competes for the use of a shared wire.

• 3 properties of a packet switched paradigm– Arbitrary, asynchronous communication– No set-up required before communication starts– Performance varies due to statistical multiplexing.

Page 8: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Standards for Packet Format and Identification

– LAN – IEEE project 802– There may be sublayers, eg. Datalink layer is

dived into LLC-logical link control (upper portion) and MAC –media access control (lower portion)

– Some 802 projects:• 802.3 Ethernet 802.4 Token bus, 802.5 Token

Ring. 802.11 wirless. 802.15 bluetooth

Page 9: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA
Page 10: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

LAN topologies

• Bus• Ring• Star• Mesh• Advantages and disadvantages

Page 11: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Packet Identification, demultiplexing, mac addresses

• Only intended recipient should process the packet. Demultiplexing requires an address. Each computer has a unique address (MAC address) and each packet contains the address of this computer.– 48 bit address on NIC. 3 bytes (MSB) identify

the manufacturer (Unique ID, OUI). Remaining 3 bytes is the number for each card.

Page 12: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Types of MAC addresses

• Unicast – uniquely identifies a single computer, only that computer get the packet. A source address is always unicast.The lease significant bit of the first byte defines the type of address. If the bit is 0, it is unicast, otherwise multicast.

• Broadcast – each computer on that network should receive a copy of the packet. All 48 bits are 1s.

• Multicast – identifies a subnet of computers on a given network and all computers in the subnet will receive the packet.

Page 13: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Examples:

• 4A:30:10:21:10:1A – lsb of first byte is 0 so unicast. 0100 (4) 1010 (A)

• 47:20:1B:2E:08:EE – lsb is 1 so multicast. 0111 (7)

• FF:FF:FF:FF:FF:FF – muticast

Page 14: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Broadcast, Multicast and efficient multi-point delivery

• LAN transmits over a shared medium. All can hear, each machine should examine the address to determine if it belongs self, or discard the packet. See p.233 for algorithm.

• In case of broadcast or multicast only a single copy needs to be transmitted.

Page 15: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Frames and Framing• Framing refers to the structure added to the

sequence of bits or bytes that allows a send and receiver to agree on the exact format of the message.

• A frame header contains information used to process the frame.

• In a ethernet packet switched network a frame has the same data length (payload) as a packet.

• An ethernet frame contains seven fields: preamble, SFD, DA, SA, length or type of data unit, upper-layer data and the CRC.

Page 16: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

TCP/IP Protocol Suite 16

Figure 3.3 Ethernet layers

Page 17: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Framing

• SOH – start of header• EOT – End of Transmission

Page 18: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Stop lecture here

• Rest of the slides are good for a little deeper study

Page 19: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

TCP/IP Protocol Suite 19

Figure 3.4 Ethernet frame

Page 20: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Frame• Preamble 7bytes alerts the receiving system to the

coming frame and enables it to synchronize.• SFD – start frame delimiter. 1byte. Signals the beginning

of the frame.• DA/SA – destination and source address. 6bytes each.• Length/type – 2 bytes. number of bytes n the data field.• CRC – 4 bytes. • Must have DA(6), SA(6), Length(2) Data.. And CRC(4),

18 bytes plus data.• Data – encapsulated data from upper layers. minimum

of 46 bites and maximum of 1500 bytes. So minumum length of the frame is 64 byte and maximum is 1518 bytes.

Page 21: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

802.3 Frame

• A SNAP header (8bytes) is added (3bytes LLC, 3byte OUI and 2byte type/length)– LLC = Logical Link control– OUI = Organization unique identifier

• This reduced the maximum payload of 1500 to 1492.

Page 22: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Frame• In order to provide service to the network layer, the data

link layer must use the service provided to it by the Physical layer. The physical layer only accept a raw bit stream. For a long bit stream, if error occurred during transmission, the entire stream has to be sent again. Therefore, it is broken to smaller frames. Each frame will have to be distinguished somehow. Three methods are used

• Character count• Starting and ending characters, with character

stuffing• Starting and ending flags, with bit stuffing

Page 23: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Character count

• The first byte indicates how many characters are in the frame including the first byte.

• Trouble with this scheme is that if the first byte of any frame gets corrupted, the destination will get out of sequence, having no way to find where the beginning of the next frame is.

• This method is rarely used any more.

Page 24: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Start and end with control chars with character stuffing

• Resynchronize at the beginning of each frame• Start with ASCII chars DLE & STX

– Data Link Escape, Start of Text

• End with the same sequence• If these ASCII char is part of the text then double it

– like Jim’’s book - in pascal• Problem - must use 8 bit ASCII which is not

suitable for all communications

Page 25: 13-LAN, packets, frames and topologies Dr. John Abraham Professor UTPA

Start and end with flags with stuffing

• Each frame begins with bit pattern 01111110• If senders data has five consecutive ones then

stuff it with a zero which is deleted at the receiving end

• This bit pattern called flag byte is added at the end of each frame as well

• With this method boundary between two frames are easily recognized.