ENSP Demo2 RIP & static & OSPF

让我读个条發表於2024-03-24

ENSP Demo2 RIP & static & OSPF

各個路由器配置命令

sys 
sysn R1

int g0/0/0
ip add 10.1.1.1 30
int g0/0/1
ip add 192.168.255.2 30

rip 1
version 2
net 10.0.0.0

ip route-static 0.0.0.0 0 192.168.255.1

sys
sysn R2

int g0/0/0
ip add 10.1.1.2 30
int lo 1
ip add 2.2.2.2 32

rip 1
version 2
net 10.0.0.0
net 2.0.0.0

ip route-static 0.0.0.0 0 10.1.1.1

sys 
sysn R3

int g0/0/0
ip add 192.168.255.1 30
int g0/0/1
ip add 151.151.1.2 30

ip route-static 2.2.2.2 32 192.168.255.2
ip route-static 10.1.1.0 30 192.168.255.2
ip route-static 192.168.255.0 30 192.168.255.2
ip route-static 151.151.1.0 30 151.151.1.1
ip route-static 131.131.255.0 30 151.151.1.1
ip route-static 131.131.255.4 30 151.151.1.1
ip route-static 131.131.255.8 30 151.151.1.1
ip route-static 131.131.255.12 30 151.151.1.1
ip route-static 7.7.7.7 32  151.151.1.1

其中131.131.255.0、131.131.255.4、131.131.255.8、131.131.255.12可以彙總為ip route-static 131.131.255.0 28 151.151.1.1


sys
sysn R4

int g0/0/0
ip add 151.151.1.1 30
int g0/0/1
ip add 131.131.255.13 30
int s4/0/0
ip add 131.131.255.6 30

ip route-static 0.0.0.0 0 151.151.1.2

ospf 1 router-id 1.1.1.1
area 0
network 131.131.255.4 0.0.0.3
network 131.131.255.12 0.0.0.3

ospf 1
default-route-advertise

sys
sysn R5

int g0/0/0
ip add 131.131.255.14 30
int g0/0/1
ip add 131.131.255.10 30

ospf 1 router-id 2.2.2.2
area 0
network 131.131.255.12 0.0.0.3
network 131.131.255.8 0.0.0.3

sys
sysn R6

int g0/0/0
ip add 131.131.255.9 30
int s4/0/0
ip add 131.131.255.5 30
int g0/0/1
ip add 131.131.255.1 30

ospf 1 router-id 3.3.3.3
area 0
network 131.131.255.8 0.0.0.3
network 131.131.255.4 0.0.0.3
network 131.131.255.0 0.0.0.3

sys
sysn R7

int g0/0/0
ip add 131.131.255.2 30 
interface loopback 0
ip address 7.7.7.7 32

ospf 1 router-id 4.4.4.4
area 0
network 131.131.255.0 0.0.0.3
network 7.7.7.7 0.0.0.0