3
1
The computer in question has a Linux SO and is connected to a local network that has DHCP service active. I configured a public ip address to be given to that computer by the DHCP and I can ssh into it using this ip address. Now comes the weird part.
ifconfig
returns a 169.254.x.x address. I have read that 169.254.x.x is given to a computer when DHCP fails to give it a proper address. But it did give a proper address, I can ssh to it (using the public IP address) and sites as http://www.whatsmyip.org/ tell me the computer has the public ip address I configured on the DHCP.
How can this be possible and what details should I include in this post?
When I asked my colleague to restart his network
/etc/init.d/net.eth0 restart
this was his output:
* Caching service dependencies ... [ ok ]
* Unmounting network filesystems ... [ ok ]
* Bringing down interface eth0
* Stopping dhcpcd on eth0 ... [ ok ]
* Bringing up interface eth0
* dhcp ...
* Running dhcpcd ...
control_open: Connection refused
eth0: adding address fe80::f85f:1ef7:db63:7475
eth0: waiting for carrier
eth0: carrier acquired
DUID 00:01:00:01:1b:ef:52:ea:dc:85:de:20:38:fa
eth0: IAID a9:04:2c:82
eth0: soliciting an IPv6 router
eth0: rebinding lease of 193.136.136.136
eth0: probing for an IPv4LL address
eth0: DHCP lease expired
eth0: soliciting a DHCP lease
eth0: using IPv4LL address 169.254.78.15
eth0: adding route to 169.254.0.0/16
forked to background, child pid 6332 [ ok ]
* received address 169.254.78.15/16 [ ok ]
* Mounting network filesystems ...
The output of ifconfig
is as follows:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.78.15 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::f85f:1ef7:db63:7475 prefixlen 64 scopeid 0x20<link>
ether 48:85:a3:04:2d:81 txqueuelen 1000 (Ethernet)
RX packets 113090 bytes 80195148 (76.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 39425 bytes 7462270 (7.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 2259 bytes 217008 (211.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2259 bytes 217008 (211.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether df:83:de:11:37:fb txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ip addr
shows both IPs, 169.x.x.x and 193.x.x.x. Still haven't discover why 169.x.x.x is given by DHCP server.
How do you mean you configured a public IP address to be given by the DHCP? As you're running Linux, are you using a network manager or are you using the
/etc/network/interfaces
file to manage your connections? – Kinnectus – 2015-08-11T09:11:01.383I did not configure the IP in the computer, I did it in the DHCP server. – rmarques – 2015-08-11T09:32:28.840
Because I can ssh to that computer using 193.136.136.136, the address that I wanted. – rmarques – 2015-08-11T09:54:23.130
What is the output of
ifconfig
? – Niall – 2015-08-11T10:13:56.520And: what does
ifconfig
return when used on the other computers? – Arjan – 2015-08-11T11:13:11.930@Arjan not sure re ifconfig, but the linux commands that show default gateway, like(or something like)
ip route show
androute -n
andtraceroute
show a different default gateway on different computers. Some show 192.x.x.x some show 10.x.x.x some show 193.x.x.x And the behemonth behind all this is a Cisco VLAN Switch – barlop – 2015-08-11T11:31:04.533@Arjan and you would see that if you went into the chat and read what was said and spoke to him! (as you know, the admins here aren't fans of numerous comments) – barlop – 2015-08-11T11:36:38.763
output of ifconfig added – rmarques – 2015-08-11T11:43:38.673
"Still haven't discover why 169.x.x.x is given by DHCP server" -- why do you think it was assigned by the DHCP server? I agree that your DHCP is assigning the 193.x.x.x address. Good. (I don't know if DHCP should then also assign an address from the local network.) But I always thought that 169.254.x.x addresses were assigned by a computer to itself when it did not get an address assigned by the DHCP server (after trying to ensure no other computer on the network is already using it). – Arjan – 2015-08-13T08:42:13.943
Well I assumed it was the DHCP, maybe it was the computer that assigned itself that IP, but why has it done that if the DHCP gave it the address I asked for? – rmarques – 2015-08-14T18:30:50.950
Can you edit your question to make clear if your colleague is seeing the same problem? (Why did you ask them to restart their network rather than restarting your own?) Some Googling shows that some others get an
– Arjan – 2015-08-15T14:53:29.123offered ... from ...
as the result ofrebinding lease of ...
, which made me wonder if your DHCP server is really extending the lease? But even for them, it it is still followed byprobing for an IPv4LL address
, even before awaiting the rebind result... So maybe seeing both is just not an issue...?