OSPF configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2015 07:29 PM - edited 03-07-2019 10:52 PM
I try to setup the simple OSPF connection between 2 switches. The setup was done and the protocol is running. When I do the tracertroute from workstation 172.21.6.1 to the next 2 hop of the IP 172.21.3.1, it cannot reach it. It stop at the gateway 172.21.6.254.
Any items I miss out and does static route need to be added?
SW1(config)#router ospf 1
SW1(config-router)#network 172.21.3.0 0.0.0.255 area 2
SW1(config-router)#network 1.1.1.0 0.0.0.255 area 2
SW1(config-router)#network 10.1.3.0 0.0.0.255 area 2
SW2(config)#router ospf 1
SW2(config-router)#network 172.21.6.0 0.0.0.255 area 2
SW2(config-router)#network 2.2.2.0 0.0.0.255 area 2
SW2(config-router)#network 172.21.3.0 0.0.0.255 area 2
- Labels:
-
Other Switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2015 08:05 PM
You need to have common subnet between the 2 switches in order for the peering to work correctly
lets assume int gi0/1 on switch-1 and gi0/1 on switch-2 are connecting the switches together
You need a config like this for each interface
switch-1
config t
int gi0/1
ip add 172.21.3.1 255.255.255.0
no sh
router ospf 1
network 172.21.3.0 0.0.0.255 area 0
switch-2
config t
int gi0/1
ip add 172.21.3.2 255.255.255.0
no sh
router ospf 1
network 172.21.3.0 0.0.0.255 area 0
verify with "sh ip os nei" the switches are neighbors
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2015 01:38 AM
Let me try it out first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2015 01:49 AM
Hello
Can you ping the neighbour, is so can you do it with also with a large mtu size specified?
Debug ip ospf adj
res
Paul
Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.
Kind Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2015 11:35 PM
Hi,
Please refer to below. I have no problem to ping the interface from both of the switches. Can I know confirm that no static route is required for this setup in order for sw1 to ping to sw2 loopback interface?
Switch#debug ip ospf adj
OSPF adjacency events debugging is on
Switch#
00:04:34: OSPF: Rcv DBD from 2.2.2.2 on Vlan506 seq 0x20BCFF9 opt 0x52 flag 0x7 len 32 mtu 1500 state EXCHANGE
00:04:34: OSPF: Nbr 2.2.2.2 has smaller interface MTU
00:04:34: OSPF: Send DBD to 2.2.2.2 on Vlan506 seq 0x20BCFF9 opt 0x52 flag 0x2 len 52
00:04:38: OSPF: Rcv DBD from 2.2.2.2 on Vlan506 seq 0x20BCFF9 opt 0x52 flag 0x7 len 32 mtu 1500 state EXCHANGE
00:04:38: OSPF: Nbr 2.2.2.2 has smaller interface MTU
00:04:38: OSPF: Send DBD to 2.2.2.2 on Vlan506 seq 0x20BCFF9 opt 0x52 flag 0x2 len 52
00:04:43: OSPF: Rcv DBD from 2.2.2.2 on Vlan506 seq 0x20BCFF9 opt 0x52 flag 0x7 len 32 mtu 1500 state EXCHANGE
00:04:43: OSPF: Nbr 2.2.2.2 has smaller interface MTU
00:04:43: OSPF: Send DBD to 2.2.2.2 on Vlan506 seq 0x20BCFF9 opt 0x52 flag 0x2 len 52
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2015 02:27 AM
Hello
On the switch interface running ip ospf
int x/x
ip ospf ignore-mtu
res
Paul
Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.
Kind Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2015 09:45 PM
After i issue the ip ospf mtu-ignore, i do not see the message "00:04:34: OSPF: Nbr 2.2.2.2 has smaller interface MTU" come out from debug log.
I still have one question about it. Does static route is required for this setup in order for sw1 to ping to sw2 loopback interface and vice versa?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2015 02:56 AM
Hello
I am a bit confused now as to how your topology is set up, Can you post a diagram and running config of your switches please
res
Paul
Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.
Kind Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2015 07:24 AM
The connection is just between 2 switches.
Below configuration indicated the network advertises the route to each other from both switches. Does static route is required?
SW1(config)#router ospf 1
SW1(config-router)#network 172.21.3.0 0.0.0.255 area 2
SW1(config-router)#network 1.1.1.0 0.0.0.255 area 2
SW1(config-router)#network 10.1.3.0 0.0.0.255 area 2
SW2(config)#router ospf 1
SW2(config-router)#network 172.21.6.0 0.0.0.255 area 2
SW2(config-router)#network 2.2.2.0 0.0.0.255 area 2
SW2(config-router)#network 172.21.3.0 0.0.0.255 area 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2015 07:32 AM
No, you should not need a static route if OSPF is running and exchanging routes properly.
Are you saying it is not working ?
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2015 07:34 AM
Yes. It is not working until I added in the static route. I wonder how come like that..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2015 07:41 AM
Can you draw a quick diagram showing the IPs of the switch connections and where the PCs are ?
What do the routing tables look like on each switch ?
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2015 09:14 PM
set the mtu back to default 1500 (on both routers)
interface xxx
no ip mtu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2015 11:54 PM
Please refer to the attached diagram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2015 12:16 AM
Please refer to below:
SW1 (Cisco)
-------
Switch#sh ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 10)
Router Link States (Area 2)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 357 0x80000003 0x000D20 3
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 1.1.1.1 467 0x80000001 0x00BFE5 10
Switch#sh ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Vl506 10 2 172.21.3.1/24 1 BDR 0/1
Fa0/2 10 2 10.1.3.253/24 1 DR 0/0
Lo0 10 2 1.1.1.1/32 1 LOOP 0/0
Switch#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 128 EXCHANGE/DR 00:00:39 172.21.3.2 Vlan506
Switch#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 172.21.3.2
172.21.0.0/24 is subnetted, 1 subnets
C 172.21.3.0 is directly connected, Vlan506
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.3.0 is directly connected, FastEthernet0/2
Sw2 (Juniper)
-------
root> show ospf database
OSPF database, Area 0.0.0.2
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *2.2.2.2 2.2.2.2 0x80000008 838 0x22 0xb896 72
root> show ospf interface
Interface State Area DR ID BDR ID Nbrs
lo0.0 DR 0.0.0.2 2.2.2.2 0.0.0.0 0
vlan.0 DR 0.0.0.2 2.2.2.2 1.1.1.1 1
vlan.702 DR 0.0.0.2 2.2.2.2 0.0.0.0 0
root> show ospf neighbor
Address Interface State ID Pri Dead
172.21.3.1 vlan.0 ExStart 1.1.1.1 1 36
root> show route
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2.2.2.0/24 *[Direct/0] 00:16:35
> via lo0.0
2.2.2.2/32 *[Local/0] 00:16:35
Local via lo0.0
172.21.3.0/24 *[Direct/0] 00:16:29
> via vlan.0
172.21.3.2/32 *[Local/0] 00:16:35
Local via vlan.0
172.21.6.0/24 *[Direct/0] 00:16:23
> via vlan.702
172.21.6.254/32 *[Local/0] 00:16:34
Local via vlan.702
224.0.0.5/32 *[OSPF/10] 00:16:40, metric 1
MultiRecv
224.0.0.22/32 *[IGMP/0] 00:16:39
MultiRecv
Traceroute from user pC
C:\Users\admin>ping 172.21.6.254
Pinging 172.21.6.254 with 32 bytes of data:
Reply from 172.21.6.254: bytes=32 time=1ms TTL=64
Ping statistics for 172.21.6.254:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
Control-C
^C
C:\Users\admin>tracert -d 172.21.3.1
Tracing route to 172.21.3.1 over a maximum of 30 hops
1 1 ms 3 ms 1 ms 172.21.6.254
2 * *
