Google의 DNS 또는 네트워크 외부에 ping을 시도하면 얻을 수 connect: Network is unreachable
있습니까?
나는 이것에 내려 놓은 어느 쪽도 업데이트 할 수 없다
저는 네트워킹을 처음 접합니다. 그리고 Ubuntu. 그러나 이것은 내가 도움이 될 것이라고 생각한 몇 가지 명령의 결과입니다.
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:0e:7f:a9:10:54 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.5/24 brd 192.168.0.255 scope global eth0
inet6 fe80::20e:7fff:fea9:1054/64 scope link
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 86:0b:cb:43:63:a5 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
mcserver@helloworld:~$
$ vi /etc/resolv.conf:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.0.5
nameserver 8.8.8.8
$ vi /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.5
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.0.255
post-up iptables-restore < /etc/iptables.up.rules
dns-nameservers 192.168.0.5 8.8.8.
다음 줄이 잘못되었습니다.
iface eth0 inet static
address 192.168.0.5
netmask 255.255.255.0
network 192.168.1.0 <<<<<<<<<<<<<<<<<<<<<<<< It should be 192.168.0.0
broadcast 192.168.0.255
post-up iptables-restore < /etc/iptables.up.rules
dns-nameservers 192.168.0.5 8.8.8.8
또한 기본 게이트웨이 설정이없는 것 같습니다.
네트워크에 대한 자세한 정보가 없으면 끝에 다음 줄을 추가하는 것이 좋습니다.
gateway <YOUR.ROUTER.IP.ADDRESS>
따라서 라우터 IP 주소가 192.168.0.1이라고 가정하면 전체 항목이됩니다.
iface eth0 inet static
address 192.168.0.5
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
post-up iptables-restore < /etc/iptables.up.rules
gateway 192.168.0.1
dns-nameservers 192.168.0.5 8.8.8.8
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다