Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

3560g with vlans

does anyone have an example of a 2 vlan config with inter-vlan routing?

I have ports 1-10 on vlan 1

ports 11-27 on vlan 2

if I set all the ports to trunk mode I can ping from the switch to a box on vlan 2. but set in access mode i can not.

I cannot ping from a pc on vlan 1 to the pc on vlan 2 in ether mode.but the switch can ping both. IP routing is turned on,

OOh yea the OS is c3560-IPBASE ver 12.2(25)see2

7 REPLIES
Community Member

Re: 3560g with vlans

did you set ip addresses on the vlan interfaces?

int vlan 1

ip address 192.168.1.1 255.255.255.224

int vlan 2

ip address 192.168.2.1 255.255.255.224

Community Member

Re: 3560g with vlans

Good luck!! Froggy has an excellent example.... Also, all ip routing should point to your gateway.

sh ip route>

ip route 192.168.1.1 x.x.x.x ((gateway ip))

Re: 3560g with vlans

in addition to that are those 2 box are connected to same switch or different switch? If it is different switch, then link connecting those switches has to be a trunk and link to carry VLAN 1 and 2. If you configure it as access link then traffic can't be passed through both VLANs and hence you on't be able to ping each other.

Re: 3560g with vlans

Make sure that you have the correct gateway set on the hosts in both the vlans. The hosts in Vlan1 should have the Vlan1 interface IP as the default-gateway and the hosts in Vlan2 should have the default-gateway as Vlan2 interface IP.If the users are on a different switch then make sure that you have a trunk enabled between the switches.

-amit singh

Community Member

Re: 3560g with vlans

Currently IP routing is enabled.

ports 1-10 are on vlan 1, the default vlan. with ip address 1.x.x.20/24 ports 11-27 are on vlan 2 ip address 2.x.x.20/24 if ports 1-10 and 11-27 on their repective vlans are set to access mode I cannot ping the pc on vlan 2 from the switch! The pc on vlan 2 has 2.2.2.20 as its gateway.

Do I have to tell the pc its on vlan 2?

If I set these ports to trunk mode encap dot1q I can ping the pc from the switch but still cannot ping it from vlan 1.

Re: 3560g with vlans

can you share running config and output of show vlan with us?

Community Member

Re: 3560g with vlans

got it thanks all.

151
Views
0
Helpful
7
Replies
CreatePlease to create content