狠狠撸

狠狠撸Share a Scribd company logo
VLANs in
    Red Hat Enterprise Linux

    Raghu Udiyar
    Technical support engineer
    Red Hat



1                VLANs & you | Raghu Udiyar
First, LAN?

    ●   Local Area Network
    ●   Uses Ethernet for Layer 2 communication
    ●   using MAC addresses
    ●   ARP is used for IP -> MAC
    ●   ARP uses broadcast
    ●   LAN = 1 Broadcast domain



    ●   A short refresher on how this works

2                        VLANs & you | Raghu Udiyar
Port 1       A : f3:a3:34:
    Port 2       B : f2:de:34:
                                                   This mac is D
    Port 3       C : f1:d1:23
                                                     On port 4
    Port 4       D : f3:a4:56




    Who is 192.x.x.x                                                       Hey, that's me




                                                                   Mac is f3:a4:x:x:x




3                            VLANs & you | Raghu Udiyar
To recap

    ●   A–B–C–D
    ●   A -> D
    ●   ARP broadcast, D is IP 192.x.x.x what is MAC?
    ●   D replies with MAC
    ●   A sends to switch
    ●   Switch looks up the address in the MAC table
    ●   Switch sends to D




4                       VLANs & you | Raghu Udiyar
Any questions?




5                VLANs & you | Raghu Udiyar
VLANs

    ●   Splits a LAN into multiple LANs


    ●   Into multiple broadcast domains


    ●   Splits single switch into multiple switches




6                         VLANs & you | Raghu Udiyar
Port 1       A : f3:a3:34:
        Port 2       B : f2:de:34:
        Port 3       C : f1:d1:23
        Port 4       D : f3:a4:56
                                                      B
                                     Trunk
                                                  B




    B
                 B               B




7                    VLANs & you | Raghu Udiyar
VLAN - Advantages

    ●   Flexibility - No physical restrictions
    ●   Security – layer 2 separation
    ●   Cost effective
    ●   Reduce size of broadcast domains




8                         VLANs & you | Raghu Udiyar
How does this work?

    ●   802.1q protocol
    ●   VLAN “Tags”

        VLAN ID    Ethernet Frame




    ●   VLAN 50, 100, etc (1 – 4094)




9                         VLANs & you | Raghu Udiyar
Type of Ports

     ●   Access port


                 SW                               Ethernet
                                                             PC1
             Vid Ethernet


                                                             Vlan id is stripped


                                                  Ethernet
                                                             PC2

             Vid Ethernet
                 SW




10                          VLANs & you | Raghu Udiyar
Type of Ports

     ●   Trunk Ports


                                            v Et
                SW                                         SW
                                                    v Et
                                   v Et




                                    Trunk Ports

                                 Carries all VLAN's


11                     VLANs & you | Raghu Udiyar
Native Vlan




                                           v Et
         SW                  Et                                        SW
                                                   v Et
        v Et                      v Et




        Native Vlan

                Ethernet frame with no Vlan id get's the native VLAN




12                    VLANs & you | Raghu Udiyar
Any questions?




13               VLANs & you | Raghu Udiyar
Vlans in RHEL

     ●   Access
     ●   Trunk
     ●   Vlan interface :
                                                         RHEL
         eth0.40
         eth0.100                           eth0.40      eth0.100     eth0.8


         eth0.8

                                                               eth0            native vlan




14                          VLANs & you | Raghu Udiyar
Use case 1 :


                                             SW1


      Httpd



      Payroll
      eth0.40


                eth0
                                             SW2




15              VLANs & you | Raghu Udiyar
Use Case 2 :
               Hypervisor with two guests




          VM1                                  VM2



        VLAN10                                VLAN20




                                  eth0


               Trunk




16                     VLANs & you | Raghu Udiyar
Demo - Assigning a Vlan ID

     ●   # vconfig add eth0 7
     ●   # ip addr add dev eth0.7 192.168.0.1/24 brd +
     ●   # ip link set dev eth0.7 up




