Link to home
Start Free TrialLog in
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
SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eemoon
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eemoon

ASKER

Thank you !!