eve-ng模拟小实验
01
拓扑:
02
配置过程:
R1:
interface Loopback0
ip address 192.168.100.1 255.255.255.0
interface Ethernet0/0
ip address 192.168.127.99 255.255.255.248
exit
ip route 0.0.0.0 0.0.0.0 192.168.127.100
SW1:
interface Ethernet0/1
interface Ethernet0/1
no switchport
ip address 192.168.127.157 255.255.255.252
interface Ethernet0/2
no switchport
ip address 192.168.127.100 255.255.255.248
exit
ip route 0.0.0.0 0.0.0.0 192.168.127.99
ip route 192.168.22.0 255.255.255.0 192.168.127.158
ip route 192.168.36.0 255.255.255.0 192.168.127.158
R2:
interface Ethernet0/0
ip address 192.168.127.213 255.255.255.252
interface Ethernet0/1
ip address 192.168.127.158 255.255.255.252
interface Ethernet0/2
ip address 192.168.127.145 255.255.255.252
router ospf 100
redistribute static subnets
default-information originate
network 192.168.127.144 0.0.0.3 area 0
network 192.168.127.156 0.0.0.3 area 0
network 192.168.127.212 0.0.0.3 area 0
ip route 0.0.0.0 0.0.0.0 192.168.127.157
R3:
interface Ethernet0/0
ip address 192.168.127.146 255.255.255.252
no shut
interface Ethernet0/1
ip address 192.168.22.1 255.255.255.0
no shut
interface Ethernet0/2
ip address 192.168.127.189 255.255.255.252
exit
router ospf 100
network 192.168.22.0 0.0.0.255 area 0
network 192.168.127.144 0.0.0.3 area 0
network 192.168.127.188 0.0.0.3 area 0
R4:
interface Ethernet0/0
ip address 192.168.127.214 255.255.255.252
no shut
interface Ethernet0/1
ip address 192.168.36.1 255.255.255.0
no shut
interface Ethernet0/2
ip address 192.168.127.190 255.255.255.252
router ospf 100
network 192.168.36.0 0.0.0.255 area 0
network 192.168.127.188 0.0.0.3 area 0
network 192.168.127.212 0.0.0.3 area 0
SW2 :
vlan 22
interface Ethernet0/0
switchport access vlan 22
switchport mode access
interface Vlan22
ip address 192.168.22.2 255.255.255.0
ip route 0.0.0.0 0.0.0.0 192.168.22.1
SW3:
vlan 36
interface Ethernet0/0
switchport access vlan 36
switchport mode access
interface Vlan36
ip address 192.168.36.2 255.255.255.0
ip route 0.0.0.0 0.0.0.0 192.168.36.1
03
测试结果:
查看各设备路由表
然后在ping测试:
至此实验完成