Skip navigation
Login   |   Register
Cisco Learning Home > Certifications > IP Networking (CCENT) > Discussions

_Communities

7826 Views 13 Replies Latest reply: Nov 7, 2008 11:31 PM by B Haines RSS

Currently Being Moderated

Default gateway....?

Nov 7, 2008 1:41 AM

r.goforth 45 posts since
Oct 19, 2008

 

Thank you guys for being patient with me, Im still learning! Although tonight it feels like I havent learnecd a thing!

 

 

What is a default gateway? How do you enter a default gateway? Why would you need to enter this gateway?

 

 

Thanks in advance!

 

 

R

 

 

  • Conwyn 9,657 posts since
    Sep 10, 2008
    Currently Being Moderated
    1. Nov 7, 2008 2:21 AM (in response to r.goforth)
    Re: Default gateway....?

     

    Hi Raven

     

     

    PC are connected together on a Local Area Network normally Ethernet cables into a switch. Each PC has a IP address consisting of a network number and a host number. So if your PC are 192.168.1.1 and 192.168.1.2 ....

     

     

    then 192.168.1 is the network and .1 and .2 are the host numbers.

     

     

    If they want to go to the Internet you need a Gateway (Router). This Gateway will have an address such as 192.168.1.254.

     

     

    So if you want to get to the Internet you send things to the default gateway 192.168.1.254.

     

     

    Normally when you switch on your PC it issues a general request which says please give me my IP address and tell me the default gateway and other thing. All PC on the LAN sees the request but the Gateway say I will find a free IP number for you and tell you the default-gateway.

     

     

    If you need to explicity state the default gateway you code it on the PC using the Windows route command

     

     

    route ADD 0.0.0.0 MASK 0.0.0.0 192.168.1.254 METRIC 3

    destination^ ^mask gateway metric ^

     

     

    This says to get to any network go to Gateway 192.169.1.254 which must be on your LAN.

     

     

    route print shows the value.

     

     

    Above is a very simple introduction because it is quite a big subject.

     

     

    Regards Conwyn

     

     

     

     

     

    Join this discussion now: Login / Register
  • Conwyn 9,657 posts since
    Sep 10, 2008
    Currently Being Moderated
    3. Nov 7, 2008 3:09 AM (in response to r.goforth)
    Re: Default gateway....?

     

    Hi Raven

     

     

     

     

     

    It is for any address that is not on your local area network.

     

     

    I am sorry I know nothing about the new Cisco exams it all changed a while ago.

     

     

    Regards Conwyn

     

     

    Join this discussion now: Login / Register
  • shanekillian 230 posts since
    Aug 18, 2008
    Currently Being Moderated
    5. Nov 7, 2008 4:04 AM (in response to r.goforth)
    Re: Default gateway....?

    Hi r.goforth

    I think for me the best way I understood the concept was while applying it to my home network.

    At home I assume you have a Cable/DSL modem/router - the internal IP address of this device would be the default gateway for your PC.

     

    So, if your PC was trying to request www.cisco.com if would resolve the cisco.com domain to an IP address. Then, your computer would realize that this IP address is not on the local network and so the request would be forwarded out into the big world through your router (default gateway).

     

     

     

     

    HTH

     

     

     

    Shane

    Join this discussion now: Login / Register
  • B Haines 660 posts since
    Jun 28, 2008
    Currently Being Moderated
    7. Nov 7, 2008 11:18 AM (in response to r.goforth)
    Re: Default gateway....?

    r.goforth,

    While researching the topic of a DEFAULT GATEWAY also research DEFAULT ROUTE (IE. DEFAULT NETWORK) and STATIC ROUTE! They all provide similar functionality but are indeed different.. Takes a while to grasp the differences so don't fret!

     

    Here are some links that may be of interest for all three!!!

     

    Default Route VS Static Route

    http://www.mcmcse.com/cisco/guides/ip_default_network.shtml

     

    Default Gateway VS Static Route (On a layer 2 switch) Just know that on a Cisco/HP and most other switches you have to use a static route to forward (Default Gateway will not work!)

    http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626122608489354928353475&threadId=785117

     

    Wikipedia:

    Static Routes

    http://en.wikipedia.org/wiki/Static_routing

    Default Routes

    http://en.wikipedia.org/wiki/Default_route

    Default Gateway

    http://en.wikipedia.org/wiki/Default_gateway

     

    The Cisco Explanation:

    http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094374.shtml

     

    Finally, How routers work from How Stuff Works website!!! Read this in it's entirety!!!

    http://computer.howstuffworks.com/router.htm

     

    I hope this helps!

    Join this discussion now: Login / Register
  • Conwyn 9,657 posts since
    Sep 10, 2008
    Currently Being Moderated
    8. Nov 7, 2008 12:03 PM (in response to B Haines)
    Re: Default gateway....?

     

    Hi Billy and Raven

     

     

    Just to clarify the default-gateway on a L2 switch. This always causes confusion.

     

     

    A L2 switch has a management address called VLAN 1. If you add a new VLAN x then VLAN 1 disappears. So you can only have one what ever you call it. This VLAN 1 has an IP address so you can logon onto the switch to manage it. Now if you come from a distant network you need a route to get back. The L2 switch has a default-gateway which must point to a L3 device such as a router. So you can ping all the other devices with similar IP address but if the target of the ping is not within the local network then it sends the traffic to the named default-gateway. Note you have to fully type show default-gateway because it is a hidden command. Ordinary data entering the switch on one of the port simply passes through the switch. It is not routed.

     

     

    I hope that is a fair explaination. Scott to clarify.

     

     

    Regards Conwyn

     

     

    Join this discussion now: Login / Register
  • Conwyn 9,657 posts since
    Sep 10, 2008
    Currently Being Moderated
    9. Nov 7, 2008 12:07 PM (in response to Conwyn)
    Re: Default gateway....?

     

    Hi Billy and Raven

     

     

     

     

     

    Correction the command is : show ip default-gateway.

     

     

    Regards Conwyn

     

     

    Join this discussion now: Login / Register
  • B Haines 660 posts since
    Jun 28, 2008
    Currently Being Moderated
    10. Nov 7, 2008 12:48 PM (in response to Conwyn)
    Re: Default gateway....?

    Thanks Conwyn,

    That is pretty much what the post I referenced is referring to with the exception that they claim it to be necessary to use a static route as opposed to the default-gateway command on an L2 switch with multiple VLANs.. Not applicable to an L3 model which will properly utilize the ip default-gateway command.. Follow the link and let me know what you think! I will read it more thoroughly and follow up!

    Join this discussion now: Login / Register
  • Conwyn 9,657 posts since
    Sep 10, 2008
    Currently Being Moderated
    11. Nov 7, 2008 1:36 PM (in response to B Haines)
    Re: Default gateway....?

    Hi Billy

     

    Practical demonstration

     

     

     

    It is a L2 2950 switch.

     

     

    root#show version

    Cisco Internetwork Operating System Software

    IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA6, RELEASE SOFTWARE (fc1)

    Copyright (c) 1986-2005 by cisco Systems, Inc.

     

     

    Look no routing

     

     

     

    root#show ip route

    ^

    % Invalid input detected at '^' marker.

     

     

    Let us set a default-gateway

     

     

     

    root#config t

    Enter configuration commands, one per line. End with CNTL/Z.

    root(config)#ip default-gateway 14.0.0.3

    root(config)#end

     

     

    Let us try pinging something which is not on 14.0.0.0

     

     

    root#ping 10.0.0.6

     

     

    Type escape sequence to abort.

    Sending 5, 100-byte ICMP Echos to 10.0.0.6, timeout is 2 seconds:

    !!!!!

    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/8 ms

     

     

    So how did we get there?

     

     

    root#trace 10.0.0.6

     

     

    Type escape sequence to abort.

    Tracing the route to 10.0.0.6

     

     

    1 14.0.0.3 0 msec 0 msec 0 msec (default-gateway address)

    2 10.0.0.6 4 msec 0 msec * ( a distant router)

     

     

    root#show ip default-gateway

    14.0.0.3

     

     

    What is our management address from show run

     

     

     

    interface Vlan1

    ip address 14.0.0.1 255.255.255.0

    no ip route-cache

     

    ip default-gateway 14.0.0.3

     

     

    Regards Conwyn

    Join this discussion now: Login / Register
  • B Haines 660 posts since
    Jun 28, 2008
    Currently Being Moderated
    12. Nov 7, 2008 11:29 PM (in response to Conwyn)
    Re: Default gateway....?

    Thanks Conwyn,

    Do me a favor.. Take my last post and completely reverse it.. LoL

     

    L2 Switch or L3 with No Routing enabled = ip default-gateway

    L3 Switch with Routing enabled = ip route

     

    I had to read my post twice to grasp the extent of dyslexia involved.. LoL

     

    It's all in the link I posted before dyslexia kicked in.. Thanks for the help!

    Join this discussion now: Login / Register
  • B Haines 660 posts since
    Jun 28, 2008
    Currently Being Moderated
    13. Nov 7, 2008 11:31 PM (in response to Conwyn)
    Re: Default gateway....?

    Seriously thanks.. I even managed to confuse myself on that one!!! It's bed time! LoL

    Join this discussion now: Login / Register

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)