视频里面的配置:
实际这样配置时会报提示:
[Route1]ip route-static 10.1.2.2 255.255.255.0 10.1.1.2
Info: The destination address and mask of the configured static route mismatched
, and the static route 10.1.2.0/24 was generated.
就是10.1.2.2这个和子网掩码不匹配,其实应该是10.1.2.0不是2.2.
路由器会自动修正,然后添加这条路由。
但其实可以用比较简单的方式:
[Route2]ip route-static 10.1.1.0 24 10.1.2.1
[Route2]dis cu
不用写255这一串,用24即可代替。
效果一样的。