0

Something weird is going on. I had a cable with VLAN 300 plugged into my ubuntu machine. And that worked fine, like this.

Jul  9 09:13:16 ruby dhclient[17696]: bound to 85.x.x.136 -- renewal in 1797 seconds.
Jul  9 09:43:13 ruby dhclient[17696]: DHCPREQUEST of 85.x.x.136 on enp5s0.300 to 85.144.96.1 port 67 (xid=0x5bf4fa8d)

I added VLAN 640 to the interface, that worked as well, for a while. But then 300 stopped working. I removed VLAN 640 again, rolled back to my saved config, but 300 never started to work again, instead giving me this:

Jul  9 21:01:18 ruby dhclient[10101]: Listening on LPF/enp5s0.300/bc:5f:f4:35:31:4e
Jul  9 21:01:18 ruby dhclient[10101]: Sending on   LPF/enp5s0.300/bc:5f:f4:35:31:4e
Jul  9 21:01:18 ruby dhclient[10101]: DHCPDISCOVER on enp5s0.300 to 255.255.255.255 port 67 interval 3 (xid=0xd0b9a504)
Jul  9 21:01:21 ruby dhclient[10101]: DHCPDISCOVER on enp5s0.300 to 255.255.255.255 port 67 interval 5 (xid=0xd0b9a504)
Jul  9 21:01:26 ruby dhclient[10101]: DHCPDISCOVER on enp5s0.300 to 255.255.255.255 port 67 interval 7 (xid=0xd0b9a504)
Jul  9 21:03:16 ruby dhclient[10578]: DHCPDISCOVER on enp5s0.300 to 255.255.255.255 port 67 interval 3 (xid=0x773a3622)
Jul  9 21:03:19 ruby dhclient[10578]: DHCPDISCOVER on enp5s0.300 to 255.255.255.255 port 67 interval 3 (xid=0x773a3622)
Jul  9 21:03:22 ruby dhclient[10578]: DHCPDISCOVER on enp5s0.300 to 255.255.255.255 port 67 interval 4 (xid=0x773a3622)
Jul  9 21:03:26 ruby dhclient[10578]: DHCPDISCOVER on enp5s0.300 to 255.255.255.255 port 67 interval 11 (xid=0x773a3622)
Jul  9 21:03:36 ruby dhclient[10601]: DHCPDISCOVER on enp5s0.300 to 255.255.255.255 port 67 interval 3 (xid=0xdb1d8017)
Jul  9 21:03:39 ruby dhclient[10601]: DHCPDISCOVER on enp5s0.300 to 255.255.255.255 port 67 interval 6 (xid=0xdb1d8017)
Jul  9 21:03:45 ruby dhclient[10601]: DHCPDISCOVER on enp5s0.300 to 255.255.255.255 port 67 interval 9 (xid=0xdb1d8017)

Then I plugged the cable into another NIC in the same machine, configured eth0.300 to work via DHCP, and that did work.

So, I reconfigured, making the enp5s0 NIC the lan card and the eth0 the WAN interface. But I can't figure out why this would happen.

What can cause the one NIC to suddenly stop working for that specific VLAN? It does still work on VLAN 640.

I tried;

  • Rebooting, number of times
  • Deleting all the interfaces and bringing them back
  • Rewriting the /etc/network/interfaces file
  • Switching and replacing cables

Nothing worked, the Realtek NIC on VLAN 300 remains unable to get an addess via DHCP, while the other NIC can.

This is the network lspci bit;

