1. Trang chủ
  2. » Công Nghệ Thông Tin

Part 4: Addressing Resolution & IP Routing ppsx

17 237 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 17
Dung lượng 601,19 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

– Multiplexing accomplished by transport protocols TCP, UDP • And how to build on top of the narrow waist – Domain Name System DNS for resolution between name and addresses – Dynamic hos

Trang 1

Computer Network Part 4 Addressing Resolution & IP

Routing

• ARP

• R-ARP/ DHCP

• DNS

• IP Routing

– Concepts & terminologies

– Static & dynamic routing

– Routing algorithms

• Distance vector

• Link-state

– Routing protocols

• RIP

• OSPF

IP Infrastructure Services

• IP best-effort packet-delivery service – IP addressing and packet forwarding with datagram mode

– Multiplexing accomplished by transport protocols (TCP, UDP)

• And how to build on top of the narrow waist – Domain Name System (DNS) for resolution between name and addresses

– Dynamic host configuration protocol-DHCP for IP configurations

– build on below of the narrow waist: ARP for Destination MAC address

• Glue (ARP, R-ARP/DHCP, DNS, ICMP)

• Security with end-system/ essential devices protection and data privacy (NAT, firewalls)

• And how to get the traffic from internal to external

– Internet routing(Intra-domain and inter-domain)

Three Kinds of Identifiers for

Communication

• Host name (e.g., www.cnn.com)

– Mnemonicname appreciated by humans

– Provides little (if any) information about location

– Hierarchical, variable # of alpha-numeric characters

• IP address (e.g., 64.236.16.20)

– Numericaladdress appreciated by routers/ host

– Related to host’s current location in the topology

– Hierarchical name space of 32 bits

• MAC address (e.g., 00-15-C5-49-04-A9)

– Numericaladdress appreciated within local area network

– Unique, hard-coded in the adapter when it is built

– Flat name space of 48 bits

Mapping Between Identifiers

• Domain Name System (DNS)

– Given a host name, provide the IP address – Given an IP address, provide the host name

• Dynamic Host Configuration Protocol (DHCP)

– Given a MAC address, assign a unique IP address – Tell host other stuff about the Local Area Network – IP Address

– Network Mask – Default Router

To automate the boot-strapping process

• Address Resolution Protocol (ARP)

– Given an IP address, provide the MAC address – To enable communication within the Local Area Network

Address Resolution Protocol (ARP)

• In order for devices to communicate, the sending

devices need both the IP addresses and the MAC

addresses of the destination devices

• When they try to communicate with devices whose IP

addresses they know, they must determine the MAC

addresses

• ARP enables a computer to find the MAC address of

the computer that is associated with an IP address

ARP Flowchart

Send Data to a device

Send Data

Send an ARP request

Get an ARP reply

Is the MAC address

in my ARP cache

N

Y

Insert the new record into ARP cache

Trang 2

A.B.C.1.3.3 A.B.C.4.3.4 197.15.22.34 A.B.C.7.3.5 197.15.22.35

ARP operation: ARP request

MAC A.B.C.1.3.3 ff.ff.ff.ff.ff.ff MAC IP

197.15.22.33 IP

197.15.22.35 What is your MAC Addr?

A Broadcast: who knows the Ethernet address for 197.15.22.35?

10.0.2.1

ARP Reply and Caching

MAC A.B.C.7.3.5 A.B.C.1.3.3 MAC IP

197.15.22.35 IP

197.15.22.33 This is my MAC Addr

C reply in Unicast : Yes, I am

A.B.C.7.3.5

ARP Table:

A.B.C.7.3.5 – 197.15.22.35

RA M

RA M

197.15.22.33

A.B.C.1.3.3 A.B.C.4.3.4 197.15.22.34 A.B.C.7.3.5 197.15.22.35

ARP Cache For Creating A Data Frame

ARP Table:

A.B.C.7.3.5 – 197.15.22.35 MAC

A.B.C.1.3.3 A.B.C.7.3.5 MAC IP

197.15.22.33 IP

197.15.22.35 Data

Default gateway

• In order for a device to communicate with another device on

another network, you must supply it with a default gateway

• A default gateway is the IP address of the interface on the

host is located

• In order for a device to send data to the address of a device

that is on another network segment , the source device sends the data to a default gateway

ARP Reply

Default gateway

Eo

E1

Reverse-ARP

Dynamic addressing

• There are a few different methods that you can use to assign

IP addresses dynamically:

– RARP: Reverse Address Resolution Protocol.

– BOOTP: BOOTstrap Protocol.

– DHCP: Dynamic Host Configuration Protocol.

Trang 3

