Public bug reported:

1) We are using a custom ISO but it is based on ubuntu 24.04

2) ```netplan.io:
  Installed: 1.0-2ubuntu1
  Candidate: 1.0-2ubuntu1
  Version table:
 *** 1.0-2ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status
```

3) What I expected to happen:

Applying a simple ethernet configuration like
```
network:
  version: 2
  renderer: networkd
  ethernets:
    ethX:
       dhcp4: true
```

then running netplan status would correctly return that the address
comes from the DHCP server.

4) What happened instead:

Applying the above config, netplan status output yields
```
enp181s0f0np0 ethernet UP (networkd: enp181s0f0np0)
      MAC Address: 5c:25:73:64:11:9e (vendor)
        Addresses: 10.211.1.250/23  
                   fe80::5e25:73ff:fe64:119e/64 (link)
           Routes: 10.211.0.0/23 from 10.211.1.250 metric 100 (link)
                   fe80::/64 metric 256
```

Notice the lack of (dhcp) for the 10.211.1.250 address.

Running networkctl status enp181s0f0np0 yields
```
                 Link File: /usr/lib/systemd/network/99-default.link
                Network File: 
/run/systemd/network/10-netplan-enp181s0f0np0.network
                       State: routable (configured)
                Online state: online                                            
   
                        Type: ether
                        Path: pci-0000:b5:00.0
                      Driver: mlx5_core
                      Vendor: Mellanox Technologies
                       ...
            Auto negotiation: yes
                       Speed: 25Gbps
                      Duplex: full
                     Address: 10.211.1.250 (DHCP4 via 10.211.0.1)
                              fe80::5e25:73ff:fe64:119e
           Activation Policy: up
         Required For Online: yes
             DHCP4 Client ID: IAID:0x33a8732/DUID
           DHCP6 Client DUID: DUID-EN/Vendor:0000ab11825061d73ae2a6f4
                Connected To: localhost on port Ethernet21/1
```

Investigating this further with tcpdump shows that the router is not
giving this interface a default gateway, and I was able to replicate
this on another network by specifically removing default gateway
assignment in the router page.

tcpdump output:
```
12:28:38.270403 IP (tos 0xc0, ttl 64, id 0, offset 0, flags [none], proto UDP 
(17), length 324)                                                               
                                                                              
13:28:45 [165/258]
    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 
5c:25:73:64:11:9e, length 296, xid 0x9eec5657, secs 1, Flags [none] (0x0000)    
                                                                                
                   
          Client-Ethernet-Address 5c:25:73:64:11:9e                             
                                                                                
                                                                                
              
          Vendor-rfc1048 Extensions                                             
                                                                                
                                                                                
              
            Magic Cookie ---                                                    
                                                                                
                                                                                
     
            DHCP-Message (53), length 1: Discover                               
                                                                                
                                                                                
              
            Client-ID (61), length 19: hardware-type 255, 
03:3a:87:32:00:02:00:00:ab:11:82:50:61:d7:3a:e2:a6:f4                           
                                                                                
                                    
            Parameter-Request (55), length 12:                                  
                                                                                
                                                                                
              
              Subnet-Mask (1), Default-Gateway (3), Domain-Name-Server (6), 
Hostname (12)                                                                   
                                                                                
                  
              Domain-Name (15), MTU (26), Static-Route (33), NTP (42)           
                                                                                
                                                                                
              
              URL (114), Unknown (119), Unknown (120), Classless-Static-Route 
(121)                                                                           
                                                                                
                
            MSZ (57), length 2: 1472                                            
                                                                                
                                                                                
              
            SLP-NA (80), length 0""                                             
                                               
            Hostname (12), length 9: "---"                                      
                                         
12:28:38.270754 IP (tos 0x10, ttl 128, id 0, offset 0, flags [DF], proto UDP 
(17), length 322)                                 
    10.211.0.1.67 > 10.211.0.101.68: [udp sum ok] BOOTP/DHCP, Reply, length 
294, xid 0x9eec5657, Flags [none] (0x0000)         
          Your-IP 10.211.0.101                                                  
                                               
          Client-Ethernet-Address 5c:25:73:64:11:9e
          Vendor-rfc1048 Extensions
            Magic Cookie ---
            Subnet-Mask (1), length 4: 255.255.254.0
            Hostname (12), length 9: "---"
            Lease-Time (51), length 4: 5184000
            DHCP-Message (53), length 1: Offer
            Server-ID (54), length 4: 10.211.0.1
            Client-ID (61), length 19: hardware-type 255, 
03:3a:87:32:00:02:00:00:ab:11:82:50:61:d7:3a:e2:a6:f4
```

I think this should be enough to track down the issue, but let me know
if I can provide anything else to help.

In summary, I would expect that applying a DHCP configuration to an
interface and running netplan status would properly return that the
address was received from a DHCP server.

** Affects: netplan.io (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2147446

Title:
  Netplan status describes DHCP-configured interface with a static
  address if no default gateway is provided

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2147446/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to