cisco交换机路由器静态路由配置

一、切换模式

  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                  //显示路由

猜你喜欢

转载自www.cnblogs.com/Crazy-Liu/p/12761367.html