Sunteți pe pagina 1din 10

2/6/2015

Eathernet LAN
y Developed by Metcalfe's (Xerox company got patent)

Ethernet, ARP, RARP

y MAC address (48 bits) is used as address of a device.


y CSMA/CD is used for multiple access.
y Packet size is variable (payload varies from 46 to 1500 octet)
y Pure Ethernet is no more in use, at present combination of

Ethernet (LAN)

Ethernet and Internet is used in LAN.

Address Resolution Protocol (ARP)


Reverse Address Resolution Protocol (RARP)

y Ethernet can be setup using Coaxial cables or Twisted Wire

cables (RJ 45 cat 5 and cat 6 cables)


1

OPM

OPM

Ethernet frame format


y Internet devices
y Host devices- Computer, Laptop, PDA, IP telephone etc.
y Hub, Switch, Router, Repeaters, Bridge, Gateway, Server

y Preamble field consists of 64 bits alternating 0 and 1 to help receiving

interface to synchronize.

y IP allocation Techniques
y Static IP allocation

y 48 bits MAC/Hardware/Physical/Ethernet address unique throughout the world

for a devise
devise.

y comparatively secure but not efficient in case of limited IP addresses

y MAC address 0xFFFFFFFFFFFF is used to broadcast a packet in the network.

y Some software can generate duplicate MAC address also (generally used by hackers)

y Dynamic IP allocation (DHCP)


y

y 16 bits Frame Type Field is used to identify the type of data being carried in a

frame. It determine which protocol software module should process the frame.

more efficient but less secure,


can be secured by allocating user login & password to authenticate users

y Packet size is variable (payload varies from 46 to 1500 octet in case of IPv4)
y 32 bits CRC field helps to detect error in the frame.
3

OPM

Internet devices (Cont.)

Internet devices (Cont.)

y Hub:-

y Switch:-

y connects PCs together,

y Switch has capability to process received packet and identify

y Works as multi-port repeater , simply passes on (repeats) all the

the destination port based on destination address in header of


the packet.
y It forwards the received p
packets to respective
p
destination ports
p
only
y Thus it doesnt generate unnecessary traffic in network
y This allows simultaneous communication across the switch,
improving bandwidth.

information it receives
y broadcasts incoming packets from a port to other ports of the Hub.
y Can not process packets.
y generates unnecessary traffic in network due to broadcasting of
packets through undesired ports (not part of destination link) .
y Hub can be used in a small network but for a larger, heavily

used network a another network device (switch) may be used to


reduce the amount of unnecessary traffic being generated.
5

OPM

OPM

y Switch is preferred over Hub to extend a network.

OPM

2/6/2015

ARP and RARP

ARP and RARP

y ARP
y ARP provides a dynamic mapping from an IP address to the

corresponding hardware (MAC) address.

Objectives

y We use the term dynamic since it happens or updates

automatically after certain period of time and is normally not a


concern of either the application user or the system
administrator.

Understand the need for ARP


Understand the cases in which ARP is used
Understand the components and interactions in an ARP package
Understand the need for RARP

y RARP (Reverse Address Resolution Protocol)


y RARP is used by systems without a disk drive but requires

manual configuration (in ROM) by the system administrator to


send bootstrap message.

OPM

OPM

OPM

10

OPM

ARP and RARP

Position of ARP and RARP in TCP/IP protocol suite

Notice that ARP and RARP are supplemental to IP.

11

OPM

12

OPM

2/6/2015

ARP operation

ARP packet (IP PDU)

Hardware Type - Ethernet


is type 1, field length= 16
bits
Protocol Type- IPv4= x0800,
field length= 16 bits
Hardware Length: Hardware
Address length (6 byte), field
length= 8 bits
Protocol Length: length of
IPv4 address (4 byte), field
length= 8 bits
Operation: Request 1, Reply
2, field length= 16 bits
13

OPM

14

OPM

Four cases using ARP


Encapsulation of ARP packet (IP PDU)

