- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2022 01:59 PM
Hi,
I have a lab on eve-ng with the following:
Both switches use vlan 1 by default with the ip address on the image. The switch on the right is indeed named R6. Now, I was wondering why I couldn't reach each others subnets, until I hit the no ip routing command. Now, everything pings but I don't understand why it does. Whether I put a default-gateway on each switches, or I don't, it works. I can ping from 192.168.2.2 to 192.168.1.1 and vice versa. Here are the configs of the switch:
Switch on the right (R6)
Building configuration...
Current configuration : 936 bytes
!
! Last configuration change at 15:42:15 EST Fri Apr 15 2022
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname R6
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone EST -5 0
!
!
!
!
!
no ip source-route
no ip routing
!
!
!
no ip cef
no ipv6 cef
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
!
interface Vlan1
ip address 192.168.2.2 255.255.255.0
no ip route-cache
!
no ip classless
ip forward-protocol nd
!
ip http server
!
ip ssh server algorithm encryption aes128-ctr aes192-ctr aes256-ctr
ip ssh client algorithm encryption aes128-ctr aes192-ctr aes256-ctr
!
!
!
!
!
control-plane
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
!
end
R6#
Switch on the left (SW2)
SW2#show run
Building configuration...
Current configuration : 936 bytes
!
! Last configuration change at 15:38:05 EST Fri Apr 15 2022
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname SW2
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone EST -5 0
!
!
!
!
!
no ip source-route
no ip routing
!
!
!
no ip cef
no ipv6 cef
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
!
interface Ethernet0/1
!
interface Ethernet0/2
!
interface Ethernet0/3
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
no ip route-cache
!
no ip classless
ip forward-protocol nd
!
ip http server
!
ip ssh server algorithm encryption aes128-ctr aes192-ctr aes256-ctr
ip ssh client algorithm encryption aes128-ctr aes192-ctr aes256-ctr
!
!
!
!
!
control-plane
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
!
end
SW2#
Why can I ping everything here? In the CCNA volume 1 book, it mentions that you need to add a default-gateway on the switch so it can communicate with other subnets in case you want to telnet or SSH into the switch. In this case, it's working without it. Is this a dumb question to ask? Thanks for your help.
If it helps, R6 is a Cisco IOL Layer 2 device. Also, I tried adding the no ip classless command, but I have no idea what it does; so please ignore.
Solved! Go to Solution.
- Labels:
-
LAN Switching
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2022 04:31 PM
The router will be using proxy arp and that is why it works.
If the switch has no default gateway it will arp for everything so it arps for 192.168.1.1, the router sees this arp and because it has a directly connected interface in that subnet it answers of behalf of 192.168.1.1 using the mac address of it's fa0/1 interface.
The switch then just sends the packet to the router with the router's mac address and the router forwards it on.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2022 04:31 PM
The router will be using proxy arp and that is why it works.
If the switch has no default gateway it will arp for everything so it arps for 192.168.1.1, the router sees this arp and because it has a directly connected interface in that subnet it answers of behalf of 192.168.1.1 using the mac address of it's fa0/1 interface.
The switch then just sends the packet to the router with the router's mac address and the router forwards it on.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2022 07:13 PM
Thank you!!! I got it to work. I set the command no ip proxy-arp on the interface facing the switch and now it cannot ping unless I set the default-gateway.
I appreciate it!
