Data Link Layer Switching - IfI

hardsweetlipsNetworking and Communications

Oct 28, 2013 (3 years and 7 months ago)

61 views

11. Mar. 2004

1

INF
-
3190: Internet

Internet

Foreleser: Carsten Griwodz

Email:
griff@ifi.uio.no

11. Mar. 2004

2

INF
-
3190: Internet

Address Resolution

11. Mar. 2004

3

INF
-
3190: Internet

Address Resolution


Addressing levels


Host identification and routing specification within a subnetwork


based on the (local) physical network addresses of the end systems


e.g. station address of the adapter card


Problem


Different address styles for different layer 2 protocols


IP address must be mapped onto the physical network address, 48 bit
for Ethernet


Direct mapping possible for IPv6


But impossible for IPv4

Domain

Name

System

?

Logical address

e.g. www.ifi.uio.no

Internet address

e.g. 129.31.65.7

Netadapter address

e.g. Ethernet address 00:08:74:35:2b:0a

Address

resolution

11. Mar. 2004

4

INF
-
3190: Internet

Address Resolution: Methods


Address resolution in


Source ES, if destination ES is local (direct routing)


Gateway, if destination ES is not local



Solutions


Direct homogeneous Addressing


if the physical address can be changed by the user


physical address = Hostid of the IP address


Only possible if physical address is also longer than hostid



If the physical address is pre
-
defined or if it has to have a different
format, one of the following has to be used


a mapping table from the configuration data base (IPaddr


HWaddr),


e.g. in the Gateway,


may become maintenance nightmare


the Address Resolution Protocol (ARP)


mainly applied in LANs with broadcasting facility

11. Mar. 2004

5

INF
-
3190: Internet

Address Resolution Protocol (ARP)


Process


Broadcast ARP request datagram on LAN


including receiver’s IP address (desired value)


sender’s physical (HW) and IP address (IP)


Every machine on LAN receives this request and checks address


Reply by sending ARP response datagram


machine which has requested address responses


including the physical address


Enter the pair (I,P) into buffer for future requests


11. Mar. 2004

6

INF
-
3190: Internet

Address Resolution Protocol (ARP)

H

H

H

H

H

@IP: 9.228.50.3

@HW: 0xa3e

target

ARP Response

@IP: 9.228.50.3

@HW: 0xa3e

@IP: 9.228.50.8

@HW: 0xaa

source

H

target

ARP Request

@IP: 9.228.50.8

@HW: 0xaa

@IP: 9.228.50.3

@HW:

source

11. Mar. 2004

7

INF
-
3190: Internet

Address Resolution Protocol (ARP)


Process


Broadcast ARP request datagram on LAN


including receiver’s IP address (desired value)


sender’s physical (HW) and IP address (IP)


Every machine on LAN receives this request and checks address


Reply by sending ARP response datagram


machine which has requested address responses


including the physical address


Enter the pair (I,P) into buffer for future requests



Refinement


The receiver of the ARP request stores the sender’s (I,P) pair in its
cache


Send own table during the boot process (but may be too old)


Entries in ARP cache should time out after some time (few minutes)

11. Mar. 2004

8

INF
-
3190: Internet

Address Resolution Protocol (ARP)


End system not directly
available by broadcast


Example: ES 1 to ES 4


ARP would not
receive a response


Ethernet broadcast
is not rerouted over
a router


Solution 1: proxy ARP


the local router knows all remote networks with their respective
routers


responds to local ARP


local ES 1 sends data for ES 4 always to the local router, this router
forwards the data (by interpreting the IP address contained in the
data)


Solution 2: remote network address is known


local ES 1 sends data to the appropriate remote router


local router forwards packets

11. Mar. 2004

9

INF
-
3190: Internet

Reverse Address Resolution Protocol
(RARP)


Retrieve Internet address from knowledge of hardware address

H

H

H

H

H

@IP: 9.228.50.3

@HW: 0xa3e

target

RARP Response

@IP: 9.228.50.3

@HW: 0xa3e

@IP: 9.228.50.8

@HW: 0xaa

source

@IP: unknown

@HW: 0xaa


RARP server responds


RARP server has to be
available on the LAN

target

RARP Request

@IP:

@HW: 0xaa

@IP:

@HW: 0xaa

source

H


Application: diskless
workstation boots over
the network

11. Mar. 2004

10

INF
-
3190: Internet

Dynamic Host Configuration Protocol
(DHCP)


DHCP has largely replaced RARP (and BOOTP)


extends functionality



DHCP


simplifies installation and configuration of end systems


allows for manual and automatic IP address assignment


may provide additional configuration information (DNS server, netmask, default
router, etc.)



