Posted by: isaraffee | August 10, 2009

Configuring Static IP in Vector Linux

Configuring Static IP in Vector Linux

To configure static ip, you can do it by GUI or command line. To configure by GUI, launching vasm by typing vasm on the command line or by clicking Program(This is the leter ‘V’,Vector icon on your bottom left of your screen) –>System–> VASM.

To assign ip address in VASM, click NETWORK–>NETCONF. YOu have to enter your hostname, static address or dhcp, subnet mask, gateway address, DNS (you can leave it blank), and so on. After you have complete assigning the ip address you then save and quit VASM.

To configure ip address by command line type the following commands:

root:# cd /etc/rc.d/

neptune://etc/rc.d

root:# more rc.inet

rc.inet1 rc.inet2

neptune://etc/rc.d

root:# more rc.inet1

#!/bin/sh

# This file is supposed to be created by vnetadd

# and modified by vnetset.

# You can modify it by hand, but be careful 😉

#

# GNU GPL (c) Eko M. Budi, 2004

# (c) Vector Linux, 2004

#

###########################################################

## The settings

DEVICE=’eth0′

DHCP=’no’

IPADDR=’172.18.0.10′

NETMASK=’255.255.0.0′

GATEWAY=’172.18.0.1′

PROBE=’no’

###########################################################

## The script

## You may make customized script here

## If not, source the standard network

. /etc/rc.d/functions-network “$@

To verify that the IP address has been set type:

root:# ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:E0:7D:A1:06:D7

inet addr:172.18.0.10 Bcast:172.18.255.255 Mask:255.255.0.0

UP 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:11 Base address:0xec00

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:4284 errors:0 dropped:0 overruns:0 frame:0

TX packets:4284 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:214332 (209.3 KiB) TX bytes:214332 (209.3 KiB)

You can see that it has been set.

To see the routing table, type:

root:# netstat -rn

Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface

172.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo

0.0.0.0 172.18.0.1 0.0.0.0 UG 0 0 0 eth0

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: