
PC에 데비안을 설치하려고 했는데 기본 경로가 없고 인터넷에 접속할 수 없습니다. 그것은 말한다:
네트워크 자동 구성이 성공했습니다. 그러나 기본 경로는 설정되지 않았습니다. 시스템은 인터넷에서 호스트와 통신하는 방법을 모릅니다.
ip route show
192.168.147.0/24 dev esp4n0 src 192.168.147.50
내 서브넷에서 다른 시스템이 완벽하게 실행되고 있기 때문에 무엇이 잘못되었는지 잘 모르겠습니다. 모든 시스템에는 기본 경로가 있습니다. 직접 기본 경로를 설정하려고 했지만 이 역시 작동하지 않았습니다.
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
인터넷 연결을 위한 서버(dhcp, dns, ...)로 Fritz.Box(192.168.178.1)가 있습니다. Fritz.Box는 내 서버 시스템에 고정 IP를 보냅니다.eth1(192.168.178.20). 다음에서 서브넷을 실행합니다.eth0isc-dhcp-server (192.168.147.0/24)를 통해. Fritz.Box의 연결이 자주 끊어지기 때문에 항상 네트워크가 끊어지는 것에 대해 걱정할 필요가 없습니다.
내 서버의 구성은 다음과 같습니다 ...
/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-서버
# 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
명확하게 말하자면, 내 서브넷에서 여러 시스템이 실행되고 있으며 isc-dhcp-server/gateway 콤보를 통해 완벽하게 작동합니다. 차단방화벽도 없습니다. debian net-install 이미지를 통해 이 서브넷에 새 시스템을 설치할 수 없습니다.
답변1
해결책을 찾았습니다. 사용하는 대신 ip route add default via 192.168.147.1
팁을 주어야했습니다 route add default gw 192.168.147.1
. 이제 시스템을 설치할 수 있습니다.