08-02-2016 03:01 AM - edited 03-08-2019 06:51 AM
Hi,
I am working on packet tracer. I have a topology below topology.
I have connected 2901 router to 2 switches (2960).
Vlan 10 is configured in switch 1 and Vlan 20 is configured in switch 2.
Ip address of host in switch 1 is 192.168.1.10 and ip address of host in switch 2 is 192.168.2.10.
I need to communicate between the 2 hosts. But Its not communicating. Please check my configurations below and help me to solve the issue.
I have done the below configurations
Router:
#inter giga0/0
#Ip address 192.168.1.1 255.255.255.0
#exit
#inter giga0/1
#ip address 192.168.2.1 255.255.255.0
#exit
In Switch 1:
#inter fa0/1
#switchport mode Trunk
#exit
#inter fa0/2
#switchport mode access
#switchport access vlan 10
#exit
In Switch 2:
#inter fa0/1
#switchport mode trunk
#exit
#inter fa0/2
#switchport mode access
#switchport access vlan 20
#exit
Solved! Go to Solution.
08-02-2016 04:06 AM
change your configuration on your switch interface facing the router
In Switch 1:
#inter fa0/1
#no switchport mode Trunk
#switchport mode access
#switchport access vlan 10
#exit
In Switch 2:
#inter fa0/1
#no switchport mode Trunk
#switchport mode access
#switchport access vlan 20
#exit
try to test ping from host to gateway (router).. or gateway (router) to host), if it works then
try to test ping from host to host
if not check the ip configured at each hosts or check the ip configured at the router (subnet mask, default gateway, interface not administratively shutdown)
regards,
08-02-2016 03:56 AM
Hi
can you ping between your ip interfaces ? -------------ping 192.168.2.1 source 192.168.1.1
if your going to do a trunk instead of an access as its only 1 vlan you may need to tell the router the vlan encapsulation on router side like router and stick setup , you have switch side as trunk but router as routed interface , how does it know the vlan ?
Try this same on both sides obviously with the vlan and ip changed for far side
inter giga0/1
no ip address
interface g0/1.1
encapsulation dot1q 1 10
ip address 192.168.2.1 255.255.255.0
08-02-2016 04:15 AM
Hi Mark,
But there are 2 vlans. Vlan 10 and Vlan 20
08-02-2016 04:38 AM
if you want only changes on router then try belows config for your router
inter giga0/0
no ip address
interface g0/0.1
encapsulation dot1q 10
ip address 192.168.1.1 255.255.255.0
no shutdwon
inter giga0/1
no ip address
interface g0/1.2
encapsulation dot1q 20
ip address 192.168.2.1 255.255.255.0
no shutdown
that should do it.
regards
08-02-2016 04:40 AM
08-02-2016 04:00 AM
I assume the trunk (fa0/1) switch interfaces are connected to the router - if that's the case, you've got an "access vs. trunk" mismatch between the switches and the router: either change fa0/1s to access mode, or define sub-interfaces gi0/0.10 and gi0/1.20 on the router and move its .1 IPs there.
08-02-2016 04:38 AM
Thansk Lulian
08-02-2016 04:06 AM
change your configuration on your switch interface facing the router
In Switch 1:
#inter fa0/1
#no switchport mode Trunk
#switchport mode access
#switchport access vlan 10
#exit
In Switch 2:
#inter fa0/1
#no switchport mode Trunk
#switchport mode access
#switchport access vlan 20
#exit
try to test ping from host to gateway (router).. or gateway (router) to host), if it works then
try to test ping from host to host
if not check the ip configured at each hosts or check the ip configured at the router (subnet mask, default gateway, interface not administratively shutdown)
regards,
08-02-2016 04:36 AM
I tried the above config. Its working now. I am able to ping between host and gateway and also between the 2 hosts. Thanks.
I actually set fa0/1 as access before changing to truck.But i forgot to give vlan access. Tats d issue.
Thanks.
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