Solutions for dynamic assignment of IP

addresses

• Reverse Address Resolution Protocol -RARP

– Workstations running RARP have codes in ROM that

direct them to start the RARP process, and locate the RARP server

– Broadcast a request for the IP address associated with

a given MAC address – RARP server responds with an IP address

– Only assigns IP address (not the default router and

subnetmask)

RARP

Ethernet MAC address (48 bit)

ARP

IP address (32 bit)

BOOTP

• BOOTstrap Protocol (BOOTP)

• From 1985

• Host can configure its IP parameters at boot time

• 3 services.

– IP address assignment

– Detection of the IP address for a serving machine

– The name of a file to be loaded and executed by the client machine (boot file name)

– Not only assign IP address, but also default router, network mask, etc

– Sent as UDP messages (UDP Port 67 (server) and 68 (host))

– Use limited broadcast address (255.255.255.255):

• These addresses are never forwarded

DHCP

• Dynamic Host Configuration Protocol (DHCP)

– From 1993

– An extension of BOOTP, very similar to DHCP

– Same port numbers as BOOTP

– Extensions:

• Supports temporary allocation (“leases”) of IP addresses

• DHCP client can acquire all IP configuration parameters needed to operate

– DHCP is the preferred mechanism for dynamic

assignment of IP addresses – DHCP can interoperate with BOOTP clients

IP address assignment

static addressing and dynamic addressing

MAC: Known

IP: Unknown

MAC:

MAC: Known Known

IP: Unknown

RARP Request RARP Reply

RARP server

Dynamic addressing: DHCP

MAC: Known IP: Unknown

MAC:

MAC: Known Known

IP: Unknown

DHCP Discover UDP Broadcast DHCP Offer UDP Broadcast

DHCP server

IP1 IP2 IP3

IP IP1 1 IP IP2 2 IP IP3 3

DHCP Request DHCP Ack

Gateway

IP of other servers And more …

Gateway

IP of other servers And more …

IP Address Lease time DHCP sever IP Address

IP Address Lease time DHCP sever IP Address

Trang 4

DHCP Timeline Includes the Lease Time (LT), Renewal

• Other DHCP information that is sent as

an option:

Subnet Mask, Name Server, Hostname, Domain Name, Forward On/Off, Default

IP TTL, Broadcast Address, Static Route, Ethernet Encapsulation, X Window Manager, X Window Font, DHCP Msg Type, DHCP Renewal Time, DHCP Rebinding, Time Server, SMTP-Server, Client FQDN, Printer Name, …

INIT

SELECTING -/ DHCPDISCOVER

DHCPOFFER / Process offer

REQUESTING Select offer/ DHCPREQUEST

BOUND DHCPACK /Set T1,T2

DHCPACK /Set T1,T2 DHCPACK /Set T1,T2 RENEWING

T1/

Unicast

DHCPREQUEST

REBINDING T2/Broadcast DHCPREQUEST

DHCPNAK / Stop using IP address DHCPNAK,

Lease expires/

Stop using IP address

DHCPACK (in use)/

DHCPDECLINE

DHCPNAK / Discard offer

DHCP client Behavior

Detail

Trang 5

DHCP Relay Agents

• The relay agent function is typically loaded on a

router connected to the segment containing DHCP clients

• This relay agent device is configured with the

address of the DHCP server, and can communicate unicast directly with that server

DHCP Relay Agents

• Figure 8-11 shows the communication sequence on a network that supports a DHCP relay agent

Summary

• The function of a subnet mask is to map the parts of an IP

address that are the network and the host

• Someday IPV4 will be completely obsolete and IPV6 will be

the commonly used version

• A computer must have an IP address to communicate on the

Internet

• An IP address may be configured statically or dynamically

• A dynamic IP address may be allocated using RARP, DHCP

• DHCP supplies more information to a client than BOOTP

• DHCP allows computers to be mobile allowing a connection to

many different networks

• ARP and Proxy ARP can be used to solve address resolution

problems

DNS Domain Name Service

The Domain Name System

• The domain name systemis usually used to translate a

host name into an IP address and vice versa

• DNS comprises three main elements:

– Domain name space

– Name servers

– Resolver

• Domain name space

– A hierarchical and logical tree structure

– An inverted tree with the root node at the top

– Each node has a label- The root node has a null

label, written as “.”

Name Space

vnn com edu gov

. Root

www

abc

• Domain namescomprise a hierarchyso that names are unique, easy to remember

• Each host nameis made up of a sequence of labels separated by periods

• Examples:

– www.abc.edu.vn

Trang 6

DNS (Name) Servers

• DNS name serverswith DNS distributed

