I built a simple Network with 2 routers, the problem is that i cant reach to other router, somehow there's problem i couldn't figure out.
here is the configurations:
Router0:
Router1:
doesn't work...
Network Engineering Stack Exchange is a question and answer site for network engineers. It only takes a minute to sign up.
Sign up to join this community(I imagine your setup to be something like this)
Your OSPF adjacency is not coming up because the IP addresses on the facing interfaces between R1 and R2 are not in the same subnet.
As soon as you use two IP addresses that are in the same subnet (as in the drawing above), you will have IP connectivity between R1 and R2, and your OSPF adjacency can be established :
Router R1
!
interface GigabitEthernet0/0
ip address 72.40.42.1 255.255.254.0
duplex full
speed 1000
media-type gbic
negotiation auto
!
interface GigabitEthernet1/0
ip address 72.40.40.1 255.255.254.0
negotiation auto
!
<...>
!
router ospf 1
router-id 1.1.1.1
network 72.40.40.0 0.0.1.255 area 0
network 72.40.42.0 0.0.1.255 area 0
!
Router R2
!
interface GigabitEthernet0/0
ip address 72.40.43.1 255.255.254.0
duplex full
speed 1000
media-type gbic
negotiation auto
!
interface GigabitEthernet1/0
ip address 72.40.46.1 255.255.254.0
negotiation auto
!
<...>
!
router ospf 1
router-id 2.2.2.2
network 72.40.42.0 0.0.1.255 area 0
network 72.40.46.0 0.0.1.255 area 0
!
(Please note that 72.40.42.1/23 and 72.40.43.1/23 are in the same subnet) << as pointed out above, this is the crucial point
Your OSPF comes up now :
R1#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:38 72.40.43.1 GigabitEthernet0/0
R1#
and
R2#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/BDR 00:00:37 72.40.42.1 GigabitEthernet0/0
R2#
And you are able to check the reachability of the OSPF-learned network by pinging :
R2#ping 72.40.40.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 72.40.40.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/32/48 ms
The crucial point is that the IP addresses on the link between R1 and R2 have to be in the same subnet (or you need to configure static routes or other less elegant tricks). Otherwise, R1 will have no way to know how to reach R2, and vice-versa.
as Ron mentioned before there is no common network between your routers and every single interface is on a separate network and the reason is that the wild card mask that you have configured on each of these interfaces which give you the option to have interfaces on the same network only using the 1st octet (.255) 2nd octet (.1)cannot be changed. You can fix that by using a different wild card mask such 0.0.8.255 and here the ping can work and all your interfaces will be on the same network but you will be losing the benefit of the router which is separating between 2 different networks Better practice is to change the IP addresses on the interfaces and have both of the connected interfaces to be on the same network.
If these are your only two routers, you have a problem: there is no common network on which these routers can communicate. Routers need a common network between them in order to even communicate with IP, much less with a protocol (e.g. OSPF) which uses IP. OSPF could never form a neighbor relationship if the FastEthernet ports on these routers are connected to the other router as the only links between the routers.
72.40.40.0/23
is a different network than 72.40.44.0/23
), and those two networks cannot communicate without an intervening router.
show ip ospf neigh
.