routers and networking

12
1 Ch.7 - Routers and Networking 1 Router development 2 IP addresses 3 Subnet mask 4 Routing decision 5 Routing table 6 Routing protocols 7 Example - RIP 8 Redundancy 9 Dynamic update

Upload: hoangkhue

Post on 08-Dec-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Routers and Networking

1

Ch.7 - Routers and Networking

1 Router development

2 IP addresses

3 Subnet mask

4 Routing decision

5 Routing table

6 Routing protocols

7 Example - RIP

8 Redundancy

9 Dynamic update

Page 2: Routers and Networking

Ch.7 - Routers and Networking

2

IP networks are packet-switched networks, which means that the packets can take differentroutes between a source and a destination host. The routing functions are performed by arouter, which is a computer with a single task: to transfer data packets between differentphysical networks. The whole Internet consists of a number of networks connected to eachother via routers.

The first routers appeared in the middle of the 80´s. At that time the router function wasperformed by UNIX workstations. The UNIX workstations had two or more networkinterface cards and router software installed. Companies such as Cisco, Wellfleet andProteon were born and developed router technology.

Later the router became a dedicated device with a single function of routing packets.

In the mid 90’s almost all networks were router based, and new routing techniques thatsupported higher bandwidths were developed.

Today, new applications such as multimedia demand smaller delays from routers. To satisfythis demand, new types of fast routing technologies, called level 3 switching, are beingdeveloped.

Page 3: Routers and Networking

Ch.7 - Routers and Networking

3

The addresses used by the IP protocol are 32-bit numbers. Every host and physical networkmust be assigned a unique 32-bit address number. If you are running a local TCP/IP networkthat does not have connections with other public networks such as the Internet, you mayassign these numbers according to your personal preferences. However, for sites on theInternet, numbers are assigned by a central authority, such as INTERNIC in the USA or bythe local service providers.

IP addresses are split up into four 8-bit numbers called octets. For example, 193.12.15.1.This format is often referred to as the dotted quad notation. Since every octet consists of 8bits, the maximum decimal number for an octet is 255.

A company usually gets a number of consecutive IP-numbers from an Internet ServiceProvider. Those numbers must be used for the network itself, for the connected routers andhosts.

Quad notation is useful because IP addresses are split into a network number and localnumbers. The network number is contained in the leading octets, while the local numbers arecontained in the remainder.

In the picture for example you can see two different networks. The first networks isidentified by the IP-number 193.12.15.0 and the other network is identified by the IP-number 10.5.17.0. On every network there are two hosts. Observe that the first three octetsin the IP-numbers are the same as in the IP-number of the networks.The router that connectsthe two networks has two interfaces with IP-numbers that belong to each respectivenetwork.

Page 4: Routers and Networking

Ch.7 - Routers and Networking

4

The number of IP addresses assigned depends on the size of your network. To accommodatedifferent needs, there are several classes of IP addresses. Those classes are called A, B , C orD.

There are 128 class A networks. You can have up to 16 million different hosts in every classA network. As you can very well understand, there are very few owners that have class Anetworks. Some owners are IBM, Japan and General Electric. If the first octet in an IP-address has a number from 0 to 127 it is a class A network.

There are about 16 000 class B networks. You can have up to 65 000 different hosts in everyclass B network. Some owners of class B networks are big companies. For instance, Ericssonhas several class B networks. You can recognise a B network from its first octet. It has avalue from 128 to 191.

There are about 2 million class C networks. You can have up to 255 different hosts in everyclass C network. Smaller companies are typical owners of class C networks. You canrecognise a C network from its first octet. It has a value from 192 to 223.

D networks are used for a special purpose called multicasting. Multicasting is a data trafficthat is sent to a group of destinations, for example videoconferences and radio broadcastsover the Internet. You can recognise a multicast address from its first octet. It has a valuefrom 224 to 239.

Page 5: Routers and Networking

Ch.7 - Routers and Networking

5

The subnet mask is used to tell what part of the IP address is used for the network andwhich for local addresses. The subnet mask assigns a binary 1 for the bits that belong to thenetwork part while it assigns a binary 0 for the bits that belong to the local address part.

In the picture you can see the default subnet masks for the A, B and C classes.

