Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev 200 cannot get a static ip?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
white_tiger
n00b
n00b


Joined: 04 Oct 2011
Posts: 40

PostPosted: Thu May 02, 2013 1:06 pm    Post subject: udev 200 cannot get a static ip? Reply with quote

Whatever I try the networkcard allways gets a dynamic ip by dhcp and I want to give it an static ip, but /etc/conf.d/net does nothing.

My /etc/conf.d/net looks like this:
Code:

# cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /usr/share/doc/openrc*/net.example* and save your configuration
# in /etc/conf.d/net (this file :]!).
config_enp4S0="192.168.2.82/24"
routes_enp4S0="default via 192.168.2.254"
dns_servers_enp4S0="192.168.2.254 8.8.8.8"


Ifconfig reads:
Code:

# ifconfig
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.1  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::922b:34ff:fe33:de46  prefixlen 64  scopeid 0x20<link>
        ether 90:2b:34:33:de:46  txqueuelen 1000  (Ethernet)
        RX packets 582285  bytes 679824043 (648.3 MiB)
        RX errors 0  dropped 2  overruns 0  frame 0
        TX packets 498542  bytes 53654918 (51.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 1  collisions 0


a ls -la /sys/class/net gives me:
Code:

# ls -la /sys/class/net
total 0
drwxr-xr-x  2 root root 0 May  2 12:04 .
drwxr-xr-x 39 root root 0 May  2 12:04 ..
lrwxrwxrwx  1 root root 0 May  2 12:04 enp4s0 -> ../../devices/pci0000:00/0000:00:1c.4/0000:04:00.0/net/enp4s0
lrwxrwxrwx  1 root root 0 May  2 12:04 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx  1 root root 0 May  2 12:04 sit0 -> ../../devices/virtual/net/sit0


So I dont understand why the i cannot get the static ip and dns i have provided in the /etc/conf.d/net file
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8708
Location: ~Brussels - Belgique

PostPosted: Thu May 02, 2013 1:12 pm    Post subject: Reply with quote

Hello,

Try to use lower case s in place of upper case S in the config file ;)
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
white_tiger
n00b
n00b


Joined: 04 Oct 2011
Posts: 40

PostPosted: Thu May 02, 2013 1:17 pm    Post subject: Reply with quote

XavierMiller wrote:
Hello,

Try to use lower case s in place of upper case S in the config file ;)


omg how did i overlook that one :(

but thx it works now :)
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8708
Location: ~Brussels - Belgique

PostPosted: Thu May 02, 2013 1:34 pm    Post subject: Reply with quote

;)
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum