Lecture 04 -Routing and Routing Protocols
Direct Delivery
 Send a message to a machine in the LAN
Indirect Delivery
Indirect Delivery
 To send a packet from source to destination
 packet should go from router to router
 All routers should maintain a routing table
 IP packet is analyzed at the router and correct path is
selected form the routing table
 The packet is sent though that path
 Indirect delivery is done using the routing strategies
Routing Strategies
 There are four routing strategies
- Fixed Routing
- Flooding
- Random Routing
- Adaptive Routing
Fixed Routing
 Routing information is centrally maintained
 This is called a Directory (A central database)
 Advantage
- Updating new information is easy as need to change at one
location (central Database)
 Disadvantages
- Each and every IP packet should be analyzed
- Network traffic may increase at the central database because it
has to serve lots of requests from routers
- Dynamic changes are not possible
Flooding
 When an IP packet comes, the router will send it on all paths.
- retransmitted to neighbors
 Advantages
- Simple mechanism (IP packets are not analyzed at router)
- Most likely it will reach the destination (Highly reliable)
 Disadvantages
- Causes high network traffic
- Duplicate packets might reach the destination
- Wastes Network bandwidth
Random Routing
 When an IP packet comes to the router, it decides the
path randomly and sends the IP packet in that path
 Advantages
- Will not cause unnecessary network traffic
- Simple
 Disadvantage
- No guarantee that the IP packet will reach to the
destination
Adaptive Routing
 Each router maintains a routing table
 Also it can be changed according to the network changes
(Adaptive)
 Advantages
- Network traffic is minimized
- The best route will be selected most of the time
 Disadvantages
- Routers need to keep a routing table
- Process each IP packet
- Need to update routing tables automatically with the changes
in the network
Routing Methods used in Adaptive
Routing
 Next hop routing
 Host specific
 Network specific
 Default routing
Host Specific Routing
 Each router keeps a table entry for each host (one record for
one host)
 Table entry has Host IP and the Interface
Host Address Interface
A E0
B S0
C S1
Disadvantages
• Large number of records (if multiple paths are available number
of records increases)
•Table updating is difficult and complex as it should be done for
each and every host (if the host IP changes)
Network Specific Routing
 Each router keeps a table entry for each network (one record
for one network)
 Table entry has Network address and Interface
Advantages
• Number of records are limited (Table updates are not for each
host but for a network)
•Update is easy
Network Address Interface
A E0
B S0
C S1
Default Routing
 Another record in the routing table
 Indicates the route/path to be taken, if any of the records does not
match with the IP packet destination IP address
 Stub networks only use default routing , which means that they
have only one exit port out of the network
Routing Table update Methods
 Basically there are three methods to update routing
tables
- Connected
- Static
- Dynamic
Connected
 Once the router is connected to the network its interfaces
are given IP addresses
 With that router automatically identifies the network
addresses to which it connected
Static
 Administrator can manually give routing table
records
Dynamic
 Routing tables are updated automatically by using
routing rules ( protocols )
 Routing tables have
 Initially only ‘connected’ records
 Then add few ‘static’ records
 Then add dynamic updates
Routing Protocols
Features of routing protocols
 Network changes (addition or removal or fault) are
automatically updated in routing tables of all routers
 When there are many routes to a destination, the
best route should be selected
 Share the traffic through different routes
What Is a Routing Protocol?
 Routing Protocols
allow routers to
dynamically
advertise and
learn routes,
determine which
routes are
available and
which are the
most efficient
routes to a
destination
20
Network
Protocol
Destination
Network
Connected
RIP
IGRP
10.120.2.0
172.16.2.0
172.17.3.0
Exit
Interface
E0
S0
S1
Routing Protocol: RIP, IGRP,OSPF
172.17.3.0
172.16.1.010.120.2.0
E0
S0
Routing Protocols
Routing Protocols cont.
 An autonomous system (AS) is a collection of routers
under a common administration
ex : a company's internal network
 Interior Gateway Protocols (IGP) are used for
intra-autonomous system routing
(routing inside an autonomous system)
 Exterior Gateway Protocols (EGP) are used for
inter-autonomous system routing
(routing between autonomous systems)
Routing Protocols cont.
Distance Vector Routing Protocols
 Routes are advertised as vectors of distance and direction
 Distance is defined in terms of a metric such as hop count and
direction is simply the next-hop router or exit interface
 Send periodic updates of their routing information
 Use the Bellman-Ford algorithm for best path selection
 Work best in situations where:
- Network is simple
- Administrators do not have enough knowledge to configure
Ex : RIP, IGRP, EIGRP
Link State Routing Protocols
 link-state routing protocol send information about the state of
its links to other routers in the routing domain
 The state of those links includes information about the type of
network and any neighboring routers on those networks
 A link-state update only sent when there is a change in the
topology
 Use the Dijkstra algorithm for best path/ route selection
 Work best in situations where:
- Network design is complex (large networks)
- Administrators have a good knowledge of network
Ex : OSPF, IS-IS
Routing Algorithms
Bellman-Ford Algorithm
 Used by distance vector routing protocols
Dijkstras Algorithm
 Used by link state routing protocols

