<r2>sy
Enter system view, return user view withCtrl+Z.
[r2]interface e0/0/0
[r2-Ethernet0/0/0]ip address 192.168.30.224
[r2-Ethernet0/0/0]q
[r2]interface e0/0/1
[r2-Ethernet0/0/1]ip address 192.168.40.124
<r3>sy
Enter system view, return user view withCtrl+Z.
[r3]interface e0/0/0
[r3-Ethernet0/0/0]ip address 192.168.40.2255.255.255.0
[r3-Ethernet0/0/0]q
[r3]inte e0/0/1
[r3-Ethernet0/0/1]ip address 192.168.20.254255.255.255.0
R1自动生成了直连路由
[r1]disp ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes :6
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.10.0/24 Direct 0 0 D 192.168.10.254 Ethernet0/0/0
192.168.10.254/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/0
192.168.30.0/24 Direct 0 0 D 192.168.30.1 Ethernet0/0/1
192.168.30.1/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/1
[r1]
静态路由
[r1]ip route-static 192.168.20.0 24 e0/0/1192.168.30.2
[r1]q
<r1>disp ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes :7
Destination/Mask Proto Pre Cost Flags NextHop Interface
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.10.0/24 Direct 0 0 D 192.168.10.254 Ethernet0/0/0
192.168.10.254/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/0
192.168.20.0/24 Static 60 0 D 192.168.30.2 Ethernet0/0/1
192.168.30.0/24 Direct 0 0 D 192.168.30.1 Ethernet0/0/1
192.168.30.1/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/1
[r2]ip route-static 192.168.20.0 24 e0/0/1192.168.40.2
[r2]ip route-static 192.168.10.0 24 e0/0/0192.168.30.1