1 2 Previous Next 15 Replies Latest reply: Jul 22, 2013 8:51 PM by Dude! RSS

    VLAN 8021q -issue

    narayana

      Hi,

      i have created a VLAN but its failing when i restart network service

       

      1) lsmod | grep 8021q

      2) modprobe 8021q

      3)  followed this link lucv: InterVLAN Routing using CentOS with 1 Interface

       

      i get an error device vlan10 doesnot seem to be present , delaying ini..... [failed]

       

      i want vlan with number (i.e vlan10, vlan20)not like eth0.10, eth0.20

        • 1. Re: VLAN 8021q -issue
          Dude!

          Are you confusing device name and VLAN ID? The device name defines the vlan VID. For instance, ifcfg-eth0.10 uses VID 10.

           

          What is the name of your Linux OS distribution and release version?

          • 2. Re: VLAN 8021q -issue
            WadhahDaouehi

            Hi,

            To create a VLAN connection under Linux. The first step is:

            - choose  the Network card (interface); in this case is eth0

            - The VLAN ID; in this case is 10

            - The IP ADDRESS for you VLAN Network and in this case is 192.168.10.10.

             

            Looks at this example:

            #!/bin/bash

            VLAN_ETH=eth0

            VLAN_ID=10

            VLAN_IP=192.168.10.10

            vconfig add $VLAN_ETH $VLAN_ID

            ifconfig "$VLAN_ETH.$VLAN_ID" "$VLAN_IP" netmask 255.255.255.0 up


            I hope this can help you

            Best Regards

            • 3. Re: VLAN 8021q -issue
              Dude!

              The configuraiton using vconfig won't survive a system restart. It is necessary to cerate appropriate network scripts in that case.

              • 4. Re: VLAN 8021q -issue
                narayana

                Hi,

                 

                 

                Oracle Linux 5.6 (64-bit)

                Exactly followed the http://hitecksqud.blogspot.in/2012/12/intervlan-routing-using-centos-with-1.html

                #vim /etc/sysconfig/network-scripts/ifcfg-eth0

                #vim /etc/sysconfig/network-scripts/ifcfg-vlan10

                #vim /etc/sysconfig/network-scripts/ifcfg-vlan20

                #service network restart

                 

                i get an error device vlan10 doesnot seem to be present , delaying ini..... [failed]

                 

                i get an error device vlan20 doesnot seem to be present , delaying ini..... [failed]

                • 5. Re: VLAN 8021q -issue
                  WadhahDaouehi

                  Hi,

                  So you want to create 2 VALN on eth0 with the ID 10 and 20, the your configuration should looks like:

                   

                  Configure your eth0 like:

                  /etc/sysconfig/network-scripts/ifcfg-eth0

                  DEVICE=eth0

                  ONBOOT=yes

                  TYPE=Ethernet

                  The VALN ID 10:

                  /etc/sysconfig/network-scripts/ifcfg-eth0.10

                  DEVICE=eth0.10

                  IPADDR=10.10.10.1

                  NETMASK=255.255.255.0

                  VLAN=yes

                  ONBOOT=yes

                  BOOTPROTO=none

                   

                  The VALN ID 20:

                  /etc/sysconfig/network-scripts/ifcfg-eth0.20

                  DEVICE=eth0.20

                  IPADDR=10.10.20.1

                  NETMASK=255.255.255.0

                  VLAN=yes

                  ONBOOT=yes

                  BOOTPROTO=none

                   

                  I hope this can help you

                  Best Regards

                  • 6. Re: VLAN 8021q -issue
                    WadhahDaouehi

                    Hi,

                    Thank you for your clarification and i know about that and just i want him to verify; that's it.

                     

                    Best Regards

                    • 7. Re: VLAN 8021q -issue
                      narayana

                      Thanks for the reply

                      but i dont want like this approach as i stated in my original query which ahs some issues when we go for IP4 forwading from sysctl.conf

                       

                      original query partial text: i want vlan with number (i.e vlan10, vlan20)not like eth0.10, eth0.20

                       

                      hope you got above statement & you can help me i need vlan name as vlan10 and vlan20

                      • 8. Re: VLAN 8021q -issue
                        narayana

                        Thanks for the reply

                        but i dont want like this approach as i stated in my original query which ahs some issues when we go for IP4 forwading from sysctl.conf

                         

                        original query partial text: i want vlan with number (i.e vlan10, vlan20)not like eth0.10, eth0.20

                         

                        hope you got above statement & you can help me i need vlan name as vlan10 and vlan20

                        • 9. Re: VLAN 8021q -issue
                          WadhahDaouehi

                          Hi,

                          You can change the name of the interface to a new name using the ip command

                          Figured it out. Simply run the following command

                          ip link set <current name> name <new name>

                          So if I had vlan eth0.10 and I wanted to call it vlan10 I would run the command

                          ip link set eth0.10 name vlan10

                           

                           

                          I hope this can help you

                          Best Regards

                          • 10. Re: VLAN 8021q -issue
                            narayana

                            Thanks for prompt reply

                             

                            # ip link set eth0.10 name vlan10

                            SIOCSIFNAME: Device or resource busy


                            for eth0.10, eth0.20 message i got.

                            • 11. Re: VLAN 8021q -issue
                              WadhahDaouehi

                              Hi,

                              you should down the interface first.

                               

                              # ifconfig eth0.10 down

                              # ifconfig eth0.20 down

                               

                              # ip link set eth0.10 name vlan10

                              # ip link set eth0.10 name vlan10


                              # ifconfig vlan10 up

                              # ifconfig vlan20 up


                              I hope this can help you

                              Best Regards

                              • 12. Re: VLAN 8021q -issue
                                narayana

                                Hi,

                                 

                                Thanks again...

                                 

                                you suggested me to change the logical name which resides in /proc/net/vlan not in this path /etc/sysconfig/networl-scripts


                                I hope you got my query i need vlan10, vlan20 interfaces under ../../network-scripts/ifcfg-valnXX


                                pls try if u can bale to help

                                • 13. Re: VLAN 8021q -issue
                                  Dude!

                                  Please see my first reply.  You cannot freely choose the name of the vlan device if you want to use the default network startup procedure.The network startup determines its actions from the device name which needs to use the format of physical_dev.vlan_id.

                                   

                                  ifup:    VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^.*\.\([0-9]\+\)/\1/')

                                  ifup:    VID=$(echo "${DEVICE}" | LC_ALL=C sed 's/^vlan0*//')

                                  ifup:    if [ -n "$VID" ]; then

                                  ifup:    test -z "$VLAN_NAME_TYPE" && VLAN_NAME_TYPE=DEV_PLUS_VID_NO_PAD

                                  ifup:        /sbin/vconfig add ${PHYSDEV} ${VID} || {

                                  ifup:            $"ERROR: could not add vlan ${VID} as ${DEVICE} on dev ${PHYSDEV}" &)&

                                   

                                  What is your problem with the eth0.10 naming convention?

                                  • 14. Re: VLAN 8021q -issue
                                    narayana

                                    Hi,

                                     

                                    Thanks for your help, it got fixed followed this link and cross verified data lucv: InterVLAN Routing using CentOS with 1 Interface

                                     

                                    Drawback with eth0.XX interfaces

                                    Configuring VLANs Under Fedora/RHEL/CentOS. &amp;ndash; tummy.com, ltd.

                                     

                                    this is fixed/closed

                                    1 2 Previous Next