TCP/IP Architecture (continued)
In a Nutshell - CIW Course Section 1, Part C, Chapter 4b
Introduction to Routing
Routing is a very important function of IP. The device that performs the task is a router, which forwards packets from one physical network to another.
The Internet Layer, or OSI network layer, performs the routing function. A packer, or datagram, contains sufficient information for routing from source host to the destination host. The routing function is not necessarily reliable. The application or transport layer is responsible for reliability, ensuring that the packet reaches the destination.
Routing Process
Routing involves two key elements:
- The host must know which router to use for a given destination; the router is determined by the default gateway. The default gateway is the IP address of the router on your local network.
- The router must know where to send the packet; the destination is determined by the router's routing information table.
Routing Information Tables
A routing information table is a database maintained by the router. The table contains the location of all networks in relation to the router's location. When a packet arrives at the router, the router examines the packet's destination network, then checks it's own routing information table. It determines the next router to send the packet, and forwards the packet to that router, which is considered a hop. Static routers contain routing information tables that must be updated manually, Dynamic routers communicate with other routers to calculate routes.
Routing Information Protocol (RIP)
The Routing Information Protocol (RIP) is commonly implemented on small to medium-sized LANs. RIP maintains only the best route to a destination. Old route information is replaced by new route information, causing network topology changes that are reflected in routing update messages. Routing update messages cause routers to update their tables and propagate the changes. Two versions of RIP are used: RIPv1 (RFC 1058) and RIPv2 (RFC 2453).
Open Shortest Path First (OSPF)
A disadvantage of RIP is that routes are selected on the basis of the closest path (fewest hops) between source and destination systems. No emphasis is placed on factors such as available bandwidth, multiple connection or security.
The Open Shortest Path First (OSPF) routing protocol is an interior gateway routing protocol that overcomes many of RIP's shortcomings. OSPFv2 (RFC 2328) has recently become and Internet standard protocol.
OSPF contains several practical features:
- Routing Table Updates - Updates take place when necessary, rather than at regular intervals.
- Various types of Service Routing - OSPF makes it possible to install multiple reoutes to a given destination.
- Load Balancing - If multiple routes exist to a destination and all routes cost the same, OSPF distributes traffic evenly over all routes.
- Network areas - OSPF provides the ability to partition a network into areas, allowing growth and organisation.
- Authenticated Exchanges - All exchanges between routers using the OSPF protocol are authenticated.
- Defined Route Support - OSPF allows the definition of host-specific or network-specific routes.
Port Numbers
When a packet arrives at a destination host using the IP address, the packet is passed to the transport layer. The transport layer determines which service the packet is using by examining the packet's destination port number.
TCO and UDP protocol headers contain both the source and destination port numbers. These port numbers are addresses by which processes can be identified. Each port number is a 16-bit integer value that identifies a communication channel to a specific process, For example:
- FTP = port 21
- HTTP = port 80
- DNS = port53
- SMTP = port 25
The standard port assignments are:
| Port Number Range | Description |
|---|---|
| 1 to 1023 | Well-known (reserved) port numbers |
| 1024 to 65535 | Registered port numbers |

