0

I am taking an internet (CISCO) course and don't understand the difference between the default gateway address for a router and its IP address. In every example of the class the default gateway address is 192.168.1.x, often x is 1. In my home system the router default gateway is 192.168.1.1. Therefore the IP address of the router and its default gateway are the same. In a class example I am to create a home network with a number of different hosts and assign IP addresses for each of them. The default gateway of the router is given as 209.165.200.226. So, I have to believe the desired network address for the home network is 209.165.200.0 and therefore all of the hosts on this network should follow as 209.165.200.2 - x. The default gateway address of a host is the router so how can a router have a default gateway address unless it is itself.

Second, I have never seen an example of a switch with an IP address. Do I have to assign an IP address to a switch. I assume not.

If multiple hosts are tied directly to a router, must I change the network address for each connection?

Stuggi
  • 2,269
  • 1
  • 14
  • 33
RobB
  • 1

1 Answers1

2

the difference between the default gateway address for a router and its IP address

Network nodes (often) use a default gateway. Routers may have a default route. A gateway is a router that allows you to pass traffic to a network that is remote to you.

A router's IP address may be set up as default gateway for the other network nodes. That means that router is used as a gateway to any other network.

The default gateway of the router is given as 209.165.200.226. So, I have to believe the desired network address for the home network is 209.165.200.0

That depends on the network mask or prefix length that is being used. Your assumption is based on a /24 prefix which may or may not be the case. Also, your router's default gateway is usually located on another network (see below), not on your local network, so your assumption is most likely wrong.

See this excellent Q&A for how network masks and prefixes work.

The default gateway address of a host is the router so how can a router have a default gateway address unless it is itself.

Routing needs to be done on a hop-to-hop basis. Usually, all nodes in a given network use a common default gateway for outbound traffic. That gateway/router is connected to multiple networks. Its routing table contains the routes to the directly connected networks and to other, remote networks that are in turn connected to other routers/gateways it can talk to (because it shares a network with them).

In a very simple scenario, a router has only two networks connected: your LAN and a link its own default gateway points to. However, a router can have more than two interfaces and it can see a number of other gateways. Accordingly, it can have a much larger number of choices when making forwarding decisions.

Zac67
  • 90,111
  • 4
  • 75
  • 141