静态路由:  

 LO3-------------------- R3-------------------------------R4------------------LO4

R3:
system-view
sysname R3
int lo3
ip address 192.168.3.1 255.255.255.255
undo shutdown
quit
int e0/1/0
ip address 192.168.13.1 255.255.255.0
undo shutdown
quit
int s0/2/2
ip add 192.168.34.1 255.255.255.0
undo shutdown
quit
ip route-static 192.168.4.0 255.255.255.0 192.168.34.2
ip route-static 192.168.14.0 255.255.255.0 192.168.34.2


display ip interface brief
display ip routing-table
save


R4:

system-view
sysname R4
int lo4
ip address 192.168.4.1 255.255.255.255
undo shutdown
quit
int e0/1/0
ip address 192.168.14.1 255.255.255.0
undo shutdown
quit
int s0/2/2
ip add 192.168.34.2 255.255.255.0
undo shutdown
quit
ip route-static 192.168.3.0 255.255.255.0 192.168.34.1
ip route-static 192.168.13.0 255.255.255.0 192.168.34.1

display ip interface brief
display ip routing-table
save

默认路由:

    LO3-------------------- R3-------------------------------R4------------------LO4

R3:
system-view
sysname R3
int lo3
ip address 192.168.3.1 255.255.255.255
undo shutdown
quit
int e0/1/0
ip address 192.168.13.1 255.255.255.0
undo shutdown
quit
int s0/2/2
ip add 192.168.34.1 255.255.255.0
undo shutdown
quit
ip route-static 0.0.0.0 0.0.0.0 s0/2/2


display ip interface brief
display ip routing-table
save


R4:

system-view
sysname R4
int lo4
ip address 192.168.4.1 255.255.255.255
undo shutdown
quit
int e0/1/0
ip address 192.168.14.1 255.255.255.0
undo shutdown
quit
int s0/2/2
ip add 192.168.34.2 255.255.255.0
undo shutdown
quit
ip route-static 0.0.0.0 0.0.0.0 s0/2/2

display ip interface brief
display ip routing-table
save