我无法从局域网 192.168.44.0 和 192.168.45.0 ping 通,pc 3 pc 4

网络工程 路由 ospf
2022-02-16 16:24:34

在此处输入图像描述

R0 and R1 are linked with ospf , and R1 with static route with MLSw.
If i change R1 conn with MlSw to #ip route 0.0.0.0 0.0.0.0 g0/1 or g0/2 
i can ping , but need help with static route conf 

Current configuration : 1599 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
ip dhcp excluded-address 192.168.44.1 192.168.44.5
ip dhcp excluded-address 192.168.45.1 192.168.45.5
!
ip dhcp pool Vl44
 network 192.168.44.0 255.255.255.0
 default-router 192.168.44.1
 dns-server 8.8.8.8
ip dhcp pool Vl45
 network 192.168.45.0 255.255.255.0
 default-router 192.168.45.1
 dns-server 8.8.8.8
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX1524S4HU-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface GigabitEthernet0/1
 no ip address
 duplex auto
 speed auto
!
interface GigabitEthernet0/1.44
 encapsulation dot1Q 44
 ip address 192.168.44.1 255.255.255.0
!
interface GigabitEthernet0/1.45
 encapsulation dot1Q 45
 ip address 192.168.45.1 255.255.255.0
!
interface Serial0/0/0
 ip address 192.168.200.1 255.255.255.252
 ip ospf network point-to-point
 ip ospf hello-interval 30
 ip ospf dead-interval 120
 clock rate 2000000
!
interface Serial0/0/1
 no ip address
 clock rate 2000000
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 10
 log-adjacency-changes
 passive-interface GigabitEthernet0/1.44
 passive-interface GigabitEthernet0/1.45
 network 192.168.44.0 0.0.0.255 area 0
 network 192.168.45.0 0.0.0.255 area 0
 network 192.168.200.0 0.0.0.255 area 0
!
ip classless
!
ip flow-export version 9
!
!
!
no cdp run
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

///////////////////////////////////////// ////////////////////////

   Router!#1version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO1941/K9 sn FTX15241LD1-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
 ip address 192.168.150.2 255.255.255.252
 duplex auto
 speed auto
!
interface GigabitEthernet0/1
 ip address 192.168.101.2 255.255.255.252
 duplex auto
 speed auto
!
interface Serial0/0/0
 ip address 192.168.200.2 255.255.255.252
 ip ospf network point-to-point
 ip ospf hello-interval 30
 ip ospf dead-interval 120
!
interface Serial0/0/1
 no ip address
 clock rate 2000000
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
router ospf 10
 log-adjacency-changes
 network 192.168.200.0 0.0.0.3 area 0
 default-information originate
!
ip classless
ip route 192.168.40.0 255.255.255.0 GigabitEthernet0/1 
ip route 192.168.30.0 255.255.255.0 GigabitEthernet0/1 
ip route 192.168.100.0 255.255.255.0 GigabitEthernet0/1 
ip route 192.168.50.0 255.255.255.0 GigabitEthernet0/0 
ip route 192.168.60.0 255.255.255.0 GigabitEthernet0/0 
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end
1个回答

您通过 OSPF 在第二个路由器上获取第一个路由器后面的网络,因此您不需要第二个路由器上的任何静态路由。你应该删除那些。

第一个路由器需要被告知第二个路由器后面的网络,因此您需要通过网络语句将这些包含在 OSPF 中,或者在第二个路由器上重新分配连接的路由,或者您可以在第一个路由器上为那些放置两个静态路由两个网络。