database-indexed by name

– Process of resolving names to IP addresses

-resolve forward lookup queries – A reverse lookup query resolves an IP address to a

name -resolvereverse lookupqueries

• a special second-level domain called in-addr.arpa

was created

• Name Caching-Name server cachingand that the

name server caches the query results to reduce the

DNS trafficon the network

Resolvers/ DNS Clients

• A DNS client is called a resolver Which query name servers about the name space

• Resolving Resolution – Recursionrequests the name server to find out the answer (possibly by contacting other servers)

– Iterationrequest the name server response may be

a list of othername servers to contact.

DNS: System

DNS: Database

vn com

ctt

www.ctt.com.vn 203.162.50.100

www

203.162.4.10

203.162.50.1

203.162.0.1 63.63.0.1

www – 203.162.50.100 mail – 203.162.50.101 Lab – 203.160.100.1

www – 203.162.50.100 mail – 203.162.50.101 Lab – 203.160.100.1

ctt – 203.162.50.1 aaa – 203.162.70.201 bbb – 203.160.9.7

ctt – 203.162.50.1 aaa – 203.162.70.201 bbb – 203.160.9.7

com vn

.

Address

of com server

Address

of com server Address of yahoo.com server

Address of yahoo.com server

Address of www.yahoo.com

Address of www.yahoo.com

Address of www.yahoo.com

Address of

www.yahoo.com

Request

Reply

Back…

IP Network Infrastructure For

Interconnection

IP ROUTING OVERVIEW

IP Network Infrastructure For

Interconnection

IP ROUTING OVERVIEW

Trang 7

Routing overview

• Routing is processes of finding themost efficient path

• Router with control plane and forwarding plane

– Maintain routing tables/ knowing of changes

– Datagram processing:

• Path determination:

– Choose the next hop basing on routing table – Metric bases onbandwidth, hop, delay, load, cost

• Packet switching:

– re-encapsulates – then switches the packet out that port

» switches the packets to the appropriate interface

-Some Routing Concepts (1/2)

¾Hierarchical routing in structure of ASs, Areas, networks

• Autonomous System: a collection of networks that falls

under the same administration domain

– Connecting ASs are boundary routers

• Areas:

– The main units in AS – Include in Networks and Sub-networks – Connecting between areas are border routers – Connecting between networks/ subnetworks in a area are internal routers

• Interior Gateway Protocol (IGP): is used for exchanges of

routing information by routers located within an

autonomous system

– Border routers run interior routing protocol with other

border routers

• Exterior Gateway Protocol (EGP): The Exterior Gateway

Protocol is used for exchanging routes between two

autonomous systems

– Boundary routers run exterior routing protocol with

other gateway routers

Some Routing Concepts (2/2) Intra-AS and Inter-AS routing

Host h2

a

b

b

C A

B

A.a A.c

C.b

B.a c b

Host h1

Intra-AS routing within AS A

Inter-AS routing between

A and B

Intra-AS routing within AS B

Internet: OSPF, IS-IS, RIP

Internet: BGP

Routing Fundamentals (1/2)

• Routing table contain of routing information

• A router learns paths (routes), from the static

configuration entered by an administrator or dynamically

from other routers, through routing protocols

• Routers keep a routing table in RAM

• A routing table is a list of the best known available

routes

• Routers use this table to make decisions about how to

forward a packet

Routing Fundamentals (2/2)

•Static routing – An administrator manually defines routes to one or more destination networks

•Static routing is notsuitable for large, complex networks that include redundant links, multiple protocols, and meshed topologies

•Dynamic routing – used in complex networks must adapt

to topology changes quicklyand select the best route from multiple candidates

Trang 8

Basic Dynamic Routing Methods

• Source-based:source gets a map of the network,

– source gives a list of routes to reach destination

– signals the route-setup (eg: ATM , Frame relay approach)

• Hop by Hop:routers determine e best next hop to a

destination

– Link statewith least-cost path calculated using global

knowledgeabout network

• Maps consistent => next-hops consistent

• OSPF; BGP

– Distance vector:least-cost path calculated in an

iterative, distributed manner

• begins with a cost of the directly attached links

• info exchange with the neighbouring nodes

• RIP; IGP

Approaches to Routing – Distance-vector

• Each node (router or host) exchange information with adjacent nodes(nodes directly connected to same network)

• Node maintains vector of link costs for each directly attachednetwork and distance and next-hop vectors for each destination

• Bellman Ford Algorithmused by Routing Information Protocol (RIP)

• Requires transmission of lots of information by each router

– Distance vector to all neighbors – Contains estimated path cost to all networks – Changes take long timeto propagate

