Default Gateway

w^rl0rdw^rl0rd Member Posts: 329
Can somebody please explain what a default gateway is? From what I can gather, it is the IP address of the computer or router that separates networks.

Comments

  • WebmasterWebmaster Admin Posts: 10,292 Admin
    It's where every packet destined outside your local subnet is send for which your host doesn't know a direct route. Typically the default gateway is a router. (a computer that separates network is also a router).
  • w^rl0rdw^rl0rd Member Posts: 329
    Thanks Webmaster. Here's why I am asking: I just started supporting VPNs about 3 months ago, and each person with a VPN has a router.

    Well, each router has to have it's LAN IP Address set to a certain IP.
    When the user does an IPCONFIG from his/her computer, their Default Gateway will match that LAN IP Address.

    Is that Default Gateway the VPN Server or something else on our end?
    I mean, does it physically reside on our side?
  • WebmasterWebmaster Admin Posts: 10,292 Admin
    I mean, does it physically reside on our side?

    Yes, a default gateway does reside on 'your' side', physically and logically, because it is part of your local subnet.
  • w^rl0rdw^rl0rd Member Posts: 329
    O.K. So when I do an IPCONFIG, the default gateway is 10.141.97.9. Does that reside on my ISP's side?
  • WebmasterWebmaster Admin Posts: 10,292 Admin
    the default gateway for your Internet connection is the nearest interface on the other side of the line. This can be a modem at the ISP, or a cable router in your home for example.
  • w^rl0rdw^rl0rd Member Posts: 329
    So there are atleast 2 default gateways. Mine, and the ISP's. What I need to know is: When I do an IPCONFIG, is the default gateway my router?

    I know I am beating a dead horse here, but I can't rest until I know this.
  • WebmasterWebmaster Admin Posts: 10,292 Admin
    no, there's typically one default gateway, one place where all traffic destined outside the local subnet is send to. The default gateway is the nearest interface on the routing device (can be a router, or a computer that acts as a router, or a modem at a remote access server.) that can take your traffic to other networks.

    [A]
    e1[X]e2



    [A] is your computer with IP 192.168.5.1 mask 255.255.255.0

    is a host in another network and uses IP 192.168.24.1 mask 255.255.255.0, this can be a printer, file server, web server for example.

    [X] is a router with two interfaces, interface e1 and interface e2

    Interface e1 uses IP address 192.168.5.254 (thus in same network as host A)

    Interface e2 uses IP address 192.168.24.254 (thus in same network as host B)

    The connection between [A] and e0 does not have to be physical, it can be logical as well, for example several hubs and switches can be in between.

    The connection between and e1 does neither have to be physical, it can be logical as well, for example several hubs and switches and routers can be in between.

    What would be the default gateway for host [A]?
  • w^rl0rdw^rl0rd Member Posts: 329
    E1 is A's default gateway right?
  • WebmasterWebmaster Admin Posts: 10,292 Admin
    :o nope... it's e1... the 'nearest'...
  • w^rl0rdw^rl0rd Member Posts: 329
    Well then it is e2. The gateway to the other network. All I know is, to access my routing table, I telnet into my default gateway. So, packets not destined for my network/subnet are sent to my router and then to the VPN server. Right?
  • WebmasterWebmaster Admin Posts: 10,292 Admin
    Sorry, somehow I didn't read your answer... thought you said e2.. icon_confused.gif

    It's E1 indeed.
    So, packets not destined for my network/subnet are sent to my router
    right...
    and then to the VPN server
    if the router has a route to it for all traffic... right.
  • w^rl0rdw^rl0rd Member Posts: 329
    Thanks for clearing that up for me Webmaster. As you can see, I'm not preparing for my N+ yet. But, the more I learn now, the less I will have to learn when it comes time for the exam. Anyway, it's back to the OS forum for me.
Sign In or Register to comment.