News:

::) Religion and life. There are many people who were imprisoned and killed because of greed and the intense engagement in acquiring more sustenance and money.

Main Menu

TCP/IP Configuration for Linux/Debian/Slackware/Mandrake..

Started by The Tech, 05, 26

Previous topic - Next topic

The Tech

TCP/IP Configuration for Linux versions of:

Debian
Gentoo
Mandrake
Red Hat9
Slackware




Debian



Adding a Static IP

Open a terminal

Type â€" su root

Password : type password here

Type â€" ifconfig eth0 netmask up

route add â€"net netmask eth0

route add default gw eth0


Adding / Removing Static DNS


Pico / nano / vi /etc/resolv.conf

nameserver 4.2.2.1

nameserver 4.2.2.2

save (ctrl o for nano and pico esc : !wq for vi)

The Tech

Gentoo


su root

password:

pico / nano / vi /etc/conf.d/net

add in

ifconfig_eth0=(“ netmask �)

routes_eth0=(“default gw

save (ctrl o for nano and pico esc : !wq for vi)


Pico / nano / vi /etc/resolv.conf

nameserver 4.2.2.1

nameserver 4.2.2.2

save (ctrl o for nano and pico esc : !wq for vi)


ln â€"s net.eth0 /etc/init.d/net.eth0

rcâ€"update add net.eth0 default

/etc/init.d/net.eth0 start

The Tech

Mandrake


Start DrakConf
Select Hardware Configuration
 
Select correct card under Network Device Card

Push Run Configuration Tool

Select System Configuration
Under the Config tab select Networking

Select Basic Host Information under the Client Tasks tab
 
 Select Adaptor 1 tab
Make sure Enabled is selected

Config Mode, either Manual for static settings or DHCP for automatic

DHCP â€" push accept then select Activate the Changes

Manual â€" Primary Name and Domain (gateway)

IP Address - (ip)

Netmask â€" drag to correct option

Net Device â€" eth0

Push the Accept button

Then select Activate the Changes

The Tech

Red Hat 9



su root
password:

cd /etc/sysconfig/network-scripts

less ifcfg â€"eth0


Static

DEVICE=eth0

IPADDR=

NETMASK=

BOOTPROTO=static

ONBOOT=yes

NETWORK=


Using DHCP

DEVICE=eth0

BOOTPROTO=dhcp

ONBOOT=yes


If the less command won’t let you change the settings try pico / nano /vi

Do not forget to save when you are done

save (ctrl o for nano and pico esc : !wq for vi)

The Tech

Slackware


Open a terminal window also called a console

Type su root and then enter your password

Type vi /etc/rc.d/rc.inet1.conf If there is no vi try pico or nano as the first command

For each device there's a section like the following:

# Config information for eth0: Or whatever the eth may be

IPADDR[0]="" This is where you would enter the ip your trying ot assign it

NETMASK[0]="" Subnet mask goes here

USE_DHCP[0]="" Change this it no if your adding a static setting and to yes if you are removing one

DHCP_HOSTNAME[0]="" Do not touch this it is poison

Now scroll down to the bottom and you will see

# Default gateway IP address:

GATEWAY="" Set your default gateway here