Question running ifup-local

Issues related to configuring your network
ilikefishdou
Posts: 4
Joined: 2018/01/31 01:10:47

Question running ifup-local

Postby ilikefishdou » 2018/02/01 19:55:04

I want to run a script with ifup to disable tcp offload since it's slowing down my DNS queries. I created an ifup-local script and put it in /sbin for ifup-post to call. You're supposed to turn off network manager in ifcfg to make it run. When I have NM_CONTROLLED=no, then I can't get anywhere on the network. ip addr shows the interface is up and it has an ip address (which it does because it's static), but if I try to ping something I get connect: Network Unreachable, but my script runs.

If I put NM_CONTROLLED=yes, then I have network access but my script doesn't run. Why is it doing that?

CentOS 7 minimal install.

Thanks!

Code: Select all

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens160
UUID=91fe0225-06ba-4ea1-95f4-9438f82f0b94
DEVICE=ens160
ONBOOT=yes
IPADDR=192.168.254.251
PREFIX=32
GATEWAY=192.168.0.1
DNS1=192.168.254.250
DOMAIN=name-gst.com
NM_CONTROLLED=yes


ilikefishdou
Posts: 4
Joined: 2018/01/31 01:10:47

Re: Question running ifup-local

Postby ilikefishdou » 2018/02/01 20:22:28

Never mind. I figured I'd just use NetworkManager to run the script. I copied the ifup-local script to /etc/NetworkManager/dispatcher.d directory, renamed it, and then it worked at ifup time.

Still curious why turning off NetworkManager would keep my network from working, though.

Thanks!