<s>
The	O
gateway	B-Protocol
address	I-Protocol
(	O
or	O
default	O
gateway	O
)	O
is	O
a	O
router	B-Protocol
interface	O
connected	O
to	O
the	O
local	O
network	B-Architecture
that	O
sends	O
packets	B-Protocol
out	O
of	O
the	O
local	O
network	B-Architecture
.	O
</s>
<s>
The	O
gateway	O
operates	O
at	O
the	O
network	B-Architecture
layer	O
(	O
Layer	O
3	O
)	O
of	O
the	O
OSI	O
Model	O
.	O
</s>
<s>
The	O
gateway	O
is	O
used	O
when	O
transmitting	O
packets	B-Protocol
.	O
</s>
<s>
When	O
packets	B-Protocol
are	O
sent	O
over	O
a	O
network	B-Architecture
,	O
the	O
destination	O
IP	B-Protocol
address	I-Protocol
is	O
examined	O
.	O
</s>
<s>
If	O
the	O
destination	O
IP	O
is	O
outside	O
of	O
the	O
network	B-Architecture
,	O
then	O
the	O
packet	B-Protocol
goes	O
to	O
the	O
gateway	O
for	O
transmission	O
outside	O
of	O
the	O
network	B-Architecture
.	O
</s>
<s>
The	O
gateway	O
is	O
on	O
the	O
same	O
network	B-Architecture
as	O
end	O
devices	O
.	O
</s>
<s>
The	O
gateway	B-Protocol
address	I-Protocol
must	O
have	O
the	O
same	O
subnet	B-Protocol
mask	I-Protocol
as	O
host	O
devices	O
.	O
</s>
<s>
Each	O
host	O
on	O
the	O
network	B-Architecture
uses	O
the	O
same	O
gateway	O
.	O
</s>
<s>
The	O
gateway	O
should	O
have	O
a	O
static	O
address	O
,	O
as	O
changing	O
the	O
address	O
would	O
cause	O
packets	B-Protocol
not	O
to	O
be	O
delivered	O
.	O
</s>
<s>
The	O
gateway	O
is	O
typically	O
assigned	O
either	O
the	O
highest	O
or	O
lowest	O
network	B-Architecture
address	O
.	O
</s>
<s>
This	O
is	O
not	O
a	O
requirement	O
,	O
but	O
many	O
organizations	O
use	O
a	O
consistent	O
addressing	O
scheme	O
to	O
facilitate	O
network	B-Architecture
planning	O
.	O
</s>
<s>
The	O
gateway	O
also	O
operates	O
at	O
the	O
data	O
link	O
layer	O
(	O
Layer	O
2	O
)	O
of	O
the	O
OSI	O
network	B-Architecture
model	O
.	O
</s>
<s>
The	O
physical	O
gateway	B-Protocol
address	I-Protocol
is	O
called	O
the	O
media	O
access	O
control(MAC )	O
address	O
or	O
burned	O
in	O
address	O
(	O
BIA	O
)	O
.	O
</s>
<s>
When	O
a	O
frame	B-Protocol
is	O
sent	O
to	O
a	O
device	O
not	O
on	O
the	O
local	O
network	B-Architecture
,	O
the	O
gateway	O
's	O
MAC	O
address	O
is	O
used	O
in	O
the	O
frame	B-Protocol
header	O
.	O
</s>
<s>
The	O
gateway	B-Protocol
address	I-Protocol
must	O
be	O
configured	O
on	O
each	O
host	O
.	O
</s>
<s>
The	O
network	B-Architecture
host	O
IP	O
interface	O
binds	O
the	O
gateway	B-Protocol
address	I-Protocol
to	O
the	O
MAC	O
address	O
of	O
the	O
physical	O
gateway	O
by	O
broadcasting	B-Operating_System
IP	O
datagrams	O
and	O
caching	O
the	O
MAC	O
address	O
of	O
the	O
reply	O
from	O
the	O
gateway	O
in	O
an	O
ARP	O
table	O
stored	O
on	O
the	O
host	O
.	O
</s>
<s>
The	O
gateway	B-Protocol
address	I-Protocol
may	O
be	O
added	O
manually	O
.	O
</s>
<s>
On	O
Windows	O
computers	O
,	O
the	O
gateway	B-Protocol
address	I-Protocol
is	O
configured	O
using	O
the	O
TCP/IP	B-Protocol
Properties	O
.	O
</s>
<s>
The	O
gateway	B-Protocol
address	I-Protocol
can	O
be	O
automatically	O
determined	O
using	O
Dynamic	B-Protocol
Host	I-Protocol
Configuration	I-Protocol
Protocol	I-Protocol
(	O
DHCP	B-Protocol
)	O
.	O
</s>
<s>
DHCP	B-Protocol
allows	O
a	O
host	O
to	O
obtain	O
network	B-Architecture
information	O
from	O
a	O
server	B-Application
.	O
</s>
<s>
The	O
host	O
contacts	O
the	O
server	B-Application
to	O
obtain	O
an	O
IP	B-Protocol
address	I-Protocol
and	O
Default	O
Gateway	B-Protocol
address	I-Protocol
.	O
</s>
<s>
DHCP	B-Protocol
Servers	I-Protocol
are	O
normally	O
provided	O
by	O
Internet	O
Service	O
Providers	O
(	O
ISPs	O
)	O
.	O
</s>
<s>
The	O
Bad	O
Gateway	O
502	O
error	O
message	O
is	O
a	O
HTTP	B-Protocol
status	I-Protocol
code	I-Protocol
.	O
</s>
<s>
This	O
occurs	O
when	O
the	O
server	B-Application
was	O
unable	O
to	O
forward	O
the	O
users	O
request	O
,	O
as	O
all	O
queries	O
are	O
forwarded	O
via	O
gateways	O
on	O
the	O
internet	O
.	O
</s>
<s>
It	O
could	O
mean	O
that	O
the	O
target	O
server	B-Application
has	O
failed	O
to	O
complete	O
the	O
request	O
.	O
</s>
