Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 428  / 1 Year ago, thu, december 15, 2022, 10:00:14

I have some trouble setting-up the network interface using the static IP configuration. I run ubuntu 12.04 kernel 3.11.0-22 with the back-ports enabled.



I followed these instructions from help.ubuntu.com but there seems to exist some conflict between the GUI approach (NetworkManager) and the command line approach.



$ sudo nano /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 10.1.1.50
gateway 10.1.1.10
netmask 255.255.255.0
dns-nameservers 192.168.3.45 192.168.8.10

$ sudo /etc/init.d/networking restart


I than try to ping for example google.com ping -c 3 www.google.com the response is that the host is unreachable. The icon on the top right of the desktop says: wired network disconnected.



If I work using the GUI approach (Edit Connections and so on...) all works great.



Can same one explain to me where I wrong?



$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 90:e6:ba:07:4a:77
inet addr:10.1.1.50 Bcast:10.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::92e6:baff:fe07:4a77/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:39619 errors:0 dropped:0 overruns:0 frame:0
TX packets:18520 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19030895 (19.0 MB) TX bytes:2768769 (2.7 MB)

$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.1.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0

More From » networking

 Answers
1

Your gateway is outside of your network



address 10.1.1.50
netmask 255.255.255.0
implies network from 10.1.1.0 - 10.1.1.255



as you can see geteway 10.0.0.1 falls outside. Check the subnet on your gateway and assign ip within that range


[#24809] Saturday, December 17, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tocklftime

Total Points: 110
Total Questions: 109
Total Answers: 100

Location: Mayotte
Member since Mon, Sep 12, 2022
2 Years ago
;