Network settings2010/11/03 |
[1] | Set static IP address to the server, DHCP is not recommended if you use as a server, Change it. |
[root@dlp ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:50:43:00:3B:AE # change ONBOOT= yes # add lines
BOOTPROTO=none TYPE=Ethernet # DNS server's IP address DNS1=10.0.0.1 # this server's IP address IPADDR=10.0.0.30 # subnet mask NETMASK=255.255.255.0 # default gateway GATEWAY=10.0.0.1 USERCTL=no IPV6INIT=no PREFIX=24 PEERDNS=no [root@dlp ~]# /etc/rc.d/init.d/network start Bringing up loopback interface: [ OK ] Bringing up interface eth0: [ OK ] [root@dlp ~]# chkconfig network on [root@dlp ~]# eth0 Link encap:Ethernet HWaddr 00:50:43:00:3B:AE inet addr:10.0.0.30 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::250:43ff:fe00:3bae/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12068 errors:0 dropped:0 overruns:0 frame:0 TX packets:7445 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:15474350 (14.7 MiB) TX bytes:582667 (569.0 KiB) Interrupt:30 Base address:0x6000 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:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:680 (680.0 b) TX bytes:680 (680.0 b) |
[2] | Disable IPv6 if you don't need it. |
[root@dlp ~]# eth0 Link encap:Ethernet HWaddr 00:50:43:00:3B:AE inet addr:10.0.0.30 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::250:43ff:fe00:3bae/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12068 errors:0 dropped:0 overruns:0 frame:0 TX packets:7445 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:15474350 (14.7 MiB) TX bytes:582667 (569.0 KiB) Interrupt:30 Base address:0x6000 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:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:680 (680.0 b) TX bytes:680 (680.0 b) [root@dlp ~]# echo "install ipv6 /bin/true" > /etc/modprobe.d/disable-ipv6.conf [root@dlp ~]# # reboot [root@dlp ~]# eth0 Link encap:Ethernet HWaddr 00:50:43:00:3B:AE inet addr:10.0.0.30 Bcast:10.0.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:12068 errors:0 dropped:0 overruns:0 frame:0 TX packets:7445 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:15474350 (14.7 MiB) TX bytes:582667 (569.0 KiB) Interrupt:30 Base address:0x6000 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:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:680 (680.0 b) TX bytes:680 (680.0 b) |
Sponsored Link |