cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
648
Views
0
Helpful
7
Replies

3560g with vlans

gschertz
Level 1
Level 1

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 7

froggy3132000
Level 3
Level 3

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

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))

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.

amit-singh
Level 8
Level 8

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

gschertz
Level 1
Level 1

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.

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

got it thanks all.

Review Cisco Networking products for a $25 gift card