10-31-2016 01:48 AM - last edited on 03-25-2019 04:40 PM by ciscomoderator
https://drive.google.com/file/d/0Bxs_ao6uuBDUeGJkSjRqamE1NU0/view?usp=sharing
https://drive.google.com/file/d/0Bxs_ao6uuBDUX25leEd4SjNycFU/view?usp=sharing
https://drive.google.com/file/d/0Bxs_ao6uuBDUalJWSmhKMDJXcnM/view?usp=sharing
all switches and pc can ping each other
however, when using a router to do inter vlan routing with SVI
in packet tracer 7.0 can not ping 192.168.5.254 which is ip address of router from switches
is the model of switches or router wrong?
switch 1
conf t
hostname switch1
end
conf t
vlan 2
end
conf t
int GigabitEthernet0/1
switchport mode trunk
switchport trunk allowed vlan 2
end
conf t
int vlan 2
ip address 192.168.2.254 255.255.255.0
no shut
end
conf t
int f0/1
switchport access vlan 2
switchport mode access
switchport port-security maximum 1
switchport port-security mac-address 00E0.A336.DD84
switchport port-security violation protect
switchport port-security
no shut
end
conf t
ip default-gateway 192.168.5.254
end
switch 2
conf t
hostname switch2
end
conf t
int GigabitEthernet0/1
switchport mode trunk
switchport trunk allowed vlan 3
end
conf t
vlan 3
end
conf t
int vlan 3
ip address 192.168.3.254 255.255.255.0
no shut
end
conf t
int f0/1
switchport access vlan 3
switchport mode access
switchport port-security maximum 1
switchport port-security mac-address 0001.43C3.28E3
switchport port-security violation protect
switchport port-security
no shut
end
switch 3
conf t
hostname switch3
end
conf t
vlan 2
vlan 3
end
conf t
int f0/1
switchport mode trunk
switchport trunk allowed vlan 2
switchport trunk allowed vlan add 3
no shut
end
conf t
int f0/2
switchport mode trunk
switchport trunk allowed vlan 3
switchport trunk allowed vlan add 2
no shut
end
conf t
int GigabitEthernet0/1
switchport mode trunk
switchport trunk allowed vlan 2
switchport trunk allowed vlan add 3
switchport trunk allowed vlan add 5
no shut
end
conf t
ip default-gateway 192.168.5.254
end
conf t
spanning-tree vlan 1 priority 0
spanning-tree vlan 2 priority 0
spanning-tree vlan 3 priority 0
end
conf t
int vlan 2
ip address 192.168.2.3 255.255.255.0
no shut
end
conf t
int vlan 3
ip address 192.168.3.3 255.255.255.0
no shut
end
conf t
int vlan 5
ip address 192.168.5.3 255.255.255.0
no shut
end
conf t
int GigabitEthernet0/1
shut
no shut
end
Router
conf t
hostname router0
end
conf t
ip routing
router eigrp 11
network 192.168.0.0
int vlan 5
ip address 192.168.5.254 255.255.255.0
no shut
end
conf t
router rip
network 192.168.0.0
interface vlan 5
ip address 192.168.5.254 255.255.255.0
no shut
end
conf t
int GigabitEthernet0/0
ip address 192.168.5.254 255.255.255.0
shut
no shut
end
conf t
int GigabitEthernet0/0
shut
no shut
end
10-31-2016 08:14 AM
Hi
Are you trying to ping 192.168.5.254 from PC or from switch?
Anyway, I guess you have this problem becouse you have gateway's IPs in another subnet, than switches. All your vlans terminates on the switch3, so for switch2, switch1 and both PC switch3 should be gateway, then you will be able to ping 192.168.5.254. But if you need to reach network beyond the router, you have to use dynamic routing.
For switch1 it should be
ip default-gateway 192.168.2.3
For switch2
ip default-gateway 192.168.3.3
If you want router to proceed intervlan routing you have to terminate all vlans on the router. To do this you have to configure a subinterface for each vlan.
For example:
interface GigabitEthernet0/1.2
encapsulation dot1q 2
ip address 192.168.2.1 255.255.255.0
interface GigabitEthernet0/1.3
encapsulation dot1q 3
ip address 192.168.3.1 255.255.255.0
interface GigabitEthernet0/1.5
encapsulation dot1q 5
ip address 192.168.5.1 255.255.255.0
For switch1
ip default-gateway 192.168.2.1
For switch2
ip default-gateway 192.168.3.1
For switch3
ip default-gateway 192.168.5.1
10-31-2016 08:33 PM
A. after tried router on a stick, the switch 1 from vlan 2 can not ping 192.168.3.50 which is the PC in vlan 3
i see that router can ping both vlan 2 and vlan 3 pc 192.168.2.50 and 192.168.3.50
switch 1 can ping 192.168.3.3 and 192.168.3.254, but can not ping the PC
B. why this case can only use router on a stick but can not use SVI based intervlan routing
C. if using another group of vlan, should we use second cable to group vlan?
that means vlan 2 and vlan 3 using gi0/0, if another group is vlan 10, and vlan 11 , then need extra cable to use gi0/1 ?
switch 1
conf t
hostname switch1
end
conf t
vlan 2
end
conf t
int GigabitEthernet0/1
switchport mode trunk
switchport trunk allowed vlan 2
end
conf t
int vlan 2
ip address 192.168.2.254 255.255.255.0
no shut
end
conf t
int f0/1
switchport access vlan 2
switchport mode access
switchport port-security maximum 1
no switchport port-security mac-address 00E0.A336.DD84
switchport port-security mac-address 0030.A3C3.CA15
switchport port-security violation protect
switchport port-security
no shut
end
conf t
ip default-gateway 192.168.2.1
end
conf t
hostname switch2
end
conf t
int GigabitEthernet0/1
switchport mode trunk
switchport trunk allowed vlan 3
end
conf t
vlan 3
end
conf t
int vlan 3
ip address 192.168.3.254 255.255.255.0
no shut
end
conf t
int f0/1
switchport access vlan 3
switchport mode access
switchport port-security maximum 1
no switchport port-security mac-address 0001.43C3.28E3
switchport port-security mac-address 0007.ECD5.6E13
switchport port-security violation protect
switchport port-security
no shut
end
conf t
ip default-gateway 192.168.3.1
end
router0
conf t
hostname router0
end
conf t
interface GigabitEthernet0/0
no ip address
no shut
interface GigabitEthernet0/0.2
encapsulation dot1q 2
ip address 192.168.2.1 255.255.255.0
interface GigabitEthernet0/0.3
encapsulation dot1q 3
ip address 192.168.3.1 255.255.255.0
interface GigabitEthernet0/0.5
encapsulation dot1q 5
ip address 192.168.5.254 255.255.255.0
end
conf t
hostname switch3
end
conf t
vlan 2
vlan 3
end
conf t
int f0/1
switchport mode trunk
switchport trunk allowed vlan 2
switchport trunk allowed vlan add 3
no shut
end
conf t
int f0/2
switchport mode trunk
switchport trunk allowed vlan 3
switchport trunk allowed vlan add 2
no shut
end
conf t
int GigabitEthernet0/1
switchport mode trunk
switchport trunk allowed vlan 2
switchport trunk allowed vlan add 3
switchport trunk allowed vlan add 5
no shut
end
conf t
ip default-gateway 192.168.5.254
end
conf t
spanning-tree vlan 1 priority 0
spanning-tree vlan 2 priority 0
spanning-tree vlan 3 priority 0
end
conf t
int GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
shut
no shut
end
conf t
int vlan 2
ip address 192.168.2.3 255.255.255.0
no shut
end
conf t
int vlan 3
ip address 192.168.3.3 255.255.255.0
no shut
end
conf t
int vlan 5
ip address 192.168.5.3 255.255.255.0
no shut
end
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