Routing between Vlans

Unanswered Question
Apr 24th, 2007
User Badges:

I have a catalyst 3560G with 3 vlans(Vlan1,Vlan2 and vlan3)and also one trunk port for vlan2 and vlan3.My question is how can i make a routing (Traffic exhange)between Vlan1 and vlan2?


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Jon Marshall Tue, 04/24/2007 - 01:16
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Hi



3560(conf t)# int vlan 1

3560(config-if)# ip address x.x.x.x "subnet mask"

3560(config-if)# no shut


3560(conf t)# int vlan 2

3560(config-if)# ip address x.x.x.x "subnet mask"

3560(config-if)# no shut



Set your clients default gateway to the relevant vlan interface address ie


clients in vlan 2 have a default-gateway of the address you used when you created the vlan 2 interface.


HTH


Jon

nouha1984 Tue, 04/24/2007 - 01:47
User Badges:

This is my Catalyst configuration:

3560-G#sh run

Building configuration...


Current configuration : 2287 bytes

!

version 12.2

no service pad

service timestamps debug uptime

service timestamps log uptime

service password-encryption

!

!

!

no aaa new-model

ip subnet-zero

!

!

!

!

no file verify auto

spanning-tree mode pvst

spanning-tree extend system-id

!

vlan internal allocation policy ascending

!

interface GigabitEthernet0/1

!

interface GigabitEthernet0/2

!

interface GigabitEthernet0/3

!

interface GigabitEthernet0/4

!

interface GigabitEthernet0/5

!

interface GigabitEthernet0/6

!

interface GigabitEthernet0/7

!

interface GigabitEthernet0/8

!

interface GigabitEthernet0/9

!

interface GigabitEthernet0/10

!

interface GigabitEthernet0/11

!

interface GigabitEthernet0/12

!

interface GigabitEthernet0/13

!

interface GigabitEthernet0/14

!

interface GigabitEthernet0/15

!

interface GigabitEthernet0/16

!

interface GigabitEthernet0/17

switchport access vlan 36

switchport mode access

!

interface GigabitEthernet0/18

switchport access vlan 36

switchport mode access

!

interface GigabitEthernet0/19

switchport access vlan 69

switchport mode access

!

interface GigabitEthernet0/20

switchport access vlan 69

switchport mode access

!

interface GigabitEthernet0/21

switchport access vlan 69

switchport mode access

!

interface GigabitEthernet0/22

switchport access vlan 69

switchport mode access

!

interface GigabitEthernet0/23

switchport access vlan 36

switchport mode access

!

interface GigabitEthernet0/24

switchport trunk encapsulation dot1q

switchport trunk allowed vlan 36,69

switchport mode trunk

!

interface GigabitEthernet0/25

!

interface GigabitEthernet0/26

!

interface GigabitEthernet0/27

!

interface GigabitEthernet0/28

!

interface Vlan1

no ip address

no ip route-cache

!

interface Vlan69

ip address 192.168.3.2 255.255.255.0

no ip route-cache

!

ip default-gateway 192.168.3.1

ip classless

ip http server

!

!



where Vlan 36: 192.168.1.0/24

Vlan 1: 192.168.2.0/24


I want to add a new commands to make routing between Vlan 36 and Vlan 1 only for traffic data.

So please can you help me.

Jon Marshall Tue, 04/24/2007 - 01:54
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Hi


3560(conf t)# int vlan 1

3560(config-if)# ip address 192.168.2.1 255.255.255.0

3560(config-if)# no shut


3560(conf t)# int vlan 36

3560(config-if)# ip address 192.168.1.1 255.255.255.0

3560(config-if)# no shut



HTH


Jon


Amit Singh Tue, 04/24/2007 - 01:56
User Badges:
  • Cisco Employee,

In addition to Jon's post, you have enable " ip routing on the switch as well.You dont have " ip routing" enabled on the switch. Do this:


3560(conf t)# ip routing

3560#Wr mem


You will be good to go.


HTH,Please rate if it does.


-amit singh

desai.jaideep Tue, 04/24/2007 - 01:59
User Badges:
  • Gold, 750 points or more

Hi


Can u tell that these 3560Gs are connected to which other switches/routers.And moreover how?

Would be better if u would attach your network diagram.



Regards


JD


Actions

This Discussion