cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2184
Views
0
Helpful
13
Replies

OSPF functions. Load balancing.

hanwucisco
Level 1
Level 1

R1-----R2====R3------R4

The 4 of them are running OSPF in one area. Between R2 and R3, I configured two simple GRE tunnels. I want to user’s traffic from R1 to R4 to use the two tunnels via OSPF load balancing. What is the best way to do that? I mean the traffic always going through the physical link no the tunnels.

Thanks,

Han

6 Accepted Solutions

Accepted Solutions

Edison Ortiz
Hall of Fame
Hall of Fame

modify the ospf cost on the GRE tunnel to match the LAN. By default, the cost is calculated based on BW from the interface.

 

type show ip ospf interface and you will see the OSPF cost for the GRE and physical connection - make sure they match.

View solution in original post

Are both tunnels up? Let's see the output from show interfaces on that router.

View solution in original post

hanwucisco wrote:

I tried this one though, but I have an issue. I put the physical and two tunnels into OSPF on R2 and R3, but when I show IP ospf neighbor, it only show two links that have neighbor. Only physical link and the tunnel with high IP. Does it need special configuration on OSPF to make it recognize the two tunnels?

thanks,

Han

How are your tunnel destination IP Addresses learnt by the routers? Do make sure that the tunnels do not use OSPF to actually establish the tunnel endpoint reachability as otherwise you will end up in a recursive routing issue especially when you lower the cost of the tunnels to have them preferred over your physical links. This can happen when the tunnel destinations become reachable via the tunnels themselves which eventually breaks the tunnel connectivity and the process repeats unless you manually fix it.

In your case if the GRE tunnel destinations are reachable via connected or static routes then you should not have an issue and OSPF should prefer the tunnels if you lower their cost compared to the physical links. If, however, you are using OSPF in the first place to discover the tunnel destinations then you will run into the issue I mentioned above. By the way what is the motivation to use GRE tunnels here?

Atif

View solution in original post

Can you post your OSPF config as well as the output of the 'show ip ospf interface brief' command for both routers?

Atif

View solution in original post

Enabling ospf only on tunnel interfaces will do.Tunnel reachability can be done via static routes!!

HTH

~bava

View solution in original post

Hi,

Please provide:

-show ip ospf interface tunnel0/1

-show interface tunnel 0/1

-ping 224.0.0.5

-ping 224.0.0.6

-show ip os nei detail

-debug ip ospf adj

-debug ip ospf hello

-show run int tunnel0/1

-ping 10.0.0.3 size (mtu of tunnel intf) df-bit

You could also configure:

router ospf XX

log-adjacency-changes detail

and check the log for OSPF messages.

Thanks,

Luc

View solution in original post

13 Replies 13

Edison Ortiz
Hall of Fame
Hall of Fame

modify the ospf cost on the GRE tunnel to match the LAN. By default, the cost is calculated based on BW from the interface.

 

type show ip ospf interface and you will see the OSPF cost for the GRE and physical connection - make sure they match.

I tried this one though, but I have an issue. I put the physical and two tunnels into OSPF on R2 and R3, but when I show IP ospf neighbor, it only show two links that have neighbor. Only physical link and the tunnel with high IP. Does it need special configuration on OSPF to make it recognize the two tunnels?

thanks,

Han

Are both tunnels up? Let's see the output from show interfaces on that router.

Yes, tunnels are both up and pingable.

R3(config-router)#do sh ip int bri | e una
Interface                  IP-Address      OK? Method Status                Protocol
Serial1/0                  1X.1.23.3        YES manual up                    up 
Serial1/1                  1X.1.34.3        YES manual up                    up 
Tunnel0                    10.0.0.3        YES manual up                    up 
Tunnel1                    10.0.1.3        YES manual up                    up 
R3(config-router)#do ping 10.0.0.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/57/92 ms
R3(config-router)#do ping 10.0.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/67/104 ms
R3(config-router)#

But only one tunnel has cdp nei to R2.

R3(config-router)#do sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
1X.4.4.4           0   FULL/  -        00:00:38    1.1.34.4        Serial1/1
10.0.1.2          0   FULL/  -        00:00:30    10.0.1.2        Tunnel1
R3(config-router)#

hanwucisco wrote:

I tried this one though, but I have an issue. I put the physical and two tunnels into OSPF on R2 and R3, but when I show IP ospf neighbor, it only show two links that have neighbor. Only physical link and the tunnel with high IP. Does it need special configuration on OSPF to make it recognize the two tunnels?

thanks,

Han

How are your tunnel destination IP Addresses learnt by the routers? Do make sure that the tunnels do not use OSPF to actually establish the tunnel endpoint reachability as otherwise you will end up in a recursive routing issue especially when you lower the cost of the tunnels to have them preferred over your physical links. This can happen when the tunnel destinations become reachable via the tunnels themselves which eventually breaks the tunnel connectivity and the process repeats unless you manually fix it.

In your case if the GRE tunnel destinations are reachable via connected or static routes then you should not have an issue and OSPF should prefer the tunnels if you lower their cost compared to the physical links. If, however, you are using OSPF in the first place to discover the tunnel destinations then you will run into the issue I mentioned above. By the way what is the motivation to use GRE tunnels here?

Atif

I created the tunnel first and pinged. Then I put OSPF. So there shouldnt have that problem.

thanks,

Can you post your OSPF config as well as the output of the 'show ip ospf interface brief' command for both routers?

Atif

Enabling ospf only on tunnel interfaces will do.Tunnel reachability can be done via static routes!!

HTH

~bava

R3#sh run | b r o

router ospf 1

log-adjacency-changes

network 1.1.34.3 0.0.0.0 area 0

network 10.0.0.3 0.0.0.0 area 0

network 10.0.1.3 0.0.0.0 area 0

R3#sh ip os interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Se1/1        1     0               1.1.34.3/24        64    P2P   1/1
Tu0          1     0               10.0.0.3/24        11111 P2P   0/0
Tu1          1     0               10.0.1.3/24        11111 P2P   1/1

===========

R2#sh ip os
*Mar  1 00:31:26.219: %SYS-5-CONFIG_I: Configured from console by console
R2#sh ip os int bri
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Se1/0        1     0               1.1.12.2/24        64    P2P   1/1
Tu0          1     0               10.0.0.2/24        11111 P2P   0/0
Tu1          1     0               10.0.1.2/24        11111 P2P   1/1
R2#

router ospf 1
log-adjacency-changes
network 1.1.12.2 0.0.0.0 area 0
network 10.0.0.2 0.0.0.0 area 0
network 10.0.1.2 0.0.0.0 area 0

Hi,

Please provide:

-show ip ospf interface tunnel0/1

-show interface tunnel 0/1

-ping 224.0.0.5

-ping 224.0.0.6

-show ip os nei detail

-debug ip ospf adj

-debug ip ospf hello

-show run int tunnel0/1

-ping 10.0.0.3 size (mtu of tunnel intf) df-bit

You could also configure:

router ospf XX

log-adjacency-changes detail

and check the log for OSPF messages.

Thanks,

Luc

Thank you all. I solved the problem in a different appoach.

testing where I land

Cheers, Dan

esomarriba
Level 5
Level 5

What was your solution?

Review Cisco Networking products for a $25 gift card