Tiny Core Base > TCB Q&A Forum

network configuration file and dhcp

(1/1)

Magil:
Hello,

I would like to know where i can find the configuration file for the network. I would also like to know how to set a static ip adress in tiny core by changing it in text.I am aware of the Netcardconfig in the desktop but would like to change things manually and be able to change these settings remotely. Can someoen answer my question? Thanks.

combo3:
There are no configuration files per se.

The command line syntax is:

ifconfig eth0 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255
route add default gw 192.168.0.1 eth0

You'll also need to create file /etc/resolv.conf for DNS lookups.
That file contains the following items:

nameserver x.x.x.x
nameserver x.x.x.x

where x.x.x.x are your IPs nameserver addresses.

To make life easy, here's a script that you can run at system boot:


--- Code: ---#!/bin/sh

# Variable Assignment

INTERFACE=eth0
ADDRESS=192.168.0.100
BROADCAST=192.168.0.255
GATEWAY=192.168.0.1
NETMASK=255.255.255.0
NAMESERVER1=8.8.8.8
NAMESERVER2=8.8.4.4

# Bring up the interface

ifconfig $INTERFACE $ADDRESS netmask $NETMASK broadcast $BROADCAST up
route add default gw $GATEWAY $INTERFACE

# Create DNS Lookup File

cat > /etc/resolv.conf <<EOF
nameserver $NAMESERVER1
nameserver $NAMESERVER2
EOF
--- End code ---

Substitute the variables to suit your needs.

roberts:
There is a GUI for such. Control Panel Netcardconfig, or from shell netcardconf

Magil:
ah cool, thanks for the fast response, problem solved.  :D

Navigation

[0] Message Index

Go to full version