LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   establishing internet connection after boot (https://www.linuxquestions.org/questions/linux-newbie-8/establishing-internet-connection-after-boot-172722/)

true_atlantis 04-21-2004 12:05 AM

establishing internet connection after boot
 
i used the netconfig to set up my internet connection. if the cable is not plugged in when i boot up, is there a command that will enable the connection manually?

d0t3x3 04-21-2004 12:20 AM

you will need to manually issue a command from the command line once your machine is booted and the network is connected. this command will be similar to:

/etc/rc.d/init.d/network start

this can vary from distro to distro so please verify the command for you distro.

keep in mind /etc/rc.d/init.d/network restart and /etc/rc.d/init.d/network stop are also valid commands. i hope this helps.

true_atlantis 04-21-2004 01:20 AM

the init.d folder does not exist in rc.d here is the directory listing...

atlantis:/etc/rc.d $ ls
rc.0@ rc.S* rc.cups* rc.inet1* rc.local* rc.pcmcia rc.sshd*
rc.4* rc.acpid* rc.font.sample* rc.inet1.conf rc.lprng rc.portmap rc.syslog*
rc.6* rc.alsa* rc.gpm* rc.inet2* rc.modules* rc.samba rc.sysvinit*
rc.K* rc.atalk rc.hotplug* rc.inetd* rc.mysqld rc.sendmail rc.yp*
rc.M* rc.bind rc.httpd rc.ip_forward rc.nfsd* rc.serial*

dimi 04-21-2004 03:09 AM

Do "/etc/init.d/networking start", this is how it is on Debian. Like dot3x3 had pointed out, it differs from distro to distro.

Most of the time its better to do a restart, as even if network is running, restart will reset the ethernet.

D

silver2003 04-21-2004 01:56 PM

Netconfig

The preferred way of setting up your network connection is through the use of the netconfig program. Run this as root and you will presented with a series of questions to answer. The program will then create the rc.inet1 file. You will also need kernel support for your network card. The netconfig program can probe your system for a network card and enable it. Or you can edit /etc/rc.d/rc.modules and select your card. You can, of course, edit the network configuration files by hand. They are /etc/rc.d/rc.inet1 and /etc/rc.d/rc.inet2, which are discussed in greater detail below.

rc.inet1

rc.inet1's role is simple: it configures your networking devices and sets up your routing. Essentially, rc.inet1 is the file that gives you a network in the first place.

Sample of rc.inet1

# Edit for your setup.
IPADDR="111.112.113.114"
NETMASK="255.255.255.0"
NETWORK="111.112.113.0"
BROADCAST="111.112.113.255"
GATEWAY="111.112.113.1"


All times are GMT -5. The time now is 02:17 PM.