Thanks Maher H for clarifying it.
For the case 1, does it require Router on Stick / SVI (or) we can just assign an ip in the same subnet range on the interface where switch is connected and will it just does routing between subnets ?
Thanks Maher H for clarifying it.
For the case 1, does it require Router on Stick / SVI (or) we can just assign an ip in the same subnet range on the interface where switch is connected and will it just does routing between subnets ?
Hi Rene/Moderators,
With regards to this questions and answers
"
Hi Chris,
IP route is used on a router to enter something in its routing table. The effect will be the sameâŚ
Devices like switches donât build a routing table so thatâs when you need to use the ip default-gateway command. Also, on a router you can use it if you disable the routing table with âno ip routingâ.
Rene
"
Am trying to fix some problems on L3 switches with ip routing enabled, which have eg.
ip default-gateway 10.10.10.10
and
ip route 0.0.0.0 0.0.0.0 20.20.20.20
Since ip routing is enabled, is the ip default-gateway 10.10.10.10 overridden?
Hello Ian.
This is a very good question. This often causes confusion.
The ip default-gateway
command is used to allow the switch itself to communication with devices outside its subnet. If you have an SVI configured, say interface vlan 10 with an IP address of 10.10.10.5/24, in order for this interface to communicate with the administratorâs PC on another subnet for telnet or SSH connectivity, then it requires a default gateway. You would enter the command ip default-gateway 10.10.10.
1. This is similar to the default gateway you configure on a PC. Note that this has NOTHING to do with the routing functionality of the L3 switch. This is called a default gateway.
The ip route 0.0.0.0 0.0.0.0 20.20.20.20
command actually places this default route within the routing table and is used to route packets that enter and exit the L3 switch. This is called a default route.
I hope this has been helpful!!
Laz
Awesome!
19 posts were merged into an existing topic: What is a default gateway
Rene, your explanation is the same as proxy arp concept ? i mean when a host forwards traffic of a host in another network to the default gateway.
Hi Juan,
There is an important difference between the two.
A host looks at a destination IP address and decides whether the destination is inside or outside its own subnet. When itâs outside its own subnet, it does an ARP request for the default gateway, gets a reply from the default gateway, then sends the IP packet to the default gateway.
With proxy ARP, a host thinks that the destination is in its own subnet while in reality, itâs notâŚitâs on another subnet. The host does an ARP request for the destination and the default gateway responds âon behalfâ of the device on the other subnet.
On a LAN, proxy ARP works but itâs basically a misconfiguration issue where you have an incorrect subnet mask on a host.
Hope this helps!
Rene
Hi Renee,
Iâm stuck in this lab for one week, I tried to solve the problem by myself but I failed to find a solution.
I have the same config as in the âdefault gateway courseâ (itâs a physical lab)
HOST 1 : 192.168.1.1
R1(1841 ROUTER) fa0/0: 192.168.1.254; fa0/1: 192.168.2.254
HOST 2 : 192.168.2.1
Hosts run Windows 7, default gateway is correct, I can ping fa0/0 from host1, and fa0/1 from host2, and I can ping the hosts from the router
BUT I canât reach fa0/1 from host 1, or host 2 from host 1, neither fa0/0 from host 2
What can I do to enable routing between these two networks?
Olivier
Hello Olivier
There are several things that come to mind that you can check.
Try those out and let us know your results.
I hope this has been helpful!
Laz
Hi, Rene!
I intended to misconfigure the following two scenarios.
Topology I
Can you explain to me why the ping from PC1 to PC2 works even though I donât have a gateway configured on PC1? (I intentionally put a âsmallerâ mask)
In theory it shouldnât have worked.
Topology II
Thanks!
Hello Robert
In both these cases, the mechanism that is allowing you to obtain connectivity is Proxy ARP. In the first case, PC1 is sending an ARP request for the destination IP, and R1 and R2 will send proxy ARP requests that eventually reach PC2. Via proxy ARP, R1 responds to PC1 and provides its own MAC address as the next hop L2 address.
In the second case, the host will send an ARP request for the configured gateway, and via the router, proxy ARP responds with the MAC address of the router on the local network.
Take a look at this lesson for more information:
I hope this has been helpful!
Laz
Thanks , Lazaros Agapides!Your answer is very helpfull for me!
Hi, Rene,
Hello Heping
You can assign whatever IP address you want to the default gateway as long as it is a valid address within the specific IP subnet. Also, it cannot be the network or broadcast address. So yes, you can use 192.168.1.253 if you like. Typically you will find that many administrators choose to use either the first or last valid host address in the subnet for the default gateway. So you will often see either 192.168.1.1 or 192.168.1.254 for this particular subnet. But really you can use whatever you like.
Yes you are correct. If the destination is in the same subnet, the ARP request will get the MAC address of the destination host. If the destination is in a different subnet, the ARP request will request the MAC address of the default gateway that has been configured on the sending host.
I hope this has been helpful!
Laz