Both pc1 and server 1 have a default gateway. what is the purpose of a default gateway?

I am no network engineer, but I have to find a solution to a networking problem for work. Any help or advice would be of much appreciation .

I have the following network topology:

https://drive.google.com/file/d/1ISKdIaGFfzbyY9y9hHH3RfPgCWo8iZsU/view?usp=sharing

PC1 has a GSM module connected to it Via USB as shown. This GSM acts as the main gateway for the entire system providing internet access to both PC1 and PC2.

To have internet access on PC2, IP routing rules were setup on PC1. Both PC1 and PC2 are configured with static IPs and are connected through a managed switch. This network works fine.

Now, I have an extra requirement and that is the possibility to provide internet access to the system via an external port, by connecting an Ethernet connection to the switch. The reason is that in case there is a need for a big software update, users can connect the system to their private network and download the update without using the GSM module.

The problem falls here, as the private network will most likely have DHCP to assign IP addresses to connected devices. So, I have two questions:

1- Is it possible to meet the internet requirements with current hardware setup, knowing that a part of the network must have static IPs? and how can this be achieved?

2- If its not possible with only a switch, what can be the most appropriate solution? I am assuming in this case a dual WAN router?

Thank you for your help :)

This chapter is from the book

Routing

To understand basic routing processes, consider Figure 10-1. In this topology, PC1 needs to send traffic to Server1. Notice that these devices are on different networks. In this topology, how does a packet from the source IP address 192.168.1.2 get routed to the destination IP address 192.168.3.2?

It might help to walk through this process systematically:

Both pc1 and server 1 have a default gateway. what is the purpose of a default gateway?

  • Step 1. PC1 compares its IP address and subnet mask 192.168.1.2/24 with the destination IP address and subnet mask 192.168.3.2/24. PC1 concludes that the destination IP address resides on a remote subnet. Therefore, PC1 needs to send the packet to its default gateway, which could have been manually configured on PC1 or dynamically learned via Dynamic Host Configuration Protocol (DHCP). In this example, PC1 has the default gateway 192.168.1.1 (router R1). However, to construct a Layer 2 frame, PC1 also needs the MAC address of its default gateway. PC1 sends an Address Resolution Protocol (ARP) request for router R1’s MAC address. After PC1 receives an ARP reply from router R1, PC1 adds router R1’s MAC address to its ARP cache. PC1 now sends its data in a frame destined for Server1, as shown in Figure 10-2.

  • Step 2. Router R1 receives the frame sent from PC1 and interrogates the IP header. An IP header contains a Time-to-Live (TTL) field, which is decremented once for each router hop. Therefore, router R1 decrements the packet’s TTL field. If the value in the TTL field is reduced to 0, the router discards the frame and sends a “time exceeded” Internet Control Message Protocol (ICMP) message back to the source. As long as the TTL has not been decremented to 0, router R1 checks its routing table to determine the best path to reach network 192.168.3.0/24. In this example, router R1’s routing table has an entry stating that network 192.168.3.0/24 is accessible via interface Serial 1/1. Note that ARP is not required for serial interfaces because these interface types do not have MAC addresses. Router R1, therefore, forwards the frame out its Serial 1/1 interface, as shown in Figure 10-3.

  • Step 3. When router R2 receives the frame, it decrements the TTL in the IP header, just as router R1 did. Again, as long as the TTL has not been decremented to 0, router R2 interrogates the IP header to determine the destination network. In this case, the destination network 192.168.3.0/24 is directly attached to router R2’s Fast Ethernet 0/0 interface. Similar to the way PC1 sent out an ARP request to determine the MAC address of its default gateway, router R2 sends an ARP request to determine the MAC address of Server1. After an ARP reply is received from Server1, router R2 forwards the frame out its Fast Ethernet 0/0 interface to Server1, as illustrated in Figure 10-4.

The previous steps identified two router data structures:

  • IP routing table: When a router needed to route an IP packet, it consulted its IP routing table to find the best match. The best match is the route that has the longest prefix. Specifically, a route entry with the longest prefix is the most specific network. For example, imagine that a router has an entry for network 10.0.0.0/8 and for network 10.1.1.0/24. Also, imagine that the router is seeking the best match for destination address 10.1.1.1/24. The router would select the 10.1.1.0/24 route entry as the best entry because that route entry has the longest prefix (/24 is longer than /8, which is a more specific entry).

  • Layer 3 to Layer 2 mapping: In the previous example, router R2’s ARP cache contained Layer 3 to Layer 2 mapping information. Specifically, the ARP cache had a mapping that said MAC address 2222.2222.2222 corresponded to IP address 192.168.3.2.

As shown in the preceding example, routers rely on their internal routing table to make packet-forwarding decisions. So how does a router’s routing table become populated with entries? That is the focus of the next section.

How would you describe the default gateway address of PC1?

For PC0 and PC1 the default gateway is the router port G0/0, which for this network is the address 192.168. 1.1.

What do I put in default gateway?

Default Gateway.
Internet Protocol..
Domain Name System..
Dynamic Host Configuration Protocol..
Network Address..
Subnet..
Subnet Mask..
Address Resolution..

What is a default gateway quizlet?

Default gateway. Identifies the router to which packets for remote networks are sent. The default gateway address is the IP address of the router interface on the same subnet as the local host. Without a default gateway set, most clients will be unable to communicate with hosts outside of the local subnet.

What are Sections A and B of the IP address?

Section A is the network portion, and Section B is the host portion. The IP address range of 172.16. 0.0 - 172.31.