networking - connect: Network is unreachable? - ping - Ask Ubuntu
when attempt ping google's dns or outside network connect: network unreachable
?
i can't update either put down this
i new networking... , ubuntu. these results of commands thought might help
$ ip 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 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 glibc resolver(3) generated resolvconf(8) # not edit file hand -- changes overwritten nameserver 192.168.0.5 nameserver 8.8.8.8 $ vi /etc/network/interfaces # loopback network interface auto lo iface lo inet loopback # 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.
the following line wrong:
iface eth0 inet static address 192.168.0.5 netmask 255.255.255.0 network 192.168.1.0 <<<<<<<<<<<<<<<<<<<<<<<< should 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
also, there doesn't seem default gateway setup.
not having more info network, suggest adding following line @ end:
gateway <your.router.ip.address>
so, assuming router ip address 192.168.0.1, whole entry:
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
Comments
Post a Comment