Client broadcasts DHCP DISCOVER packet


server answers


DHCP server is used for assignment


request can be relayed by DHCP relay agent, if server on other LAN



Address is assigned for limited time only


before the ’lease’ expires, client must renew it


allows to reclaim addresses of disappearing hosts

11. Mar. 2004

11

INF
-
3190: Internet

IP Routing

11. Mar. 2004

12

INF
-
3190: Internet

IP Routing: Internal and External Routing


Direct Routing/ Interior Protocols:


Both source and destination ES
are located in the same
subnetwork


source ES sends datagram to the
destination ES


identification done by the local
address


mapping


routing is completely defined by
the subnetwork routing algorithm

N0

N1

N3

N5

N4

N2


Indirect Routing/Exterior Protocols:


Source and destination ES are located on different networks


source ES sends datagram to the next router


each router determines the next router on the path to the destination ES


routing decision is based only on


the netid part of the Internet address, i.e. hostid is not used

11. Mar. 2004

13

INF
-
3190: Internet

IP Routing


Routing tables


Routers may have incomplete information


Default paths

Networ
k

10.0.0.
0

F

Networ
k

20.0.0.
0

Networ
k

30.0.0.
0

Networ
k

40.0.0.
0

G

H

20.0.0.5

10.0.0.5

30.0.0.6

20.0.0.6

40.0.0.7

30.0.0.7

To reach host

on network

20.0.0.0

30.0.0.0

10.0.0.0

40.0.0.0

Route to this

address

Deliver direct

Deliver direct

20.0.0.5

30.0.0.7

Routing table of G

11. Mar. 2004

14

INF
-
3190: Internet

IP Routing: Initial Gateway
-
to
-
Gateway
Protocol (GGP)


Core Gateways


connect LANs to the backbone, know the routes to all networks


exchange routing information with each other


Gateway
-
to
-
Gateway Protocol (GGP):


