Hi I'm trying to use quagga to connect 3 routers but the middle one doen't complete the path that a trace route command would do even though it knows where the target address is. It seems that whenever the packages have to go through intemediate routers they get stuck and this problem also happened when I was trying to connect two AS(autonomous systems) using BGP for Inter-AS communication and OSPF for intra-AS communication. So the problem is the intermediate routers that are not doing what I expected when they receive a package that they know the target address of.
In the picture below the yellow line should connect the two computers in the network because they know each other exist through OSPF, but the router N1 is preventing the package from reaching its destination.
Thanks for any help.
N1 Config
interface eth0
ip address 192.0.2.2/24
ipv6 address 2001:db8::2/64
!
interface eth1
ip address 192.0.3.1/24
ipv6 address 2001:db8:1::1/64
!
router ospf
router-id 192.0.2.2
network 192.0.2.0/24 area 0
network 192.0.3.0/24 area 0
!
router ospf6
router-id 192.0.2.2
interface eth0 area 0.0.0.0
interface eth1 area 0.0.0.0
!
N2 Config
interface eth0
ip address 192.0.2.1/24
ipv6 address 2001:db8::1/64
!
interface eth1
ip address 192.0.4.1/24
ipv6 address 2001:db8:2::1/64
!
router ospf
router-id 192.0.2.1
network 192.0.2.0/24 area 0
network 192.0.4.0/24 area 0
!
router ospf6
router-id 192.0.2.1
interface eth0 area 0.0.0.0
interface eth1 area 0.0.0.0
!
N3 Config
interface eth0
ip address 192.0.3.2/24
ipv6 address 2001:db8:1::2/64
!
interface eth1
ip address 192.0.5.1/24
ipv6 address 2001:db8:3::1/64
!
router ospf
router-id 192.0.3.2
network 192.0.3.0/24 area 0
network 192.0.5.0/24 area 0
!
router ospf6
router-id 192.0.3.2
interface eth0 area 0.0.0.0
interface eth1 area 0.0.0.0
!
Best Answer
In the top image, it appears that the traceroute is actually making it all the way from one host to the other host. I think you are concerned that the intermediate hops are not represented.
Traceroute works by sending IP packets with a TTL starting at
1
, and increasing the TTL. As a router receives and processes a packet, it decreases the TTL. If the TTL reaches0
, then the packet is discarded, and the router is supposed to send an ICMP message back to the source indicating that the packet timed out. Not all routers do this.Routers can purposely be configured to not generate the ICMP messages, and ICMP message generation is also a very low priority for the routers, so the message may be generated and sent, but it arrives back to the source too late for the purpose of traceroute. The primary function of a router is to forward packets as fast as possible, and ICMP message generation is something they do when they have some free time and get around to it.
If the hosts can ping each other or otherwise communicate, then your routing is working, and your
n7
host is responding to then6
host traceroute packets, so routing is working.