配置接口IP地址並通過靜態路由、默認路由配置實現全網互通。
搭建環境
eNSP中配置默認路由
代碼
[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.2.2
[R3]ip route-static 0.0.0.0 0.0.0.0 192.168.3.1
[R2]ip route-static 192.168.1.0 255.255.255.0 192.168.2.1
[R2]ip route-static 192.168.4.0 255.255.255.0 192.168.3.2
測試
pc1和pc2之間能夠相互連通