distributed routing definition (group "Distance
-
Vector
-
Procedure")


metrics: simply by distance


Problems: particularly poor scalability


several backbones


not all networks are connected directly to the backbone


all Gateways communicate with each other

ARPANET

Local net 1

Local net 2

Local net n

G
1

G
2

G
n



Original

implementation

11. Mar. 2004

15

INF
-
3190: Internet

IP Routing: Autonomous Systems


Hidden networks

Local net 2

Local net 1

Local net 3

Local net 4

G
2

G
3

G
4


Core gateways have to be informed about hidden networks


Autonomous systems (AS)


Internet domains

Autonomous System

AS boundary router

G
1

Core gateways

11. Mar. 2004

16

INF
-
3190: Internet

IP Routing: Autonomous Systems


Types of ASs


Stub domains


source & sink only


Multiconnected domain


No through traffic


Transit domains


interconnect domain


Autonomous systems are administrative entities


Collects routing information on networks in the AS


Defines boundary routers (also called Exterior Gateways)


that transmit routing information to other autonomous sys.


Boundary routers


Transmits information about network reachability only into its own AS


Reason: each AS shall control exactly, to whom the information about
reachability is given to

Core gateways

Autonomous

system



Autonomous

system

Autonomous

system

G
1

G
2

G
n

G
i

11. Mar. 2004

17

INF
-
3190: Internet

Interior Gateway Protocol

Autonomous

System x

IGP
x

IGP
x

G
x

Autonomous

System 1

IGP
1

IGP
1

G
1

EGP


Other variants


e.g. HELLO by Dave Mills


distributed routing algorithm


distance: Delay


requires synchronized clocks



In general: intradomain
routing


individual solutions possible


Presently preferred procedures


Routing Information Protocol
(RIP), old


Open Shortest Path First
(OSPF)


Interior Gateway Routing
Protocol (IGRP) and
Enhanced IGRP (EIGRP)

11. Mar. 2004

18

INF
-
3190: Internet

Routing Information Protocol (RIP)


Background (regarding the originally used protocol)


developed as a part of Berkeley UNIX


since 1988, RIP Version 1, RFC 1058


Principle


Distributed routing algorithm: Distance
-
Vector
-
Procedure


i.e.


IS periodically sends a list

containing estimated distances to each destination

to its neighbors


distance


number of hops: 0 .. 15 (15 corresponds to infinite)


periodical


every 30 sec; after 180 sek without packet


distance infinite


RIP Version 2


G. Malkin, RFC 1387, 1388 and 1389 (RIP
-
MIB)


Uses multicast if necessary to distribute data


Not broadcast (so that all ES also receive this)


Networks without broadcast or multicast (ISDN, ATM)


“Triggered" updates


To be sent only if the routing table changes

11. Mar. 2004

19

INF
-
3190: Internet

Open Shortest Path First (OSPF)


Background: since 1990 Internet Standard, RFCs 1247, 2178


Transition from vector
-
distance to link
-
state
-
protocol


Principle (link
-
state
-
protocol)


IS measures "distance" to the immediately adjacent IS, distributes the
information, calculates the optimal route


determine the address of adjacent IS


measure the "distance" (delay, ..) to adjacent IS


OSPF permits differing metrics


selection per packet possible (RFC 1349)


process local link
-
state information as a packet


distribute information to all adjacent IS by flooding


compute route from the information of all IS e.g. with Dijkstra’s "shortest
path first" algorithm


name "Open Shortest Path First“

0

2

4

8

16

Normal service

Minimize financial cost

Maximize reliability

Maximize throughput

Minimize delay

OSPF no.

Meaning

11. Mar. 2004

20

INF
-
3190: Internet

Open Shortest Path First (OSPF)


For large autonomous
systems


AS substructure


AS


AS backbone area


Area


Router classes


AS boundary routers


Backbone routers


Area border routers


Internal routers

To other AS

To other AS

11. Mar. 2004

21

INF
-
3190: Internet

Open Shortest Path First (OSPF)


Adjacency


LSR measures distance to all neighbours


OSPF measures distance to all adjacent nodes


If several routers are connected by a LAN


One is designated router


All other routers on the LAN are adjacent only to it


It is adjacent to all others

A

F

B

C

LAN

D

E

G

H

I

N

A

F

B

C

D

E

G

H

I

A

F

B

C

D

E

G

H

I

transform to

graph

A

F

B

C

D

E

G

H

I

LAN are represented as star configurations

11. Mar. 2004

23

INF
-
3190: Internet

Exterior Gateway Protocol: Circumstances



Requirements,

basic conditions


political


economical


security
-
related

Core gateways

AS
1

AS
3

AS
2

NW

IG
2

IG
1


Requirement examples


to avoid certain autonomous systems


to avoid certain countries


to stay within one country (before going via
foreign country)


data of company A should not to pass through
company B


Exchange information on accessibility


including at least one Core Gateway


possibly with other AS

11. Mar. 2004

24

INF
-
3190: Internet

Exterior Gateway Protocol

Border Gateway Protocol (BGP)


Previously: Internet Exterior Gateway Protocol (RFC 1654)


Now: Border Gateway Protocol (RFC 1771, 1772, 1773) is de
-
facto
standard



Configurations


Possibility to have several Exterior Gateways per AS


Variations


Branch (topology):


all of the external traffic is routed over this/a single, external router


Multiconnected networks


linked to many end systems


can pass on traffic if necessary


Transit networks


networks with increased capacity and


often linked to many AS


Demands


To allow for routing path decisions


e.g. to prefer to send traffic via own country


e.g. not to send traffic through certain companies


Routing policy can not only be based on a "minimal distance"

11. Mar. 2004

25

INF
-
3190: Internet

Exterior Gateway Protocol

Border Gateway Protocol (BGP)


Algorithm


Fundamentals: based on distance vector mechanism, where


IS sends periodically to its neighbours a list containing


the estimated distances from itself to all known destinations


BGP uses
distance path mechanism


Related to distance vector


But without count
-
to
-
infinity problem


IS sends periodically a list to its neighbours containing


estimated distance and preferred Path

from itself to each destination

for a specified block of reachable IP addresses


Receiving IS evaluates path


Distance


Policy compliance



notion of a path / of how to reach other routers is distributed



but, no criteria for selecting a route is distributed


each BGP router must have its own criteria, i.e. policy


e.g. never send using certain AS


Remarks


Big updates


But only a limited number of routers

11. Mar. 2004

26

INF
-
3190: Internet

Protocol Support in an IP Router


Network layer protocols


IP (Internet Protocol)


ARP (Address Resolution
Protocol),


RARP (Reverse ARP)


ICMP (Internet Control
Message Protocol)


IGMP (Internet Group
Management Protocol)

LLC
-
1

SNAP

ARP

RARP

ICMP

IGMP

OSPF

EGP

TCP

UDP

BGP

RIP

SNMP

IP


Routing protocols


RIP (Routing Information
Protocol)


BGP (Border Gateway Protocol)


EGP (Exterior Gateway
Protocol)


OSPF (Open Shortest Path First)


Network management protocols


SNMP (Simple Network
Management Protocol)


Transport protocols


UDP (User Datagram Protocol)


TCP (Transmission Control
Protocol)


and


SNAP (Subnet Access Point)


LLC (Logical Link Control)