You are not logged in.

#1 2012-03-16 13:45:07

acidic
Member
Registered: 2011-11-24
Posts: 27

assign eth0 ip on start up

Hello

I now have no need to use netcfg so am going to switch to using the settings in /etc/rc.conf. I have the line ifconfig eth0 192.168.2.1 in my netcfg profile. How can I set it up while using /etc/rc.conf so that I can give eth0 an ip address on start up.

Thanks for your help

Offline

#2 2012-03-16 14:05:08

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: assign eth0 ip on start up

rc.conf has a man page, everything is explained there.

Offline

#3 2012-03-16 14:21:33

Czarcasmo
Member
From: Colorado Springs, Colorado
Registered: 2011-04-20
Posts: 82

Re: assign eth0 ip on start up

acid,

If you look at your rc.conf, it is well commented throughout on how to setup your network connections for DHCP.

Cheers,
Czar.


Laptop: Lenovo X1 Carbon, Core i7 2.0Ghz, 8GB RAM, Gnome 3.16

Offline

#4 2012-03-16 14:52:43

acidic
Member
Registered: 2011-11-24
Posts: 27

Re: assign eth0 ip on start up

Yes I read it but I assumed I could use this to connect to a wireless network and share the connection through eth0. This is what I do now using netcfg but i don't use any other netcfg profiles now and it seems to really slow down starting up my laptop even in the backgound. So I guess I can't do it this way and should just leave it the way it is?

Offline

#5 2012-03-16 14:59:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: assign eth0 ip on start up

Not sure I understand what you're trying to do, but rc.conf alone doesn't support wireless networking, just a single wired connection.

Offline

#6 2012-03-16 15:42:12

Czarcasmo
Member
From: Colorado Springs, Colorado
Registered: 2011-04-20
Posts: 82

Re: assign eth0 ip on start up

It sounds like you are trying to setup masquerading, which I do not believe is supported through rc.conf. You probably need to look at something along the lines of iptables to setup some rules (though, I expect karol may be able to provide some better insight).

Cheers,
Czar.


Laptop: Lenovo X1 Carbon, Core i7 2.0Ghz, 8GB RAM, Gnome 3.16

Offline

#7 2012-03-16 16:25:50

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: assign eth0 ip on start up

Check this wiki article.


Burninate!

Offline

#8 2012-03-16 16:38:22

acidic
Member
Registered: 2011-11-24
Posts: 27

Re: assign eth0 ip on start up

Sorry for not being clear

I already have this all setup using netcfg and following the simple stateful firewall guide in the wiki. I have been using this for a while now and it works I just thought there might be another way of doing it because my computer takes quite a bit longer starting up using netcfg.

Offline

#9 2012-03-16 16:43:57

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: assign eth0 ip on start up

Have you tried backgrounding net-profiles -> '@net-profiles'?
What other daemons do you have in your DAEMONS array in rc.conf?

Offline

#10 2012-03-16 17:06:05

acidic
Member
Registered: 2011-11-24
Posts: 27

Re: assign eth0 ip on start up

Yes
syslog-ng (not sure what this is so I have not touched it), dbus, @iptables, @net-profiles, @alsa

Backgrounding does help alot but it still takes a while for my login manager to appear

Offline

#11 2012-03-16 17:46:05

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: assign eth0 ip on start up

General forum advice: provide all relevant details when you're asking for help. Your initial post here mentions eth0 only.

Connecting to wireless networks can take time - that is most likely the cause of the delay you are experiencing.

Offline

Board footer

Powered by FluxBB