Lecture 04 networking

  • 1.
    Lecture 04 -Routingand Routing Protocols
  • 2.
    Direct Delivery  Senda message to a machine in the LAN
  • 3.
  • 4.
    Indirect Delivery  Tosend a packet from source to destination  packet should go from router to router  All routers should maintain a routing table  IP packet is analyzed at the router and correct path is selected form the routing table  The packet is sent though that path  Indirect delivery is done using the routing strategies
  • 5.
    Routing Strategies  Thereare four routing strategies - Fixed Routing - Flooding - Random Routing - Adaptive Routing
  • 6.
    Fixed Routing  Routinginformation is centrally maintained  This is called a Directory (A central database)  Advantage - Updating new information is easy as need to change at one location (central Database)  Disadvantages - Each and every IP packet should be analyzed - Network traffic may increase at the central database because it has to serve lots of requests from routers - Dynamic changes are not possible
  • 7.
    Flooding  When anIP packet comes, the router will send it on all paths. - retransmitted to neighbors  Advantages - Simple mechanism (IP packets are not analyzed at router) - Most likely it will reach the destination (Highly reliable)  Disadvantages - Causes high network traffic - Duplicate packets might reach the destination - Wastes Network bandwidth
  • 8.
    Random Routing  Whenan IP packet comes to the router, it decides the path randomly and sends the IP packet in that path  Advantages - Will not cause unnecessary network traffic - Simple  Disadvantage - No guarantee that the IP packet will reach to the destination
  • 9.
    Adaptive Routing  Eachrouter maintains a routing table  Also it can be changed according to the network changes (Adaptive)  Advantages - Network traffic is minimized - The best route will be selected most of the time  Disadvantages - Routers need to keep a routing table - Process each IP packet - Need to update routing tables automatically with the changes in the network
  • 10.
    Routing Methods usedin Adaptive Routing  Next hop routing  Host specific  Network specific  Default routing
  • 11.
    Host Specific Routing Each router keeps a table entry for each host (one record for one host)  Table entry has Host IP and the Interface Host Address Interface A E0 B S0 C S1 Disadvantages • Large number of records (if multiple paths are available number of records increases) •Table updating is difficult and complex as it should be done for each and every host (if the host IP changes)
  • 12.
    Network Specific Routing Each router keeps a table entry for each network (one record for one network)  Table entry has Network address and Interface Advantages • Number of records are limited (Table updates are not for each host but for a network) •Update is easy Network Address Interface A E0 B S0 C S1
  • 13.
    Default Routing  Anotherrecord in the routing table  Indicates the route/path to be taken, if any of the records does not match with the IP packet destination IP address  Stub networks only use default routing , which means that they have only one exit port out of the network
  • 14.
    Routing Table updateMethods  Basically there are three methods to update routing tables - Connected - Static - Dynamic
  • 15.
    Connected  Once therouter is connected to the network its interfaces are given IP addresses  With that router automatically identifies the network addresses to which it connected
  • 16.
    Static  Administrator canmanually give routing table records
  • 17.
    Dynamic  Routing tablesare updated automatically by using routing rules ( protocols )  Routing tables have  Initially only ‘connected’ records  Then add few ‘static’ records  Then add dynamic updates
  • 18.
  • 19.
    Features of routingprotocols  Network changes (addition or removal or fault) are automatically updated in routing tables of all routers  When there are many routes to a destination, the best route should be selected  Share the traffic through different routes
  • 20.
    What Is aRouting Protocol?  Routing Protocols allow routers to dynamically advertise and learn routes, determine which routes are available and which are the most efficient routes to a destination 20 Network Protocol Destination Network Connected RIP IGRP 10.120.2.0 172.16.2.0 172.17.3.0 Exit Interface E0 S0 S1 Routing Protocol: RIP, IGRP,OSPF 172.17.3.0 172.16.1.010.120.2.0 E0 S0
  • 21.
  • 22.
    Routing Protocols cont. An autonomous system (AS) is a collection of routers under a common administration ex : a company's internal network  Interior Gateway Protocols (IGP) are used for intra-autonomous system routing (routing inside an autonomous system)  Exterior Gateway Protocols (EGP) are used for inter-autonomous system routing (routing between autonomous systems)
  • 23.
  • 24.
    Distance Vector RoutingProtocols  Routes are advertised as vectors of distance and direction  Distance is defined in terms of a metric such as hop count and direction is simply the next-hop router or exit interface  Send periodic updates of their routing information  Use the Bellman-Ford algorithm for best path selection  Work best in situations where: - Network is simple - Administrators do not have enough knowledge to configure Ex : RIP, IGRP, EIGRP
  • 25.
    Link State RoutingProtocols  link-state routing protocol send information about the state of its links to other routers in the routing domain  The state of those links includes information about the type of network and any neighboring routers on those networks  A link-state update only sent when there is a change in the topology  Use the Dijkstra algorithm for best path/ route selection  Work best in situations where: - Network design is complex (large networks) - Administrators have a good knowledge of network Ex : OSPF, IS-IS
  • 26.
    Routing Algorithms Bellman-Ford Algorithm Used by distance vector routing protocols Dijkstras Algorithm  Used by link state routing protocols