静态路由是一种特殊路由,由网络管理员采用手工方法在路由器中配置而成。
实验1:
实验拓扑图:
配置PC:
例如PC_1如下图,PC_2,PC_3如下图添加:
路由器R1:
[R1]int GigabitEthernet 0/0
[R1]ip address 192.168.1.1 24
[R1]int Gigabitethernet 0/1
[R1]ip address 192.168.2.1 24
[R1]int Serial 1/0
[R1]ip add 1.1.1.0 /30
[R1]qu
[R1]ip route-static 192.168.3.0 255.255.255.0 s1/0
路由器R2:
[R2]int GigabitEthernet 0/0
[R2]ip address 192.168.3.1 24
[R2]int Serial1/0
[R2]ip add 1.1.1.2 30
[R2]qu
[R2]ip route-static 192.168.1.0 255.255.255.0 s1/0
实验2:
拓扑图:
配置:
配置路由:
R1:
[H3C]sysname R1
[R1]int g0/0
[R1-GigabitEthernet0/0]ip add 10.1.0.1 24
[R1-GigabitEthernet0/0]int s1/0
[R1-Serial1/0]ip add 10.2.0.1 24
[R1-Serial1/0]qu
[R1]ip route-static 10.5.0.0 255.255.255.0 s1/0
R2:
[H3C]sysname R2
[R2]int s1/0
[R2-Serial1/0]ip add 10.2.0.2 24
[R2-Serial1/0]int s2/0
[R2-Serial2/0]ip add 10.3.0.1 24
[R2-Serial2/0]qu
[R2]ip route-static 10.1.0.0 255.255.255.0 s1/0
[R2]ip route-static 10.5.0.0 255.255.255.0 s2/0
R3:
[H3C]sysname R3
[R3]int Serial 1/0
[R3-Serial1/0]ip add 10.3.0.2 24
[R3-Serial1/0]int serial 2/0
[R3-Serial2/0]ip add 10.4.0.1 24
[R3-Serial2/0]qu
[R3]ip route-static 10.1.0.0 255.255.255.0 10.3.0.1
[R3]ip route-static 10.5.0.0 255.255.255.0 10.4.0.2
R4:
[H3C]sysname R4
[R4]int Serial 1/0
[R4-Serial1/0]ip add 10.4.0.2 24
[R4-Serial1/0]int g0/0
[R4-GigabitEthernet0/0]ip add 10.5.0.1 24
[R4]ip route-static 10.1.0.0 255.255.255.0 10.4.0.1
测试:
实验3:
拓扑图:
PC配置:
R1:
[H3C]sysname R1
[R1]int g0/0
[R1-GigabitEthernet0/0]ip add 192.168.1.254 24
[R1-GigabitEthernet0/0]int s1/0
[R1-Serial1/0]ip add 10.0.1.1 24
[R1-Serial1/0]qu
[R1]ip route-static 10.0.2.0 255.255.255.0 s1/0
[R1]ip route-static 192.168.2.0 255.255.255.0 s1/0
[R1]
R2
[H3C]sysname R2
[R2]int s1/0
[R2-Serial1/0]ip add 10.0.1.2 24
[R2-Serial1/0]int s2/0
[R2-Serial2/0]ip add 10.0.2.1 24
[R2-Serial2/0]qu
[R2]ip route-static 192.168.2.0 255.255.255.0 10.0.2.2
[R2]ip route-static 192.168.1.0 255.255.255.0 10.0.1.1
R3
[H3C]sysname R3
[R3]
[R3]int s1/0
[R3-Serial1/0]ip add 10.0.2.2 24
[R3-Serial1/0]int g0/0
[R3-GigabitEthernet0/0]ip add 192.168.2.254 24
[R3-GigabitEthernet0/0]qu
[R3]ip route-static 192.168.1.0 255.255.255.0 10.0.2.1
[R3]ip route-static 10.0.1.0 255.255.255.0 10.0.2.1
[R3]
此文章若有错误请大佬指正