The ARP packet is encapsulated within an Ethernet packet.


Note: Type field for ARP is x0806

15

OPM

16

EXAMPLE 1

OPM

EXAMPLE 1 (CONTINUED)

A host with IP address 130.23.43.20 and physical address


B2:34:55:10:22:10 has a packet to send to another host with IP
address 130.23.43.25 and physical address A4:6E:F4:59:83:AB
(which is unknown to the first host). The two hosts are on the
same Ethernet network. Show the ARP request and reply packets
encapsulated
l d in
i Ethernet
Eh
f
frames.

Solution
the ARP request and reply packets. Note that the ARP data field
in this case is 28 bytes, and that the individual addresses do not
fit in the 4-byte boundary. That is why we do not show the
regular 4-byte boundaries for these addresses. Also note that the
IP addresses
dd
are shown
h
i hexadecimal.
in
h d i l For
F information
i f
i
on
binary or hexadecimal notation see Appendix B.

See Next Slide

See Next Slide


17

OPM
Network
topology:- when two computers connected directly or through Hub in same network

18

OPM

2/6/2015

Example 1
Proxy ARP

A proxy ARP, running in a router, can respond to an ARP request for any of its
sub- ordinate device. The proxy ARP replies with its own MAC address.
When the packet arrives, the router delivers it to the appropriate host.

19

OPM

20

OPM

ARP components

ARP Software Package


An example of a simplified ARP software package
ARP software package consists of five modules:
modules: a cache table, queues, an
output module, an input module, and a cache
cache--control module.
module.

The topics discussed in this section include:


Cache Table
Queues
Output Module
Input Module
Cache
Cache--Control Module

21

OPM

22

The Cache Table

OPM

Original cache table used for examples

y If ARP just resolved an IP address, chances are a few moments later someone

is going to ask to resolve the same IP address.


y When ARP returns a MAC address, it is placed in a cache table. When the

next request comes in for the same IP address, look first in the cache table.

y Essential for the efficient operation of ARP is the maintenance of

an ARP cache on each host.

23

OPM

24

OPM

2/6/2015

The Cache Table Contents


y State: FREE, PENDING, RESOLVED
y Hardware type: same as ARP field

How Does the Cache Work?


y Output Module
y The output module waits for an IP packet with a request

y Protocol type: same as ARP field

y Checks the cache for an existing entry

y Hardware length: same as ARP field

y If entry found and state RESOLVED, we already have this MAC

y Protocol length: same as ARP field

address

