0% found this document useful (0 votes)
11 views29 pages

Chapter - 4mk23 - BGPbroadmulti

The document discusses network layer concepts including network layer services, routing, and routing protocols. It describes hierarchical routing, how autonomous systems and inter-AS routing work. Specific routing protocols discussed include RIP, OSPF, and BGP.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views29 pages

Chapter - 4mk23 - BGPbroadmulti

The document discusses network layer concepts including network layer services, routing, and routing protocols. It describes hierarchical routing, how autonomous systems and inter-AS routing work. Specific routing protocols discussed include RIP, OSPF, and BGP.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Chapter 4: network layer

chapter goals:
❖ understand principles behind network layer
services:
▪ network layer service models
▪ forwarding versus routing
▪ how a router works
▪ routing (path selection)
▪ broadcast, multicast
❖ instantiation, implementation in the Internet

Network Layer 4-1


Hierarchical routing
our routing study thus far - idealization
❖ all routers identical
❖ network “flat”
… not true in practice

scale: with 600 million administrative autonomy


destinations: ❖ internet = network of
❖ can’t store all destinations networks
in routing tables! ❖ each network admin may
❖ routing table exchange want to control routing in
would swamp links! its own network

Network Layer 4-2


Hierarchical routing
❖ aggregate routers into gateway router:
regions, “autonomous ❖ At “edge” of its own AS
systems” (AS) ❖ has link to router in
❖ routers in same AS another AS
run same routing
protocol
▪ “intra-AS” routing
protocol
▪ routers in different AS
can run different intra-
AS routing protocol

Network Layer 4-3


Interconnected ASes

3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b AS1
1d ❖ forwarding table
configured by both intra-
and inter-AS routing
Intra-AS Inter-AS algorithm
Routing Routing
algorithm algorithm ▪ intra-AS sets entries
Forwarding
for internal dests
table ▪ inter-AS & intra-AS
sets entries for
external dests
Network Layer 4-4
Inter-AS tasks
❖ suppose router in AS1 AS1 must:
receives datagram 1. learn which dests are
destined outside of AS1: reachable through AS2,
▪ router should forward which through AS3
packet to gateway 2. propagate this
router, but which one? reachability info to all
routers in AS1
job of inter-AS routing!

3c
3a
3b
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d
Network Layer 4-5
Example: setting forwarding table in router 1d
❖ suppose AS1 learns (via inter-AS protocol) that subnet x
reachable via AS3 (gateway 1c), but not via AS2
▪ inter-AS protocol propagates reachability info to all internal
routers
❖ router 1d determines from intra-AS routing info that its
interface I is on the least cost path to 1c
▪ installs forwarding table entry (x,I)

3c
x
3a
3b
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d
Network Layer 4-6
Example: choosing among multiple ASes

❖ now suppose AS1 learns from inter-AS protocol that subnet


x is reachable from AS3 and from AS2.
❖ to configure forwarding table, router 1d must determine
which gateway it should forward packets towards for dest x
▪ this is also job of inter-AS routing protocol!

3c
x
3a
3b
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d
?
Network Layer 4-7
Example: choosing among multiple ASes
❖ now suppose AS1 learns from inter-AS protocol that subnet
x is reachable from AS3 and from AS2.
❖ to configure forwarding table, router 1d must determine
towards which gateway it should forward packets for dest x
▪ this is also job of inter-AS routing protocol!
❖ hot potato routing: send packet towards closest of two
routers.

use routing info determine from


learn from inter-AS hot potato routing: forwarding table the
from intra-AS
protocol that subnet choose the gateway interface I that leads
protocol to determine
x is reachable via that has the to least-cost gateway.
costs of least-cost
multiple gateways smallest least cost Enter (x,I) in
paths to each
of the gateways forwarding table

Network Layer 4-8


Chapter 4: outline
4.1 introduction 4.5 routing algorithms
4.2 virtual circuit and ▪ link state
datagram networks ▪ distance vector
4.3 what’s inside a router ▪ hierarchical routing
4.4 IP: Internet Protocol 4.6 routing in the Internet
▪ datagram format ▪ RIP
▪ IPv4 addressing ▪ OSPF
▪ ICMP ▪ BGP
▪ IPv6 4.7 broadcast and multicast
routing