17                         VLANs & you | Raghu Udiyar
Troubleshooting

     ●   Misconfiguration
          ●   Check switch
     ●   Misunderstanding of concepts
          ●   Access/Trunk
          ●   Native Vlan




18                           VLANs & you | Raghu Udiyar
Any questions?




19               VLANs & you | Raghu Udiyar
Thank You

More Related Content

Vlans

  • 1. VLANs in Red Hat Enterprise Linux Raghu Udiyar Technical support engineer Red Hat 1 VLANs & you | Raghu Udiyar
  • 2. First, LAN? ● Local Area Network ● Uses Ethernet for Layer 2 communication ● using MAC addresses ● ARP is used for IP -> MAC ● ARP uses broadcast ● LAN = 1 Broadcast domain ● A short refresher on how this works 2 VLANs & you | Raghu Udiyar
  • 3. Port 1 A : f3:a3:34: Port 2 B : f2:de:34: This mac is D Port 3 C : f1:d1:23 On port 4 Port 4 D : f3:a4:56 Who is 192.x.x.x Hey, that's me Mac is f3:a4:x:x:x 3 VLANs & you | Raghu Udiyar
  • 4. To recap ● A–B–C–D ● A -> D ● ARP broadcast, D is IP 192.x.x.x what is MAC? ● D replies with MAC ● A sends to switch ● Switch looks up the address in the MAC table ● Switch sends to D 4 VLANs & you | Raghu Udiyar
  • 5. Any questions? 5 VLANs & you | Raghu Udiyar
  • 6. VLANs ● Splits a LAN into multiple LANs ● Into multiple broadcast domains ● Splits single switch into multiple switches 6 VLANs & you | Raghu Udiyar
  • 7. Port 1 A : f3:a3:34: Port 2 B : f2:de:34: Port 3 C : f1:d1:23 Port 4 D : f3:a4:56 B Trunk B B B B 7 VLANs & you | Raghu Udiyar
  • 8. VLAN - Advantages ● Flexibility - No physical restrictions ● Security – layer 2 separation ● Cost effective ● Reduce size of broadcast domains 8 VLANs & you | Raghu Udiyar
  • 9. How does this work? ● 802.1q protocol ● VLAN “Tags” VLAN ID Ethernet Frame ● VLAN 50, 100, etc (1 – 4094) 9 VLANs & you | Raghu Udiyar
  • 10. Type of Ports ● Access port SW Ethernet PC1 Vid Ethernet Vlan id is stripped Ethernet PC2 Vid Ethernet SW 10 VLANs & you | Raghu Udiyar
  • 11. Type of Ports ● Trunk Ports v Et SW SW v Et v Et Trunk Ports Carries all VLAN's 11 VLANs & you | Raghu Udiyar
  • 12. Native Vlan v Et SW Et SW v Et v Et v Et Native Vlan Ethernet frame with no Vlan id get's the native VLAN 12 VLANs & you | Raghu Udiyar
  • 13. Any questions? 13 VLANs & you | Raghu Udiyar
  • 14. Vlans in RHEL ● Access ● Trunk ● Vlan interface : RHEL eth0.40 eth0.100 eth0.40 eth0.100 eth0.8 eth0.8 eth0 native vlan 14 VLANs & you | Raghu Udiyar
  • 15. Use case 1 : SW1 Httpd Payroll eth0.40 eth0 SW2 15 VLANs & you | Raghu Udiyar
  • 16. Use Case 2 : Hypervisor with two guests VM1 VM2 VLAN10 VLAN20 eth0 Trunk 16 VLANs & you | Raghu Udiyar
  • 17. Demo - Assigning a Vlan ID ● # vconfig add eth0 7 ● # ip addr add dev eth0.7 192.168.0.1/24 brd + ● # ip link set dev eth0.7 up 17 VLANs & you | Raghu Udiyar
  • 18. Troubleshooting ● Misconfiguration ● Check switch ● Misunderstanding of concepts ● Access/Trunk ● Native Vlan 18 VLANs & you | Raghu Udiyar
  • 19. Any questions? 19 VLANs & you | Raghu Udiyar