Carregar apresentação
A apresentação está carregando. Por favor, espere
1
Prof. José Marcos Silva Nogueira
Roteamento Algoritmos Vetor de distâncias Estado de enlaces Escalabilidade Internet global Sub-redes Roteamento interdomínios Curso de Redes de Computadores, 2004 DCC - ICEx - UFMG Prof. José Marcos Silva Nogueira Redes de Computadores – DCC UFMG
2
Overview Forwarding vs Routing
forwarding: to select an output port based on destination address and routing table routing: process by which routing table is built Redes de Computadores – DCC UFMG
3
Overview Network as a Graph Problem: Factors
Find lowest cost path between two nodes Factors static: topology dynamic: load Redes de Computadores – DCC UFMG
4
Distance Vector Each node maintains a set of triples
(Destination, Cost, NextHop) Exchange updates w/ directly connected neighbors periodically (on the order of several seconds) whenever table changes (called triggered update) Each update is a list of pairs: (Destination, Cost) Update local table if receive a “better” route smaller cost came from next-hop Refresh existing routes; delete if they time out Redes de Computadores – DCC UFMG
5
Example Redes de Computadores – DCC UFMG
6
Example – Initial distances (global view)
Information at each node A B C D E F G 1 Redes de Computadores – DCC UFMG
7
Example – initial routing table at node B
Destination Cost NextHop A A C C D C E A F A G A Redes de Computadores – DCC UFMG
8
Example – Final distances (global view)
Information at each node A B C D E F G 1 2 3 Redes de Computadores – DCC UFMG
9
Example – final routing table at node A
Destination Cost NextHop B B C C D C E E F F G F Redes de Computadores – DCC UFMG
10
Routing Loops Example 1 – Fail of a link
F detects that link to G has failed F sets distance to G to infinity and sends update to A A sets distance to G to infinity since it uses F to reach G A receives periodic update from C with 2-hop path to G A sets distance to G to 3 and sends update to F F decides it can reach G in 4 hops via A Redes de Computadores – DCC UFMG
11
Routing Loops Example 2 – Stabilization problem link from A to E fails
A advertises distance of infinity to E B and C advertise a distance of 2 to E B decides it can reach E in 3 hops; advertises this to A A decides it can read E in 4 hops; advertises this to C C decides that it can reach E in 5 hops… Count to infinite problem Redes de Computadores – DCC UFMG
12
Loop-Breaking Heuristics Partial solutions to the problem
Set infinity to 16 At least stop the process ... Split horizon When a node sends a routing update to its neighbors, it does not send the routes it learned from each neighbor back to that neighbor Split horizon with poison reverse Redes de Computadores – DCC UFMG
13
Distance Vector - RIP RIP – Routing Information Protocol
Muito usado nas redes IP Distribuído junto com o Unix BSD Muito simples Anuncia custos de se chegar a outras redes, ao invés de outros roteadores Anúncio a cada 30 segundos Métrica: cada enlace custa 1 Suporta multiplas famílias de endereços Redes de Computadores – DCC UFMG
14
Link State Routing Second major class of intradomain routing protocol
Strategy Send to all nodes (not just neighbors) information about directly connected links (not entire routing table) Provide each node enough information to enable it to find the least-cost path to any destination Basic mechanisms Reliable dissemination of link state information Calculation of routes from the sum of all the accumulated link-state knowledge Redes de Computadores – DCC UFMG
15
Link State Routing Link State Packet (LSP)
id of the node that created the LSP cost of link to each directly connected neighbor sequence number (SEQNO) time-to-live (TTL) for this packet Redes de Computadores – DCC UFMG
16
Link State (cont) Reliable flooding
store most recent LSP from each node forward LSP to all nodes but one that sent it generate new LSP periodically increment SEQNO start SEQNO at 0 when reboot decrement TTL of each stored LSP discard when TTL=0 Redes de Computadores – DCC UFMG
17
Building Link State Packets
(a) A subnet (b) The link state packets for this subnet. Redes de Computadores – DCC UFMG
18
Distributing the Link State Packets
The packet buffer for router B in the previous slide (Fig ). Redes de Computadores – DCC UFMG
19
Route Calculation Dijkstra’s shortest path algorithm Let
N denotes set of nodes in the graph l (i, j) denotes non-negative cost (weight) for edge (i, j) s denotes this node M denotes the set of nodes incorporated so far C(n) denotes cost of the path from s to node n Redes de Computadores – DCC UFMG
20
Route Calculation for each n in N - {s} C(n) = l(s, n) while (N != M)
M = {s} for each n in N - {s} C(n) = l(s, n) while (N != M) M = M union {w} such that C(w) is the minimum for all w in (N - M) for each n in (N - M) C(n) = MIN(C(n), C (w) + l(w, n )) Redes de Computadores – DCC UFMG
21
A subnet in which the East and West parts are connected by two lines.
Measuring Line Cost A subnet in which the East and West parts are connected by two lines. Redes de Computadores – DCC UFMG
22
Metrics Original ARPANET metric
measures number of packets enqueued on each link took neither latency or bandwidth into consideration Redes de Computadores – DCC UFMG
23
Metrics New ARPANET metric Fine Tuning
stamp each incoming packet with its arrival time (AT) record departure time (DT) when link-level ACK arrives, compute Delay = (DT - AT) + Transmit + Latency if timeout, reset DT to departure time for retransmission link cost = average delay over some time period Fine Tuning compressed dynamic range replaced Delay with link utilization Redes de Computadores – DCC UFMG
24
Global Internet Com os esquemas vistos até agora, da hierarquia simples do endereço IP, o roteamento em uma internet tem “alguma” escalabilidade Não é necessário saber de todos os nodos conectados É necessário saber de todas as redes conectadas Na Internet de hoje, são centenas de milhares de redes conectadas Redes de Computadores – DCC UFMG
25
Global Internet Passado Recente Topologia da rede em 1990
Sites de usuários finais Provedores de rede – atuação regional Backbone nacional – nos USA, NFSNET Redes construídas a partir de enlaces ponto-a-ponto (DS-1, OC-3, etc) Redes dos usuários: coleção de redes ligadas por roteadores e pontes Redes de Computadores – DCC UFMG
26
Global Internet Recent Past – by 90`s … P
NSFNET backbone Stanford BARRNET regional Berkeley P ARC NCAR UA UNM Westnet UNL KU ISU MidNet … Redes de Computadores – DCC UFMG
27
Global Internet Recent Past – by 90`s
Cada rede de usuário ou provedor adequada para uma administração independente Diferentes maneiras de fazer roteamento interno Possivelmente diferentes métricas Redes conhecidas como Sistemas Autônomos AS – Autonomous System Redes de Computadores – DCC UFMG
28
Collection of Subnetworks
The Internet is an interconnected collection of many networks. Redes de Computadores – DCC UFMG
29
Global Internet Dois problemas de escala Escalabilidade do roteamento
É necessário encontrar maneiras de reduzir o número de redes consideradas no roteamento É necessário reduzir as tabelas dos roteadores Utilização de endereços Garantir que os endereços disponíveis não se esgotem rapidamente Redes de Computadores – DCC UFMG
30
Global Internet Soluções a vista Sub-redes Roteamento sem classes
Novo protocolo IP Redes de Computadores – DCC UFMG
31
Global Internet Sub-redes Roteamento sem classes
Utilização do espaço de endereçamento Roteamento sem classes Utilização de endereços e escalabilidade de roteamento Roteamento interdomínio e intradomínio Novo protocolo IP Redes de Computadores – DCC UFMG
32
Internet Structure Today Backbone service provider Peering point
Large corporation Small corporation “ Consumer ” ISP Redes de Computadores – DCC UFMG
33
Subnetting Flat versus Hierarchical Addresses
Inefficient use of Hierarchical Address Space class C with 2 hosts (2/255 = 0.78% efficient) class B with 256 hosts (256/65535 = 0.39% efficient) Still Too Many Networks routing tables do not scale route propagation protocols do not scale Redes de Computadores – DCC UFMG
34
A campus network consisting of LANs for various departments.
Subnets A campus network consisting of LANs for various departments. Redes de Computadores – DCC UFMG
35
Subnetting Add another level to address/routing hierarchy: subnet
Subnet masks define variable partition of host part Subnets visible only within site Network number Host number Redes de Computadores – DCC UFMG
36
A class B network subnetted into 64 subnets.
Redes de Computadores – DCC UFMG
37
Subnetting Network number Host number Class B address
Subnet mask ( ) Subnetted address Host ID Subnet ID Redes de Computadores – DCC UFMG
38
Subnet Example Subnet mask: 255.255.255.128 Subnet number: 128.96.34.0
H1 R1 Subnet number: R2 H2 Subnet mask: Subnet number: H3 Redes de Computadores – DCC UFMG
39
Subnet Example Forwarding table at router R1
Subnet mask: Subnet number: H1 R1 Subnet number: R2 H2 Subnet mask: Subnet number: H3 Forwarding table at router R1 Subnet Number Subnet Mask Next Hop interface 0 interface 1 R2 Redes de Computadores – DCC UFMG
40
Forwarding Algorithm D = destination IP address
for each entry (SubnetNum, SubnetMask, NextHop) D1 = SubnetMask & D if D1 = SubnetNum if NextHop is an interface deliver datagram directly to D else deliver datagram to NextHop Redes de Computadores – DCC UFMG
41
Forwarding Algorithm Use a default router if nothing matches
Not necessary for all 1s in subnet mask to be contiguous Can put multiple subnets on one physical network Subnets not visible from the rest of the Internet Redes de Computadores – DCC UFMG
42
Supernetting – Classless Routing
Two problems: Growth of backbone routing tables Potencial exhaustion of IP 32 bits address space A solution: Route aggregation Assign block of contiguous network numbers to nearby networks CIDR: Classless Inter-Domain Routing Redes de Computadores – DCC UFMG
43
Supernetting – Classless Routing
Represent blocks with a single pair (first_network_address, count) Restrict block sizes to powers of 2 Use a bit mask (CIDR mask) to identify block size All routers must understand CIDR addressing Redes de Computadores – DCC UFMG
44
Supernetting – Classless Routing
Example AS with 16 class C network numbers Handling contiguous class C addresses through (16 nets) Top 20 bits: We have created a 20 bits network number Something between class C and B High address eficiency Single network prefix to put in routing tables Redes de Computadores – DCC UFMG
45
CIDR – Classless InterDomain Routing
A set of IP address assignments. Redes de Computadores – DCC UFMG
46
Route agreggation Corporation X (11000000000001000001
Regional Network Border router advertises path to Corporation Y ( ) Redes de Computadores – DCC UFMG
47
Supernetting – IP Forwarding
CIDR implica que prefixos podem ser de qualquer tamanho (de 2 a 32 bits) É possível ter prefixos que se sobrepõem: Endereços podem “casar” com mais de um prefixo Ex: (16 bits) e (24 bits) na tabela de um único roteador Um pacote para “casa” com ambos Regra do casamento mais longo. Vale o prefixo mais longo para definir o casamento Redes de Computadores – DCC UFMG
48
Roteamento Interdomínios
A Internet é organizada em sistemas autônomos - AS Cada um sob o controle de uma única entidade administrativa Uma rede complexa de uma corporação pode constituir um único AS Uma rede de um provedor de serviços internet também Redes de Computadores – DCC UFMG
49
Autonomous Systems R1 R3 R2 R4 R5 R6 Autonomous system 1
Redes de Computadores – DCC UFMG
50
Agregação de informação
A idéia básica por trás dos sistemas autônomos é prover uma forma adicional de agregar hierarquicamente informação de roteamento em uma internet grande Melhora a escalabilidade Sistema Autônomo (AS) Corresponde a um domínio administrativo Ex: Universidade, empresa, rede backbone Cada um tem um número atribuído de 16-bit Redes de Computadores – DCC UFMG
51
Route Propagation Know a smarter router
hosts know local router local routers know site routers site routers know core router core routers know everything Two-level route propagation hierarchy interior gateway protocol (each AS selects its own) exterior gateway protocol (Internet-wide standard) Redes de Computadores – DCC UFMG
52
Popular Interior Gateway Protocols
RIP: Route Information Protocol developed for XNS distributed with Unix distance-vector algorithm based on hop-count Redes de Computadores – DCC UFMG
53
Popular Interior Gateway Protocols
OSPF: Open Shortest Path First recent Internet standard uses link-state algorithm supports load balancing supports authentication Redes de Computadores – DCC UFMG
54
OSPF – Interior Gateway Routing Protocol
(a) An autonomous system. (b) A graph representation of (a). Redes de Computadores – DCC UFMG
55
The five types of OSPF messages.
5-66 Redes de Computadores – DCC UFMG
56
EGP: Exterior Gateway Protocol
Overview designed for tree-structured Internet concerned with reachability, not optimal routes Protocol messages neighbor acquisition: one router requests that another be its peer; peers exchange reachability information neighbor reachability: one router periodically tests if the another is still reachable; exchange HELLO/ACK messages; uses a k-out-of-n rule routing updates: peers periodically exchange their routing tables (distance-vector) Redes de Computadores – DCC UFMG
57
BGP-4: Border Gateway Protocol
AS Types stub AS has a single connection to one other AS carries local traffic only multihomed AS: has connections to more than one AS refuses to carry transit traffic transit AS: carries both transit and local traffic Redes de Computadores – DCC UFMG
58
Internet structure today
Backbone service provider Peering point Large corporation Small corporation “ Consumer ” ISP Redes de Computadores – DCC UFMG
59
BGP-4: Border Gateway Protocol
Each AS has: one or more border routers one BGP speaker that advertises: local networks other reachable networks (transit AS only) gives path information Redes de Computadores – DCC UFMG
60
BGP Example Speaker for AS2 advertises reachability to P and Q
Backbone network (AS 1) Regional provider A (AS 2) Regional provider B (AS 3) Customer P (AS 4) Customer Q (AS 5) Customer R (AS 6) Customer S (AS 7) 128.96 Speaker for AS2 advertises reachability to P and Q network , , , and , can be reached directly from AS2 Redes de Computadores – DCC UFMG
61
BGP Example Speaker for backbone advertises
Backbone network (AS 1) Regional provider A (AS 2) Regional provider B (AS 3) Customer P (AS 4) Customer Q (AS 5) Customer R (AS 6) Customer S (AS 7) 128.96 Speaker for backbone advertises networks , , , and can be reached along the path (AS1, AS2) Speaker can cancel previously advertised paths Redes de Computadores – DCC UFMG
62
The relation between ASes, backbones, and areas in OSPF.
Redes de Computadores – DCC UFMG
63
NAT Network Address Translation
Placement and operation of a NAT box. Redes de Computadores – DCC UFMG
Apresentações semelhantes
© 2024 SlidePlayer.com.br Inc.
All rights reserved.