ā04-06-2024 02:20 AM
Linux1 [eth1.20] --------[F1/1](SW1)[F1/2] --------[F1/2](SW2)[F1/1] ----------[eth1.20] Linux2
When we configure VLAN on any NIC in Linux does the server tags the packet with the VLAN?
Linux1 & Linux2 part of VLAN 20. They are configured as eth1.20. What should be the VLAN mode Trunk/Access for F1/1 & F1/2 of both switches? Considering VLAN 20 is not native on both switches?
Similar scenario when VLAN 20 is NATIVE.
As per my understanding the end server does not understand the VLAN taging , so why do we configure VLAN on server , where we can just assign an IP that is part of that VLAN? Or my understanding is wrong?
Solved! Go to Solution.
ā04-06-2024 03:03 AM
Yes, this means that the ethernet frame contained in the IP packet will have a tag attached to it identifying the vlan. In this case the switch port to which the Linux is connected should be configured as a trunk.
Also the links between switches should be configured as a trunk if you want to carry multiple vlans in your network.
ā04-06-2024 03:07 AM
SW-access-Server
No need subinterface or vlan
SW-trunk-server (multi vlan)
Here we need subinterface IP or VLAN SVI for each vlan allow in trunk between SW and Server.
MHM
ā04-06-2024 02:25 AM
- In a first approach the linux server does not need to know about VLAN tags; it can be connected to a port being in a particular vlan. The switch takes care of adding the vlan-tag when receiving traffic 'by default'
M.
ā04-06-2024 02:32 AM
Correct .. The question remains the same why do we configure the NICs as eth1.20 or similar? What is the purpose ..
Also will F1/1 of both switches be access or trunk?
ā04-06-2024 02:47 AM
>Correct .. The question remains the same why do we configure the NICs as eth1.20 or similar? What is the purpose ..
Would only be needed if the server would have to bridge multiple vlans itself.
>Also will F1/1 of both switches be access or trunk?
You only need trunk if the 'whole link' needs to carry multiple vlans
M.
ā04-06-2024 02:42 AM
Hello @royavi5302 ,
like @marce1000 mentioned in 90% of use cases, a Linux server doesn't need to know Vlan tagging on his interfaces. Your network topology is one of this cases - just configure the switch ports in the necessary vlan, assign the servers IP addresses from the correct subnet and you are ready to go.
There are some use cases in which the server needs to send tagged traffic on his interfaces and in this case you can configure a Linux server to do that. Here is an example on how to configure this in Ubuntu: https://wiki.ubuntu.com/vlan
Hope this helps.
ā04-06-2024 02:57 AM
Thanks for the link. I am aware of how to configure it.
---> There are some use cases in which the server needs to send tagged traffic on his interfaces: That means a server can also tag the packet before sending to switch ? A packet while leaving eth1.20 , will it have any tagging or just pacacket ?
ā04-06-2024 03:03 AM
Yes, this means that the ethernet frame contained in the IP packet will have a tag attached to it identifying the vlan. In this case the switch port to which the Linux is connected should be configured as a trunk.
Also the links between switches should be configured as a trunk if you want to carry multiple vlans in your network.
ā04-06-2024 02:56 AM
If ther server need to connect to SW via more than one vlan the this step need
Otherwise it not need
MHM
ā04-06-2024 03:04 AM
If I understand correctly if the port where the server is connected is configured with Multiple VLans then only we need to configure eth1.20 with IP otherwise we need not to configure VLAN on the ethernet.
In other words if the switch port (F1/1) is a trunk one ? Correct?
ā04-06-2024 03:07 AM
SW-access-Server
No need subinterface or vlan
SW-trunk-server (multi vlan)
Here we need subinterface IP or VLAN SVI for each vlan allow in trunk between SW and Server.
MHM
ā04-06-2024 03:11 AM
Thank you everyone. All doubts are clear. Keep rocking!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide