计算机cmd如何设置路由,Windows 系统cmd设置添加静态路由方式

步骤/方法

1.设置计算机A的IP为192.168.1.2子网掩码为255.255.255.0网关为192.168.1.1!

2.设置计算机B的IP为192.168.2.2子网掩码为255.255.255.0网关为192.168.2.1!

3.给路由A的fastEthernet 0/0端口配置IP为192.168.1.1子网掩码为255.255.255.0,由于路由默认的端口是关闭的,所以在给路由端口配置好IP以后,要注意用no shutdown(不关闭)命令把端口开启!如下是配置路由A端口fastEthernet 0/0的所有命令:

4. Continuewith configuration dialog? [yes/no]: no

Router#configure terminal(进入全局配置模式)

Router(config)#interfacefastEthernet 0/0(进入端口模式,进入端口0/0了)

Router(config-if)#noshutdown(开启端口)

(有红线画出的就是我输入的命令,没红线画出的,那是路由的提示):

5.给路由A的fastEthernet 1/0端口配置IP为192.168.3.1子网掩码为255.255.255.0,如下是配置路由A端口fastEthernet1/0的所有命令

Router(config-if)#exit(从0/0端口退回到全局配置模式)

Router(config)#interfacefastEthernet 1/0(进入1/0端口)

Router(config-if)#ipaddress 192.168.3.1 255.255.255.0(给端口1/0配置好了IP跟子网掩码)

Router(config-if)#noshutdown(开启端口

你可能感兴趣的:(计算机cmd如何设置路由)