The Routing & the IP networ k data link physical networ k data link physical networ k data link physical networ k data link physical networ k data link physical networ k data link physical networ k data link physical networ k data link physical applicat ion transpor t networ k data link physical The network layer moves transport layer segments from host to host in the network, to deliver them to their destination. This layer involves each and every host and router in the network. applicat ion transpor t networ k data link physical applicat ion transpor t networ k data link physical
57
Embed
The Routing & the IP network data link physical network data link physical network data link physical network data link physical network data link physical.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
The Routing &the IP
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
application
transportnetworkdata linkphysical
The network layer moves transport layer segments from host to host in the network, to deliver them to their destination. This layer involves each and every host and router in the network.
application
transportnetworkdata linkphysical
application
transportnetworkdata linkphysical
Network layer functions
transport packet from sending to receiving hosts
network layer protocols in every host, router
three important functions: path determination: route
taken by packets from source to destination - routing algorithms
switching: move packets from router’s input to appropriate router output
call setup: some network architectures require router call setup along path before data flows (connection oriented networks)
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
networkdata linkphysical
application
transportnetworkdata linkphysical
application
transportnetworkdata linkphysical
Datagram networks: the Internet model no call setup at network layer routers: do not maintain state for the end-to-end
connections no network-level concept of a “connection”
packets are typically routed using only destination host ID which is carried in the packet packets between same source-destination pair may take
different paths
application
transportnetworkdata linkphysical
application
transportnetworkdata linkphysical
1. Send data 2. Receive data
Routing
Graph abstraction for routing algorithms:
graph nodes are routers
graph edges are physical links link cost: delay,
distance, # of hops, rate structure or congestion level = $$
Other costs??
Goal: determine a “good” path
(sequence of routers) thru the network from the
source to the destination
Routing protocol
A
ED
CB
F
2
2
13
1
1
2
53
5
“good” path: typically means
minimum cost path other definitions also
possible
Hierarchical Routing
scale: with 55 million+ destination hosts:
can’t store all destinations in routing tables!
routing table exchange would swamp links!
administrative autonomy
internet = network of networks
each network admin may want to control routing in its own network
Our routing study thus far – an idealization
all routers are identical the network is “flat”
… not true in practice
Why?
Hierarchical Architecture of the Internet
Legend
router
border router
connection
host
LAN
intra domain network (AS)
inter AS network
Inter-AS level
Intra Domainlevel (AS)
LAN level
Hierarchical Routing
aggregate routers into regions, called “autonomous systems” (AS)
routers in same AS run same routing protocol “intra-AS” routing
protocol routers in different AS
can run different intra-AS routing protocol
special routers in AS run intra-AS routing
protocol with all other routers in AS
also responsible for routing to destinations outside AS run inter-AS routing
protocol with other gateway routers
gateway routers
Internet AS HierarchyInter-AS border (exterior gateway) routers
Intra-AS interior (gateway) routers
Internet inter-AS routing: BGP
BGP (Border Gateway Protocol): the de facto standard
Path Vector protocol: similar to Distance Vector protocol each Border Gateway broadcasts to
neighbors (peers) the entire path (I.e, sequence of ASs) to destination
Intra-AS and Inter-AS routing
Gateways:• perform inter-AS
routing amongst themselves
• perform intra-AS routers with other routers in their AS
inter-AS, intra-AS routing in
gateway A.c
network layer
data link layerphysical layer
a
b
b
aaC
A
Bd
A.a
A.c
C.bB.a
cb
c
Intra-AS and Inter-AS routing
Host h2
a
b
b
aaC
A
Bd c
A.a
A.c
C.bB.a
cb
Hosth1
Intra-AS routingwithin AS A
Inter-AS routingbetween A and B
Intra-AS routingwithin AS B
We’ll examine specific inter-AS and intra-AS Internet routing protocols shortly
IP Addressing: introduction IP address: 32-bit
identifier for host or router interface
interface: connection between host or router and the physical link routers typically
have multiple interfaces
hosts typically have only one
IP addresses are associated with the interface, not the host or the router
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2223.1.3.1
223.1.3.27
223.1.1.1 = 11011111 00000001 00000001 00000001
223 1 11
dotted-decimal notation:
IP Addressing IP address:
network part (high order bits)
host part (low order bits)
What’s a network ? (from the IP address perspective) device interfaces
with the same network part of their IP address
hosts can physically reach each other without an intervening router
223.1.1.1
223.1.1.2
223.1.1.3
223.1.1.4 223.1.2.9
223.1.2.2
223.1.2.1
223.1.3.2223.1.3.1
223.1.3.27
Example: network consisting of 3 IP networks (for IP addresses starting with 223, the first 24 bits are the network address – more later)
LAN
IP Addresses
1.0.0.0 to127.255.255.255
128.0.0.0 to191.255.255.255
192.0.0.0 to223.255.255.255
224.0.0.0 to239.255.255.255
32 bits
Given the notion of a “network”, let’s look closer at IP addresses:
“classful” addressing -
What is the address space size (number of hosts) for each class?
The SP is the optimal path, however, this is not obviously the geometrically shortest path
Other factor, which can be taken into account: Number of routers in the path delay cost Average traffic Reliability of the links in a certain path
Dijkstra’s algorithm
Dijkstra's algorithm, named after its inventor the Dutch computer scientist Edsger Dijkstra , solves a shortest path problem for a directed and connected graph G(V,E) which has nonnegative (>=0) edge weights
Dijkstra's algorithm is known to be a good algorithm to find a shortest path
The method…
Finds the shortest path between a source node and the rest
Finds routes between nodes by cost precedence
Assumes every cost is a positive number Supports directed or bidirectional
communication
Dijkstra’s algorithm
CA,D=1 CA,B=2
CA,C=5
D
A
B
C
M={A}
F E
G
Initialisation – Example network
Dijkstra’s algorithm
CA,D=1
CA,E=2
CA,B=2 CA,C=4
D
A
B
M={A,D}
C F
E G
Step 1Least cost new node: D
Node B C D E F G
Cost of the least cost path 2 5 1
Path A-B A-C A-D - - -
Node Expression Value Evaluation Resulted action
B CA,D+LD,B 1+= >2 No change
C CA,D+LD,C 1+3=4 4<5 New path
E CA,D+LD,E 1+1=2 2< New path
F CA,D+LD,F 1+= = No change
G CA,D+LD,G 1+= = No change
Dijkstra’s algorithm
CA,C=4
CA,D=1
CA,E=2
CA,B=2
D
A
B
M={A,B,D}
C
F E
G E
CA,C=3
CA,D=1
CA,E=2 CA,F=6
CA,B=2
D
A
B
M={A,B,D,E}
C
F
G
Step 2Node B C D E F G
Cost of the least cost path 2 4 1 2
Path A-B A-D-C A-D A-D-E - -
Node Expression Value Evaluation Resulted action
C CA,B+LB,C 2+4=6 6>4 No change
E CA,B+LB,E 2+= >2 No change
F CA,B+LB,F 2+= = No change
G CA,B+LB,G 2+= = No change
Dijkstra’s algorithm
Least cost new node (with smaller IP address) : B
CA,C=4
CA,D=1
CA,E=2
CA,B=2
D
A
B
M={A,B,D}
C
F E
G E
CA,C=3
CA,D=1
CA,E=2 CA,F=6
CA,B=2
D
A
B
M={A,B,D,E}
C
F
G
Step 3Node B C D E F G
Cost of the least cost path 2 4 1 2
Path A-B A-D-C A-D A-D-E - -
Node Expression Value Evaluation Resulted action
C CA,E+LE,C 2+1=3 3<4 New path
F CA,E+LE,F 2+4=6 6< New path
G CA,E+LE,G 2+= = No change
Dijkstra’s algorithm
Least cost new node: E
G E
CA,C=3
CA,D=1
CA,E=2 CA,F=4
CA,B=2
D
A
B
M={A,B,C,D,E,G}
C
F
E
CA,C=3 CA,D=1
CA,E=2 CA,F=4
CA,B=2
D
A
B
M={A,B,C,D,E}
C
F
G
Step 4Node B C D E F G
Cost of the least cost path 2 3 1 2 6
Path A-B A-D-E-C A-D A-D-E A-D-E-F -
Node Expression Value Evaluation Resulted action
F CA,C+LC,F 3+6=9 9>6 No change
G CA,C+LC,G 3+1=4 4< New path
Dijkstra’s algorithm
Least cost new node: C
Least cost new node: G
Node B C D E F G
Cost of the least cost path 2 3 1 2 6 4
Path A-B A-D-E-C A-D A-D-E A-D-E-F A-D-E-C-G
Step 5
G E
CA,C=3
CA,D=1
CA,E=2 CA,F=4
CA,B=2
D
A
B
M={A,B,C,D,E,G}
C
F
E
CA,C=3 CA,D=1
CA,E=2 CA,F=4
CA,B=2
D
A
B
M={A,B,C,D,E}
C
F
G
Node Expression Value Evaluation Resulted action
F CA,G+LF,G 4+1=5 5<6 New path
Dijkstra’s algorithm
G E
CA,C=3
CA,D=1
CA,E=2 CA,F=4
CA,B=2
D
A
B
M={A,B,C,D,E,F,G}
C
F
Step 6 (final result)Node B C D E F G
Cost of the least cost path
2 3 1 2 5 4
Path A-B A-D-E-C A-D A-D-E A-D-E-C-G-F A-D-E-C-G
Dijkstra’s algorithm
Second exampleStep 1
Dijkstra’s algorithm
Dijkstra’s algorithmSecond exampleStep 2
Dijkstra’s algorithmSecond exampleStep 3
Dijkstra’s algorithmSecond exampleStep 4
Dijkstra’s algorithmSecond exampleStep 5
Dijkstra’s algorithmSecond exampleStep 6
Dijkstra’s algorithmSecond exampleStep 7
Dijkstra’s algorithmSecond exampleStep 8
Dijkstra’s algorithmSecond exampleStep 9
Dijkstra’s algorithmSecond exampleStep 10
Dijkstra’s algorithmSecond exampleStep 11
Dijkstra’s algorithmSecond exampleStep 12
Differences between the forward and the backward search algorithms
Forward search (Dijkstra algorithm) It increases the scope of the search in each
step with including new node Backward search (Bellman-Ford
algorithm) It increases the scope of the search in each
step with including new hop
Comparison of the distance-vector and the link-state algorithms
Distance vector: Each router sends distance-vector, but to its neighbours The distance-vector contains the estimated distance to all
other nodes Older method Problem of the ”count-to-infinity” due to the fact, that the bad
news are distributed too slowly Link-state:
Each router sends link-state distance-vector to all others The link-state distance-vector contains the distance to the
neighbours, only The distance value to the neighbour (called link-state) is