Static IP set still get another IP from DHCP server.

Started by kalpana, Oct 21, 2023, 04:07 AM

Previous topic - Next topic

kalpana

I'm on Ubuntu 22.04.2 LTS and NetworkManager is installed.
The computer is connected to a LAN where I work. This work place has DHCP, which I don't have control to.

I edited the file of /etc/network/interfaces on the computer as following:

auto br0
iface br0 inet static
address 10.11.1.113
netmask 255.255.255.0
gateway 10.11.1.1
broadcast 10.11.1.255
dns-nameservers 8.8.8.8 168.95.1.1

But when I do # ip a
it shows..

br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 96:ab:7b:c8:fa:ec brd ff:ff:ff:ff:ff:ff
inet 10.11.1.113/24 brd 10.11.1.255 scope global br0
valid_lft forever preferred_lft forever
inet 10.11.1.112/24 brd 10.11.1.255 scope global secondary dynamic noprefixroute br0
valid_lft 286sec preferred_lft 286sec
inet6 fe80::edca:5cc8:b735:25b9/64 scope link noprefixroute
valid_lft forever preferred_lft forever

It got the static IP 10.11.1.113 as my setting, but also got another IP 10.11.1.112 from the DHCP server.
I don't want the computer to get another IP from the DHCP server, in this case 10.11.1.112, even after rebooting.

How do I fix this?



Some info on br0 if needed.

# nmcli conn show
NAME UUID TYPE DEVICE
bridge-br0 f3d19268-2ad5-4e1a-a986-94e132842cf4 bridge br0
bridge-slave-eth0 3729442d-bccf-4ca8-ac32-1e8c1544e6e9 ethernet eth0
bridge-slave-eth4 2f24a76c-5f20-416f-b7f4-25a94bca813f ethernet --
Wired connection 1 2849a7f2-748b-3a29-b2d0-3d960628f886 ethernet --
Wired connection 2 894428d1-d30a-3692-8512-e80165511e80 ethernet --
Wired connection 3 3b83c1a0-eef3-32b2-9397-c1fac6d10c97 ethernet --


# nmcli dev status
DEVICE TYPE STATE CONNECTION
br0 bridge connected bridge-br0
eth0 ethernet connected bridge-slave-eth0
eth1 ethernet unavailable --
eth2 ethernet unavailable --
eth3 ethernet unavailable --
eth4 ethernet unavailable --
lo loopback unmanaged --