@hjalti-atlason said in Understand and Apply Subnetting Part 2 - Default gateway:
Watching Understand and Apply Subnetting Part 2
Made me think what would be the default gateway in this example (when splitting a network into 4 smaller networks)Is it assigned by the admin to for example 192.168.10.1 when setting up a Cisco router?
192.168.10.0 (Network ID)
255.255.255.192 (1st network)
192.168.10.63 (Broadcast ID)
192.168.10.1 - 192.168.10.62 (Range)
The default-gateway
is ANY address in this range
You as the network engineer would decided the number to be used. I generally like easy numbers to remember, so for me I would choose 192.168.10.1
but 192.168.10.59
would work just as well.
Also, what would be the default gateway in this example?
192.168.10.64 (Network ID)
255.255.255.192 (2nd network)
192.168.10.125 (Broadcast ID)
192.168.10.65 - 192.168.10.126 (Range)
Anyone?
Remember that the default-gateway
or default-router
doesn't have to be any specific address itself, as long as within the range of addresses.
Now, having said that, this is not to be confused with a default route
, this address cannot be on the same router as you set it on but it is normally also within the same subnet.
NYEDGE1(config)#ip route 0.0.0.0 0.0.0.0 192.168.16.1
%Invalid next hop address (it's this router)
NYEDGE1(config)#
Also, the default-gateway is not is to be confused with an ip default-network
.
- I created a static route to 8.8.8.8 in NYEDGE1
- The route to 8.8.8.8 must be in the routing table FIRST
- Note, the
Gateway of last resort is not set
NYEDGE1#show ip route
<omitted code table>
Gateway of last resort is not set
192.168.12.0/24 is subnetted, 1 subnets
C 192.168.12.1 is directly connected, GigabitEthernet0/2
192.168.16.0/24 is subnetted, 1 subnets
C 192.168.16.1 is directly connected, GigabitEthernet0/0
S 8.8.8.8/29 [1/0] via 192.168.12.2
Configure ip default-network 8.8.8.8
- Examine the routing table
- The static route is now a candidate route
S*
- The
Gateway of last resort is 192.168.12.2 to network 8.8.8.8
NYEDGE1#config
NYEDGE1(config)#ip default-network 8.8.8.8
NYEDGE1#show ip route
<omitted code table>
Gateway of last resort is 192.168.12.2 to network 8.8.8.8
192.168.12.0/24 is subnetted, 1 subnets
C 192.168.12.1 is directly connected, GigabitEthernet0/2
192.168.16.0/24 is subnetted, 1 subnets
C 192.168.16.1 is directly connected, GigabitEthernet0/0
S* 8.8.8.8/29 [1/0] via 192.168.12.2
Let me know if I didn't answer what you were asking. Sometimes, I answer my own question and not what is meant. 
Cordially,
Ronnie Wong
Edutainer Manager, ACI Learning [ITPRO]
*if the post has answered the question, mark as solved.
**All "answers" and responses are offered "as is" and my opinion. There is no implied service, support, or guarantee by ITProTV.