LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   which file can i set "ifconfig eth0 up"? (http://www.linuxquestions.org/questions/debian-26/which-file-can-i-set-ifconfig-eth0-up-317661/)

Mathsniper 04-27-2005 07:06 AM

which file can i set "ifconfig eth0 up"?
 
Code:

mathsniper:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:04:75:B3:F8:EA
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:209 Base address:0xd800
mathsniper:~# ifconfig eth0 up
mathsniper:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:04:75:B3:F8:EA
          inet6 addr: fe80::204:75ff:feb3:f8ea/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:3 dropped:0 overruns:0 carrier:6
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:209 Base address:0xd800

after i type "ifconfig eth0 up" and then use command type "pon dsl-provider", it's work. um... where can i set "ifconfig eth0 up"?

RomanG 04-27-2005 07:52 AM

Hello.
"/etc/sysconfig/network-scripts" contains some scripts you should look for

Mathsniper 04-27-2005 10:28 AM

Quote:

Originally posted by RomanG
Hello.
"/etc/sysconfig/network-scripts" contains some scripts you should look for

I can't find this file, doesn't it exist?(login as root)

zuralin 04-27-2005 10:37 AM

I don't think he realizes he posted in the Debian forum..
Look into /etc/network/interfaces and read man interfaces

Mathsniper 04-27-2005 10:58 AM

Quote:

Originally posted by zuralin
I don't think he realizes he posted in the Debian forum..
Look into /etc/network/interfaces and read man interfaces

I read /etc/network/interfaces but didn't know howto do with this file. (I am using sarge)

zoredache 04-27-2005 12:45 PM

try checking out the example file...

zcat /usr/share/doc/ifupdown/examples/network-interfaces.gz | more

basically for a eth0 with dhcp you would need

auto eth0
iface eth0 inet dhcp

for a eth0 with a static addr you would need

auto eth0
iface eth0 inet static
address 192.168.0.42
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1

zuralin 04-27-2005 02:17 PM

Quote:

Originally posted by Mathsniper
I read /etc/network/interfaces but didn't know howto do with this file. (I am using sarge)
Which is why I said to read: man interfaces

The man pages explain it better than anyone else can and are very useful.


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