Linux修改IP、DNS
一、修改IP、网关
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.117
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
二、修改DNS
[root@lvs_master ~]# vi /etc/resolv.conf
nameserver 202.106.195.68
nameserver 202.106.116.56
三、修改host name
[root@lvs_master ~]# vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=lvs_master
GATEWAY=192.168.1.1
四、修改之后启动网络配置
[root@lvs_master ~]# /etc/init.d/network restart 或者 service network restart
五、即时生效的方法
修改IP:
[root@lvs_master ~]# ifconfig eth0 192.168.0.20 netmask 255.255.255.0
修改default gateway:
[root@lvs_master ~]# route add default gw 192.168.0.254
修改host name
[root@lvs_master ~]# hostname fc2
相关文档:
一.什么是NS 2
NS 2是一种针对网络技术的源代码公开的、免费的软件模拟平台,研究人员使用它可以很容易的进行网络技术的开发,而且发展到今天,它所包含的模块非常丰富,几乎涉及到了网络技术的所有方面。
NS 2(Network Simulator, version
2)是一种面 ......
目录结构为:
inc/hello.h
src/hello.c
main/main.c
Makefile
文件内容为:
hello.h:
void hello(char name[]);
hello.c:
#include <stdio.h>
void hello(char name[])
{
printf("Hello %s!\n", name);
}
main.c:
#include <stdio.h>
#include "hello.h"
// The second hello.h should ......
Unix中的函数select和poll用来,支持Unix中I/O复用的功能,在Unix中I/O模型可以分为以一几种:
(1)阻塞I/O
(2)非阻塞I/O
(3)I/O复用(select和poll)
(4)信号驱动I/O(SIGIO)
(5)异步I/O
其中,现在比较流行的I/O模型是阻塞I/O模型.阻塞I/O是当应用程序和内核交换数据时,由于内核还没有准备好 ......
< type="text/javascript"><!--
google_ad_client = "pub-3936520987820628";
//250x250, 创建于 07-12-28
google_ad_slot = "5080959190";
google_ad_width = 250;
google_ad_height = 250;
//-->
< src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javasc ......