Chapter 14 - Routing

flutteringevergreenΔίκτυα και Επικοινωνίες

29 Οκτ 2013 (πριν από 3 χρόνια και 11 μήνες)

100 εμφανίσεις

ROUTING


Christopher James

CMSC 691X , Summer 2002

Concepts


Routing Tables and Interfaces


netstat , ifconfig


Distance Vector Protocols


Maintain tables giving the best known distance to each router in
the subnet and which line to use to get there.


Tables updated by exchanging information with neighbors.


Converges very slowly.


Eg. RIP, BGP.


Link State Protocols



Each router discovers its neighbors and measures the cost to
them.


Send this info to all the other routers.



Concepts


Each router forms a connectivity map and computes its own
routing table


Converge quickly but need more memory.


Cost metrics


Fewest number of hops, lowest latency , largest minimal
intermediate bandwidth, lowest financial cost …


Interior and Exterior Protocols


Interior Protocols operate within an Autonomous System.


Exterior Protocols operate between Autonomous Systems or
Networks. Used when there is more than one route to the
Internet.



Various Protocols


Routing Information Protocol (RIP)


Distance Vector Protocol using hop counts


Used by
routed


Any host more than 15 hop counts away is unreachable


Resource hog due to broadcasting


Useful for changing network topologies


Used as a de facto routing protocol since all UNIX versions
provide
routed



Routing Information Protocol ver 2 (RIP
-
2)


Also distributes netmasks thus providing better support for
subnetted networks


Increased security


“Route Tags” for advertising external routes from an Exterior
Protocol.



Various Protocols


Backward Compatible with RIP



Open Shortest Path First (OSPF)


Link State Protocol


Each router maintains an identical database describing the AS’s
topology


Routing tables constructed using a Shortest Path Tree.


Supported by
gated


Supports multiple paths to a destination


Can partition networks into sections that share high level routing
information.




Routed


Routing Daemon supported by almost every version of
Unix


Supports only RIP and some support RIP
-
2 also.


Adds its discovered routes to the kernel’s routing table.


Modes of operation :


-
q : Quiet Mode


-
s : Server Mode


-
t : Tracing


-
g : Global Default Route


Configuration file
-

/etc/gateways


Gated


Routing Daemon that allows different routing protocols to
be used simultaneously . Supports both RIPs, OSPF, IS
-
IS, EGP and BGP


Startup and control


Started at boot time with no arguments


Configuration file
-

/etc/gated.conf


Controlled using ‘gdc
command’ ,
where the
command

options
are


interface


reconfig


checkconf


toggletrace


stop


start


restart


Gated


The Configuration File


Has the following sections


Options and Definitions


Configuration of Individual Protocols


Static Routes


Import, Export and Aggregation Controls


Tracing options


Can be anywhere in the file.

traceoptions

[“log” [
replace
] [
size

size[
k|m
]
files

num]] trace_options


[
except

trace_options];


Option configuration statements


options

[
nosend
] [
noresolv
] [
syslog

[
upto
] log_level ];

Gated


Network interface definitions


interfaces

{




options

[
strictinterfaces
];




define
address [
broadcast

addr] | [
pointtopoint

addr]




interface

iflst [
preference

prf] [
passive
] [
simplex
];




[
netmask

mask] [
multicast
];


};


Other definitions


routerid

host


martians

{


host

host [
allow
];


network [
allow
] [
exact

|
refines

];


network
mask

mask [
allow
] [
exact

|
refines
];


network
masklen

number [
allow
] [
exact

|
refines
];


default

[
allow
];


};



Gated


Protocol Configuration for RIP

rip

yes

|
no

|
off

[ {


broadcast

|
nobroadcast
;


preference

pref;


defaultmetric

metric;


interface

interface_list



[
noripin

|
ripin
] [
noripout

|
ripout
]



[
version 1
] | [
version 2

[
multicast

|
broadcast

] ];


trustedgateways

gateway_list;


sourcegateways

gateway_list;


traceoptions

[
packets

|
request

|
response

|
detail

] ];

} ];


Gated


Protocol Configuration for OSPF



ospf

yes

|
no

|
off

[{



defaults

{



router
-
prio
;



};


traceoptions

trace_options;


backbone

| (
area

area) {



networks

{




network [
exact

|
refines
] [
restrict
];




network
mask

mask [
exact

|
refines
] [
restrict
];




network
masklen

num [
exact

|
refines
] [
restrict
];





host

host [
exact

|
refines
] [
restrict
];



};



stubhosts
{




host
cost

cost;



};





Gated




interface

interface_list [
cost

cost] {





enable

|
disable
;





priority

priority;




};




};




} ];




Static Routes

static

{



dest
gateway

gateway_list [
interface

interface_list]


[
preference

preference] [
retain
] [
reject
] [
blackhole
] [
noinstall
];

};



Gated


Exported Routes


export

proto

protocol



[
interface

interface_list |
gateway

gateway_list]



restrict
;


Or


export

proto

protocol



[
interface

interface_list |
gateway

gateway_list]



[
metric

metric] {



export_list;



};



http://hpc.uky.edu/cgi
-
bin/man.cgi?section=all&topic=gated.conf