cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2525
Views
0
Helpful
6
Replies

VLAN - 2 switches and router

krzysbie
Level 1
Level 1

Hi Guys, Let say PC0 and PC2 are in the same VLAN10 and PC1 and PC3 in same VLAN20. I tried to make some configuration between VLANs but when adding address to subinterfaces it put me an error overlaps address. I'm trying on gig0/0.10 add 192.168.10.1 which is in the same range as in gig0/1.10. Is this make sense? Thanks

IMAG1144.jpgIMAG1145.jpg

2 Accepted Solutions

Accepted Solutions

luis_cordova
VIP Alumni
VIP Alumni

Hi @krzysbie ,

 

From what I see in the first image, you should not enter an IP address in the router interface. IP addresses should only go in the subinterfaces.

You must bear in mind that two interfaces or subinterfaces of the same router can belong to the same network, even if they are associated with the same vlan.

Try with this:

Router (config)#interface g0/0

Router (config-if)#no ip address 

Router (config-if)#exit

Router (config)#interface g0/1

Router (config-if)#no ip address 

Router (config-if)#exit

Router (config)#interface g0/0.10

Router (config-subif)#ip address 10.10.10.1 255.255.255.0

Router (config-subif)#exit

Router (config)#interface g0/0.20

Router (config-subif)#ip address 192.168.20.1 255.255.255.0

Router (config)#exit

Router (config)#interface g0/1.10

Router (config-subif)#ip address 192.168.10.1 255.255.255.0

Router (config)#exit

Router (config)#interface g0/1.20

Router (config-subif)#ip address 10.10.20.1 255.255.255.0

Router (config-subif)#exit

 

Regards

View solution in original post

Hi @krzysbie ,

 

The ping will be successful, since the one that directs the networks is the router, so if the rest is well configured, there should be ping between networks connected to the same router.

Do you have connectivity between the networks? If not, check the following:

1- Check that PCs have a correct ip and the correct gateway.

2- Check that the switch ports are associated with the correct vlan.

3- Check that the port of the switch that connects to the router is in trunk mode and that existing vlan is allowed.

 

Regards

 

View solution in original post

6 Replies 6

Jon Marshall
Hall of Fame
Hall of Fame

 

What you are trying to do won't work. 

 

You can't use the same IP subnet on different router interfaces which is what the error message is telling you. 

 

Either connect all devices to one switch and use just one interface or if you want to use both switches you must have PCs in the same vlan on the same switch. 

 

Jon

 

luis_cordova
VIP Alumni
VIP Alumni

Hi @krzysbie ,

 

From what I see in the first image, you should not enter an IP address in the router interface. IP addresses should only go in the subinterfaces.

You must bear in mind that two interfaces or subinterfaces of the same router can belong to the same network, even if they are associated with the same vlan.

Try with this:

Router (config)#interface g0/0

Router (config-if)#no ip address 

Router (config-if)#exit

Router (config)#interface g0/1

Router (config-if)#no ip address 

Router (config-if)#exit

Router (config)#interface g0/0.10

Router (config-subif)#ip address 10.10.10.1 255.255.255.0

Router (config-subif)#exit

Router (config)#interface g0/0.20

Router (config-subif)#ip address 192.168.20.1 255.255.255.0

Router (config)#exit

Router (config)#interface g0/1.10

Router (config-subif)#ip address 192.168.10.1 255.255.255.0

Router (config)#exit

Router (config)#interface g0/1.20

Router (config-subif)#ip address 10.10.20.1 255.255.255.0

Router (config-subif)#exit

 

Regards

So looks like that won't work. If the subinterfaces are in the different subnet they are not ping each other. I was wondering if the subinterfaces put in some bridge mode or set routing. I just wondering if that configuration would work. Thank for help!

Hi @krzysbie ,

 

The ping will be successful, since the one that directs the networks is the router, so if the rest is well configured, there should be ping between networks connected to the same router.

Do you have connectivity between the networks? If not, check the following:

1- Check that PCs have a correct ip and the correct gateway.

2- Check that the switch ports are associated with the correct vlan.

3- Check that the port of the switch that connects to the router is in trunk mode and that existing vlan is allowed.

 

Regards

 

Ok, I forgot to set default route and I changed hosts IP and yes it works! Thanks for help.

Hi @krzysbie ,

 

I'm glad that your problem was solved. Do not forget to mark the correct answers as solved, since that helps other users with similar doubts.

 

regards

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card