linux 下IP配置@
f:ff
RX: bytes packets errors dropped overrun mcast
2449949362 2786187 0 0 0 0
RX errors: length crc frame fifo missed
0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
178558497 1783946 332 0 332 35172
TX errors: aborted fifo window heartbeat
0 0 0 332
这个命令等于传统的ifconfig eth0
5.1 ip address add--添加一个新的协议地址. 缩写:add、a
示例1:为每个地址设置一个字符串作为标签。为了和Linux-2.0的网络别名兼容,这个字符串必须以设备名开头,接着一个冒号,
# ip addr add local 192.168.4.1/28 brd + label eth0:1 dev eth0
示例2: 在以太网接口eth0上增加一个地址192.168.20.0,掩码长度为24位(155.155.155.0),标准广播地址,标签为eth0:Alias:
# ip addr add 192.168.4.2/24 brd + dev eth1 label eth1:1
这个命令等于传统的: ifconfig eth1:1 192.168.4.2
5.2 ip address delete--删除一个协议地址. 缩写:delete、del、d
# ip addr del 192.168.4.1/24 brd + dev eth0 label eth0:Alias1
5.3 ip address show--显示协议地址. 缩写:show、list、lst、sh、ls、l
# ip addr ls eth0
5.4.ip address flush--清除协议地址. 缩写:flush、f
示例1 : 删除属于私网10.0.0.0/8的所有地址:
# ip -s -s a f to 10/8
示例2 : 取消所有以太网卡的IP地址
# ip -4 addr flush label "eth0"
6. ip neighbour--neighbour/arp表管理命令
缩写neighbour、neighbor、neigh、n
命令add、change、replace、delete、fulsh、show(或者list)
6.1 ip neighbour add -- 添加一个新的邻接条目
ip neighbour change--修改一个现有的条目
ip neighbour replace--替换一个已有的条目
缩写:add、a;change、chg;replace、repl
示例1: 在设备eth0上,为地址10.0.0.3添加一个permanent ARP条目:
# ip neigh add 10.0.0.3 lladdr 0:0:0:0:0:1 dev eth0 nud perm
示例2:把状态改为reachable
# ip neigh chg 10.0.0.3 dev eth0 nud reachable
6.2.ip neighbour delete--删除一个邻接条目
示例1:删除设备eth0上的一个ARP条目10.0.0.3
# ip neigh del 10.0.0.3 dev eth0
6.3.ip neighbour show--显示网络邻居的信息. 缩写:show、list、sh、ls
示例1: # ip -s n ls 193.233.7.254
193.233.7.254. dev eth0 lladdr 00:00:0c:76:3f:85 ref 5 used 12/13/20 nud reachable
6.4.ip neighbour flush--清除邻接条目. 缩写:flush、f
示例1: (-s 可以显示详细信息)
# ip -s -s n f 193.233.7.254
7. 路由表管理
7.1.缩写route、ro、r
7.5.路由表
从Linux-2.2开始,内核把路由归纳到许多路由表中,这些表都进行了编号,编号数字的范围是1到255。另外,
为了方便,还可以在/etc/iproute2/rt_tables中为路由表命名。
默认情况下,所有的路由都会被插入到表main(编号254)中。在进行路由查询时,内核只使用路由表main。
7.6.ip route add -- 添
Linux 配置静态 IP(图解)环境:主机 windows xp 虚拟机:red hat enterprises 5 配置静态 IP 是为了开发的方便 1、 查看主机所在网络,以便虚拟机内配置静态 IP,...
Linux 静态 IP 设置 一、设置 IP: vi /etc/sysconfig/network-scripts/ifcfg-eth0 修改以下内容: DEVICE=eth0 HWADDR=00:07:E9:05:E8:B4 BOOTPROTO=...
Linux上静态IP配置_计算机软件及应用_IT/计算机_专业资料。linux!Linux 网络相关的配置文件 1. 在虚拟机 linux(NAT 方式连网)上完成以下实验。功能 终端命令, ...
RedHat配置静态IP_计算机硬件及网络_IT/计算机_专业资料。RedHat Linux配置静态IP的步骤RedHat 静态 Ip 地址配置 RedHat 静态 Ip 地址配置 依次修改以下三个文件:...
Linux双网卡静态IP地址配置过程_计算机软件及应用_IT/计算机_专业资料。Linux虚拟机VM中Linux双网卡配置 ? 静态IP地址配置过程说明– 第一个网卡在安装时已经配置...
VirtualBox 虚拟的Linux系统静态IP设置_电脑基础知识_IT/计算机_专业资料。VirtualBox 虚拟的Linux系统静态IP设置VirtualBox 虚拟的 Linux 系统静态 IP 设置 1、 设置...
Ubuntu中配置静态IP地址_电子/电路_工程科技_专业资料。Ubuntu,配置静态IP地址,LinuxUbuntu 中配置静态 IP 地址 1、编辑文件:/etc/network/interfaces 在命令行中...
Linux 静态IP设置_电脑基础知识_IT/计算机_专业资料。很实用,请收藏Linux 静态IP,动态IP配置分类: 杂项 2010-08-14 21:28 749人阅读 评论(0) 收藏 举报第...
Linux静态IP设置_计算机硬件及网络_IT/计算机_专业资料。Linux静态IP设置 IP配置: /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static ...
如何在linux系统中设置静态ip地址_计算机软件及应用_IT/计算机_专业资料。如何在 linux 系统中设置静态 ip 地址工具/原料 ? redhat6.4 x64 方法/步骤 1. 1...
热门文档