1/21/2011

Network settings

[1] Change to static IP addres if you use Ubuntu 10.04 as a server.
root@ubuntu:~# vi /etc/network/interfaces 

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5)..

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
# make it comment
#iface eth0 inet dhcp
# add these lines
iface eth0 inet static
address 10.0.0.50# define IP address
network 10.0.0.0# define network address
netmask 255.255.255.0# define subnet mask
broadcast 10.0.0.255# define broadcast address
gateway 10.0.0.1# define default gateway

dlp:~# /etc/init.d/networking restart
* Reconfiguring network interfaces...
[2] Disable IPv& if not needed.
root@ubuntu:~# echo "net.ipv6.conf.all.disable_ipv6=1" >> /etc/sysctl.conf
root@ubuntu:~# reboot

root@ubuntu:~# ifconfig
eth0Link encap:Ethernet HWaddr 00:22:68:3d:82:88
inet addr:10.0.0.50 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:50 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5813 (5.8 KB) TX bytes:7450 (7.4 KB)
Interrupt:27 Base address:0x8000

loLink encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

From(server-world).

No comments:

Post a Comment