默认路由实现全网互通
默认路由属于静态路由的一种,只能在末梢网络中使用。
实验例图
先把所有设备的必打命令先打上
关闭弹屏,设备名字的修改,启用永不超时。如下
undo terminal monitor --关闭弹屏
Info: Current terminal monitor is off.
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1–设备名字的修改
[r1]user-interface console 0
[r1-ui-console0]idle-timeout 0 0–启用永不超时
[r1-ui-console0]quit
设备接口配置
R1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 10.1.1.1 24–端口地址
[r1-GigabitEthernet0/0/0]undo shutdown --启用
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[r1-GigabitEthernet0/0/0]int loop0
[r1-LoopBack0]ip add 1.1.1.1 32----环回地址
[r1-LoopBack0]quit
r1]ip route-static 10.1.2.0 24 10.1.1.2–要获取的网段和下一跳指向
1]ip route-static 3.3.3.3