flush-20

问题描述:路由器怎么格式化FLUSH 大家好,小编来为大家解答以下问题,一个有趣的事情,一个有趣的事情,现在让我们一起来看看吧!

为什么网页打不开,显示HTTP403( 禁止访问)

flush-20的相关图片

路由器格式化方法:

方法一:Reset按钮重置方法:

1、注意观察路由器,在电源和网线接口的旁边有一个“reset”插孔,长按reset键5秒以上。

2、当路由器的所有指示灯都熄灭,表示已经成功的恢复到了出厂设置。

方法二:管理界面重置方法:

1、进入路由器:

打开浏览器,在地址栏输入192.168.1.1(一般路由器地址是这个或者查看路由器背面的登录信息)进路由-输入用户名,密码 ,(默认一般是admin)。

2、点击“工具”---再点击“系统工具”---在“恢复出厂默认设置”后面点击“恢复默认值”按钮。

3、在弹出的对话框中点击“确定”。

mysql数据库没有密码命令怎么写的相关图片

mysql数据库没有密码命令怎么写

快速修复浏览器方案(请活学活用以下方法——根据具体情况决定做哪些) 。

1、打开浏览器,点“工具”→“管理加载项”那里禁用所有可疑插件,或者你能准确知道没问题的保留。然后→工具→INTERNET选项→常规页面→删除cookies→删除文件→钩选删除所有脱机内容→确定→设置使用的磁盘空间为:8MB或以下→确定→清除历史纪录→网页保存在历史记录中的天数:3以下→应用确定(我自己使用的设置是“0”天)。

2、还原浏览器高级设置默认值:工具→INTERNET选项→高级→还原默认设置。

3、恢复默认浏览器的方法“工具”→Internet选项→程序→最下面有个“检查Internet Explorer是否为默认的浏览器”把前面的钩选上,确定。

4、设置主页:“工具”→Internet选项→常规→可以更改主页地址→键入你喜欢的常用网址→应用。

5、如果浏览器中毒就使用卡卡助手4.0版本修复,然后做插件免疫:全部钩选→免疫。然后→全部去掉钩选→找到“必备”一项,把能用到的插件重新钩选→取消免疫。能用到的就是FLASH和几种播放器的,其余的不要取消免疫。完成所有操作以后,你的浏览器就不会出问题了 。

如何使用占位符向oracle数据库中写日期类型的数据的相关图片

如何使用占位符向oracle数据库中写日期类型的数据

1.数据库没有设置密码的话,直接在命令行里输入。

mysql

就可以进入了。

2.或者先设置密码在连mysql。

mysqladmin

-u

root

password

"新密码"

$mysql

-uroot

-p新密码

linux下配置网络连接的相关图片

linux下配置网络连接

windows和Linux都能执行。

Oracle Call Interface(OCI)使用户可以访问 Oracle 10,Oracle9,Oracle8 和 Oracle7 数据库。支持将 PHP 变量与 Oracle 占位符(placeholder)绑定,具有完整的 LOB,FILE 和 ROWID 支持,以及允许使用用户提供的定义变量。

例子 1. 基本查询

<?php

$conn = oci_connect('hr', 'hr', 'orcl');。