Network Layer 4-9


Intra-AS Routing
❖ also known as interior gateway protocols (IGP)
❖ most common intra-AS routing protocols:
▪ RIP: Routing Information Protocol
▪ OSPF: Open Shortest Path First
▪ IGRP: Interior Gateway Routing Protocol
(Cisco proprietary)

Network Layer 4-10


RIP ( Routing Information Protocol)
❖ included in BSD-UNIX distribution in 1982
❖ distance vector algorithm
▪ distance metric: # hops (max = 15 hops), each link has cost 1
▪ DVs exchanged with neighbors every 30 sec in response message (aka
advertisement)
▪ each advertisement: list of up to 25 destination subnets (in IP addressing
sense)

from router A to destination subnets:


u v subnet hops
w u 1
A B
v 2
w 2
x x 3
z C D y 3
y z 2
Network Layer 4-11
RIP table processing
❖ RIP routing tables managed by application-level
process called route-d (daemon)
❖ Not used anymore.
❖ Distance vector protocols in use are, e.g.,
Enhanced Interior Gateway protocol (Cisco
routers)
http://www.cisco.com/c/en/us/support/docs/ip/enh
anced-interior-gateway-routing-protocol-
eigrp/13669-1.html

Network Layer 4-12


OSPF (Open Shortest Path First)
❖ “open”: publicly available
❖ uses link state algorithm
▪ LS packet dissemination
▪ topology map at each node
▪ route computation using Dijkstra’s algorithm
❖ OSPF advertisement carries one entry per neighbour
❖ advertisements flooded to entire AS
▪ carried in OSPF messages directly over IP (rather than
TCP or UDP

Network Layer 4-13


OSPF “advanced” features (not in RIP)
❖ security: all OSPF messages authenticated (to prevent
malicious intrusion)
❖ multiple same-cost paths allowed (only one path in
RIP)
❖ integrated uni- and multicast support:
▪ Multicast OSPF (MOSPF) uses same topology data
base as OSPF
❖ hierarchical OSPF in large domains.

Network Layer 4-14


Hierarchical OSPF
boundary router
backbone router

backbone
area
border
routers

area 3

internal
routers
area 1
area 2

Network Layer 4-15


Hierarchical OSPF
❖ two-level hierarchy: local area, backbone.
▪ link-state advertisements only in area
▪ each nodes has detailed area topology; only know
direction (shortest path) to nets in other areas.
❖ area border routers: “summarize” distances to nets in
own area, advertise to other Area Border routers.
❖ backbone routers: run OSPF routing limited to
backbone.
❖ boundary routers: connect to other AS’s.

Network Layer 4-16


Internet inter-AS routing: BGP
❖ BGP (Border Gateway Protocol): the de facto
inter-domain routing protocol
▪ “glue that holds the Internet together”
❖ BGP provides each AS a means to:
▪ eBGP: obtain subnet reachability information from
neighboring ASs.
▪ iBGP: propagate reachability information to all AS-
internal routers.
▪ Determine “good” routes to other networks based on
reachability information and policy.
❖ allows subnet to advertise its existence to rest of
Internet: “I am here”
Network Layer 4-17
BGP basics
❖ BGP session: two BGP routers (“peers”) exchange BGP
messages:
▪ advertising paths to different destination network prefixes (“path vector”
protocol)
▪ exchanged over semi-permanent TCP connections

❖ when AS3 advertises a prefix to AS1:


▪ AS3 promises it will forward datagrams towards that prefix
▪ AS3 can aggregate prefixes in its advertisement

3c
BGP
3a message
3b
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d
Network Layer 4-18
BGP basics: distributing path information
❖ using eBGP session between 3a and 1c, AS3 sends prefix
reachability info to AS1.
▪ 1c can then use iBGP to distribute new prefix info to all routers in
AS1
▪ 1b can then re-advertise new reachability info to AS2 over 1b-to-
2a eBGP session
❖ when router learns of new prefix, it creates entry for
prefix in its forwarding table.

eBGP session
3a iBGP session
3b
AS3 2c other
1c 2a networks
other 1a 2b
networks 1b AS2
AS1 1d
Network Layer 4-19
BGP routing policy
legend: provider
B network
X
W A
customer
C network:
Y

❖ A,B,C are provider networks


❖ X,W,Y are customer (of provider networks)
❖ X is dual-homed: attached to two networks
▪ X does not want to route from B via X to C
▪ .. so X will not advertise to B a route to C

Network Layer 4-20


BGP routing policy (2)
legend: provider
B network
X
W A
customer
C network:
Y

❖ A advertises path AW to B
❖ B advertises path BAW to X
❖ Should B advertise path BAW to C?
▪ No way! B gets no “revenue” for routing CBAW since neither W nor
C are B’s customers
▪ B wants to force C to route to w via A
▪ B wants to route only to/from its customers!

Network Layer 4-21


Why different Intra-, Inter-AS routing ?
policy:
❖ inter-AS: admin wants control over how its traffic
routed, who routes through its net.
❖ intra-AS: single admin, so no policy decisions needed
scale:
❖ hierarchical routing saves table size, reduced update
traffic
performance:
❖ intra-AS: can focus on performance
❖ inter-AS: policy may dominate over performance

Network Layer 4-22


Chapter 4: outline
4.1 introduction 4.5 routing algorithms
4.2 virtual circuit and ▪ link state
datagram networks ▪ distance vector
4.3 what’s inside a router ▪ hierarchical routing
4.4 IP: Internet Protocol 4.6 routing in the Internet
▪ datagram format ▪ RIP
▪ IPv4 addressing ▪ OSPF
▪ ICMP ▪ BGP
▪ IPv6 4.7 broadcast and multicast
routing

Network Layer 4-23


Broadcast and multicast routing
❖ Broadcast protocols are used in practice at both the
application and network layers.
▪ Gnutella (P2P architecture) uses application-level broadcast in
order to broadcast queries for content among Gnutella peers.
❖ Multicast; e.g.:
▪ transfer of a software upgrade to selection of users
▪ streaming continuous media (audio, video, and text of a live
lecture to a set of distributed lecture participants)
▪ shared data applications (a whiteboard or teleconferencing
application)
▪ data feeds (for example, stock quotes)
▪ interactive gaming (distributed interactive virtual environments or
multiplayer games)

Network Layer 4-24


Broadcast routing
❖ deliver packets from source to all other nodes
❖ source duplication is inefficient:
duplicate
duplicate R1 creation/transmission R1
duplicate
R2 R2

R3 R4 R3 R4

source in-network
duplication duplication

❖ source duplication: how does source determine


recipient addresses?
Network Layer 4-25
In-network duplication
❖ flooding: when node receives broadcast packet,
sends copy to all neighbors
▪ problems: cycles & broadcast storm
❖ controlled flooding: node only broadcasts pkt if it
hasn’t broadcast same packet before
▪ node keeps track of packet ids already broadcasted
▪ or reverse path forwarding (RPF): only forward packet
if it arrived on shortest path between node and source
❖ spanning tree:
▪ no redundant packets received by any node

Network Layer 4-26


Spanning tree
❖ first construct a spanning tree
❖ nodes then forward/make copies only along
spanning tree

A A

B B
c c

D D
F E F E

G G
(a) broadcast initiated at A (b) broadcast initiated at D

Network Layer 4-27


Spanning tree: creation
❖ center node
❖ each node sends unicast join message to center
node
▪ message forwarded until it arrives at a node already
belonging to spanning tree

A A
3
B B
c c
4
2
D D
F E F E
1 5
G G
(a) stepwise construction of (b) constructed spanning
spanning tree (center: E) tree
Network Layer 4-28
Spanning tree: creation
❖ Minimum spanning tree (Kruskall)
▪ Take smallest edge that doesn’t make a cycle
▪ Repeat until all nodes have ‘joined’

A A
3
B B
c c
4
2
D D
F E F E
1 5
G G

Network Layer 4-29

You might also like