0

I tried to install Debian on a PC but I don't get a default route and can't access to internet. It says:

The network autoconfiguration was successful. However, no default route was set: the system does not know how to communicate with hosts on the Internet.

ip route show
192.168.147.0/24 dev esp4n0 src 192.168.147.50

Not sure what went wrong because my other systems running flawless in my subnet. All systems have a default route. I tried to set up a default route by my self, but this didn't work neither.

ip route add default via 192.168.147.1
ip route show
default via 192.168.147.1 dev enp4s0 src 192.168.147.50
192.168.147.0/24 dev enp4s0 src 192.168.147.50 

I have a Fritz.Box (192.168.178.1) as server (dhcp, dns, ...) for internet connection. The Fritz.Box sends a static IP to my server system on eth1 (192.168.178.20). I run a subnet on eth0 via isc-dhcp-server (192.168.147.0/24). The Fritz.Box gets disconnected often and this way I don't have to worry about network lost all the time.

Here are the configurations of my server ...

/etc/dhcp/dhcpd.conf

# 
# Sample configuration file for ISC dhcpd for Debian
# /etc/dhcp/dhcpd.conf
#

option domain-name "heimat.lokal";
option domain-name-servers 192.168.178.1;
option routers 192.168.147.1, 192.168.178.1;

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# DHCP-Server sollten das folgende Statement im globalen Bereich ihrer Konfiguration aufweisen, wenn der Administrator keine falsch konfigurierten "Rogue"-DHCP-Server im eigenen Netzwerk dulden will (also eigentlich immer):
authoritative;

default-lease-time 600;
max-lease-time 7200;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

subnet 192.168.147.0 netmask 255.255.255.0 {
    #interface eth0;
    range 192.168.147.50 192.168.147.60;
    #option routers 192.168.178.1, 192.168.147.1;
}

/etc/default/isc-dhcp-server

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#   Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth0"

/etc/network/interfaces.d/gigabyte_mb_dual_gigabit_lan

auto    eth0=lan0
auto    eth1=lan1

# 01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
iface   eth0    inet    manual
    pre-up ifconfig $IFACE up
    post-down ifconfig $IFACE 0.0.0.0 down

# 02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
iface   eth1    inet    manual
    pre-up ifconfig $IFACE up
    post-down ifconfig $IFACE 0.0.0.0 down


iface   lan1    inet    dhcp

iface   lan0    inet    static
    address 192.168.147.1
    dns-nameservers 192.168.178.1

/etc/sysctl.d/99-sysctl.conf

net.ipv4.ip_forward=1

To be clear: I have multiple systems running in my subnet and they work flawless via my isc-dhcp-server/gateway combo. There is no blocking firewall neither. I just can't install a new system on this subnet via debian net-install image.

0

I found a solution. Instead of using ip route add default via 192.168.147.1 I had to tip in route add default gw 192.168.147.1. Now I can install the system.

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.