Inter-Vlan done right finally! or is it? :)

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.

Inter-Vlan done right finally! or is it? :)

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
Inter-Vlan done right finally! or is it? :)
Inter-Vlan done right finally! or is it? :)
2022-11-28 03:05:38 - last edited 2022-11-28 03:07:44
Model: T1700G-28TQ  
Hardware Version: V3
Firmware Version: 3.0

Hi,

I finally managed to setup inter-vlan in my tp-link t1700g-28tq switch successfully and wanted to share my settings here. I didn't understand the logic fully so i may have questions. I set it up by trial and error and thanks to helpfull people in this forum. I hope it may help other newbies like me trying to set up their own vlans and don't hesitate to correct me anywhere.

 

To be honest, i didnt need inter-vlan in my house as i didnt have that many machines. I bought this switch as it have 4 spf+ ports with port truncating features but as i am curious about learning new things i said why not learn some new things about networking.

 

My current network is like below:

 

 

 

So for the people like me who are new to networking world and its terminology, inter-vlan is a concept about connecting computers in different sub nets like 192.168.1.150 to 192.168.10.150.

 

For example i can ping my laptop with a ip of 192.168.20.100 from my computer (my ip: 192.168.10.70 with a subnet mask of 255.255.255.0) and each computer can access the internet from different subnets.

 

First here is my vlan configuration below: ( L2 Features \ Vlan \ 802.1-Q Vlan )

 

 

 

 

 

 

My router is connected through port 2 of the switch so i made sure port 2 and other unused ports are at vlan 1, My computer and truenas server are at ports 26 and 28, proxmox server is at port 24 (tagged) both of these 3 are vlan 10 and my laptop is at port 17 at vlan 20. Also i removed port 2 from all other interfaces, i dont know if it is related or not or good practice.

 

 

Then i created 3 interfaces like below: ( L3 Features \ Interface )

 

 

The key point of this while creating these interfaces one of them should be in the same subnet of your router. For example my router was 192.168.1.1 and i made one of these interfaces with a ip of 192.168.1.2. I've seen some ppl disregarding this and successfully making this work but how much i try i couldnt succeed. This interface is making sure my network is working by connecting to my router.

 

Then i created only 1 static route, next hop should be your router's ip

 

 

 

Finally my routing table looked like this:

 

And finally i added 2 static routes to my router like below to be able to communicate with my switch. Gateways of these routes should be the one which you setup at the switch with the same subnet of router. I tried adding these routes through switch's interface but it didnt work.

 

 

 

 

I hope these settings help someone like me. Please let know if you saw anything wrong with these settings or something like "you dont need to do this" or "doing that should be better"

 

  0      
  0      
#1
Options
4 Reply
Re:Inter-Vlan done right finally! or is it? :)
2022-12-07 01:12:06

Also can someone explain me the logic behind why it doesn't work when i add static routes from my switch like i did in my router? i can give the exact same parameters at the switch too. Am i doing something wrong there? I can't even access router when i delete static routes from my router and give static routes from switch with my ip configuration above.

  0  
  0  
#2
Options
Re:Inter-Vlan done right finally! or is it? :)
2022-12-07 20:19:27

  @orfenegro 

 

Your switch does not need those static routes, but your router needs them. They tell the router that you have additional subnets on the network, beside the subnet the router is in, and how to reach those subnets.

 

As an example, imagine you make an Internet request from a device in the 192.168.20.0/24 subnet. Thanks to the inter-VLAN routing and the default gateway route, the request makes it from the switch to the router through the 192.168.1.2 interface. The router forwards it to Internet and then a reply comes back. If that request was sent from a device in the 192.168.1.0/24 subnet, the reply would find its way to the requesting device through the switching mechanism. However that reply should go to a device in the 192.168.20.0/24 subnet and thus it needs to be routed. The router has no a clue that the reply is to a request that came through the 192.168.1.2 interface, but it knows its destination IP address. That’s why you need that static route in the router itself, not the switch. It tell the router that the 192.168.20.0/24 subnet can be reached through the 192.168.1.2 interface. Once the reply gets to the switch, the inter-VLAN routing kicks in to forward it to the proper subnet.

Kris K
  1  
  1  
#3
Options
Re:Inter-Vlan done right finally! or is it? :)
2022-12-09 06:51:34

  @KJK 

i see, so i make the subnet mask of router 255.255.0.0 instead of 255.255.255.0 i wont even need them right?

  0  
  0  
#4
Options
Re:Inter-Vlan done right finally! or is it? :)
2022-12-09 11:37:25

  @orfenegro 

That would be a mistake. I don't want to speculate what would happen.

Kris K
  0  
  0  
#5
Options

Information

Helpful: 0

Views: 1372

Replies: 4

Related Articles