一、切换模式

  router>en                           //用户模式enable

  router#conf t                      //特权模式configure terminal

二、启动接口,分配ip地址

       router(config)#interface fa0/0         //配置模式…..对f0/0端口进行ip地址分配

  router(config-if)#ip address 192.168.1.1 255.255.255.0    //路由器的端口做为网关,子网掩码根据需要设置,一般用默认子网掩码

  router(config-if)#no shutdown        //接口模式

  router(config-if)#exit

三、配置静态路由

              目的网络              子网掩码(目的)              下一跳地址

   router(config)#ip route 192.168.2.0           255.255.255.0                 192.168.3.20

四、检查

  show ip interface brief          //显示端口ip

  do show ip route                  //显示路由

版权声明:本文为Crazy-Liu原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/Crazy-Liu/p/12761367.html1