Networking2015/11/25 |
[1] | Set static IP address to the server. |
localhost:~ #
vi /etc/HOSTNAME # set hostname dlp.srv.world
localhost:~ #
vi /etc/sysconfig/network/ifcfg-eth0 # change like follows (replace IP and other values for your own environment) # change BOOTPROTO=' static '# broadcast address BROADCAST=' 10.0.0.255 'ETHTOOL_OPTIONS='' # server's static IP address IPADDR=' 10.0.0.30 'MTU='' NAME='' # subnet mask NETMASK=' 255.255.255.0 '# network address NETWORK=' 10.0.0.0 'REMOTE_IPADDR='' STARTMODE='auto' USERCONTROL='no'
localhost:~ #
vi /etc/sysconfig/network/config # line 306: set DNS server NETCONFIG_DNS_STATIC_SERVERS=" 10.0.0.1 "
localhost:~ #
vi /etc/sysconfig/network/routes # create new: set default gatewway
default 10.0.0.1 - eth0
localhost:~ #
localhost:~ # /etc/init.d/network restart eth0 Link encap:Ethernet HWaddr 00:0C:29:4C:18:F8 inet addr:10.0.0.30 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe4c:18f8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1924 errors:0 dropped:0 overruns:0 frame:0 TX packets:1496 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:180721 (176.4 Kb) TX bytes:258382 (252.3 Kb) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:5 errors:0 dropped:0 overruns:0 frame:0 TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1828 (1.7 Kb) TX bytes:1828 (1.7 Kb) |
Sponsored Link |
|