y Interface number: port number (m0,m1,


(m0 m1 m2)
y Queue number: which queue the ARP request is sitting in

y If entry found and state PENDING, packet waits until destination

y Attempts: how many times have you tried to resolve this address?

hardware address found

y Time-out: how long until this address is tossed out (need space in cache)
y Hardware address: destination hardware address

y If no entry found, output module places this request in queue, and a

y Protocol address: destination IP address

new entry is placed in cache with state PENDING and ATTEMPTS


set to 1. An ARP request is then broadcasted.
25

OPM

26

How Does the Cache Work?

How Does the Cache Work?

y Input Module
y The input module waits until an ARP request or reply arrives

OPM

y Input Module (cont.)

y Module checks the cache for this entry

y If entry is found and state RESOLVED, module still updates the entry

(target hardware address could have changed) and the TIME-OUT


value reset

y If entry
y is found and state is PENDING, module updates
p
entrys
y

target hardware address, changes state to RESOLVED, and sets the


TIME-OUT value

y If entry not found, module creates a new entry. State is set to

RESOLVED and TIME-OUT is set


y Now the module checks to see if arrived ARP packet is a Request. If

it is, the module immediately creates an ARP Reply message and


sends it back to sender.
27

OPM

28

How Does the Cache Work?

OPM

Original cache table used for examples

y Control Module
y The cache-control module periodically checks each cache entry
y If entrys state is FREE, skips it
y If entrys
t state
t t is
i PENDING,
PENDING Attempts
Att
t field
fi ld is
i incremented
i
t d by
b 1.
1 This
Thi

value greater than max? Toss this entry (and mark entry as FREE).
Less than max? Send another ARP request
y If state of entry is RESOLVED, module decrements value of Time-out

field accordingly
y If Time-out field < 0, then remove entry and set state to FREE
29

OPM

30

OPM

2/6/2015

EXAMPLE 2

EXAMPLE 3

The ARP output module receives an IP datagram (from the


IP layer) with the destination address 114.5.7.89.

Twenty seconds later, the ARP output module receives an IP


datagram (from the IP layer) with the destination address
116.1.7.22.

It checks the cache table and finds that an entry exists for this
destination with the RESOLVED state (R in the table).

It checks the cache table and does not find this destination in the table.
The module adds an entry to the table with the state PENDING and the
Attempt value 1.

It extracts the hardware address, which is 457342ACAE32, and sends


the packet and the address to the data link layer for transmission.

It creates a new queue for this destination. It then sends an ARP request
to the data link layer for this destination.

The cache table remains the same.

31

OPM

32

OPM

See Next Slide

EXAMPLE 4

Updated cache table for Example 3

Fifteen seconds later, the ARP input module receives an ARP reply
packet with target protocol (IP) address 188.11.8.71.
The module checks the table and finds this address.
It changes the state of the entry to RESOLVED and sets the time-out value
to 900.
The module then adds the target hardware address (E34573242ACA) to the
entry.
Now it accesses queue 18 and sends all the packets in this queue, one by one,
to the data link layer. The new cache table is shown in next slide.

33

OPM

34

OPM

See Next Slide

EXAMPLE 5

Updated cache table for Example 4

Twenty-five seconds later, the cache-control module updates every


entry.
The time-out values for the first three resolved entries are decremented by
60.
y 25.
The time-out value for the last resolved entryy is decremented by
The state of the next-to-the last entry is changed to FREE because the timeout is zero.
For each of the three pending entries, the value of the attempts field is
incremented by 1. One entry (IP address 201.1.56.7 is over max, so change to
FREE.

35

OPM

36

OPM

See Next Slide

2/6/2015

ARP Probe message

Updated cache table for Example 5

ARP Probe is used in the IPv4 Address Conflict Detection


specification (RFC 5227).
It is an ARP request constructed with an all-zero sender IP
address.
Before beginning to use an IPv4 address (whether received from
manual configuration, DHCP, or some other means), a host
implementing this specification must test to see if the address is
already in use, by broadcasting ARP probe packets

37

OPM

38

OPM

40

OPM

ARP announcement / gratuitous message


This is useful for updating other hosts' mapping of a hardware address when the sender's
IP address or MAC address has changed.
ARP request is broadcasted containing the sender's protocol and Hardware address, with
the target hardware address set to zero.
An alternative is to broadcast an ARP reply with the sender's hardware and protocol
addresses .
An ARP announcement is not intended to solicit a reply.
Gratuitous ARP is also used by some interface drivers to provide load balancing for
incoming traffic (sends information without requests).
In a team of network cards, it is used to announce a different MAC address within the
team that should receive incoming packets.
39

OPM

RARP operation

RARP
RARP finds the logical address (IP) for a machine that only knows its
physical address.
address.
This if often encountered on thin
thin--client workstations
workstations.. No disk (memory)
(memory),, so
when machine is booted, it needs to know its IP address (dont want to burn
the IP address into the ROM).
ROM).
RARP requests
t are broadcast
bbroadcast,
d t, RARP replies
li are unicast.
unicast
i t.
If a thinthin-client workstation needs to know its IP address, it probably
also needs to know its subnet mask, router address, DNS address, etc.
etc.
So we need something more than RARP
RARP.. BOOTP, and now DHCP have
replaced RARP
RARP..

41

OPM

42

OPM

2/6/2015

Encapsulation of RARP packet

RARP packet (IP PDU)

43

OPM

44

InARP (Inverse ARP)

OPM

InARP (Cont.)

y Inverse Address Resolution Protocol (Inverse ARP or InARP) is


y Since ARP translates Layer 3 addresses to Layer 2 addresses,

used to obtain Network layer addresses (for example, IP addresses) of


other nodes from data link layer (Layer 2) DLCI addresses.

InARP may be described as its inverse. In addition, InARP is


implemented as a protocol extension to ARP: it uses the same
packet format as ARP, but different operation codes as for request
= 8, reply = 9.

y It is primarily used in Frame relay networks based on TDMA,SDMA,

FDMA, OFDMA based on Data Link Connection Identifier (DLCI)


and ATM networks, in which Layer 2 addresses of virtual circuits are
sometimes obtained from Layer 2 signaling, and the corresponding
Layer 3 addresses must be available before those virtual circuits can be
used.

45

OPM

y The RARP, like InARP, translates Layer 2 addresses to Layer 3

addresses. However, in InARP the requesting station queries the


Layer 3 address of another node, whereas RARP is used to obtain
the Layer 3 address of the requesting station itself for address
configuration purposes
46

Frame-relay inverse-ARP
y Frame-relay is a layer 2 technique that uses a concept of Connection

Identifier to distinguish user connections in TDMA, OFDM,


OFDMA, SDMA based and ATM networks.

y These days WiFi, WiMAX and LTE are OFDMA based wireless

technique
q which uses Connection Identifiers (CID)
(
) at Layer
y 2.

OPM

Connection techniques in Frame based networks


y Two techniques are used to assign DLCI between adjacent devices
y Common DLCI (widely used)
y Distinct DLCI

y Single virtual connection between two devices


y Central device assigns a DLCI and Protocol address (network address) to

a host device.

y The host device requests Protocol address of Central device/ other host

y In WiMAX connection Identifiers (CID) are of 16 bit length (total

2^16 CIDs are classified as Initial, Management, Traffic and Relay


sub-sets based on their utilization), All the CIDs can be reused in
another network cell (under one Base Station) except replay sub-set
of CIDs.

47

OPM

device by sending InARP request.

y Multiple virtual connection between two device


y Central device assigns a DLCIs and Protocol addresses (network
48

address) to a host device as per number of virtual connections for


example
based on type of services.
OPM

2/6/2015

Comparison of ARP, RARP & InARP

QoS scheduling in WiMAX

Parameter

ARP

RARP

InARP

Protocol
used in

TCP/IP based LAN

TCP/IP based LAN

Frame based Networks


(WLAN, ATM, WiMAX, LTE
etc.)

Mapping

IP to Hardware Address
(Static IP allocation)

Hardware to IP address
(Dynamic IP allocation)

DLCI to IP address
(Dynamic IP allocation)

Intermedi
ate device
d i
required

Opportunistic as per
l
networkk topology

Opportunistic as per
networkk topology
l

Always necessary to access


Frame based
b d networks
k

Eathernet
type field

0x0806

0x8035

assigned by IANA based on


different types of protocols and
Technologies

Request 3 , Reply 4

Request 8 , Reply 9

Request & Request 1 , Reply 2


Reply
fields
OPM

49

50

The TDMA frame format

OPM
CID/SID=
connection Identifier/Subscriber identifier

Space Division Multiple Access

Super-frame
Random
Access

Reserved

p1

p1

p0

Reserved

p0
0

Transmit Part

51

OPM

Random
Access

y primitive applications are Sectorized

antennas

p1
1

in future adaptive antennas


simultaneously
steer energy
in the direction of many users at
once

Receive Part

52

OPM

OFDM frame

SDMA in satellites
y SDMA dual-beam receive

antenna
y simultaneously access from two

diff
different
t regions
i off the
th earth
th

53

OPM

54

OPM

2/6/2015

OFDMA/TDD frame (WiFi, WiMAX)

55

OPM

10

S-ar putea să vă placă și