Still missing something on vlan - F19

Rick Stevens ricks at alldigital.com
Wed Sep 10 21:05:32 UTC 2014


On 09/09/2014 09:40 PM, Robert Moskowitz issued this missive:
>
> On 09/09/2014 06:57 PM, Rick Stevens wrote:
>> On 09/09/2014 03:43 PM, Robert Moskowitz issued this missive:
>>>
>>> On 09/09/2014 05:37 PM, Rick Stevens wrote:
>>>> On 09/09/2014 02:11 PM, Robert Moskowitz issued this missive:
>>>>> I am working on a system that has a stable MACaddr (an issue with many
>>>>> arm SOC), so I don't suspect that as an issue.
>>>>>
>>>>> cat /etc/udev/rules.d/70-persistent-net.rules
>>>>>
>>>>> # Added by 'write_udev' for detected device 'eth0'.
>>>>> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
>>>>> ATTR{address}=="02:c4:03:82:c1:53", NAME="eth0"
>>>>>
>>>>> cat /etc/sysconfig/network
>>>>>
>>>>> NETWORKING=yes
>>>>> HOSTNAME=test.htt-consult.com
>>>>>
>>>>> cat /etc/sysconfig/network-scripts/ifcfg-eth0
>>>>>
>>>>> DEVICE="eth0"
>>>>> BOOTPROTO="none"
>>>>> ONBOOT="yes"
>>>>> TYPE="Ethernet"
>>>>> NAME="System eth0"
>>>>>
>>>>> cat /etc/sysconfig/network-scripts/ifcfg-eth0.16
>>>>>
>>>>> DEVICE="eth0.16"
>>>>> BOOTPROTO="dhcp"
>>>>> vlan="yes"
>>>>> ONBOOT="yes"
>>>>> TYPE="Ethernet"
>>>>> NAME="System eth0.16"
>>>>> HOSTNAME="test.htt-consult.com"
>>>>> IPV6INIT="yes"
>>>>>
>>>>> ip addr show
>>>>>
>>>>> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
>>>>>      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>>>>>      inet 127.0.0.1/8 scope host lo
>>>>>      inet6 ::1/128 scope host
>>>>>         valid_lft forever preferred_lft forever
>>>>> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
>>>>> state UNKNOWN qlen 1000
>>>>>      link/ether 02:c4:03:82:c1:53 brd ff:ff:ff:ff:ff:ff
>>>>>      inet6 fe80::c4:3ff:fe82:c153/64 scope link
>>>>>         valid_lft forever preferred_lft forever
>>>>>
>>>>> Note I have set up the switch port so that ALL my vlans are accessable
>>>>> from this port as 'tagged'.  There are no 'untagged'. VALN 16 is
>>>>> one of
>>>>> the available labels.  I had earlier tried this with only VALN 16
>>>>> available, and that did not work; I enabled all vlans then. None of
>>>>> the
>>>>> vlans are untagged, so nothing is reachable the eth0.
>>>>>
>>>>> It bothers me that eth0.16 does not even show in the 'ip addr show'
>>>>> command output.
>>>>
>>>> Have you verified that the driver for that NIC supports VLAN tagging?
>>>> Some don't.
>>>
>>> Looks like I am going to have to ask on the Fedora-arm list:
>>>
>>> vconfig add eth0 16
>>> WARNING:  Could not open /proc/net/vlan/config.  Maybe you need to load
>>> the 8021q module, or maybe you are not using PROCFS??
>>> Added VLAN with VID == 16 to IF -:eth0:-
>>>
>>> ip addr show
>>> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
>>>      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>>>      inet 127.0.0.1/8 scope host lo
>>>      inet6 ::1/128 scope host
>>>         valid_lft forever preferred_lft forever
>>> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
>>> state UNKNOWN qlen 1000
>>>      link/ether 02:c4:03:82:c1:53 brd ff:ff:ff:ff:ff:ff
>>>      inet6 fe80::c4:3ff:fe82:c153/64 scope link
>>>         valid_lft forever preferred_lft forever
>>> 4: eth0.16 at eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
>>> noqueue state UP
>>>      link/ether 02:c4:03:82:c1:53 brd ff:ff:ff:ff:ff:ff
>>>      inet6 fe80::c4:3ff:fe82:c153/64 scope link
>>>         valid_lft forever preferred_lft forever
>>>
>>> ifup eth0.16
>>> Error: Timeout 90 sec expired.
>>>
>>> So the vconfig command did something, but not enought.
>>
>> You may need to load that 8021q module. Check with "lsmod". If it's
>> not there, try "modprobe 8021q".
>
> Progress.  lsmod did not list it.  After the modprobe it shows up. So I
> tried vconfig again:
>
> vconfig add eth0 16
> Added VLAN with VID == 16 to IF -:eth0:-
>
> ifup eth0.16
> Error: Timeout 90 sec expired.
>
> ifconfig
> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>          inet6 fe80::c4:3ff:fe82:c153  prefixlen 64  scopeid 0x20<link>
>          ether 02:c4:03:82:c1:53  txqueuelen 1000  (Ethernet)
>          RX packets 8530  bytes 1425669 (1.3 MiB)
>          RX errors 0  dropped 100  overruns 0  frame 0
>          TX packets 484  bytes 99312 (96.9 KiB)
>          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
>          device interrupt 87  base 0x6000
>
> eth0.16: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>          inet6 fe80::c4:3ff:fe82:c153  prefixlen 64  scopeid 0x20<link>
>          ether 02:c4:03:82:c1:53  txqueuelen 0  (Ethernet)
>          RX packets 57  bytes 4872 (4.7 KiB)
>          RX errors 0  dropped 0  overruns 0  frame 0
>          TX packets 3  bytes 258 (258.0 B)
>          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
>
> lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
>          inet 127.0.0.1  netmask 255.0.0.0
>          inet6 ::1  prefixlen 128  scopeid 0x10<host>
>          loop  txqueuelen 0  (Local Loopback)
>          RX packets 1024  bytes 91136 (89.0 KiB)
>          RX errors 0  dropped 0  overruns 0  frame 0
>          TX packets 1024  bytes 91136 (89.0 KiB)
>          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
>
> So I now have the vlan interface, but it is not getting the dhcpv4 and
> ipv6 RA info for setting up addresses.
>
> What do I do to get 8021q loaded at boot?   And any idea why addressing
> is still not working?

Add a "/etc/modules-load.d/8021q.conf" file that contains the following:

	# Load the 802.1q (VLAN tagging) module...
	8021q

systemd should load it on the next boot.

As to why the DHCP stuff didn't run, I'm not sure. It may be that the
interface was up already so dhclient didn't think it needed to do
anything. After installing the 8021q module, try:

	# ifdown eth0.16
	# ifup eth0.16

See if that works. If not, then try:

	# dhclient eth0.16

and see if that picks it up. Then try a full reboot (with the 
/etc/modules-load.d stuff set up) and see if it works.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks at alldigital.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-       Blessed are the peacekeepers...for they shall be shot at     -
-                 from both sides. --A.M. Greeley                    -
----------------------------------------------------------------------


More information about the users mailing list