8 Replies Latest reply: Apr 17, 2019 4:15 PM by Luke RSS

    default gateway




      im having a mind **** at the moment. im currently going through netacad labs, on some exercises, im required to configure the default gate. if i haven't been given a default gateway, where do i get this from?. im having a mare, and i think the answer is going to be a simple answer. i just cant remember.


      thank you

        • 1. Re: default gateway
          Andrew C

          Hmm, nope, I don't think you're going crazy - common practice is to set the default GW to the lowest host address in the subnet (ie in a /24) but there's no hard and fast rule.  Maybe you've missed something?

          • 2. Re: default gateway

            As Andrew C says, it could be the first usable address on the subnet; sometimes it's the last usable. On a lot of networks (not always/not a rule) you can figure this out looking for the 'nearest' L3 address: a router interface or L3 switch SVI that the device can get to (this can be behind different L2 devices).


            Can you post the topology here? Or describe it in a bit more detail?


            Regards, Tim

            • 3. Re: default gateway
              Wasif Bhatti

              Simply take the 100th address as a default gateway e.g. Fa0/0 its very simple, you just have to give an IP address to the interface connecting with your router giving you access to other networks, its your gate to enter and exit from your network and that gate has some IP could be any IP first or last usable address of your subnet. Hopefully this help.

              • 4. Re: default gateway

                "Simply take the 100th address as a default gateway"


                Not all networks have 100 addresses - it makes more sense to use the first or last usable IP in the network range for the default gateway

                • 5. Re: default gateway
                  Wasif Bhatti

                  I just gave him an example. Hopefully he will get it right. Thank you anyway.

                  • 6. Re: default gateway



                    Here is a link of CLN that mentions about this concept:

                    default gateway definition?



                    • 7. Re: default gateway

                      Keep it simple.


                      "Back in the day" routers were often called gateways (routers separate broadcast domains).  The DG is how users on the LAN get out of the local subnet into the wild blue yonder.


                      The DG can be acquired from the DHCP server (typical) or you can manually configure it per device.


                      If a PC is sending a packet but doesn't know where the destination is it just sends it to the router (DG), and he will deal with it.





                      Routers have a somewhat similar concept, but its called the default route, or Gateway of last resort...which is necessary if you want to send packets to a destination but you don't have a route in the routing table for it...if you do have a GOLR, then the router just sends it to the next router and maybe he will have a route for it.


                      Gateway of last resort is not set


               is subnetted, 1 subnets

                      C is directly connected, Loopback5

               is subnetted, 1 subnets

                      C is directly connected, Loopback7

               is subnetted, 1 subnets

                      C is directly connected, Loopback9

               is variably subnetted, 2 subnets, 2 masks

                      C is directly connected, GigabitEthernet0/0

                      L is directly connected, GigabitEthernet0/0

                      • 8. Re: default gateway

                        Are you asking how to find the default gateway on a network, or how to choose a good IP address to be the default gateway?


                        A lot of the responses here (such as 'use the last IP in the subnet') are good suggestions, but keep in mind that any IP in a subnet could be configured as a default gateway.