Routing Basics
Routing Basics
Basics
Back to basics J
Application
Application Application
Presentation (HTTP, DNS, FTP) Data (HTTP, DNS, FTP)
Session
E2E connectivity (app-to-app)
Transport Transport Transport
Transport – P o rt n u m b e rs (s o c k e ts ) Header Data
(TCP/UDP) (TCP/UDP)
Device to device
Network Internet IP Transport Internet
– IP v 4 /IP v 6 a d d re s s Header Header Data
(IPv4/IPv6) (IPv4/IPv6)
2
Internet/Network Layer
• Current protocols
– IPv4 and IPv6
3
L3 Device/Router
• L3 device gets the packet one step closer
– The next hop to reach the destination!
• Router
– Exchanges network information
4
Best path lookup – Routing
Decision
5
Best path (route) lookup
GE 1/0
GE 0/0
R1 R2 GE 1/1
2001:db8::/32 0010000000000001:1101101110000000::
2001:db8:1::/48 0010000000000001:1101101110000000:0000000000000001::
6
Best path (route) lookup
GE 1/0
GE 0/0
R1 R2 GE 1/1
2001:db8:1::1 0010000000000001:1101101110000000:0000000000000001:0:0:0:0:0000000000000001
FFFF:FFFF:: 1111111111111111:1111111111111111:0000000000000000:0:0:0:0:0000000000000000
AND
(/32)
2001:db8:: 0010000000000001:1101101110000000::
7
Best path (route) lookup
GE 1/0
GE 0/0
R1 R2 GE 1/1
Match! ………………………
2001:db8:1::1 0010000000000001:1101101110000000:0000000000000001:0:0:0:0:0000000000000001
FFFF:FFFF:FFFF:: 1111111111111111:1111111111111111:1111111111111111:0:0:0:0:0000000000000000
AND
(/48)
2001:db8:1:: 0010000000000001:1101101110000000:0000000000000001::
8
Best path (route) lookup
GE 1/0
GE 0/0
R1 R2 GE 1/1
FFFF:FFFF:FFFF:: 1111111111111111:1111111111111111:1111111111111111:0:0:0:0:0000000000000000
AND
(/48)
2001:db8:1:: 0010000000000001:1101101110000000:0000000000000001::
9
Packet Forwarding
• If a best match is found, the router determines
– the correct exit interface to reach the next-hop/destination
NO
YES Forward out the
Remote exit interface to
Network?
the next-hop
NO
NO Is there a YES Forward out the
Drop the gateway of exit interface to
packet! last resort? the next-hop
10
Process vs Hardware Switching
• Incoming packet forwarded to the control plane
(CPU)
– routing table (RIB) lookup, frame re-write (next-hop MAC),
and forwarded to the exit interface
Control Plane
RIB
Data Plane
Incoming Packets Outgoing Packets
11
Process vs Hardware Switching
• Instead two hardware based tables
– FIB derived from the RIB- all destinations and next-hops
– Adjacency table from the ARP table- L2 header info for each
next-hop in the FIB
Control Plane
RIB
12
Internet Routing
• How does a user in VN access a service hosted in
the BT?
13
Internet Routing
VN BT
AS-X AS-N
Routing flow
Traffic flow
SG IN
AS-Y AS-M
14
Autonomous System (AS)
• A group of networks with the same routing policy
(external)
– Usually under single administrative control
AS-X
15
Routing Flow & Traffic Flow
• Traffic and network info always flow in opposite
direction!
AS X Packet Flow
16
Routing & Traffic Flow: Internet
VN BT
AS-1 Routing flow AS-7
Traffic flow
SG IN
AS-3 AS-5
17
Routing Policy
• To manipulate/control traffic flow in/out of a
network
18
Routing Protocols
• How do routers exchange network information with
each other?
– Routing Protocols!
– IGP & EGP
19
Interior Gateway Protocol
(IGP)
20
Exterior Gateway Protocol
(EGP - BGP)
21
Routing Protocols Hierarchy
Other ISPs
eBGP
iBGP &
OSPF/IS-IS
eBGP Static/eBGP
IX or direct Customers
Peers
22
How it all works
eBGP eBGP
AS X AS Y AS Z
23
24