Avatar of eemoon
eemoon
 asked on

A concept of ip default-gateway needs to be confirmed

HI Expert, I want to confirm a concept of command ip default-gateway in router or switch. Here is config. and two routers R2 and R3 are connected with each other.

R2:

interface Ethernet1/0
 ip address 23.1.1.2 255.255.255.0
 half-duplex

R3:

no ip routing

interface Ethernet1/0
 ip address 23.1.1.3 255.255.255.0
 half-duplex

I tested it and the result is that R2 can still ping R3. My question is why R2 can ping R3 successfully since R3 is in no ip routing mode and did not use the command ip default-gateway ? In another word, how can R3 send the ping packet back to R2 due to R3 configuration ? Thank you
RoutersSwitches / Hubs

Avatar of undefined
Last Comment
eemoon

8/22/2022 - Mon
SOLUTION
arnold

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
UnHeardOf

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
eemoon

ASKER
Thank you for your reply. I think as layer3, ping packet always should go through routing table even if two routers connected with each other directly. I am not sure if the concept is correct
SOLUTION
arnold

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Predrag Jovic

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
eemoon

ASKER
The following(config and diagram attached) is what i tested. First time it confirmed default-gateway is unnecessary, but after redid it, it confirmed the default-gateway is necessary for R8 to ping R6. I used gns to do it. it is unstable sometimes. but I believe second test.

here is what think about the issue: I think the issue should be considered like this: If an end router has only one ip address connected with other device, the router cannot be reached by user located in different network unless the router has default route. The default route in the router is like ip default-gateway in the switch that we are talking about. if anyone are interested, it could be pasted and confirm it.

-------------------------------
R6#sh run
interface FastEthernet1/0
 switchport access vlan 2
 no ip address

interface Vlan2
 ip address 67.1.1.6 255.255.255.0
 no ip proxy-arp
 no ip route-cache
--------------------------------------------

R7#sh run
interface FastEthernet1/0
 switchport access vlan 2
 no ip address
!
interface FastEthernet1/1
 no ip address
!
interface Vlan1
 ip address 1.1.1.7 255.255.255.0
 no ip proxy-arp
!
interface Vlan2
 ip address 67.1.1.7 255.255.255.0
 no ip proxy-arp
---------------------------------------------------

R8#sh run
interface FastEthernet1/0
 switchport access vlan 2
 no ip address
!
interface Vlan1
 ip address 1.1.1.8 255.255.255.0
 no ip proxy-arp
!
ip route 0.0.0.0 0.0.0.0 1.1.1.7
!
Capture.PNG
ASKER CERTIFIED SOLUTION
Predrag Jovic

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
eemoon

ASKER
Thank you !!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
eemoon

ASKER