cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
831
Views
10
Helpful
9
Replies

Need help on configuring basic VLAN network

Joris Syen
Level 1
Level 1

Good day,

I have not enough experience to know if I am configuring things correctly.

Basically, we need a network with 5 VLANS divided over 2 layer 3 switches and all devices need to be able to communicate with each other.

The interVLAN communication can happen using the device default gateway.

network.PNG

Now this is my formation that I made already:

network2.PNG

So I created all the VLANs on switch 1, and assigned them all IP addresses.

I verified that all devices on switch 1 where able to communicate with each other.

Switch 2 is not configured yet but I have drawn what I wanted to try (but I'm not sure how to do it).

I was planning to create the same VLANs on switch 2 without assign IP addresses to them and so without enabling ip routing.

The problem with that is I think that all traffic from Sensor to Camera will go over switch 1, which is not required.

There might be other problems with that but my experience is to low.

The second problem is that in our device table, the switches must be accessible over ip addresses in VLAN 14 (see red lines).

But I seem not to be able to assign an IP address to a switch, that is not the ip address of a VLAN.

I thought I could overcome some problems by doing something like this:

network4.PNG

But again I dont know if this is the way it should be done?

And again, switch 2 will not be accessible with an ip address in vlan 14.

Can someone please assist me with some knowledge about how to setup this in a good way?

Thank you VERY much.

Best Regards,

Joris

9 Replies 9

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hello Joris,

What I understand from the above requirement you want your two swtch in L3 mode with intervlan routing enabled.If yes create a port channle with trunk enabled between the switch and creat vlan on switches with giving ip address todata vlan say 14 and put a default gateway twards router.

check out the below link for the above requirement hope it helps

http://www.cisco.com/en/US/tech/tk389/tk213/technologies_configuration_example09186a0080094bc5.shtml

Hope it Helps

Regards

Ganeshh Iyer

Thank you I will try and read the document but it is very technical for me and I am using 2 layer 3 switches and not a layer 2.

Basic questions I have:

- Do I need assign IP addresses to all VLAN interfaces, on both switches? Wont I have double IPs then?

- Where do I put the default gateway towards the router? There is no router? Can I put a default gateway on a VLAN? Or where?

Thanks,

Joris

Thank you I will try and read the document but it is very technical for me and I am using 2 layer 3 switches and not a layer 2.

Basic questions I have:

- Do I need assign IP addresses to all VLAN interfaces, on both switches? Wont I have double IPs then?

- Where do I put the default gateway towards the router? There is no router? Can I put a default gateway on a VLAN? Or where?

Thanks,

Joris

Joris,

So you have Two layer 3 switches connected back to back , see you can do the following

1) Create a port channel for redundacny between the switch with trunk enabled and allowing vlans between the switches

2) Yes you need to give different ip address to switces for managebilty and admin prupose by creating SVI on both vlan

3) Explain how is the routing hapening in your network so that we can check where to configure a default gateway in switch.

Hope it Helps !!

Regards

Ganeshh Iyer

Rate if it helps !!

Hello,

1) I can setup the port 5 and 6 for trunking with

Switch1#Configure terminal

Interface Gi0/5

Switchport trunk encapsulation dot1q

Switchport trunk native vlan 11

End

Switch2#Configure terminal

Interface Gi0/6

Switchport trunk encapsulation dot1q

Switchport trunk native vlan 11

End

Is that what you mean? Or what do you mean by "for redundant"?

2) How do I give the switches different ip addresses? Can I do this?

Switch1#Configure terminal

Interface Vlan 11

ip address 192.168.100.1 255.255.255.224

Switch2#Configure terminal

Interface Vlan 11

ip address 192.168.100.10 255.255.255.224

Is this valid?

3) "Explain how is the routing hapening in your network so that we can check where to configure a default gateway in switch." I do not understand. I only know that each device needs to be able to connect to each other device. Therefor I created the VLANs and gave them IP addresses and then I did #ip routing and everything was ok. What is the question please?

Best Regards,

Joris

Joris Syen wrote:

Hello,

1) I can setup the port 5 and 6 for trunking with

Switch1#Configure terminal

Interface Gi0/5

Switchport trunk encapsulation dot1q

Switchport trunk native vlan 11

End

Switch2#Configure terminal

Interface Gi0/6

Switchport trunk encapsulation dot1q

Switchport trunk native vlan 11

End

Is that what you mean? Or what do you mean by "for redundant"?

2) How do I give the switches different ip addresses? Can I do this?

Switch1#Configure terminal

Interface Vlan 11

ip address 192.168.100.1 255.255.255.224

Switch2#Configure terminal

Interface Vlan 11

ip address 192.168.100.10 255.255.255.224

Is this valid?

3) "Explain how is the routing hapening in your network so that we can check where to configure a default gateway in switch." I do not understand. I only know that each device needs to be able to connect to each other device. Therefor I created the VLANs and gave them IP addresses and then I did #ip routing and everything was ok. What is the question please?

Best Regards,

Joris

Joris,

Ohh I think i have misunderstood the last requirement ...Yes you are right you can given the ip address to switches by enabling SVI with ip address.

My actual question was if you want to connect these devices from different subnet suppose not from the same subnet where switch is configured then you require a default route in switches.

So i dont think so you required on you setup as it just they should be able to communicate with each other in above case it will work.

Let me know if your query solves.

Regards

Ganeshh Iyer

Hello,

I am having problem with the trunking.

on switch 1 I did this:

switch1# vlan 11 ip address 192.168.100.1 255.255.255.224

switch1# vlan 12 ip address 192.168.100.65 255.255.255.224

switch1# vlan 13 ip address 192.168.100.129 255.255.255.224

switch1# vlan 14 ip address 192.168.100.193 255.255.255.224

switch1#ip routing

switch1#Interface Gi0/5

switch1#Switchport trunk encapsulation dot1q

switch1#Switchport trunk native vlan 11

on switch 2 I did this:

switch2# vlan 11 ip address 192.168.100.2 255.255.255.224

switch2# vlan 12 ip address 192.168.100.66 255.255.255.224

switch2# vlan 13 ip address 192.168.100.130 255.255.255.224

switch2# vlan 14 ip address 192.168.100.194 255.255.255.224

switch2#ip routing

switch2#Interface Gi0/6

switch2#Switchport trunk encapsulation dot1q

switch2#Switchport trunk native vlan 11

switch2#default-gateway 192.168.100.1

But I am unable to ping from a device plugged on switch2 to a device on switch1.

For example I plug in a device 192.168.100.5 and default gateway 192.168.100.2 into port 1 of switch 2

, i cannot ping to 192.168.100.1.

I must be doing something wrong I have no idea.

Thank you again so far thanks.

Best Regards,

Joris

Thank you after some research I got it to work properly!

Thank you very much!

Joris Syen wrote:

Thank you after some research I got it to work properly!

Thank you very much!

That great if it worked , it will be helpful if you can let us know what was the problem and solve this thread so that others can get benifitted

Regards

Ganeshh Iyer

The problem was I think that the trunk on switch2 only allowed VLAN1.

After putting its mode to dynamic desirable it showed that all VLANs where allowed on the trunk.

After that I could do a succesful ping to a device on the other switch in a different VLAN.

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