The bits that belong to the network part are locked, while the bits that belong the localaddresses can be changed by the owner. This is used if the owner wants to divide hisnetwork into several different subnets.

Page 6: Routers and Networking

Ch.7 - Routers and Networking

6

The router algorithm includes four different steps.

1. The first question is if the destination host is on a network that is directly connected tothe router. If the answer to this question is yes the router makes a direct delivery to thedestination host.

2. Otherwise the next question is if the destination host is to be found in the routing table. Ifthe answer is yes, then the router sends the packets to a router that is closer to thedestination host.

3. Otherwise the router looks to see if the network, to which the destination host isconnected, is to be found in the routing table. If the answer is yes, then the router sends thepackets to a router that is closer to the destination host.

4. The last chance for the router is to use a default router to send the packet to. Now it is upto the default router to find the destination host. The default router is sometimes also calledthe default gateway.

Page 7: Routers and Networking

Ch.7 - Routers and Networking

7

How does the router choose where to send the packets?

The router keeps the routing information in a table. This information tells the router how toreach remote networks and hosts. A catch-all entry, also called the default router mustgenerally be supplied. All packets to an unknown network or host are sent to the defaultrouter.

In the picture you see a router with its specific routing table. If the packets are to bedelivered to the host with IP-number 192.1.5.10, the router sees that the destination hostbelongs to the network 192.1.5.0. The routing table says that this network can be reached viathe router 192.1.8.2.

Page 8: Routers and Networking

Ch.7 - Routers and Networking

8

Routing protocols are used so that the routers in a network can learn things from otherrouters automatically.

If you have a Point-to-Point network with no alternative routes, then there is no need forrouting protocols. In this case routing protocols just give you a lot of ”overhead” traffic inyour network. But if you have many different routes then there is good reason to use routingprotocols.

For example, if one link goes down, the routing protocol can teach other routers in thenetwork a new way to the destination.

There are two groups of routing protocols:

The first group is called Interior Gateway Protocol, IGP which is used inside a localnetwork. This network is also called an autonomous system or AS.

Three examples of IGP protocols are:

1. RIP, which stands for Routing Information Protocol.

2. IGRP, which stands for Interior Gateway Routing Protocol and EIGRP, which stands forEnhanced Interior Gateway Routing Protocol and they are two Cisco specific protocols.

3. OSPF, which stands for Open Shortest Path First.

Page 9: Routers and Networking

Ch.7 - Routers and Networking

9

RIP and OSPF are implemented by every vendor and are commonly used in mixedenvironments.

The 2nd group of protocols is called Exterior Gateway Protocols, EGP, and is used betweenautonomous systems. EGP, is normally used by the Internet service providers.

Two examples of EGP routing protocols are:

1. BGP, which stands for Border Gateway Protocol.

2. GGP, which stands for Gateway to Gateway protocol. This protocol is history and is notused today.

Page 10: Routers and Networking

Ch.7 - Routers and Networking

10

Routing Information Protocol, or RIP, is implemented by all vendors of routing equipment.RIP is a quite simple routing protocol.

It only takes into consideration the number of routers you need to pass in order to reach thedestination host. This is called the cost to reach the destination host. The RIP does not takeinto account the quality or bandwidths of the connected links.

RIP broadcasts its routing table every 30 seconds in order to share with other routers. Thisgives a lot of overhead traffic on the network.

This picture shows three routers using RIP. The router B, for example was originallyconfigured with the information about the directly connected networks. The rest of theinformation in the routing table has been learned from the other routers in the network.

Page 11: Routers and Networking

Ch.7 - Routers and Networking

11

Redundancy means having more than one possible path to reach the destination host.

In the picture you can see that there are two alternative ways between the host A and host Bwhich gives us redundancy. On the Internet for example, there are many alternative ways toreach a host or a network, which means that Internet has a lot of redundancy.

Page 12: Routers and Networking

Ch.7 - Routers and Networking

12

To use all the benefits of a secure and redundant network structure a routing protocol isneeded. The routing protocol must be used so that the routers can exchange informationcontinuously about the status of the links between the different routers. This means that therouter information is dynamically updated.

In the picture you can see that a path between routers has been broken. With the help ofrouting protocols the information about the broken link is sent to other routers in thenetwork. This means that the routers will send the packets using an alternative path.