18 静态路由和默认路由 <H3C>system-view [H3C]sysname r1 [r1]interface loopback 0 [r1-LoopBack0]ip address 192.168.10.100 32 [r1-LoopBack0]interface gigabitethernet 0/0 [r1-GigabitEthernet0/0]ip address 172.16.14.1 24 [r1-GigabitEthernet0/0]quit [r1]ip route-static 0.0.0.0 0.0.0.0 172.16.14.4 <H3C>system-view [H3C]sysname r2 [r2]interface loopback 0 [r2-LoopBack0]ip address 192.168.20.100 32 [r2-LoopBack0]interface gigabitethernet 0/0 [r2-GigabitEthernet0/0]ip address 172.16.24.2 24 [r2-GigabitEthernet0/0]quit [r2]ip route-static 0.0.0.0 0.0.0.0 172.16.24.4 [r2]quit <H3C>system-view [H3C]sysname r3 [r3]interface loopback 0 [r3-LoopBack0]ip address 192.168.30.100 32 [r3-LoopBack0]interface gigabitethernet 0/0 [r3-GigabitEthernet0/0]ip address 172.16.34.3 24 [r3-GigabitEthernet0/0]quit [r3]ip route-static 0.0.0.0 0.0.0.0 172.16.34.4 <H3C>system-view [H3C]sysname r4 [r4]interface loopback 0 [r4-LoopBack0]ip address 192.168.50.100 32 [r4-LoopBack0]interface gigabitethernet 0/0 [r4-GigabitEthernet0/0]ip address 172.16.14.4 24 [r4-GigabitEthernet0/0]interface gigabitethernet 0/1 [r4-GigabitEthernet0/1]ip address 172.16.24.4 24 [r4-GigabitEthernet0/1]interface gigabitethernet 0/2 [r4-GigabitEthernet0/2]ip address 172.16.34.4 24 [r4-GigabitEthernet0/2]interface gigabitethernet 6/1 [r4-GigabitEthernet6/1]ip address 100.100.45.4 24 [r4-GigabitEthernet6/1]quit [r4]ip route-static 192.168.10.0 255.255.255.0172.16.14.1 [r4]ip route-static 192.168.20.0 255.255.255.0172.16.24.2 [r4]ip route-static 192.168.30.0 255.255.255.0172.16.34.3 [r4]ip route-static 0.0.0.0 0.0.0.0 100.100.45.1 [r4]acl basic 2000 [r4-acl-ipv4-basic-2000]step 20 [r4-acl-ipv4-basic-2000]rule permit source any [r4]interface gigabitethernet 6/1 [r4-GigabitEthernet6/1]nat outbound 2000 [r4-GigabitEthernet6/1]quit <H3C>system-view [H3C]sysname r5 [r5]interface loopback 0 [r5-LoopBack0]ip address 192.168.50.100 32 [r5-LoopBack0]interface gigabitethernet 0/0 [r5-GigabitEthernet0/0]ip address 100.100.45.1 24 [r5-GigabitEthernet0/0]quit
[r4]delete static-routes all //删除所有静态路由
|