Static Routing and Dynamic Routing

Routing Fundamentals

• Routing table contain of routing information

• A router learns paths, or routes, from the

static configuration entered by an administrator or dynamically from other routers, through routing protocols

• Routers keep a routing table in RAM A routing table is a list of the best known available routes Routers use this table to make decisions about how to forward a packet

_ Static routing is useful in networks that do not have

multiple paths to any destination network

_ Administrators often configure static routes on access routers that connect stub networks Stub networks have only one way in and one way out

_ Router(config)# ip route destination-prefix destination-prefix-mask {next address | interface}

[distance]

Trang 9

Static routing Static routing also is used by security reason

Static routing is notsuitable for large, complexnetworks

that include redundant links, multiple protocols, and

meshed topologies

Routers in complex networks must adapt to topology

changes quicklyand select the best route from multiple

candidates Therefore, dynamic routing is the better

choice

Dynamic routing

Routers use metrics to evaluate, or measure, routes.

• When multiple routes to the same network exist and

the routes are from the same routing protocol, the

route with the lowest metric is considered the best

• Each routing protocol calculates its metrics differently

Due to Routing protocol’s criteria, as: Bandwidth;

Delay; Load; Reliability; MTU…

Routing Protocol

•Routing protocols allow routers to choose the best pathfor

data from source to destination

•Functions includes the following:

–Provides processes forsharing route information

–Allows routers to communicate with other routersto update

and maintain the routing tables

Composite Routing metrics

• Bandwidth – The data capacity of a link

• Delay – The length of time required to

move a packet along each link from source to destination.

• Load – The amount of activity on a

network resource such as a router or a link

• Reliability – Usually a reference to the

error rate of each network link

Default Route

• Default routes are used when the router cannot match a destination

network with a specific entry in the routing table The router must use

the default route, or the gateway of last resort, to send the packet to

another router

• Using default routes keep routing tables small is a key scalability

feature They make it possible for routers to forward packets

destined to any Internet host without having to maintain a table entry

for every destination network

• Default routes can be statically entered by an Admin or dynamically

learned through a routing protocol.

Finding path Algorithms

Distance Vector & Link State

Trang 10

Routing vs Forwarding

‰Forwarding:select an output port based on destination

address and routing table

‰Data-plane function

‰Often implemented in hardware

‰Routing:process by which routing table is built and

maintained

‰so that the series of local forwarding decisions

takes the packet to the destination with high probability, and reachabilitycondition

‰the path chosen/resources consumed by the

packet is efficientin some sense (optimality and filteringcondition)

‰Control-plane function

‰Implemented in software

Interconnection Devices

Router

Extended LAN

=Broadcast domain

LAN=

Collision Domain

Network Datalink Physical

Transport

Router Bridge/Switch Repeater/Hub

Gateway Application

Network Datalink Physical

Transport Application

Routing problem

• Collect, process, and condense global state into local

forwarding information

• Global state

– inherently large

– dynamic

– hard to collect

• Hard issues:

– Consistency+ completeness (convergence time),

scalability (interior / exterior )

– Impact of resource needs of sessions

Consistency

• Defn: A series of independent local forwarding decisions must

lead to connectivity between any desired (source, destination) pair in the network

• If the states are inconsistent, the network is said not to have

“converged” to steady state (I.e is in a transient state) – Inconsistency leads to loops, wandering packets etc – In general a part of the routing information may be consistent while the rest may be inconsistent

– Large networks => inconsistency is a scalability issue

• Consistency can be achieved in two ways:

– Fully distributed approach:a consistency criterion or invariant across the states of adjacent nodes

– Signaled approach:the signaling protocol sets up local forwarding information along the path (SS7; RSVP…)

Completeness

Define: The network as a wholeand every nodehas

sufficient informationto be able to compute allpaths

– In general, with more information available locally,

routing algorithms tend to converge faster, because

the chances of inconsistency reduce

– But this means that more distributed state must be

collected at each node and processed

– The demand for completeness also limits the scalability

of the algorithm

• Since both consistency and completeness pose scalability

problems, large networks have to be structured

hierarchically and abstract entire networks as a single

node

Global & decentralized routing algorithms

1 Global routing algorithm

• least-cost path calculated using global knowledge about network

• input:connectivity between all nodes & link costs

• Link state algorithms

2 Decentralized routing algorithm

• least-cost path calculated in an iterative, distributed manner

• no node has complete info about the costs of all network links

• begins with a cost of the directly attached links

• info exchange with the neighbouring nodes

• Distance vector algorithms

Ngày đăng: 05/07/2014, 00:20

TỪ KHÓA LIÊN QUAN