Selasa, 03 Maret 2009

Routing ? Determining IP Routes

Routing is the act of directing from one location to another, in network terms this means directing Layer 3 Packets around a network, the information about the "routes" is stored in a Routing Table. Routing Tables contain three basic elements:

  1. Direction (Interface / Neighbor)
  2. Eastbourne

    Distance (How Far? / How Much?)
  3. Destination (Where do you want to get to?)


Routing Tables are built up by learning the routes through 4 different methods:

  1. Connected (The interfaces directly connected to the router)
  2. Static (Manually configured by administrator, routes to specific networks)
  3. Default (Manually configured by Administrator, if no route can be found send all traffic via this route)
  4. Dynamic (Network routing protocols adjust automatically to meet topology changes)

Connected Routes

When the router first boots up it automatically adds its own live interfaces to the Routing Table, for example if a router has 1 Ethernet interface it obviously knows how to get to it and therefore adds the route accordingly.

The routing table can be viewed by entering the "sh ip route" command:

Router#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Ethernet0/0

The following information can be seen in the highlighted line from the routing table output above:

  1. The 'C' at the beginning of the line lets you know that the route is a Connected Route.
  2. Any packet entering the router destined for the 192.168.1.0/24 network will be routed out of the Ethernet0/0 interface.

Static Routes

When routing to a specific network which is not directly connected to the router and in the absence of any Dynamic routing protocols the administrator must manually configure the router in order for it to know where to send any foreign packets.

To manually configure Static Routes the following configuration command should be used:

ip route 192.168.2.0 255.255.255.0 192.168.1.254

Following the configuration above the routing table will now show the new Static Route.

Router#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Ethernet0/0

S 192.168.2.0/24 [1/0] via 192.168.1.254

As can be seen in the highlighted output the 'S' shows the Static route to the 192.168.2.0/24 network and any packets destined for that network will be forwarded onto 192.168.1.254 (i.e. out of Ethernet0/0), where it is hoped that the neighboring router 192.168.1.254 knows how to get to 192.168.2.0/24 network.

The disadvantages of manually configuring static routes is that if the network topology changes so does the configuration, the configuration must also be entered on each and every router in the network.

The advantage of static routes is that they offer very precise control over routing behavior. Static routes are also commonly used in ISDN setups, this is because Dynamic routing protocols tend to keep the ISDN line active due to regular keep alive updates (every 30 seconds) which Dynamic Routing protocols generate ? keeping the line active costs money as you typically pay per minute with ISDN.

note: Remember you must also add a route back!

Default Routes

"If can't find route ? use this as default"

Before we learn about routing protocols which automatically learn routes, I will discuss static (manual) routes:

For a computer to know where to send its foreign packets it must have a default route.

The router knows where to send packets by examining its routing table. This can be added to with the following command:

ip route

e.g. If you were to set the configuration to:

ip route 0.0.0.0 0.0.0.0 194.168.8.100

This would route all off-net traffic onto 194.168.8.100

Dynamic Routes

There are various protocols which help build a routing table automatically (you do not really want to enter every route on the internet manually!). Dynamic routing protocols learn from their neighboring routers.

There are 2 types of dynamic routing protocols

IGP (Interior Gateway Protocols), these are used for LAN's and WAN's.

EGP (Exterior Gateway Protocols), used on the large internet routers, WWAN's.

IGP Protocols

The table below lists some of the different flavors of Interior Gateway Protocols, these are used in Office, Home and Company Networks, they can be described as only exchanging routing information within an autonomous system:

Distance Vector/Link State

Classfull/Classless

Cisco/Standard

Metric

Admin Distance

RIPv1

DV

CF

S

Hop

120

RIPv2

DV

CL

S

Hop

120

IGRP

DV

CF

C

B/W,Delay

100

EIGRP

Hybrid

CL

C

B/W,Delay

90

OSPF

LS

CL

S

B/W

110

IS-IS

LS

CL

S

Manual

115

Exterior Gateway Protocols

These routing protocols are used to connect between autonomous systems. An autonomous system is a collection of networks under a common administration and sharing a common routing strategy. BGP (Border Gateway Protocol) is an example of a EGP.

Classfull does not send out mask information therefore it can be ambiguous.

Classless is better because you can use VLSM.

EIGRP supports ipv4, AppleTalk, IPX and IPv6 it is the only protocol which supports them all.

EIGRP stores a backup route also ? this is why it converges quickly.

EIGRP asks neighbours if they can help if backup not available.

The next hop is called a successor, the backup route is called a feasible successor.

PIM = Multicast Routing Protocol

Tidak ada komentar:

Posting Komentar