We will give example by using Unix-style code:
route add [destination_ip] [gateway] [metric]
This is the usage for the route add command. The metric value indicates the number of hops to the destination.
# route add 128.39.203.2 128.39.202.3 1
This will tell A to use R as the gateway to reach D.
Similar for D to reach A:
# route add 128.39.202.1 128.39.203.10 1
Open Shortest Path First (OSPF) is a routing protocol developed for Internet Protocol (IP) networks by the Interior Gateway Protocol (IGP) working group of the Internet Engineering Task Force (IETF). The working group was formed in 1988 to design an IGP based on the Shortest Path First (SPF) algorithm for use in the Internet. Similar to the Interior Gateway Routing Protocol (IGRP), OSPF was created because in the mid-1980s, the Routing Information Protocol (RIP) was increasingly incapable of serving large, heterogeneous internetworks. This chapter examines the OSPF routing environment, underlying routing algorithm, and general protocol components. [51]
OSPF was derived from several research efforts, including Bolt, Beranek, and Newman's (BBN's) SPF algorithm developed in 1978 for the ARPANET (a landmark packet-switching network developed in the early 1970s by BBN), Dr. Radia Perlman's research on fault-tolerant broadcasting of routing information (1988), BBN's work on area routing (1986), and an early version of OSI's Intermediate System-to-Intermediate System (IS-IS) routing protocol. [51]
OSPF has two primary characteristics. The first is that the protocol is open, which means that its specification is in the public domain. The OSPF specification is published as Request For Comments (RFC) 1247. The second principal characteristic is that OSPF is based on the SPF algorithm, which sometimes is referred to as the Dijkstra algorithm, named for the person credited with its creation. [51]
This appendix contains a description by
Roger Clark Williams (Nordlink) on how label switched routers get in touch with
each other and exchange label information. In this example the routing
algorithm OSPF is used, but also other algorithms exist.
1) Routers on - OK
2) Routing protocol (OSPF for instance) retrieves routing updates, sends broadcasts, routing table populated - all normal routing actions
3) Assuming MPLS and LDP running, router and all neighbors broadcast hello packets (UDP port 646).
4) LDP sessions on TCP port 646 are established between LDP neighbors to negotiate label range and all other Type/Length/Value info.
5) Be careful here: Each router sends to the upstream neighbor a label the neighbor should use when trying to reach a destination known to label sending downstream router. Upstream means in the opposite direction from the data flow to the destination.
6) Upstream neighbor associates the label received with its own knowledge of the route to the destination. All the knowledge is in the LIB. LIB holds labels now for all possible routes to destination
7) Neighbor then runs shortest path first algorithm based on routing information (OSPF in this model) choosing the shortest path to destination.
8) Neighbor then installs in the LFIB only the label information for the shortest path next-hop router used to get to the destination network, then waits for incoming labeled traffic.
By 'label information' we mean the incoming upstream label, the related downstream label, along with the interface out which the newly labeled packet should be sent. Remember, this neighbor has exchanged information with its upstream neighbors as well, so has both incoming and outgoing label pairs for a given destination. And really we have to see the possibility of a bunch of destinations grouped under the same label, as they may all be one Forwarding Equivalency Class, or FEC.