ip route 命令的作用详解

ip route 命令的作用详解
ip route 命令的作用详解

ip route 命令的作用详解

屏蔽访问IP和域名

命令行下运行 route -p(-P表示重启后生效) add destip MASK 255.255.255.255 127.0.0.1

(用你要屏蔽的IP地址替换destip)

可能会报错,但是可以用 route print(知识若不分享实在没有意义https://www.360docs.net/doc/df12214901.html,) 看到它确实加进去了

比如

route -p add 220.189.126.2 MASK 255.255.255.255 127.0.0.1

route -p add 220.189.126.2 MASK 255.255.255.255 127.0.0.1

恢复屏蔽IP

route delete 59.42.248.210 mask 255.255.255.255

?

屏蔽域名

windows/system32/drivers/etc/hosts

怎样屏蔽IP地址

通常情况下,使用防火墙来阻断因特网交通是最好的办法。但是,低端防火墙,比如Internet Connection Firewall并不能过滤单个IP地址。有一个过滤单个IP地址的办法是调整电脑上的路由表。路由命令行工具可以解决这个问题。这是一个较难使用的工具。不懂路由知识而贸然调整可能会导致电脑与网络失去连接。

下面这样的命令可以阻断与IP地址为220.189.126.2的通信:

route –p add 220.189.126.2 MASK 255.255.255.255 192.168.1.0 METRIC 1 IF 2

需要根据你的计算机调整接口号码,目的地IP应改为本地网络上以前不存在的一个地址。像我前面所说的,解决办法并不容易。

Route命令详解

在本地 IP 路由表中显示和修改条目。

语法

route [-f] [-p] [Command [Destination] [mask Netmask] [Gateway] [metric Metric]] [if Interface]] 参数

-f

清除所有不是主路由(网掩码为 255.255.255.255 的路由)、环回网络路由(目标为 127.0.0.0,网掩码为 255.255.255.0 的路由)或多播路由(目标为 224.0.0.0,网掩码为 240.0.0.0 的路由)的条目的路由表。如果它与命令之一(例如 add、change 或 delete)结合使用,表会在运行命令之前清除。

-p

与 add 命令共同使用时,指定路由被添加到注册表并在启动 TCP/IP 协议的时候初始化 IP 路由表。默认情况下,启动 TCP/IP 协议时不会保存添加的路由。与 print 命令一起使用时,则显示永久路由列表。所

有其它的命令都忽略此参数。永久路由存储在注册表中的位置是HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters \PersistentRoutes。Command

指定要运行的命令。下表列出了有效的命令。命令目的

add 添加路由

change 更改现存路由

delete 删除路由

print 打印路由

Destination

指定路由的网络目标地址。目标地址可以是一个 IP 网络地址(其中网络地址的主机地址位设置为 0),对于主机路由是 IP 地址,对于默认路由是 0.0.0.0。

mask subnetmask

指定与网络目标地址相关联的网掩码(又称之为子网掩码)。子网掩码对于 IP 网络地址可以是一适当的子网掩码,对于主机路由是 255.255.255.255 ,对于默认路由是 0.0.0.0。如果忽略,则使用子网掩码255.255.255.255。定义路由时由于目标地址和子网掩码之间的关系,目标地址不能比它对应的子网掩码更为详细。换句话说,如果子网掩码的一位是 0,则目标地址中的对应位就不能设置为 1。

Gateway

指定超过由网络目标和子网掩码定义的可达到的地址集的前一个或下一个跃点 IP 地址。对于本地连接的子网路由,网关地址是分配给连接子网接口的 IP 地址。对于要经过一个或多个路由器才可用到的远程路由,网关地址是一个分配给相邻路由器的、可直接达到的 IP 地址。

metric Metric

为路由指定所需跃点数的整数值(范围是 1 ~ 9999),它用来在路由表里的多个路由中选择与转发包中的目标地址最为匹配的路由。所选的路由具有最少的跃点数。跃点数能够反映跃点的数量、路径的速度、路径可靠性、路径吞吐量以及管理属性。

if Interface

指定目标可以到达的接口的接口索引。使用 route print 命令可以显示接口及其对应接口索引的列表。对于接口索引可以使用十进制或十六进制的值。对于十六进制值,要在十六进制数的前面加上 0x。忽略 if 参数时,接口由网关地址确定。

/?

在命令提示符显示帮助。

注释

路由表中跃点数一列的值较大是由于允许 TCP/IP 根据每个 LAN接口的 IP 地址、子网掩码和默认网关的配置自动确定路由表中路由的跃点数造成的。默认启动的自动确定接口跃点数确定了每个接口的速度,调整了每个接口的路由跃点数,因此最快接口所创建的路由具有最低的跃点数。要删除大跃点数,请在每个 LAN 连接的 TCP/IP 协议的高级属性中禁用自动确定接口跃点数。

如果在 systemroot\System32\Drivers\Etc 文件夹的本地网络文件中存在适当的条目,名称可以用于Destination。只要名称可以通过“域名系统” (DNS) 查询这样的标准主机名解析技术分解为 IP 地址,就可以将其用于 Gateway,DNS 查询使用存储在 systemroot\System32\Drivers\Etc 文件夹下的本地主机文件和 NetBIOS 名称解析。

如果是 print 或 delete 命令,可以忽略 Gateway 参数,使用通配符来表示目标和网关。Destination 的值可以是由星号 (*) 指定的通配符。如果指定目标含有一个星号 (*) 或问号 (?),它被看作是通配符,只打印或删除匹配的目标路由。星号代表任意一字符序列,问号代表任一字符。例如, 10.*.1, 192.168.*、127.* 和 *224* 都是星号通配符的有效使用。

使用了无效的目标和子网掩码(网掩码)值的组合,会显示“Route:bad gateway address netmask”错误消息。目标中有一位或多位设置为 1,而其在子网掩码中的对应位设置为 0 时会发生这个错误。可以通过二进制表示法表示目标和子网掩码来检查这种情况。以二进制表示的子网掩码包括表示目标网络地址部分的一连串的 1 和表示目标主机地址部分的一连串的 0 两个部分。查看目标以确定目标的主机地址部分(由子网掩码所定义)是否有些位设置成了 1。

只有 Windows NT 4.0、Windows 2000、Windows Millennium Edition 和 Windows XP 的 route 命令支持-p 参数。Windows 95 或 Windows 98 的 route 命令不支持该参数。

只有当网际协议 (TCP/IP) 协议在网络连接中安装为网络适配器属性的组件时,该命令才可用。

范例

要显示 IP 路由表的完整内容,请键入:

route print

要显示 IP 路由表中以 10. 开始的路由,请键入:

route print 10.*

要添加默认网关地址为 192.168.12.1 的默认路由,请键入:

route add 0.0.0.0 mask 0.0.0.0 192.168.12.1

要添加目标为 10.41.0.0,子网掩码为 255.255.0.0,下一个跃点地址为 10.27.0.1 的路由,请键入:route add 10.41.0.0 mask 255.255.0.0 10.27.0.1

要添加目标为 10.41.0.0,子网掩码为 255.255.0.0,下一个跃点地址为 10.27.0.1 的永久路由,请键入:route -p add 10.41.0.0 mask 255.255.0.0 10.27.0.1

要添加目标为 10.41.0.0,子网掩码为 255.255.0.0,下一个跃点地址为 10.27.0.1,跃点数为 7 的路由,请键入:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 metric 7(知识若不分享实在没有意义https://www.360docs.net/doc/df12214901.html,)

要添加目标为 10.41.0.0,子网掩码为 255.255.0.0,下一个跃点地址为 10.27.0.1,接口索引为 0x3 的路由,请键入:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 if 0x3

要删除目标为 10.41.0.0,子网掩码为 255.255.0.0 的路由,请键入:

route delete 10.41.0.0 mask 255.255.0.0

要删除 IP 路由表中以 10. 开始的所有路由,请键入:

route delete 10.*

要将目标为 10.41.0.0,子网掩码为 255.255.0.0 的路由的下一个跃点地址由 10.27.0.1 更改为10.27.0.25,请键入:

route change 10.41.0.0 mask 255.255.0.0 10.27.0.25

route 的命令

routing ip add/delete/set/show interface 在指定接口上添加、删除、配置或显示常规 IP 路由设置。routing ip add/delete/set/show filter 在指定接口上添加、删除、配置或显示 IP 数据包筛选器。routing ip add/delete/show boundary 在指定接口上添加、删除或显示多播边界设置。

routing ip add/set ipiptunnel 添加或配置 IP 中的 IP 接口。

routing ip add/delete/set/show rtmroute 添加、配置或显示不持续的路由表管理器路由。

routing ip add/delete/set/show persistentroute 添加、删除、配置或显示持续路由。

routing ip add/delete/set/show preferenceforprotocol 添加、删除、配置或显示路由协议的优先级。routing ip add/delete/set/show scope 添加、删除或显示多播作用域。

routing ip set/show loglevel 配置或显示全局 IP 记录等级。

routing ip show helper 显示 IP 的所有 Netsh 实用程序子环境。

routing ip show protocol 显示所有正在运行的 IP 路由协议。

routing ip show mfe 显示多播转发项。

routing ip show mfestats 显示多播转发项统计。

routing ip show boundarystats 显示 IP 多播边界。

routing ip show rtmdestinations 显示路由表管理器路由表中的目标。

routing ip show rtmroutes 显示路由表管理器路由表中的路由。

routing ip nat set/show global 配置或显示全局网络地址转换 (NAT) 设置。

routing ip nat add/delete/set/show interface 添加、删除、配置或显示指定接口的 NAT 设置。routing ip nat add/delete addressrange 在 NAT 接口公用地址池中添加或删除一个地址范围。routing ip nat add/delete addressmapping 添加或删除 NAT 地址映射。

routing ip nat add/delete portmapping 添加或删除 NAT 端口映射。

routing ip autodhcp set/show global 配置或显示全局 DHCP 分配器参数。

routing ip autodhcp set/show interface 配置或显示指定接口的 DHCP 分配器设置。

routing ip autodhcp add/delete exclusion 在 DHCP 分配器地址范围中添加或删除一个排除范围。routing ip dnsproxy set/show global 配置或显示全局 DNS 代理参数。

routing ip dnsproxy set/show interface 配置或显示指定接口的 DNS 代理参数。

routing ip igmp set/show global 配置或显示 IGMP 全局设置。

routing ip igmp add/delete/set/show interface 在指定接口上添加、删除、配置或显示 IGMP。routing ip igmp add/delete staticgroup 添加或删除指定接口的静态多播组。

routing ip igmp show grouptable 显示 IGMP 主机组表。

routing ip igmp show ifstats 显示每个接口的 IGMP 统计。

routing ip igmp show iftable 显示每个接口的 IGMP 主机组。

routing ip igmp show proxygrouptable 显示 IGMP 代理接口的 IGMP 组表。

routing ip igmp show rasgrouptable 显示远程访问服务器所使用的 Internet 接口的组表。

routing ip ospf set/show global 配置或显示全局 OSPF 设置。

routing ip ospf add/delete/set/show interface 在指定接口上添加、删除、配置或显示 OSPF。routing ip ospf add/delete/set/show area 添加、删除、配置或显示 OSPF 区域。

routing ip ospf add/delete/show range 在指定的 OSPF 区域上添加、删除、配置或显示范围。routing ip ospf add/delete/set/show virtif 添加、删除、配置或显示 OSPF 虚拟接口。

routing ip ospf add/delete/show neighbor 添加、删除、配置或显示 OSPF 邻居。

routing ip ospf add/delete/show protofilter 添加、删除、配置或显示 OSPF 外部路由的路由信息源。routing ip ospf add/delete/show routefilter 添加、删除、配置或显示 OSPF 外部路由的路由筛选。routing ip ospf show areastats 显示 OSPF 区域统计。

routing ip ospf show lsdb 显示 OSPF 链接状态数据库。

routing ip ospf show virtifstats 显示 OSPF 虚拟链接统计。

routing ip relay set global 配置“DHCP 中继代理程序”的全局设置。

routing ip relay add/delete/set interface 在指定接口上添加、删除或配置“DHCP 中继代理程序”设置。

routing ip relay add/delete dhcpserver 在 DHCP 服务器地址列表中添加或删除 DHCP 服务器的 IP 地址。

routing ip relay show ifbinding 显示接口的 IP 地址绑定。

routing ip relay show ifconfig 显示每个接口的“DHCP 中继代理程序”配置。

routing ip relay show ifstats 显示每个接口的 DHCP 统计。

routing ip rip set/show global 配置 IP 的 RIP 全局设置。

routing ip rip add/delete/set/show interface 在指定接口上添加或配置 IP 的 RIP 设置。

routing ip rip add/delete peerfilter 添加或删除 RIP 对等筛选器。

routing ip rip add/delete acceptfilter 在接受的路由列表中添加或删除 RIP 路由筛选器。

routing ip rip add/delete announcefilter 在公布的路由列表中添加或删除 RIP 路由筛选器。

routing ip rip add/delete/show neighbor 添加或删除 RIP 邻居。

routing ip rip set/show flags 在指定接口上配置 IP RIP 高级设置。

routing ip rip show globalstats 显示全局 RIP 参数。

routing ip rip show ifbinding 显示接口的 IP 地址绑定。

routing ip rip show ifstats 显示每个接口的 RIP 统计。

IPX netsh 路由命令

routing ipx add/set staticroute 在 IPX 路由表中添加或配置静态 IPX 路由。

routing ipx add/set staticservice 在 SAP 服务表中添加或配置静态 SAP 服务。

routing ipx add/set filter 在指定的接口上添加或配置 IPX 数据包筛选器。

routing ipx add/set interface 在请求拨号接口上启用 IPX 路由,或在指定的接口上配置 IPX 设置。routing ipx set global 配置全局 IPX 路由设置。

routing ipx rip add/set filter 添加和配置 RIP 路由筛选器。

routing ipx rip set global 配置全局 IPX 的 RIP 设置。

routing ipx rip set interface 在指定接口上配置 IPX 的 RIP 设置。

routing ipx sap add/set filter 添加或配置 SAP 服务筛选器。

routing ipx sap set global 配置全局 IPX 的 SAP 设置。

routing ipx sap set interface 在指定接口上配置 IPX 的 SAP 设置。

routing ipx netbios add nbname 将静态 NETBIOS 名称添加到 IPX NetBIOS 名称表中。

routing ipx netbios set interface 在指定接口上配置基于 IPX 的 NetBIOS 设置。(知识若不分享实在没有意义https://www.360docs.net/doc/df12214901.html,)

学习Windows网络命令之route命令小档案

route命令主要用来管理本机路由表,可以查看,添加、修改或删除路由表条目。该命令在win2000以上操作系统都可使用。

命令格式如下:

ROUTE [-f] [-p] [command] [destination] [MASK netmask] [gateway] [METRIC metric] [IF interface] 带方括号的参数可以省略。

各参数含义如下:

Command:可以是print(列出当前路由表)、delete(删除路由表条目)、add(添加路由表条目)和change(修改已有路由表条目)这些命令之一。

-f:清空所有路由表的网关条目。如果与某个route指令一块使用,会在执行该命令前先清空路由表。

-p:这个选项与add命令一块使用时用于添加永久的静态路由表条目。如果没有这个参数添加的路由表条目在系统重启后会丢失。如果其它命令使用这个选项此选项会被忽略。因为其它命令对路由表的影响总是永久的。在Windows 95系统的route命令不支持这个选项。

destination、gateway 、netmask、metric和interface参数分别定义路由表条目中的目标IP段,使用网关,子网掩码、度量值和网络界面。(知识若不分享实在没有意义https://www.360docs.net/doc/df12214901.html,)

在命令中可以用字符串符号来替代目标网络和网关的IP表示,对于用符号名表示的网络,系统会查找networks文件来解析符号名对应的网络IP(这个文件在winxp系统一般位于

C:\WINDOWS\system32\drivers\etc目录下),对于用符号名表示的网关系统会使用 HOSTS文件来对符号名进行解析。

如果是print或delete命令,目标网络和网关可以包括通配符(*或?),而且网关参数可以省略。

如果在目标网络定义中包含*或?,这时这些通配符会按其在命令行界面中的含义,及*代表多个任意字符而?代表一个任意字符。例如这样157.*.1。

注意:在添加或修改路由条目时,如果目标网络与网络掩码不符会产生错误,也即DEST & MASK) != DEST 时,会报错。

注意,这个命令的很多部分是可以省略的,比如网络界面常被省略。如果在添加或修改的路由条目中省略网络界面参数,系统会自动使用到达指定网关最合适的网络界面。例如,add命令的完全写法可以如下: route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2

这条命令添加到达IP为157.0.0.0掩码为255.0.0.0的目标网络的路由,指定网关为157.55.80.1,跳数定义为3,使用网络界面2,

route PRINT 157*

仅被出以157开头的目标网络的路由条目。

route DELETE 157.0.0.0(知识若不分享实在没有意义https://www.360docs.net/doc/df12214901.html,)

删除到达目标子网157.0.0.0的路由条目。

windows下 route命令详解

在一个网上查找到的,和Linux下的route很类似,但有部分不一样,汗死,开始以为是linux下的route.

使用 Route 命令行工具查看并编辑计算机的 IP 路由表。Route 命令和语法如下所示:

route [-f] [-p] [Command][Destination] [mask Netmask] [Gateway] [metric Metric]] [if Interface]] -f 清除所有网关入口的路由表。如果该参数与某个命令组合使用,路由表将在运行命令前清除。

-p 与 add 命令一起使用时使路由具有永久性。该参数与 add 命令一起使用时,将使路由在系统引导程序之间持久存在。默认情况下,系统重新启动时不保留路由。与 print 命令一起使用时,显示已注册的持久路由列表。

忽略其他所有总是影响相应持久路由的命令。

Command 指定您想运行的命令 (Add/Change/Delete/Print)。

路由类型:

有三种路由

1.主机路由从一台主机映射一条到本地网络上的的其他主机上

command format:

route add -host destination_ip local_ip -interface interface

eg:

我们想为本地主机接口hme0(204.12.17.1)和另一台在相邻才C类网络上的主机(204.12.16.100)之间增加一条路由

#route add -host 204.12.16.100 204.12.17.1 -interface hme0

2.网络路由允许数据包从本地主机传输到在本地网络的其他主机上

增加一个到另一个网络的的直接路由

command format:

route add -net destination_network_ip local_ip -netmask mask

eg:

如果我们要想为C类网掩码在本地主机(204.12.17.1)和我们上面指出的网络之间增加一条路由

(204.12.16.0网络)我们可以使用如下的命令:

#route add -net 204.12.16.0 204.12.17.1 -netmask 255.255.255.0

3.缺省路由将寻找一条路由的任务传送到一台路由器。RIP 和RDISC守护进程都可以使用缺省路由。command format:

route add default hostname -interface interface

eg:增加一条到本地路由器(204.54.56.1)的缺省路由,通常用在添加网关并马上生效

#route add default 204.54.56.1 -interface hme1(知识若不分享实在没有意义https://www.360docs.net/doc/df12214901.html,)

Destination 指定该路由的网络目标。

mask Netmask 指定与网络目标相关的网络掩码(也被称作子网掩码)。如果没有指定,将使用255.255.255.255

Gateway 指定网络目标定义的地址集和子网掩码可以到达的前进或下一跃点 IP 地址。

metric Metric 为路由指定一个整数成本值标(从 1 至 9999),当在路由表(与转发的数据包目标地址最匹配)的多个路由中进行选择时可以使用。

if Interface 为可以访问目标的接口指定接口索引。就是说发往甲的数据用接口A,发往乙的用接口B。这一条在一个网卡捆绑了多个同网段的IP时应用非常有效。比如你捆绑了*.1 和*.2两个地址,你可以指定某一条主机路由是用*.1发,某一条是用*.2发。不然,默认情况下,发往同一子网的都是用一个IP 发。

若要获得一个接口列表和它们相应的接口索引,使用 route print 命令的显示功能。可以使用十进制或十六进制值进行接口索引。

/? 在命令提示符处显示帮助。

名为 Networks 的网络数据库文件和名为 Hosts 的计算机名数据库文件中均引用全部

destination 或 gateway 使用的符号名称。如果命令是 print 或 delete,目标和网关

还可以使用通配符,也可以省略网关参数。

示例

若要显示 IP 路由表的全部内容,请键入:

route print

若要显示以 10. 起始的 IP 路由表中的路由,请键入:

route print 10.*

若要添加带有 192.168.12.1 默认网关地址的默认路由,请键入:(知识若不分享实在没有意义)

route add 0.0.0.0 mask 0.0.0.0 192.168.12.1

若要向带有 255.255.0.0 子网掩码和 10.27.0.1 下一跃点地址的 10.41.0.0 目标中添加一个路由,请键入:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1

若要向带有 255.255.0.0 子网掩码和 10.27.0.1 下一跃点地址的 10.41.0.0 目标中添加一个永久路由,请键入:

route -p add 10.41.0.0 mask 255.255.0.0 10.27.0.1

若要向带有 255.255.0.0 子网掩码、10.27.0.1 下一跃点地址且其成本值标为 7 的 10.41.0.0 目标中添加一个路由,请键入:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 metric 7

若要向带有 255.255.0.0 子网掩码、10.27.0.1 下一跃点地址且使用 0x3 接口索引的 10.41.0.0 目标中添加一个路由,请键入:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 if 0x3

若要删除到带有 255.255.0.0 子网掩码的 10.41.0.0 目标的路由,请键入:

route delete 10.41.0.0 mask 255.255.0.0

若要删除以 10. 起始的 IP 路由表中的所有路由,请键入:

route delete 10.*

若要将带有10.41.0.0 目标和255.255.0.0 子网掩码的下一跃点地址从10.27.0.1 修改为10.27.0.25,请键入:

route change 10.41.0.0 mask 255.255.0.0 10.27.0.25

原文内容:

https://www.360docs.net/doc/df12214901.html,/resources/documentation/windows/xp/all/proddocs/en-us/route.mspx?mf

r=true(知识若不分享实在没有意义https://www.360docs.net/doc/df12214901.html,)

Route

Displays and modifies the entries in the local IP routing table. Used without parameters, route displays help.

Syntax

route [-f] [-p] [Command [Destination] [mask Netmask] [Gateway] [metric Metric]] [if Interface]] Top of page

Parameters

-f : Clears the routing table of all entries that are not host routes (routes with a netmask of 255.255.255.255), the loopback network route (routes with a destination of 127.0.0.0 and a netmask of 255.0.0.0), or a multicast route (routes with a destination of 224.0.0.0 and a netmask of 240.0.0.0). If this is used in conjunction with one of the commands (such as add, change, or delete), the table is cleared prior to running the command.

-p : When used with the add command, the specified route is added to the registry and is used to initialize the IP routing table whenever the TCP/IP protocol is started. By default, added routes are not preserved when the TCP/IP protocol is started. When used with the print command, the list of persistent routes is displayed. This parameter is ignored for all other commands. Persistent routes are stored in the registry location HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentRoutes. Command : Specifies the command you want to run. The following table lists valid commands. Command Purpose

add

Adds a route.

change

Modifies an existing route.

delete

Deletes a route or routes.

print

Prints a route or routes.

Destination : Specifies the network destination of the route. The destination can be an IP network address (where the host bits of the network address are set to 0), an IP address for a host route, or 0.0.0.0 for the default route.(知识若不分享实在没有意义https://www.360docs.net/doc/df12214901.html,)

mask Netmask : Specifies the netmask (also known as a subnet mask) associated with the network destination. The subnet mask can be the appropriate subnet mask for an IP network address, 255.255.255.255 for a host route, or 0.0.0.0 for the default route. If omitted, the subnet mask 255.255.255.255 is used. Because of the relationship between the destination and the subnet mask

in defining routes, the destination cannot be more specific than its corresponding subnet mask. In other words, there cannot be a bit set to 1 in the destination if the corresponding bit in the subnet mask is a 0.

Gateway : Specifies the forwarding or next hop IP address over which the set of addresses defined by the network destination and subnet mask are reachable. For locally attached subnet routes, the gateway address is the IP address assigned to the interface that is attached to the subnet. For remote routes, available across one or more routers, the gateway address is a directly reachable IP address that is assigned to a neighboring router.

metric Metric : Specifies an integer cost metric (ranging from 1 to 9999) for the route, which is used when choosing among multiple routes in the routing table that most closely match the destination address of a packet being forwarded. The route with the lowest metric is chosen. The metric can reflect the number of hops, the speed of the path, path reliability, path throughput, or administrative properties.

if Interface : Specifies the interface index for the interface over which the destination is reachable. For a list of interfaces and their corresponding interface indexes, use the display of the route print command. You can use either decimal or hexadecimal values for the interface index. For hexadecimal values, precede the hexadecimal number with 0x. When the if parameter is omitted, the interface is determined from the gateway address.

/? : Displays help at the command prompt.

Top of page

Remarks

? Large values in the metric column of the routing table are the result of allowing TCP/IP to automatically determine the metric for routes in the routing table based on the configuration of IP address, subnet mask, and default gateway for each LAN interface. Automatic determination of the interface metric, enabled by default, determines the speed of each interface and adjusts the metrics of routes for each interface so that the fastest interface creates the routes with the lowest metric. To remove the large metrics, disable the automatic determination of the interface metric from the advanced properties of the TCP/IP protocol for each LAN connection. ? Names can be used for Destination if an appropriate entry exists in the local Networks file stored in the systemroot\System32\Drivers\Etc folder. Names can be used for the gateway as long as they can be resolved to an IP address through standard host name resolution techniques such as Domain Name System (DNS) queries, use of the local Hosts file stored in the systemroot\system32\drivers\etc folder, and NetBIOS name resolution.

? If the command is print or delete, the Gateway parameter can be omitted and wildcards can be used for the destination and gateway. The Destination value can be a wildcard value specified by an asterisk (*). If the destination specified contains an asterisk (*) or a question mark (?), it is treated as a wildcard and only matching destination routes are printed or deleted. The asterisk matches any string, and the question mark matches any single character. For example, 10.*.1, 192.168.*, 127.*, and *224* are all valid uses of the asterisk wildcard.

? Using an invalid combination of a destination and subnet mask (netmask) value displays a "Route: bad gateway address netmask" error message. This error message appears when the destination contains one or more bits set to 1 in bit locations where the corresponding subnet mask bit is set to 0. To test this condition, express the destination and subnet mask using binary notation. The subnet mask in binary notation consists of a series of 1 bits, representing the network address

portion of the destination, and a series of 0 bits, representing the host address portion of the destination. Check to determine whether there are bits in the destination that are set to 1 for the portion of the destination that is the host address (as defined by the subnet mask).

? The -p parameter is only supported on the route command for Windows NT 4.0, Windows 2000, Windows Millennium Edition, and Windows XP. This parameter is not supported by the route command for Windows 95 or Windows 98.(知识若不分享实在没有意义https://www.360docs.net/doc/df12214901.html,)

? This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections

Top of page

Examples

To display the entire contents of the IP routing table, type:

route print

To display the routes in the IP routing table that begin with 10., type:

route print 10.*

To add a default route with the default gateway address of 192.168.12.1, type:

route add 0.0.0.0 mask 0.0.0.0 192.168.12.1

To add a route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0 and the next hop address of 10.27.0.1, type:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1

To add a persistent route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0 and the next hop address of 10.27.0.1, type:(知识若不分享实在没有意义https://www.360docs.net/doc/df12214901.html,) route -p add 10.41.0.0 mask 255.255.0.0 10.27.0.1

To add a route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0, the next hop address of 10.27.0.1, and the cost metric of 7, type:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 metric 7

To add a route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0, the next hop address of 10.27.0.1, and using the interface index 0x3, type:

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 if 0x3

To delete the route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0, type: route delete 10.41.0.0 mask 255.255.0.0

To delete all routes in the IP routing table that begin with 10., type:

route delete 10.*

To change the next hop address of the route with the destination of 10.41.0.0 and the subnet mask of 255.255.0.0 from 10.27.0.1 to 10.27.0.25, type:(知识若不分享实在没有意义)

route change 10.41.0.0 mask 255.255.0.0 10.27.0.25

Top of page

Formatting legend

Format Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd} Set of choices from which the user must choose only one

Courier font

Code or program output

Command-line reference A-Z

TCP/IP utilities and services

常用的网络工具命令解析

如果你玩过路由器的话,就知道路由器里面那些很好玩的命令缩写。 例如,"sh int" 的意思是"show interface"。 现在Windows 2000 也有了类似界面的工具,叫做netsh。 我们在Windows 2000 的cmd shell 下,输入netsh 就出来:netsh> 提示符, 输入int ip 就显示: interface ip> 然后输入dump ,我们就可以看到当前系统的网络配置: # ---------------------------------- # Interface IP Configuration # ---------------------------------- pushd interface ip # Interface IP Configuration for "Local Area Connection" set address name = "Local Area Connection" source = static addr = 192.168.1.168 mask = 255.255.255.0 add address name = "Local Area Connection" addr = 192.1.1.111 mask = 255.255.255.0 set address name = "Local Area Connection" gateway = 192.168.1.100 gwmetric = 1 set dns name = "Local Area Connection" source = static addr = 202.96.209.5 set wins name = "Local Area Connection" source = static addr = none

CISCO命令全集

CISCO命令全集-思科命令汇总 视图模式介绍: 普通视图router> 特权视图router# /在普通模式下输入enable 全局视图router(config)# /在特权模式下输入config t 接口视图router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0 路由协议视图router(config-route)# /在全局模式下输入router 动态路由协议名称 1、基本配置: router>enable /进入特权模式 router#conf t /进入全局配置模式 router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字 router(config)#enable password /设置特权口令 router(config)#no ip domain lookup /不允许路由器缺省使用DNS解析命令 router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密 router(config)#line vty 0 4 /进入设置telnet服务模式 router(config-line)#password xxx /设置telnet的密码 router(config-line)#login /使能可以登陆 router(config)#line con 0 /进入控制口的服务模式 router(config-line)#password xxx /要设置console的密码 router(config-line)#login /使能可以登陆 2、接口配置: router(config)#int s0 /进入接口配置模式serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口) router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码

DOS-PING命令详解

ping和ipconfig命令详解 ping是一个计算机网络工具,用来测试特定主机能否通过IP到达。ping的运作原理是向目标主机传出一个ICMP echo要求封包,等待接收echo回应封包。程序会按时间和反应成功的次数,估计失去封包率(丢包率)和封包来回时间(网络时延)。 1983年12月,Mike Muuss写了这个程序,在IP网络出问题时方便找出其根源。因为这个程序的运作和潜水艇的声纳相似,他便用声纳的声音来为程序取名。David L. Mills曾提出另一个取名:P acket I nter n et Grouper/Gopher(后者指地鼠)。 1.ping 使用ping可以测试计算机名和计算机的ip 地址,验证与远程计算机的连接,通过将icmp 回显数据包发送到计算机并侦听回显回复数据包来验证与一台或多台远程计算机的连接,该命令只有在安装了tcp/ip 协议后才可以使用。现在打开你的ms-dos(开始→程序 →ms-dos),用win2000的朋友打开cmd.exe(这是win2000下的ms-dos,开始→程序→附件→"命令提示符" 或开始→搜索文件或文件夹→"填入cmd.exe",找到后双击运行就可 以了。)下面我们来看看他的命令: ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [[-j computer-list] | [-k computer-list]] [-w timeout] destination-list 参数 -t ping 指定的计算机直到中断。ctrl+c停止 -a 将地址解析为计算机名。例:c:\>ping -a 127.0.0.1 pinging china-hacker [127.0.0.1] with 32 bytes of data:(china-hacker就是他的计算机名) reply from 127.0.0.1: bytes=32 time<10ms ttl=128reply from 127.0.0.1: bytes=32 time<10ms ttl=128reply from 127.0.0.1: bytes=32 time<10ms ttl=128reply from 127.0.0.1: bytes=32 time<10ms ttl=128 ping statistics for 127.0.0.1:packets: sent = 4, received = 4, lost = 0 (0% loss),approximate round trip times in milli-seconds:minimum = 0ms, maximum = 0ms, average = 0ms -n count 发送count 指定的echo 数据包数。默认值为4。 -l length 发送包含由length 指定的数据量的echo 数据包。默认为32 字节;最大值是65,527。

思科交换机路由器命令大全

思科交换机路由器命令 大全 YUKI was compiled on the morning of December 16, 2020

1. 交换机支持的命令:交换机基本状态: 交换机口令设置: switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式 switch(config)#hostname ;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口 令switch(config)#enable password xxa ;设置特权非 密口令switch(config)#line console 0 ;进入控制台 口switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令 xxswitch#exit ;返回命令 交换机VLAN设置:

switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端 口1switch(config-if)#switchport access vlan 2 ; 当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config- if)#switchport trunk allowed vlan 1,2 ;设置允许 的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式 交换机设置IP地址: 交换机显示命令:

ipconfig命令详解

命令选项: /? 显示此帮助消息 /all 显示完整配置信息。 /release 释放指定适配器的IPv4 地址。 /release6 释放指定适配器的IPv6 地址。 /renew 更新指定适配器的IPv4 地址。 /renew6 更新指定适配器的IPv6 地址。 /flushdns 清除DNS 解析程序缓存。 /registerdns 刷新所有DHCP 租约并重新注册DNS 名称 /displaydns 显示DNS 解析程序缓存的内容。 /showclassid 显示适配器的所有允许的DHCP 类ID。 /setclassid 修改DHCP 类ID。 /showclassid6 显示适配器允许的所有IPv6 DHCP 类ID。 /setclassid6 修改IPv6 DHCP 类ID。 示例1: 显示网卡配置信息 简要显示就使用ipconfig就可以了,这个命令只显示网卡IP和网关,不显示dns服务器,WINS服 务器等,如果要显示,就用ipconfig/all好了 示例2: 显示dns记录 C:\Users\wangbin.BTPDI>ipconfig/displaydns Windows IP 配置 https://www.360docs.net/doc/df12214901.html, ---------------------------------------- 记录名称. . . . . . . : https://www.360docs.net/doc/df12214901.html, 记录类型. . . . . . . : 1 生存时间. . . . . . . : 3535 数据长度. . . . . . . : 4 部分. . . . . . . . . : 答案 A (主机)记录. . . . : 10.12.250.3 _ldap._tcp.default-first-site-name._https://www.360docs.net/doc/df12214901.html, ---------------------------------------- 记录名称. . . . . . . : _ldap._tcp.Default-First-Site-Name._https://www.360docs.net/doc/df12214901.html,. cn 记录类型. . . . . . . : 33

思科 cisco ip_route

路由协议(routing protocol):用于routers动态寻找网络最佳路径,保证所有routers拥有相同的路由表.一般,路由协议决定数据包在网络上的行走的路径.这类协议的例子有OSPF,RIP,IGRP,EIGRP等 可路由协议(routed protocol):当所有的routers知道了整个网络的拓扑结构以后,可路由协议就可以用来发送数据.一般的,可路由协议分配给接口,用来决定数据包的投递方式.这类例子有IP和IPX 路由:把1个数据包从1个设备发送到不同网络里的另1个设备上去.这些工作依靠routers来完成.routers并不关心主机,它们只关心网络的状态和决定网络中的最佳路径 router可以路由数据包,必须至少知道以下状况: 1.目标地址(destination address) 2.可以学习到远端网络状态的邻居router 3.到达远端网络的所有路线 4.到达远端网络的最佳路径 5.如何保持和验证路由信息 The IP Routing Process 路由原理:当IP子网中的一台主机发送IP包给同一IP子网的另一台主机时,它将直接把IP包送到网络上,对方就能收到.而要送给不同IP于网上的主机时,它要选择一个能到达目的子网上的router,把IP包送给该router,由它负责把IP包送到目的地.如果没有找到这样的router,主机就把IP包送给一个称为缺省网关(default gateway)的router上.缺省网关是每台主机上的一个配置参数,它是接在同一个网络上的某个router接口的IP地址,router转发IP包时,只根据IP包目的IP地址的网络号部分,选择合适的接口,把IP包送出去.同主机一样,router也要判定接口所接的是否是目的子网,如果是,就直接把包通过接口送到网络上,否则,也要选择下一个router来传送包.router也有它的缺省网关,用来传送不知道往哪儿送的IP包.这样,通过router把知道如何传送的IP包正确转发出去,不知道的IP包送给缺省网关,这样一级级地传送,IP包最终将送到目的地,送不到目的地的IP包则被网络丢弃了当主机A发送个IP包到主机B,目标MAC地址使用的是默认网关的以太网接口地址.这是因为帧不能放置在远端网络. show ip route:查看路由表信息,比如:

CISCO 路由交换命令大全

思科交换机路由器命令大全 交换机命令: switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#configure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例--设置禁用IP地址解析特性,设置启用消息同步特性 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab aptech2950(conf)#no ip domain-lookup -----设置禁用IP地址解析特性 aptech2950(conf)#logging synchronous -----设置启用消息同步特性 aptech2950(conf)#interface range fastethernet0/1-20 aptech2950(conf-if-range)#spanning-tree portfast -----设置快速端口

Ping与IPconfig命令的使用

上机一Ping与IPconfig命令的使用 1.Ping命令 1.1 命令格式 ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name 1.2 实验内容 (1)-t参数 该参数的意思是一直用ping命令去测试某个地址或某个服务器,直到用户按Ctrl+C 强制中断。如:ping https://www.360docs.net/doc/df12214901.html, –t。 操作要求:请用该参数去ping某台计算机,并用CTRL+C中断,然后查看Ping的情况。 (2)-a参数 解析计算机NetBios名。如:ping -a 192.168.1.21。 操作要求:请用该参数去Ping某台计算机,并查看该台计算机的NetBios名。 (3)-n count参数 发送count指定的Echo数据包数。在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知:ping -n 50 202.103.96.68 操作要求:请用该命令测试发送100个数据包到某台计算机的时间。 (4)-l size参数 定义echo数据包大小。在默认的情况下windows的ping发送的数据包大小为32byt,可以自己定义它的大小,但有一个大小的限制,就是最大只能发送65500byt,也许有人会问为什么要限制到65500byt,因为Windows系列的系统都有一个安全漏洞(也许还包括其他系统)就是当向对方一次发送的数据包大于或等于65532时,对方就很有可能当机,所以微软公司为了解决这一安全漏洞于是限制了ping的数据包大小。虽然微软公司已经做了此限制,但这个参数配合其他参数以后危害依然非常强大,比如可以通过配合-t参数来实现一个带有攻击性的命令。 ping -l 500 192.168.1.1 操作要求:请用该参数发送一个自己定义大小的数据包到某台计算机。 (5)-i TTL 参数 指定TTL值在对方的系统里停留的时间。此参数同样是帮助检查网络运转情况的。 (6)-r count 参数 在“记录路由”字段中记录传出和返回数据包的路由。在一般情况下发送的数据包是通过一个个路由才到达对方的,但到底是经过了哪些路由呢?通过此参数就可以设定想探测经过的路由的个数,不过限制在了9个,也就是说只能跟踪到9个路由,如: ping -n 1 -r 9 202.96.105.101 (发送一个数据包,最多记录9个路由) 操作要求:请用该参数去Ping某台计算机,并指经过的路由数。

CISCO 常用命令解释

视图模式介绍: 普通视图 router> 特权视图 router# /在普通模式下输入enable 全局视图 router(config)# /在特权模式下输入config t 接口视图 router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0 路由协议视图 router(config-route)# /在全局模式下输入router 动态路由协议名称 1、基本配置: router>enable /进入特权模式 router#conf t /进入全局配置模式 router(config)# hostname xxx /设置设备名称就好像给我们的计算机起个名字 router(config)#enable password /设置特权口令 router(config)#no ip domain lookup /不允许路由器缺省使用DNS解析命令 router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密router(config)#line vty 0 4 /进入设置telnet服务模式 router(config-line)#password xxx /设置telnet的密码 router(config-line)#login /使能可以登陆 router(config)#line con 0 /进入控制口的服务模式 router(config-line)#password xxx /要设置console的密码 router(config-line)#login /使能可以登陆 2、接口配置: router(config)#int s0 /进入接口配置模式 serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口) router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码router(config-if)#enca hdlc/ppp 捆绑链路协议 hdlc 或者 ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca fr router(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段 router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码给环回口 在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口 3、路由配置: (1)静态路由 router(config)#ip route xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 下一条或自己的接口router(config)#ip route 0.0.0.0 0.0.0.0 s 0 添加缺省路由 (2)动态路由 rip协议 router(config)#router rip /启动rip协议 router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段 router(config-router)#version 2 转换为rip 2版本 router(config-router)#no auto-summary /关闭自动汇总功能,rip V2才有作用 router(config-router)# passive-int 接口名 /启动本路由器的那个接口为被动接口

IPconfig里的各项指令

C:\Documents and Settings\Administrator>ipconfig/all Windows IP Configuration Host Name . . . . . . . . . . . . : lovelong Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Unknown IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : domain Ethernet adapter 本地连接: Connection-specific DNS Suffix . : domain Description . . . . . . . . . . . : Realtek RTL8168/ thernet NIC Physical Address. . . . . . . . . : 00-18-F3-4D-D8-E Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.1.102 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DNS Servers . . . . . . . . . . . : 61.147.37.1 61.177.7.1 Lease Obtained. . . . . . . . . . : 2008年4月9日22: Lease Expires . . . . . . . . . . : 2008年4月9日22: Ethernet adapter 本地连接3: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : VMware Virtual E VMnet8 Physical Address. . . . . . . . . : 00-50-56-C0-00-0 Dhcp Enabled. . . . . . . . . . . : No IP Address. . . . . . . . . . . . : 192.168.203.1 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . :

思科route命令大全

cisco router and switch 配置命令精华压缩版 时间: 2010-08-05 / 分类: +CCNA, ★CISCO技术 / 浏览次数: 105 views / 0个评论发表评论 Router and switch 配置命令精华压缩版 1、进入SETUP模式Router#setup 2、时间设置router#clock set hh:mm:ss date moth year 3、 router>show history Router>terminal history size lines 4、 router#show version 5、 router#show running-config 6、 router#show starup-config 7、 router(config)#hostname name 主机命名 8、 router(config)#banner motd # message # 开机时的固定显示信息 9、 router(config)#enable password password 特权模式明文密码 10、 router(config)#no enable password 11、 router(config)#enable secret password 特权模式加密密码 12、 router(config)#no enable secret 13、 router(config)#service password-encryption特权模式把明文密码加密密码,但没enable secret安全可以反解 14、 router(config)#line console控制台密码 15、 router(config-line)#login 16、 router(config-line)#password password 17、 router(config-line)#exec-timeout mm ss 禁止控制台会话自动退出 18、 router(config-line)#logging synchronous重显被打乱的控制台输入 router(config)#no ip domain-lookup 禁止域名解析 19、 router(config)#line vty 0 4虚拟终端密码 20、 router(config-line)#login 21、 router(config-line)#password password 22、 router(config)#interface type number(slot/port)端口设置

如何使用ipconfig命令

如何使用ipconfig命令IPConfig命令是window xp、window 7系统中用于显示当前的TCP/IP配置的设置值程序。这些信息一般用来检验人工配置的TCP/IP设置是否正确。为网络检查工作提供重要的帮助。具体使用方法如下: 点击(开始)菜单,然后点(运行),在RUN(运行)窗口中输入CMD进去DOS窗口 在盘符提示符中输入:ipconfig /all 后回车。 显示如下,(若你想查查自己或网络中存在的网络信息就用这种方法) Windows IP Configuration Host Name . . . . . . . . . . . . : FAKON-GP01(域中计算机名、计算机名称 ) Primary Dns Suffix . . . . . . . : https://www.360docs.net/doc/df12214901.html, (DNS服务器地址) Node Type . . . . . . . . . . . . : Unknown IP Routing Enabled. . . . . . . . : No [1][2]WINS Proxy Enabled. . . . . . . . : No DNS Suffix Search List. . . . . . : https://www.360docs.net/doc/df12214901.html, Ethernet adapter (本地连接): Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Realtek RTL8168/8111 PCI-E Gigabi (网卡型号) thernet NIC

Physical Address. . . . . . . . . : 00-1D-7D-71-A8-DD ·MAC地址网卡MAC地址 Dhcp Enabled. . . . . . . . . . . : No ·DHCP 路由 IP Address. . . . . . . . . . . . : 192.168.20.14 ·IP地址 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.20.254 DNS Servers . . .. . . . . : 192.168.20.88 另外ipconfig还有其他的的参数如下: Ipconfig /all:显示本机TCP/IP配置的详细信息; Ipconfig /release:DHCP客户端手工释放IP地址; Ipconfig /renew:DHCP客户端手工向服务器刷新请求; Ipconfig /flushdns:清除本地DNS缓存内容; Ipconfig /displaydns:显示本地DNS内容; Ipconfig /registerdns:DNS客户端手工向服务器进行注册; Ipconfig /showclassid:显示网络适配器的DHCP类别信息; Ipconfig /setclassid:设置网络适配器的DHCP类别。 ipconfig /renew “Local Area Connection”:更新“本地连接”适配器的由DHCP 分配 IP 地址的配置 ipconfig /showclassid Local*:显示名称以 Local 开头的所有适配器的 DHCP 类别 ID ipconfig /setclassid “Local Area Connection” TEST:将“本地连接”适配器的 DHCP 类别 ID 设置为 TEST

ipconfig命令解释

ipconfig命令是调试计算机网络的常用命令,通常大家使用它显示计算机中网络适配器的IP地址、子网掩码及默认网关。其实这只是ipconfig的不带参数用法,而它的带参数用法,在网络应用中也是相当不错的。 ipconfig命令的使用介绍: 1、利用ipconfig可以显示本机的IP地址、子网掩码和每个网卡的默认网关值。 2、利用/all参数可以完整查看目的地、本地IP地址、子网掩码、网关、DNS等。 Ipconfig命令的格式是:ipconfig [/all /renew [adapter] /release [adapter]] 参数说明: (1)如果没有参数,那么 ipconfig 实用程序将向用户提供所有当前的 TCP/IP 配置值,包括 IP 地址和子网掩码。该使用程序在运行 DHCP 的系统上特别有用,允许用户决定由 DHCP 配置的值。 (2)/all:产生完整显示。 (3)/renew [adapter]:更新 DHCP 配置参数。该选项只在运行 DHCP 客户端服务的系统上可用。要指定适配器名称,请键入使用不带参数的 ipconfig 命令显示的适配器名称。 (4)/release [adapter]:发布当前的 DHCP 配置。该选项禁用本地系统上的 TCP/IP,并只在 DHCP 客户端上可用。要指定适配器名称,请键入使用不带参数的 ipconfig 命令显示的适配器名称。 Ipconfig命令使用方法介绍:在DOS窗口输入:ipconfig /al,如图:

上图各参数含义如下: Ethernet adapter 本地连接: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : (本机的网卡型号) Physical Address. . . . . . . . . : (本机网卡的MAC地址) Dhcp Enabled. . . . . . . . . . . : Yes (DHCP服务器开放) Autoconfiguration Enabled . . . . : Yes Autoconfiguration IP Address. . . : (本地IP地址) Subnet Mask . . . . . . . . . . . : (子网掩码) PPP adapter richard: (PPPOE拨号程序) Connection-specific DNS Suffix . : Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface Physical Address. . . . . . . . . : (PPPOE拨号的MAC地址) Dhcp Enabled. . . . . . . . . . . :

思科路由器命令大全

思科路由器命令大全 2009年03月16日星期一下午 08:02 思科路由器命令大全 2007年08月24日星期五下午 02:51 最近在学习路由器的配置把这个发上来方便以后学习和查阅 switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#c onfigure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中 aptech2950(conf-if)#exit

思科路由器命令大全完整版

思科交换机路由器命令大全交换机命令: switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#configure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例--设置禁用IP地址解析特性,设置启用消息同步特性 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab aptech2950(conf)#no ip domain-lookup -----设置禁用IP地址解析特性 aptech2950(conf)#logging synchronous -----设置启用消息同步特性 aptech2950(conf)#interface range fastethernet0/1-20 aptech2950(conf-if-range)#spanning-tree portfast -----设置快速 端口 aptech2950(conf)#interface range fastethernet 0/23-24 aptech2950(conf-if-range)#swichport mode trunk -----设置主干道端口

常用的网管命令

网管必读-常用网络命令 https://www.360docs.net/doc/df12214901.html, 2005-12-8 17:14:16 1649 的意思是 "show interface"。现在 Windows 2000 也有了类似界面的工具,叫做 netsh。 我们在 Windows 2000 的 cmd shell 下,输入 netsh就出来:netsh> 提示符,输入 int ip 就显示:interface ip> 然后输入 dump ,我们就可以看到当前系统的网络配置:# ---------------------------------- # Interface IP Configuration # ---------------------------------- pushd interface ip # Interface IP Configuration for "Local Area Connection" set address name = "Local Area Connection" source = static addr = 192.168.1.168 mask = 255.255.255.0 add address name = "Local Area Connection" addr = 192.1.1.111 ma sk = 255.255.255.0 set address name = "Local Area Connection" gateway = 192.168.1.1 00 gwmetric = 1 set dns name = "Local Area Connection" source = static addr = 20 2.96.209.5 set wins name = "Local Area Connection" source = static addr = n

ipconfig下各项英文的意思

Ipconfig命令的参数和各项意思 /? 显示帮助信息 /all 显示现时所有网络连线的设定 /release 释放某一个网络上的IP位置 /renew 更新某一个网络上的IP位置 /flushdns 把DNS解析器的暂存内容全数删除 Physical address 物理地址,网络适配器(网卡)的物理地址,具有全球唯一性。网卡物理地址存储器中存储单元对应实际地址称物理地址,与逻辑地址相对应。 MAC 地址是识别LAN(局域网)节点的标识。MAC地址亦可进行绑定,绑定后的MAC地址不具有被其它电脑使用的权利。要是害怕网络无故被盗用,这时的MAC地址的绑定就产生巨大的效用了。 Dhcp enabled动态获取ip地址,网上邻居/属性/tcp/ip/属性/自动获取ip地址。 autoconfiguration enabled自动配置已激活。 subnet mask 子关掩码,用来判断任意两个ip是否属于同一子网络。

default gateway默认网关,一般是指路由器的地址的,在vlan(虚拟局域网)间互访时,需要通过路由来解决。当一个路由器接受到一个未知目的地址的数据包时,在有配置的情况下,将发送到default gateway(比如某个路由器的接口),否则丢弃。 DHCP Server指在一个特定的网络中管理DHCP标准的一台计算机。DHCP服务器的职责是当工作站登录进来时分配IP地址,并且确保分配给每个工作站的IP地址不同,DHCP服务器极大地简化了以前需要用手工来完成的一些网络管理任务。 DNS servers意思是DNS服务器,DNS的意思是域名存管伺服器。在技术上,域名代表了您在互联网上的地址。当您使用浏览器键入域名时,域名伺服器系统(DNS Servers)便会将您键入的域名翻译成网络电脑运行使用的语言数字(IP),用户就不用去记住这些难记的电脑语言数字了。

相关文档
最新文档