Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #240941 > unrolled thread
| Started by | Pierre Frenkiel <pierre.frenkiel@gmail.com> |
|---|---|
| First post | 2021-10-05 22:10 +0200 |
| Last post | 2021-10-06 07:40 +0200 |
| Articles | 5 — 5 participants |
Back to article view | Back to linux.debian.user
network problem Pierre Frenkiel <pierre.frenkiel@gmail.com> - 2021-10-05 22:10 +0200
Re: network problem Dan Ritter <dsr@randomstring.org> - 2021-10-05 22:40 +0200
Re: network problem Greg Wooledge <greg@wooledge.org> - 2021-10-05 22:40 +0200
Re: network problem ghe2001 <ghe2001@protonmail.com> - 2021-10-05 23:10 +0200
Re: network problem Reco <recoverym4n@enotuniq.net> - 2021-10-06 07:40 +0200
| From | Pierre Frenkiel <pierre.frenkiel@gmail.com> |
|---|---|
| Date | 2021-10-05 22:10 +0200 |
| Subject | network problem |
| Message-ID | <D4YVb-7d2-9@gated-at.bofh.it> |
hi,
I have the following problem on my laptop.
my /etc/network/interfaces file contains:
auto enp0s1
iface enp0s1 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
but after boot, ifconfig gives
address 192.168.0.163
netmask 255.255.255.0
gateway 192.168.1.1
Then, networking works i.e. I can reach Internet, but of course
not my desktop and other devices 192.168.1.xx
I looked on the entire disk to find where this address 192.168.0.163
is hidden, but I was unable to find it !
rather strange, isn't it?
best regards,
--
Pierre Frenkiel
[toc] | [next] | [standalone]
| From | Dan Ritter <dsr@randomstring.org> |
|---|---|
| Date | 2021-10-05 22:40 +0200 |
| Message-ID | <D4Zey-7jv-1@gated-at.bofh.it> |
| In reply to | #240941 |
Pierre Frenkiel wrote: > hi, > I have the following problem on my laptop. > my /etc/network/interfaces file contains: > auto enp0s1 > iface enp0s1 inet static > address 192.168.1.10 > netmask 255.255.255.0 > gateway 192.168.1.1 > > but after boot, ifconfig gives > > address 192.168.0.163 > netmask 255.255.255.0 > gateway 192.168.1.1 > > Then, networking works i.e. I can reach Internet, but of course > not my desktop and other devices 192.168.1.xx > > I looked on the entire disk to find where this address 192.168.0.163 > is hidden, but I was unable to find it ! > > rather strange, isn't it? First, let's see if you have the right interface. ip link show |grep enp0s1 if that doesn't show you a line of config, you are specifying the wrong interface. ip link show will show all of them to you. Second, let's see if something else is doing the configuration: grep -C1 ifupdown /etc/NetworkManager (you want this to show managed=false) ls /etc/systemd/network/ (you would like this to be empty) Let us know what you find out. -dsr-
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2021-10-05 22:40 +0200 |
| Message-ID | <D4Zoe-7mH-17@gated-at.bofh.it> |
| In reply to | #240941 |
On Tue, Oct 05, 2021 at 10:00:45PM +0200, Pierre Frenkiel wrote: > hi, > I have the following problem on my laptop. > my /etc/network/interfaces file contains: > auto enp0s1 > iface enp0s1 inet static > address 192.168.1.10 > netmask 255.255.255.0 > gateway 192.168.1.1 > > but after boot, ifconfig gives > > address 192.168.0.163 > netmask 255.255.255.0 > gateway 192.168.1.1 There is a *lot* to unpack here. I'm not sure where to start. Let's start here: that is *not* the output of "ifconfig" on Debian. The ifconfig command, which is not installed by default, but is available in an optional package, does not produce output that looks anything like that. Most particularly, it does not show any information about routing. So that "gateway" line that you claim it shows... that didn't come from ifconfig, not even if you reformatted the hell out of it. That leaves us to guess what you actually did, what the actual output of ifconfig is, and why you're misleading us. Now, let's assume for the sake of argument that you actually ran several different commands, collated their output together in your head, and rewrote it into this format. Let's even assume that you did not make any typos during this entire procedure. This still leaves us with some questions. 1) What is the actual name of your network interface? The stanza in /etc/network/interface will only apply if the interface's name is enp0s1. If it's not, then something else (perhaps network-manager) will take over and configure the interface. The 192.168.0.163 address might have come from DHCP. A fallback configuration, like the one used by N-M, might be "run a DHCP client and see if that works". > Then, networking works i.e. I can reach Internet, but of course > not my desktop and other devices 192.168.1.xx 2) What is your full routing table? "ip route" under modern era tools, or "route -n" under the legacy tools. It's not clear to me how you have working Internet access if your default route is an address (192.168.1.1) that isn't on your subnet (192.168.0.0/24). At the very least, you would need a route that leads you to the 192.168.0 network. Perhaps you have one. But you didn't show it. Then, if for some reason you really *do* have a 192.168.0 address, and a route to the 192.168.1 network, and a default gateway of 192.168.1.1, and if all of this actually works, then... where did this routing table get configured? It's a mystery for sure. You might want to look for log files that indicate what's happening. They could be in /var/log/ or you might need to use journalctl. Meanwhile, use "ip addr" and "ip route" to see what your actual network configuration is. Don't reformat it. Don't omit pieces of it. Don't mash the two together.
[toc] | [prev] | [next] | [standalone]
| From | ghe2001 <ghe2001@protonmail.com> |
|---|---|
| Date | 2021-10-05 23:10 +0200 |
| Message-ID | <D4ZRf-7M5-3@gated-at.bofh.it> |
| In reply to | #240941 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Tuesday, October 5, 2021 2:00 PM, Pierre Frenkiel <pierre.frenkiel@gmail.com> wrote: > hi, > I have the following problem on my laptop. > my /etc/network/interfaces file contains: > auto enp0s1 > iface enp0s1 inet static > address 192.168.1.10 > netmask 255.255.255.0 > gateway 192.168.1.1 > > but after boot, ifconfig gives > > address 192.168.0.163 > netmask 255.255.255.0 > gateway 192.168.1.1 > > Then, networking works i.e. I can reach Internet, but of course > not my desktop and other devices 192.168.1.xx > > I looked on the entire disk to find where this address 192.168.0.163 > is hidden, but I was unable to find it ! > > rather strange, isn't it? Most peculiar indeed. Does the interface always get the same address? Have you tried setting the IP with ifconfig -- after the box is up with the bad IP address? Is there anything in /etc/init.d that might be doing it? Have you looked at dmesg? (That 163's gotta be somewhere.) Have you looked at what's in /etc/network/interfaces.d? (There's nothing in mine, but ifup works as expected here.) Have you tried Webmin? (I know, I know, but it works.) Have you tried pinging the two addresses? (Not likely, but something's bent somewhere.) A workaround: change the netmask everywhere on your LAN to 255.255.0.0 and let the address be whatever systemd wants to assign to it :-) -- Glenn English -----BEGIN PGP SIGNATURE----- Version: ProtonMail wsBzBAEBCAAGBQJhXL2SACEJEJ/XhjGCrIwyFiEELKJzD0JScCVjQA2Xn9eG MYKsjDLdhwgAwp4apR3uGebYU5bOx+qQbh8iGDFa+sPxMzqdzYa0bVBcoaUE hzxPw1+pAe3vEfD/VYYrm5GGC4aUHILqH7SffpMMbWEZtSaL5ghKC8EGZhlk wcP0d7p3paPNvKpCHMOUkxDQOd04Cqu+gudkeiQasqAPBqnTzLpk0sEBIsj9 EMeA/RCivsIGt+VvNQPaR2+surTnubOx95pwT/SmFT1at6awcbiYYNjUU08T rnOdSAA1A7/X5UED1Mo5R+6k/DT3DqKzkK1jmwY1IKt24iBLH4wn/2md6j8w WpbLDjn/U9Gb+rpNqdEhLkVwMgLrxFRkyKkH+gJangN7JyExoT6RbQ== =Ze8U -----END PGP SIGNATURE-----
[toc] | [prev] | [next] | [standalone]
| From | Reco <recoverym4n@enotuniq.net> |
|---|---|
| Date | 2021-10-06 07:40 +0200 |
| Message-ID | <D57ON-49p-3@gated-at.bofh.it> |
| In reply to | #240941 |
Hi. On Tue, Oct 05, 2021 at 10:00:45PM +0200, Pierre Frenkiel wrote: > hi, > I have the following problem on my laptop. > my /etc/network/interfaces file contains: > auto enp0s1 > iface enp0s1 inet static > address 192.168.1.10 > netmask 255.255.255.0 > gateway 192.168.1.1 That's probably Ok. > but after boot, ifconfig gives > > address 192.168.0.163 > netmask 255.255.255.0 > gateway 192.168.1.1 And that is not. First, ifconfig is not able to show you IP routing, so please be more specific at how exactly you've got this result. Second, it's impossible to have a working default gateway that's outside the subnet you're having, and it's exactly what you have here. > Then, networking works i.e. I can reach Internet, but of course > not my desktop and other devices 192.168.1.xx Third, the whole purpose of default gateway is to let you communicate with host that are outside your subnet. > rather strange, isn't it? dpkg -l 'ifupdown*' dpkg -l 'network*' Reco
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web