02-21-2024 01:07 AM - last edited on 02-21-2024 11:09 PM by Translator
Hi guys, I have a problem with the router on a stick. I am trying to ping from R1 to S1 interface 192.168.1.2. But ping does not work. I have doubled the basis IP configuration for R1 and S1. There is no typo error so far. The address 192.168.1.2 is in the router table which is beyond to [C 192.168.1.0/26 is directly connected, GigabitEthernet0/0/1.100]. Can anyone help? Thanks
R1 Router Table
Gateway of last resort is 10.0.0.2 to network 0.0.0.0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/30 is directly connected, GigabitEthernet0/0/0
L 10.0.0.1/32 is directly connected, GigabitEthernet0/0/0
192.168.1.0/24 is variably subnetted, 4 subnets, 3 masks
C 192.168.1.0/26 is directly connected, GigabitEthernet0/0/1.100
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0/1.100
C 192.168.1.64/27 is directly connected, GigabitEthernet0/0/1.200
L 192.168.1.65/32 is directly connected, GigabitEthernet0/0/1.200
S* 0.0.0.0/0 [1/0] via 10.0.0.2
R1#sh run
Building configuration...
Current configuration : 1196 bytes
!
version 15.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname R1
!
!
!
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0/0
ip address 10.0.0.1 255.255.255.252
duplex auto
speed auto
!
interface GigabitEthernet0/0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0/1.100
encapsulation dot1Q 100
ip address 192.168.1.1 255.255.255.192
!
interface GigabitEthernet0/0/1.200
encapsulation dot1Q 200
ip address 192.168.1.65 255.255.255.224
!
interface GigabitEthernet0/0/1.1000
encapsulation dot1Q 1000 native
no ip address
!
interface GigabitEthernet0/0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.0.0.2
ip route 192.168.1.0 255.255.255.192 GigabitEthernet0/0/1
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
S1#sh run
Building configuration...
Current configuration : 2142 bytes
!
version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
service password-encryption
!
hostname S1
!
enable secret 5 $1$mERr$9cTjUIEqNGurQiFU.ZeCi1
!
!
!
no ip domain-lookup
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport access vlan 999
!
interface FastEthernet0/2
switchport access vlan 999
!
interface FastEthernet0/3
switchport access vlan 999
!
interface FastEthernet0/4
switchport access vlan 999
!
interface FastEthernet0/5
switchport trunk native vlan 1000
switchport trunk allowed vlan 1,100,200,999-1000
switchport mode trunk
!
interface FastEthernet0/6
switchport access vlan 200
!
interface FastEthernet0/7
switchport access vlan 999
!
interface FastEthernet0/8
switchport access vlan 999
!
interface FastEthernet0/9
switchport access vlan 999
!
interface FastEthernet0/10
switchport access vlan 999
!
interface FastEthernet0/11
switchport access vlan 999
!
interface FastEthernet0/12
switchport access vlan 999
!
interface FastEthernet0/13
switchport access vlan 999
!
interface FastEthernet0/14
switchport access vlan 999
!
interface FastEthernet0/15
switchport access vlan 999
!
interface FastEthernet0/16
switchport access vlan 999
!
interface FastEthernet0/17
switchport access vlan 999
!
interface FastEthernet0/18
switchport access vlan 999
!
interface FastEthernet0/19
switchport access vlan 999
!
interface FastEthernet0/20
switchport access vlan 999
!
interface FastEthernet0/21
switchport access vlan 999
!
interface FastEthernet0/22
switchport access vlan 999
!
interface FastEthernet0/23
switchport access vlan 999
!
interface FastEthernet0/24
switchport access vlan 999
!
interface GigabitEthernet0/1
switchport access vlan 999
!
interface GigabitEthernet0/2
switchport access vlan 999
!
interface Vlan1
ip address 192.168.1.2 255.255.255.224
!
interface Vlan200
ip address 192.168.1.66 255.255.255.224
!
ip default-gateway 192.168.1.65
!
!
!
!
line con 0
password 7 0822455D0A16
login
!
line vty 0 4
password 7 0822455D0A16
login
line vty 5 15
password 7 0822455D0A16
login
!
!
!
!
end
password 7 0822455D0A16
login
!
line aux 0
!
line vty 0 4
password 7 0822455D0A16
login
line vty 5 15
password 7 0822455D0A16
login
!
!
!
end
Solved! Go to Solution.
02-21-2024 06:41 AM - last edited on 02-21-2024 11:07 PM by Translator
Hello,
You have a few things going on to start:
1- R1 has 192.168.1.1 with a /26 mask and S1 has 192.168.1.2 with a /27 mask. Need to have the same masks.
2- In R1 192.168.1.1 is in VLAN 100 and on S1 192.168.1.2 is in VLAN 1. Need to fix that.
3- Make the trunk's native VLAN 200 on R1 and S1.
4- Remove the
ip route 192.168.1.0 255.255.255.192 GigabitEthernet0/0/1
it serves no purpose and as a rule you cannot point a static route to an ethernet interface. It has to point to an IP.
Hope this helps
02-21-2024 06:41 AM - last edited on 02-21-2024 11:07 PM by Translator
Hello,
You have a few things going on to start:
1- R1 has 192.168.1.1 with a /26 mask and S1 has 192.168.1.2 with a /27 mask. Need to have the same masks.
2- In R1 192.168.1.1 is in VLAN 100 and on S1 192.168.1.2 is in VLAN 1. Need to fix that.
3- Make the trunk's native VLAN 200 on R1 and S1.
4- Remove the
ip route 192.168.1.0 255.255.255.192 GigabitEthernet0/0/1
it serves no purpose and as a rule you cannot point a static route to an ethernet interface. It has to point to an IP.
Hope this helps
02-21-2024 11:05 PM
Thanks for your help. I changed 192.168.1.2 from VLAN 1 to VLAN 100 on S1 without changing the mask and the problem was solved.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide