cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3433
Views
4
Helpful
9
Replies

Layer 3 switch inter-vlan routing

frontechasl123
Level 1
Level 1

Untitled.jpgHi All,

I connected 2 PC's to a Layer 3 Switch. Each PC is in one vlan. There is no layer2 switches & Routers. I want one PC inone Vlan to communicate with another PC in another vlan.

After doing the following below configuration, PC1 couldn't ping PC 2.

Vlan 10 ; 10.1.1.0/24

Vlan 20;  20.1.1.0/24

PC1- Vlan 10-- 10.1.1.1 ;;;;  PC1 is connected to interface FastEthernet 10 in Switch

PC2- Vlan 20-- 20.1.1.1 ;;;;  PC2 is connected to interface FastEthernet 11 in Switch

SWITCH:

Layer3(config)#vlan 10

                      name ten

Layer3(config)#vlan 20

                      name twenty

Layer3(config)#int fa0/10

                      switchport mode access

                      switchport access vlan 10

                      no sh

Layer3(config)#int fa0/11

                      switchport mode access

                      switchport access vlan 20

                      no sh

Layer3(config)#int vlan 10

                      ip address 10.1.1.10 255.255.255.0

                      no sh

Layer3(config)#int vlan 20

                      ip address 20.1.1.10 255.255.255.0

                      no sh

Layer3(config)#ip routing

Pls suggest, did i miss anything

9 Replies 9

Shashank Singh
Cisco Employee
Cisco Employee

Hi,

Try setting the default gatways on PCs to their respective interface vlan IP addresses. Also, try turning off the firewall (if any) on the PCs.

Cheers,

Shashank

glen.grant
VIP Alumni
VIP Alumni

Removed

johnlloyd_13
Level 9
Level 9

hi,

your VLAN 20 is using a public IP address. try to re-configure your SVI and host PC with a private IP address and test again.

For testing purposes it dowsn't matter if he uses public addresses so long as he isn't going to the internet, in which he would probably use NAT anyway, so thats not the answer to his problem although it is good practise.

You didn't actually say if your setup worked or not? Can you ping inbetween the PC's?

Do a #sh vlan to make sure you created the vlans correctly. Try a ping, what happens?

If you configured the default gateway and masks right on the PC's it should work.

Regards,

Ian

johnlloyd_13
Level 9
Level 9

hi ian,

i stand corrected. i simulated this on lab and it does route or is able to ping. it must be the PC setup. it would be helpful to post his ipconfig.

No worries mate...you never go to bed without learning something new

kapathak
Cisco Employee
Cisco Employee

Is the default gateway on the PC's configured as the SVI IP of the corresponding vlans?

On PC0, the default gateway would be 10.1.1.10

On PC1, the default gateway would be 20.1.1.10

Cheers.

Thanks all for your support.

I couldn't ping one pc to another.

I cant configure default-gateway, as i this set up is done on packet tracer 5.3. There is no option to configure default-gateway in pc.

As far as configuration , did i miss any command?

hi,

you can set the default gateway by clicking on Config tab > Settings > Gateway.

Review Cisco Networking for a $25 gift card