Cant have internet with ip static help me please!

hi guys me again :smiley:

have a problem, im configuring a ip static in mate, but cant use the internet, can access to red but not to internet, only can have internet service with dhcp.

why?

i removed network manager, and configured the ip at the /etc/network/interface using eno1, but nothing, dont have internet with ip static.

pleaasee help mee!!

can you post the interfaces file (sample below) ... then ifdown eth0; ifup eth0

auto eth0
iface eth0 inet static
    address 10.0.0.41
    netmask 255.255.255.0
    network 10.0.0.0
    broadcast 10.0.0.255
    gateway 10.0.0.1
    dns-nameservers 10.0.0.1 8.8.8.8

here my interfaces file

primary network

auto eno1
iface eno1 inet static
address 192.168.254.53
broadcast 192.168.254.255
netmask 255.255.255.0
network 192.168.254.0
gateway 192.168.254.4

here my dns file

nameserver 200.44.32.12
nameserver 200.44.32.13
nameserver 8.8.8.8

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.15.2 netmask 255.255.255.0 broadcast 192.168.15.255
inet6 fdf3:1f0e:88ae:0:a2e:5fff:fe17:7b39 prefixlen 64 scopeid 0x0
inet6 fe80::a2e:5fff:fe17:7b39 prefixlen 64 scopeid 0x20
ether 08:2e:5f:17:7b:39 txqueuelen 1000 (Ethernet)
RX packets 17946 bytes 25360239 (25.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14193 bytes 1179199 (1.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xfe400000-fe420000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Bucle local)
RX packets 334 bytes 24706 (24.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 334 bytes 24706 (24.7 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

seems you get an ip (192.168.15.2) but not the proper one in the 254 subnet.
gateway is usually .1 but you write .4 Can you post route -n

have a red enterprise, the gateway is 192.168.254.4 and the ip 192.168.15.2 is for dhcp, but i need work with static, and internet not work with that.

Any particular reason you’re not using NetworkManager?

Also your interface says: broadcast 192.168.254.255 but your ifconfig output shows: broadcast 192.168.15.255

of course, that info is with dhcp for that the difference, but i configured all right and nothing... i read which network manager block the static ip.

No it doesn't. Define your static IP settings in this tab.

I’ve already done it, but dont work :S

If you use a router try to delete the entry from the dhcp serv (router) . You can have a ip conflict. You are seting up a static ip on the pc but the dhcp serv from the router is giving you another ip that its tie up with your nic mac.

I just tried this on my own network in a 17.04 VM. I uninstalled network-manager which also removed 5 network-manager modules and that’s all.

You need to restart networking or reboot to see the change in ifconfig. ifup/ifdown doesn’t do it.

I put exactly your setup in /etc/network/interfaces except mine is enp0s3 (your eno1) and I used my 172.x.x.x for the out-of-network gateway.

You likely need to assign your static IP within the network of the gateway. Not because it’s invalid - there is nothing wrong with a gateway anywhere as long as it is on the local network BUT… that router probably will not act as a gateway outside it’s own network. I ran into this on my OpenWrt router in fact. It gets ARP ok just won’t accept a client outside the LAN space to work as a gateway.

I added DNS right in /etc/network/interfaces, assigned inside my 172.x.x.x and it worked fine.

I used to run this way but got lazy in my old age and just configure NetworkManager static like @ouroumov suggests. :slight_smile:

look my files

/etc/network/interfaces

primary network

auto eno1
iface eno1 inet static
address 192.168.254.53
netmask 255.255.255.0
network 192.168.254.0
broadcast 192.168.254.255
gateway 192.168.254.4
dns-nameserver 200.44.32.12 8.8.8.8

and look

ifconfig info

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.254.53 netmask 255.255.255.0 broadcast 192.168.254.255
inet6 fe80::a2e:5fff:fe17:7b39 prefixlen 64 scopeid 0x20
ether 08:2e:5f:17:7b:39 txqueuelen 1000 (Ethernet)
RX packets 267 bytes 36673 (36.6 KB)
RX errors 0 dropped 6 overruns 0 frame 0
TX packets 122 bytes 12845 (12.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xfe400000-fe420000

this configuration can me connect to other pc's, but dont work internet, why? and other pc with linux mint working perfectly, but i like MATE.. help me pleasee!!

dont understand me :frowning:

It occurs to me that your configurations are all for ipv4 but your ifconfig information shows ipv6 address are assigned. What is the default behavior of Ubuntu in this case? If Ubuntu has both ipv4 and ipv6 addresses and configurations, I would think that ipv4 might be ignored ( or used as fallback ) and ipv6 would be primary?

Perhaps it would be worthwhile to attempt to disable ipv6, either, on connection in question, like this:

or

Entirely on the system like this:

and see if that doesn't improve the situation.

:wink:

right now change ipv6 to disable, look at this

/etc/sysctl.conf

disable ipv6

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

and

#ifconfig eno1
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.254.53 netmask 255.255.255.0 broadcast 192.168.254.255
ether 08:2e:5f:17:7b:39 txqueuelen 1000 (Ethernet)
RX packets 1021 bytes 127450 (127.4 KB)
RX errors 0 dropped 22 overruns 0 frame 0
TX packets 378 bytes 32505 (32.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xfe400000-fe420000

and... not working internet... i dont know... why not working??

red card, have a two leds, when use dhcp, 1 led is green another led is orange, but whe use ip static, two leds are green, :S my red card is 1000mb/s :S

What happens when you ping into your gateway?

can do it, ping to gateway and other pc and successful... :S

Ao the problem is the router. Like i did say above. reset the dhcp serv from the router and try again. The problem is not the os, it’s the router. If it was a problem with the os then all the pings from the pc in problem to all the other pcs/gateway wor death. Try to se from the dhcp serv a bind/static ip to your mac pc and see if that warks. What router do you have?

is a local red, the others computers working without problem, the gateway 192.168.254.4 dont work with dhcp, is static, and each pc have a ip static, all have internet, but not my pc

Can you tell us wat is your lan configuration? Like how many pc,s and what router or what router/ont your isp give you?