03:06.0 Ethernet controller: Intel Corporation 82541PI Gigabit Ethernet Controller (rev 05)
        Subsystem: Intel Corporation PRO/1000 GT Desktop Adapter
        Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 21, NUMA node 0
        Memory at fe140000 (32-bit, non-prefetchable) [size=128K]
        Memory at fe120000 (32-bit, non-prefetchable) [size=128K]
        I/O ports at e180 [size=64]
        Expansion ROM at fe100000 [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: e1000
        Kernel modules: e1000

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
        Subsystem: ASRock Incorporation Motherboard (one of many)
        Flags: bus master, fast devsel, latency 0, IRQ 19, NUMA node 0
        I/O ports at d000 [size=256]
        Memory at d0004000 (64-bit, prefetchable) [size=4K]
        Memory at d0000000 (64-bit, prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: r8169
        Kernel modules: r8169

I am stumped.

Edit 1, in response to more information requested:

  1. Are the both interfaces connected to the same device? Do you have the access to it? Better draw the topology of your network.

Yes. They are, both connected to the media converter that accepts the fiber optic line. Yes, I have physical access to it, power cycled that as well. Plugging in another modem or laptop directly gives network connection on VLAN 300, so I am inclined to believe the cables and hardware there are fine.

This is a raw drawing of the network topology.

Media Converter
      |
      +----- NIC A
               |
          Ubuntu Server
               |
             NIC B
               |             
               +--- Switch --- Desktop 1
                      |        Desktop 2
                      |        NAS
                      |
                      +--- Wifi ----- Laptop 1
                      |               Laptop 2
                      |               Android 1
                      |
                      +--- Switch --- TV
                                      Steam Link
                                      Set Top Box

The end goal is to use VLAN 300 for internet and route VLAN 640 to the Set Top Box. That is a different issue asked in: Route 2 VLANs over one port

  1. Run the tcpdump -ni enp5s0 -e command and check the output. Do you see outgoing and incoming frames in vlan 300?

Ran the dump, I do see VLAN300, weirdly I think also to the old ip I had when the DHCP still worked. Log is here: https://pastebin.com/raw/1UYAhPr9

Snippet here;

23:11:45.394550 bc:5f:f4:35:31:4e > 33:33:00:00:00:16, ethertype 802.1Q (0x8100), length 94: vlan 300, p 0, ethertype IPv6, fe80::be5f:f4ff:fe35:314e > ff02::16: HBH ICMP6, multicast listener report v2, 1 group record(s), length 28
23:11:45.468708 bc:5f:f4:35:31:4e > 33:33:00:00:00:fb, ethertype 802.1Q (0x8100), length 149: vlan 300, p 0, ethertype IPv6, fe80::be5f:f4ff:fe35:314e.5353 > ff02::fb.5353: 0*- [0q] 2/0/0 PTR _smb._tcp.local., PTR RUBY._smb._tcp.local. (83)

Edit2: the interfaces files

auto lo
iface lo inet loopback

auto enp5s0
iface enp5s0 inet static
        address 10.20.40.12
        netmask 255.255.255.0

iface enp5s0.300 inet dhcp

auto eth0
iface eth0 inet static
        address 192.168.40.12
        netmask 255.255.255.0

How exactly do you bring up the vlan 640?

add an entry in the interfaces, iface enp5s0.640 inet manual then:

ifup enp5s0.640
dhclient enp5s0.640
0

Let's try to troubleshoot your issue. Update the question and I'll extend the answer until issue will be solved.

  1. Are the both interfaces connected to the same device? Do you have the access to it? Better draw the topology of your network.
  2. Run the tcpdump -ni enp5s0 -e command and check the output. Do you see outgoing and incoming frames in vlan 300?
  • Thank you. Question updated with extra information. – Eloque Jul 10 at 12:18
  • Question updated with dump. – Eloque Jul 10 at 21:21
  • Show the configuration of /etc/network/interfaces file. – Anton Danilov Jul 11 at 15:22
  • Interfaces file added – Eloque Jul 11 at 18:37
  • How exactly do you bring up the vlan 640? Also, I've added the answer for you another question about configuration vlans. – Anton Danilov Jul 11 at 18:58
0

If I remember correctly dhclient needs REORDER_HEADERS (1) VLAN flag (vlan.flags in nmcli). Have you set that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.