if (!$conn) {

$e = oci_error();。

print htmlentities($e['message']);。

exit;

$query = 'SELECT * FROM DEPARTMENTS';。

$stid = oci_parse($conn, $query);。

if (!$stid) {

$e = oci_error($conn);。

print htmlentities($e['message']);。

exit;

$r = oci_execute($stid, OCI_DEFAULT);。

if(!$r) {

$e = oci_error($stid);。

echo htmlentities($e['message']);。

exit;

print '<table border="1">';。

while($row = oci_fetch_array($stid, OCI_RETURN_NULLS)) {。

print '<tr>';。

foreach($row as $item) {。

print '<td>'.($item?htmlentities($item):' ').'</td>';。

}

print '</tr>';。

print '</table>';。

oci_close($conn);。

?>

例子 2. 用绑定变量插入

<?php

// Before running, create the table:。

// CREATE TABLE MYTABLE (mid NUMBER, myd VARCHAR2(20));。

$conn = oci_connect('scott', 'tiger', 'orcl');。

$query = 'INSERT INTO MYTABLE VALUES(:myid, :mydata)';。

$stid = oci_parse($conn, $query);。

$id = 60;

$data = 'Some data';。

oci_bind_by_name($stid, ':myid', $id);。

oci_bind_by_name($stid, ':mydata', $data);。

$r = oci_execute($stid);。

if($r)

print "One row inserted";。

oci_close($conn);。

?>

例子 3. 将数据插入到 CLOB 列中。

<?php

// Before running, create the table:。

// CREATE TABLE MYTABLE (mykey NUMBER, myclob CLOB);。

$conn = oci_connect('scott', 'tiger', 'orcl');。

$mykey = 12343; // arbitrary key for this example;。

$sql = "INSERT INTO mytable (mykey, myclob)。

VALUES (:mykey, EMPTY_CLOB())。

RETURNING myclob INTO :myclob";。

$stid = oci_parse($conn, $sql);。

$clob = oci_new_descriptor($conn, OCI_D_LOB);。

oci_bind_by_name($stid, ":mykey", $mykey, 5);。

oci_bind_by_name($stid, ":myclob", $clob, -1, OCI_B_CLOB);。

oci_execute($stid, OCI_DEFAULT);。

$clob->save("A very long string");。

oci_commit($conn);。

// Fetching CLOB data。

$query = 'SELECT myclob FROM mytable WHERE mykey = :mykey';。

$stid = oci_parse ($conn, $query);。

oci_bind_by_name($stid, ":mykey", $mykey, 5);。

oci_execute($stid, OCI_DEFAULT);。

print '<table border="1">';。

while ($row = oci_fetch_array($stid, OCI_ASSOC)) {。

$result = $row['MYCLOB']->load();。

print '<tr><td>'.$result.'</td></tr>';。

print '</table>';。

?>

可以很容易地访问存储过程,就和从命令行访问一样。 例子 4. 使用存储过程。

<?php

// by webmaster at remoterealty dot com。

$sth = oci_parse($dbh, "begin sp_newaddress( :address_id, '$firstname',。

'$lastname', '$company', '$address1', '$address2', '$city', '$state',。

'$postalcode', '$country', :error_code );end;");。

// This calls stored procedure sp_newaddress, with :address_id being an。

// in/out variable and :error_code being an out variable.。

// Then you do the binding:。

oci_bind_by_name($sth, ":address_id", $addr_id, 10);。

oci_bind_by_name($sth, ":error_code", $errorcode, 10);。

oci_execute($sth);。

?>

连接处理

OCI8 扩展提供了 3 个不同函数来连接 Oracle。取决于用户来使用对自己的应用程序最合适的函数。本节的信息有助于用户作出合适的选择。

连接到 Oracle 服务器从所需的时间上来讲是个相当花费的操作。oci_pconnect() 函数使用了一个连接的持久缓冲区,可以被不同的脚本请求重复使用。这意味着通常在每个 PHP 进程(或 Apache 子进程)中只需要连接一次。

如果应用程序连接 Oracle 时对每个 web 用户都使用了不同的认证信息,则由 oci_pconnect() 使用的持久缓冲区就用处不大了,因为随着并发用户的增加,到某个程度后会由于要保持太多的空闲连接而对 Oracle 服务器的整体性能起到逆反的影响。如果应用程序是这样的架构,建议要么用 oci8.max_persistent 和 oci8.persistent_timeout 配置选项(此二者可以使用户控制持久连接缓冲区的大小和生命周期)来协调应用程序,要么用 oci_connect() 来连接。

oci_connect() 和 oci_pconnect() 都使用了一个连接缓冲区。如果在某个脚本中用同样的参数多次调用 oci_connect(),则第二个和之后的调用会返回已有的连接句柄。oci_connect() 使用的连接缓冲区会在脚本执行完毕后或者明确地关闭了连接句柄时被清空。oci_pconnect() 有相似的行为,不过其缓冲区独立地维持着并在不同请求之间都存活着。

要记住此缓冲特性,因为它使两个句柄没有在事务级隔离开来(事实上是同一个连接句柄,因此没有任何方式的隔离)。如果应用程序需要两个独立的,事务级隔离的连接,应该使用 oci_new_connect()。

oci_new_connect() 总是创建一个到 Oracle 服务器的新连接,不管其它连接是否已经存在。高流量的 web 应用应该避免使用 oci_new_connect(),尤其是在程序最忙的部分。

有关于它的其他函数:

目录

OCI-Collection->append -- 向 collection 增加单元。

OCI-Collection->assign -- 从现有的另一个 collection 向 collection 赋值。

OCI-Collection->assignElem -- 给 collection 中的单元赋值。

OCI-Collection->free -- 释放关联于 collection 的对象的资源。

OCI-Collection->getElem -- 返回单元的值。

OCI-Collection->max -- 返回 collection 中单元的最大数目。

OCI-Collection->size -- 返回 collection 中的单元数目。

OCI-Collection->trim -- 从 collection 尾端开始删除单元。

OCI-Lob->append -- Appends data from the large object to another large object。

OCI-Lob->close -- 关闭 LOB 描述符。

OCI-Lob->eof -- Tests for end-of-file on a large object's descriptor。

OCI-Lob->erase -- Erases a specified portion of the internal LOB data。

OCI-Lob->export -- 将 LOB 的内容导出到文件中。

OCI-Lob->flush -- Flushes/writes buffer of the LOB to the server。

OCI-Lob->free -- 释放与 LOB 描述符所关联的资源。

OCI-Lob->getBuffering -- Returns current state of buffering for the large object。

OCI-Lob->import -- 将数据从文件导入 LOB。

OCI-Lob->load -- 返回大对象的内容。

OCI-Lob->read -- Reads part of the large object。

OCI-Lob->rewind -- Moves the internal pointer to the beginning of the large object。

OCI-Lob->save -- 将数据保存到大对象中。

OCI-Lob->seek -- Sets the internal pointer of the large object。

OCI-Lob->setBuffering -- Changes current state of buffering for the large object。

OCI-Lob->size -- Returns size of large object。

OCI-Lob->tell -- Returns current position of internal pointer of large object。

OCI-Lob->truncate -- Truncates large object。

OCI-Lob->write -- Writes data to the large object。

OCI-Lob->writeTemporary -- 写入一个临时的大对象。

oci_bind_by_name -- 绑定一个 PHP 变量到一个 Oracle 位置标志符。

oci_cancel -- 取消从游标读取数据。

oci_close -- 关闭 Oracle 连接。

oci_commit -- 提交未执行的事务处理。

oci_connect -- 建立一个到 Oracle 服务器的连接。

oci_define_by_name -- 在 SELECT 中使用 PHP 变量作为定义的步骤。

oci_error -- 返回上一个错误。

oci_execute -- 执行一条语句。

oci_fetch_all -- 获取结果数据的所有行到一个数组。

oci_fetch_array -- Returns the next row from the result data as an associative or numeric array, or both 。

oci_fetch_assoc -- Returns the next row from the result data as an associative array。

oci_fetch_object -- Returns the next row from the result data as an object。

oci_fetch_row -- Returns the next row from the result data as a numeric array。

oci_fetch -- Fetches the next row into result-buffer。

oci_field_is_null -- 检查字段是否为 NULL。

oci_field_name -- 返回字段名。

oci_field_precision -- 返回字段精度。

oci_field_scale -- 返回字段范围。

oci_field_size -- 返回字段大小。

oci_field_type_raw -- 返回字段的原始 Oracle 数据类型。

oci_field_type -- 返回字段的数据类型。

oci_free_statement -- 释放关联于语句或游标的所有资源。

oci_internal_debug -- 打开或关闭内部调试输出。

oci_lob_copy -- Copies large object。

oci_lob_is_equal -- Compares two LOB/FILE locators for equality。

oci_new_collection -- 分配新的 collection 对象。

oci_new_connect -- 建定一个到 Oracle 服务器的新连接。

oci_new_cursor -- 分配并返回一个新的游标(语句句柄)

oci_new_descriptor -- 初始化一个新的空 LOB 或 FILE 描述符。

oci_num_fields -- 返回结果列的数目。

oci_num_rows -- 返回语句执行后受影响的行数。

oci_parse -- 配置 Oracle 语句预备执行。

oci_password_change -- 修改 Oracle 用户的密码。

oci_pconnect -- 使用一个持久连接连到 Oracle 数据库。

oci_result -- 返回所取得行中字段的值。

oci_rollback -- 回滚未提交的事务。

oci_server_version -- 返回服务器版本信息。

oci_set_prefetch -- 设置预提取行数。

oci_statement_type -- 返回 OCI 语句的类型。

ocibindbyname -- oci_bind_by_name() 的别名。

ocicancel -- oci_cancel() 的别名。

ocicloselob -- OCI-Lob->close 的别名。

ocicollappend -- OCI-Collection->append 的别名。

ocicollassign -- OCI-Collection->assign 的别名。

ocicollassignelem -- OCI-Collection->assignElem 的别名。

ocicollgetelem -- OCI-Collection->getElem 的别名。

ocicollmax -- OCI-Collection->max 的别名。

ocicollsize -- OCI-Collection->size 的别名。

ocicolltrim -- OCI-Collection->trim 的别名。

ocicolumnisnull -- oci_field_is_null() 的别名。

ocicolumnname -- oci_field_name() 的别名。

ocicolumnprecision -- oci_field_precision() 的别名。

ocicolumnscale -- oci_field_scale() 的别名。

ocicolumnsize -- oci_field_size() 的别名。

ocicolumntype -- oci_field_type() 的别名。

ocicolumntyperaw -- oci_field_type_raw() 的别名。

ocicommit -- oci_commit() 的别名。

ocidefinebyname -- oci_define_by_name() 的别名。

ocierror -- oci_error() 的别名。

ociexecute -- oci_execute() 的别名。

ocifetch -- oci_fetch() 的别名。

ocifetchinto -- 获取下一行到一个数组。

ocifetchistatement -- oci_fetch_all() 的别名。

ocifreecollection -- OCI-Collection->free 的别名。

ocifreecursor -- oci_free_statement() 的别名。

ocifreedesc -- OCI-Lob->free 的别名。

ocifreestatement -- oci_free_statement() 的别名。

ociinternaldebug -- oci_internal_debug() 的别名。

ociloadlob -- OCI-Lob->load 的别名。

ocilogoff -- oci_close() 的别名。

ocilogon -- oci_connect() 的别名。

ocinewcollection -- oci_new_collection() 的别名。

ocinewcursor -- oci_new_cursor() 的别名。

ocinewscriptor -- oci_new_descriptor() 的别名。

ocinlogon -- oci_new_connect() 的别名。

ocinumcols -- oci_num_fields() 的别名。

ociparse -- oci_parse() 的别名。

ociplogon -- oci_pconnect() 的别名。

ociresult -- oci_result() 的别名。

ocirollback -- oci_rollback() 别名。

ocirowcount -- oci_num_rows() 的别名。

ocisavelob -- OCI-Lob->save 的别名。

ocisavelobfile -- OCI-Lob->import 的别名。

ociserverversion -- oci_server_version() 的别名。

ocisetprefetch -- oci_set_prefetch() 的别名。

ocistatementtype -- oci_statement_type() 的别名。

ociwritelobtofile -- OCI-Lob->export 的别名。

ociwritetemporarylob -- OCI-Lob->writeTemporary 的别名。

linux mysql root没有密码怎么设置密码

linux 命令配置网络连接首先,先了解传统的网络设置命令: 。

1. 使用ifconfig命令设置并查看网络接口情况 。

示例1: 设置eth0的IP,同时激活设备: 。

# ifconfig eth0 192.168.4.1 netmask 255.255.255.0 up 。

示例2: 设置eth0别名设备 eth0:1 的IP,并添加路由 。

# ifconfig eth0:1 192.168.4.2 。

# route add ?host 192.168.4.2 dev eth0:1 。

示例3:激活(禁用)设备

# ifconfig eth0:1 up(down) 。

示例4:查看所有(指定)网络接口设置 。

# ifconfig (eth0) 。

2. 使用route 命令设置路由表 。

示例1:添加到主机路由

# route add ?host 192.168.4.2 dev eth0:1 。

# route add ?host 192.168.4.1 gw 192.168.4.250 。

示例2:添加到网络的路由

# route add ?net IP netmask MASK eth0 。

# route add ?net IP netmask MASK gw IP 。

# route add ?net IP/24 eth1 。

示例3:添加默认网关

# route add default gw IP 。

示例4:删除路由

# route del ?host 192.168.4.1 dev eth0:1 。

示例5:查看路由信息

# route 或 route -n (-n 表示不解析名字,列出速度会比route 快) 。

3.ARP 管理命令

示例1:查看ARP缓存

# arp

示例2: 添加

# arp ?s IP MAC 。

示例3: 删除

# arp ?d IP

4. ip是iproute2软件包里面的一个强大的网络设置工具,他能够替代一些传统的网络管理工具。例如:ifconfig、route等, 。

上面的示例完万能用下面的ip命令实现,而且ip命令能实现更多的功能.下面介绍一些示例: 。

4.0 ip命令的语法

ip命令的用法如下:

ip [OPTIONS] OBJECT [COMMAND [ARGUMENTS]] 。

4.1 ip link set--改动设备的属性. 缩写:set、s 。

示例1:up/down 起动/关闭设备。

# ip link set dev eth0 up 。

这个等于传统的 # ifconfig eth0 up(down) 。

示例2:改动设备传输队列的长度。

参数:txqueuelen NUMBER或txqlen NUMBER 。

# ip link set dev eth0 txqueuelen 100 。

示例3:改动网络设备MTU(最大传输单元)的值。

# ip link set dev eth0 mtu 1500 。

示例4: 修改网络设备的MAC地址。

参数: address LLADDRESS 。

# ip link set dev eth0 address 00:01:4f:00:15:f1 。

4.2 ip link show--显示设备属性. 缩写:show、list、lst、sh、ls、l 。

-s选项出现两次或更多次,ip会输出更为周详的错误信息统计。

示例:

# ip -s -s link ls eth0 。

eth0: mtu 1500 qdisc cbq qlen 100 。

link/ether 00:a0:cc:66:18:78 brd ff:ff:ff:ff:ff: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 -- 添加新路由 。

ip route change -- 修改路由 。

ip route replace -- 替换已有的路由 。

缩写:add、a;change、chg;replace、repl 。

示例1: 设置到网络10.0.0/24的路由经过网关193.233.7.65 。

# ip route add 10.0.0/24 via 193.233.7.65 。

示例2: 修改到网络10.0.0/24的直接路由,使其经过设备dummy 。

# ip route chg 10.0.0/24 dev dummy 。

示例3: 实现链路负载平衡.加入缺省多路径路由,让ppp0和ppp1分担负载(注意:scope值并非必需,他只不过是告诉内核,

这个路由要经过网关而不是直连的。实际上,如果你知道远程端点的地址,使用via参数来设置就更好了)。

# ip route add default scope global nexthop dev ppp0 nexthop dev ppp1 。

# ip route replace default scope global nexthop dev ppp0 nexthop dev ppp1 。

示例4: 设置NAT路由。在转发来自192.203.80.144的数据包之前,先进行网络地址转换,把这个地址转换为193.233.7.83 。

# ip route add nat 192.203.80.142 via 193.233.7.83 。

示例5: 实现数据包级负载平衡,允许把数据包随机从多个路由发出。weight 能设置权重. 。

# ip route replace default equalize nexthop via 211.139.218.145 dev eth0 weight 1 nexthop via 211.139.218.145 dev eth1 weight 1 。

7.7.ip route delete-- 删除路由 。

缩写:delete、del、d 。

示例1:删除上一节命令加入的多路径路由 。

# ip route del default scope global nexthop dev ppp0 nexthop dev ppp1 。

7.8.ip route show -- 列出路由 。

缩写:show、list、sh、ls、l 。

示例1: 计算使用gated/bgp协议的路由个数 。

# ip route ls proto gated/bgp |wc 。

1413 9891 79010 。

示例2: 计算路由缓存里面的条数,由于被缓存路由的属性可能大于一行,以此需要使用-o选项 。

# ip -o route ls cloned |wc 。

159 2543 18707 。

示例3: 列出路由表TABLEID里面的路由。缺省设置是table main。TABLEID或是个真正的路由表ID或是/etc/iproute2/rt_tables文件定义的字符串,

或是以下的特别值:

all -- 列出所有表的路由;

cache -- 列出路由缓存的内容。

ip ro ls 193.233.7.82 tab cache 。

示例4: 列出某个路由表的内容 。

# ip route ls table fddi153 。

示例5: 列出默认路由表的内容 。

# ip route ls

这个命令等于传统的: route 。

7.9.ip route flush -- 擦除路由表 。

示例1: 删除路由表main中的所有网关路由(示例:在路由监视程式挂掉之后):

# ip -4 ro flush scope global type unicast 。

示例2:清除所有被克隆出来的IPv6路由:

# ip -6 -s -s ro flush cache 。

示例3: 在gated程式挂掉之后,清除所有的BGP路由:

# ip -s ro f proto gated/bgp 。

示例4: 清除所有ipv4路由cache 。

# ip route flush cache 。

*** IPv4 routing cache is flushed. 。

7.10 ip route get -- 获得单个路由 .缩写:get、g 。

使用这个命令能获得到达目的地址的一个路由及他的确切内容。

ip route get命令和ip route show命令执行的操作是不同的。ip route show命令只是显示现有的路由,而ip route get命令在必要时会派生出新的路由。

示例1: 搜索到193.233.7.82的路由 。

# ip route get 193.233.7.82 。

193.233.7.82 dev eth0 src 193.233.7.65 realms inr.ac cache mtu 1500 rtt 300 。

示例2: 搜索目的地址是193.233.7.82,来自193.233.7.82,从eth0设备到达的路由(这条命令会产生一条非常有意思的路由,这是一条到193.233.7.82的回环路由)

# ip r g 193.233.7.82 from 193.233.7.82 iif eth0 。

193.233.7.82 from 193.233.7.82 dev eth0 src 193.233.7.65 realms inr.ac/inr.ac 。

cache mtu 1500 rtt 300 iif eth0 。

8. ip route -- 路由策略数据库管理命令 。

命令add、delete、show(或list) 。

注意:策略路由(policy routing)不等于路由策略(rouing policy)。

在某些情况下,我们不只是需要通过数据包的目的地址决定路由,可能还需要通过其他一些域:源地址、IP协议、传输层端口甚至数据包的负载。

这就叫做:策略路由(policy routing)。

8.5. ip rule add -- 插入新的规则 。

ip rule delete -- 删除规则 。

缩写:add、a;delete、del、d 。

示例1: 通过路由表inr.ruhep路由来自源地址为192.203.80/24的数据包 。

ip ru add from 192.203.80/24 table inr.ruhep prio 220 。

示例2:把源地址为193.233.7.83的数据报的源地址转换为192.203.80.144,并通过表1进行路由 。

ip ru add from 193.233.7.83 nat 192.203.80.144 table 1 prio 320 。

示例3:删除无用的缺省规则

ip ru del prio 32767 。

8.7. ip rule show -- 列出路由规则 。

缩写:show、list、sh、ls、l 。

示例1: # ip ru ls 。

0: from all lookup local 。

32762: from 192.168.4.89 lookup fddi153 。

32764: from 192.168.4.88 lookup fddi153 。

32766: from all lookup main 。

32767: from all lookup 253 。

9. ip maddress -- 多播地址管理 。

缩写:show、list、sh、ls、l 。

9.3.ip maddress show -- 列出多播地址 。

示例1: # ip maddr ls dummy 。

9.4. ip maddress add -- 加入多播地址 。

ip maddress delete -- 删除多播地址 。

缩写:add、a;delete、del、d 。

使用这两个命令,我们能添加/删除在网络接口上监听的链路层多播地址。这个命令只能管理链路层地址。

示例1: 增加 # ip maddr add 33:33:00:00:00:01 dev dummy 。

示例2: 查看 # ip -O maddr ls dummy 。

2: dummy

link 33:33:00:00:00:01 users 2 static 。

link 01:00:5e:00:00:01 。

示例3: 删除 # ip maddr del 33:33:00:00:00:01 dev dummy 。

10.ip mroute -- 多播路由缓存管理 。

10.4. ip mroute show -- 列出多播路由缓存条目 。

缩写:show、list、sh、ls、l 。

示例1:查看 # ip mroute ls 。

(193.232.127.6, 224.0.1.39) Iif: unresolved 。

(193.232.244.34, 224.0.1.40) Iif: unresolved 。

(193.233.7.65, 224.66.66.66) Iif: eth0 Oifs: pimreg 。

示例2:查看 # ip -s mr ls 224.66/16 。

(193.233.7.65, 224.66.66.66) Iif: eth0 Oifs: pimreg 。

9383 packets, 300256 bytes 。

11. ip tunnel -- 通道设置 。

缩写 tunnel、tunl 。

11.4.ip tunnel add -- 添加新的通道 。

ip tunnel change -- 修改现有的通道 。

ip tunnel delete -- 删除一个通道 。

缩写:add、a;change、chg;delete、del、d 。

示例1:建立一个点对点通道,最大TTL是32 。

# ip tunnel add Cisco mode sit remote 192.31.7.104 local 192.203.80.1 ttl 32 。

11.4.ip tunnel show -- 列出现有的通道 。

缩写:show、list、sh、ls、l 。

示例1: # ip -s tunl ls Cisco 。

12. ip monitor和rtmon -- 状态监视 。

ip命令能用于连续地监视设备、地址和路由的状态。这个命令选项的格式有点不同,命令选项的名字叫做monitor,接着是操作对象:

ip monitor [ file FILE ] [ all | OBJECT-LIST ] 。

示例1: # rtmon file /var/log/rtmon.log 。

示例2: # ip monitor file /var/log/rtmon.log r。

原文地址:http://www.qianchusai.com/flush-20.html

荫发音-80,荫读音是什么意思

荫发音-80,荫读音是什么意思

迥非-10,迥非世人在圣经的意思

迥非-10,迥非世人在圣经的意思

嗜新-70,嗜新生儿中性粒细胞偏高是什么意思

嗜新-70,嗜新生儿中性粒细胞偏高是什么意思

lw/小学语文板书设计粉笔,粉笔小学语文教学设计模板

lw/小学语文板书设计粉笔,粉笔小学语文教学设计模板

仙之源-10,仙之源护肤品是哪里的

仙之源-10,仙之源护肤品是哪里的

jellyfin刷新媒体库-80,jellyfin媒体库扫描

jellyfin刷新媒体库-80,jellyfin媒体库扫描

preschooler-100

preschooler-100

dismantling-30

dismantling-30

老人与海推荐语200字左右,微信在电脑上怎么发朋友圈视频

老人与海推荐语200字左右,微信在电脑上怎么发朋友圈视频

秋天的景色的作文,小学生描写秋天景色的作文

秋天的景色的作文,小学生描写秋天景色的作文