<s>
IP	B-Protocol
routing	I-Protocol
is	O
the	O
application	O
of	O
routing	B-Protocol
methodologies	O
to	O
IP	B-Protocol
networks	I-Protocol
.	O
</s>
<s>
In	O
each	O
IP	B-Protocol
network	I-Protocol
node	O
,	O
IP	B-Protocol
routing	I-Protocol
involves	O
the	O
determination	O
of	O
a	O
suitable	O
path	O
for	O
a	O
network	B-Protocol
packet	I-Protocol
from	O
a	O
source	O
to	O
its	O
destination	O
in	O
an	O
IP	B-Protocol
network	I-Protocol
.	O
</s>
<s>
The	O
process	O
uses	O
static	O
configuration	O
rules	O
or	O
dynamically	O
obtained	O
from	O
routing	B-Protocol
protocols	I-Protocol
to	O
select	O
specific	O
packet	B-Protocol
forwarding	I-Protocol
methods	O
to	O
direct	O
traffic	O
to	O
the	O
next	O
available	O
intermediate	O
network	O
node	O
one	O
hop	O
closer	O
to	O
the	O
desired	O
final	O
destination	O
,	O
a	O
total	O
path	O
potentially	O
spanning	O
multiple	O
computer	B-Architecture
networks	I-Architecture
.	O
</s>
<s>
Networks	O
are	O
separated	O
from	O
each	O
other	O
by	O
specialized	O
hosts	O
,	O
called	O
gateways	O
or	O
routers	B-Protocol
with	O
specialized	O
software	O
support	O
optimized	O
for	O
routing	B-Protocol
.	O
</s>
<s>
IP	B-Protocol
forwarding	I-Protocol
algorithms	I-Protocol
in	O
most	O
routing	B-Protocol
software	O
determine	O
a	O
route	O
through	O
a	O
shortest	O
path	O
algorithm	O
.	O
</s>
<s>
In	O
routers	B-Protocol
,	O
packets	B-Protocol
arriving	O
at	O
an	O
interface	O
are	O
examined	O
for	O
source	O
and	O
destination	O
addressing	O
and	O
queued	O
to	O
the	O
appropriate	O
outgoing	O
interface	O
according	O
to	O
their	O
destination	O
address	O
and	O
a	O
set	O
of	O
rules	O
and	O
performance	O
metrics	O
.	O
</s>
<s>
Rules	O
are	O
encoded	O
in	O
a	O
routing	B-Protocol
table	I-Protocol
that	O
contains	O
entries	O
for	O
all	O
interfaces	O
and	O
their	O
connected	O
networks	O
.	O
</s>
<s>
If	O
no	O
rule	O
satisfies	O
the	O
requirements	O
for	O
a	O
network	B-Protocol
packet	I-Protocol
,	O
it	O
is	O
forwarded	O
to	O
a	O
default	B-Protocol
route	I-Protocol
.	O
</s>
<s>
Routing	B-Protocol
tables	I-Protocol
are	O
maintained	O
either	O
manually	O
by	O
a	O
network	O
administrator	O
,	O
or	O
updated	O
dynamically	O
by	O
a	O
routing	B-Protocol
protocol	I-Protocol
.	O
</s>
<s>
A	O
routing	B-Protocol
protocol	I-Protocol
specifies	O
how	O
routers	B-Protocol
communicate	O
and	O
share	O
information	O
about	O
the	O
topology	O
of	O
the	O
network	O
,	O
and	O
the	O
capabilities	O
of	O
each	O
routing	B-Protocol
node	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
Open	B-Protocol
Shortest	I-Protocol
Path	I-Protocol
First	I-Protocol
(	O
OSPF	B-Protocol
)	O
protocol	O
is	O
generally	O
used	O
within	O
an	O
enterprise	O
and	O
the	O
Border	B-Protocol
Gateway	I-Protocol
Protocol	I-Protocol
(	O
BGP	B-Protocol
)	O
is	O
used	O
on	O
a	O
global	O
scale	O
.	O
</s>
<s>
BGP	B-Protocol
is	O
the	O
de	O
facto	O
standard	O
for	O
worldwide	O
Internet	B-Protocol
routing	I-Protocol
.	O
</s>
<s>
Routing	B-Protocol
protocols	I-Protocol
may	O
be	O
broadly	O
distinguished	O
by	O
their	O
realm	O
of	O
operation	O
in	O
terms	O
of	O
network	O
scope	O
.	O
</s>
<s>
Interior	B-Protocol
gateway	I-Protocol
protocols	I-Protocol
are	O
used	O
for	O
routing	B-Protocol
within	O
autonomous	B-Architecture
systems	I-Architecture
,	O
while	O
exterior	B-Protocol
gateway	I-Protocol
protocols	I-Protocol
route	O
traffic	O
between	O
them	O
.	O
</s>
<s>
The	O
former	O
group	O
is	O
exemplified	O
by	O
the	O
Routing	B-Protocol
Information	I-Protocol
Protocol	I-Protocol
(	O
RIP	O
)	O
and	O
Open	B-Protocol
Shortest	I-Protocol
Path	I-Protocol
First	I-Protocol
(	O
OSPF	B-Protocol
)	O
,	O
while	O
the	O
Exterior	B-Protocol
Gateway	I-Protocol
Protocol	I-Protocol
(	O
EGP	O
)	O
and	O
the	O
Border	B-Protocol
Gateway	I-Protocol
Protocol	I-Protocol
(	O
BGP	B-Protocol
)	O
are	O
examples	O
of	O
the	O
exterior	O
type	O
.	O
</s>
<s>
BGP	B-Protocol
is	O
the	O
dominant	O
route	O
distribution	O
protocol	O
used	O
on	O
the	O
Internet	O
.	O
</s>
<s>
The	O
IP	B-Protocol
forwarding	I-Protocol
algorithm	I-Protocol
is	O
a	O
specific	O
implementation	O
of	O
routing	B-Protocol
for	O
IP	B-Protocol
networks	I-Protocol
.	O
</s>
<s>
In	O
order	O
to	O
achieve	O
a	O
successful	O
transfer	O
of	O
data	O
,	O
the	O
algorithm	O
uses	O
a	O
routing	B-Protocol
table	I-Protocol
to	O
select	O
a	O
next-hop	O
router	B-Protocol
as	O
the	O
next	O
destination	O
for	O
a	O
datagram	O
.	O
</s>
<s>
The	O
IP	B-Protocol
address	I-Protocol
of	O
the	O
selected	O
router	B-Protocol
is	O
known	O
as	O
the	O
next-hop	O
address	O
.	O
</s>
<s>
The	O
IP	B-Protocol
forwarding	I-Protocol
algorithm	I-Protocol
states	O
:	O
</s>
<s>
Given	O
a	O
destination	O
IP	B-Protocol
address	I-Protocol
,	O
,	O
and	O
network	O
prefix	O
,	O
:	O
</s>
<s>
Send	O
datagram	O
to	O
the	O
next-hop	O
address	O
listed	O
in	O
the	O
routing	B-Protocol
table	I-Protocol
;	O
</s>
<s>
Send	O
datagram	O
to	O
the	O
default	B-Protocol
route	I-Protocol
;	O
</s>
<s>
When	O
multiple	O
route	B-Protocol
table	I-Protocol
entries	O
match	O
,	O
the	O
entry	O
with	O
the	O
longest	O
subnet	B-Protocol
mask	I-Protocol
is	O
chosen	O
as	O
it	O
is	O
the	O
most	O
specific	O
one	O
.	O
</s>
<s>
If	O
there	O
are	O
multiple	O
routes	O
with	O
the	O
same	O
subnet	B-Protocol
mask	I-Protocol
,	O
the	O
route	O
with	O
the	O
lowest	O
metric	O
is	O
used	O
.	O
</s>
<s>
If	O
there	O
are	O
multiple	O
default	B-Protocol
routes	I-Protocol
,	O
the	O
metric	O
is	O
also	O
used	O
to	O
determine	O
which	O
to	O
use	O
.	O
</s>
<s>
If	O
there	O
are	O
multiple	O
routes	O
with	O
the	O
same	O
subnet	B-Protocol
mask	I-Protocol
and	O
metric	O
,	O
the	O
system	O
may	O
use	O
equal-cost	B-Protocol
multi-path	I-Protocol
routing	I-Protocol
as	O
a	O
forwarding	O
strategy	O
.	O
</s>
<s>
When	O
no	O
route	O
is	O
available	O
,	O
an	O
ICMP	B-Protocol
error	O
message	O
is	O
sent	O
to	O
the	O
originator	O
of	O
the	O
packet	B-Protocol
,	O
to	O
inform	O
that	O
host	O
that	O
the	O
packet	B-Protocol
could	O
not	O
be	O
delivered	O
.	O
</s>
<s>
To	O
avoid	O
unnecessary	O
retransmission	B-Protocol
to	O
avoid	O
network	B-Protocol
congestion	I-Protocol
,	O
the	O
sending	O
host	O
should	O
either	O
stop	O
transmitting	O
or	O
choose	O
another	O
address	O
or	O
route	O
.	O
</s>
<s>
The	O
following	O
presents	O
a	O
typical	O
routing	B-Protocol
table	I-Protocol
in	O
a	O
Unix-like	B-Operating_System
operating	I-Operating_System
system	I-Operating_System
:	O
</s>
<s>
eth0	O
is	O
the	O
interface	O
name	O
of	O
the	O
network	B-Protocol
interface	I-Protocol
card	I-Protocol
representing	O
an	O
Ethernet	O
port	O
.	O
</s>
<s>
ppp0	O
is	O
a	O
PPPoE	B-Protocol
interface	O
,	O
which	O
is	O
configured	O
as	O
the	O
default	B-Protocol
route	I-Protocol
in	O
this	O
example	O
.	O
</s>
<s>
A	O
default	B-Protocol
route	I-Protocol
is	O
recognized	O
by	O
the	O
destination	O
0.0.0.0	O
and	O
the	O
flag	O
G	O
.	O
A	O
network	B-Protocol
router	I-Protocol
is	O
identified	O
by	O
the	O
network	O
mask	O
255.255.255.255	O
and	O
the	O
flag	O
H	O
.	O
</s>
