cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2689
Views
0
Helpful
2
Replies

connecting two routers to the same switch

burnning_candle
Level 1
Level 1

Hi i have two routers connected to the same switch( layer2 or layer3) and i have run on both routers ospf protocols, but both the routers are unable to form adjacencies.

here are my configuration

Router 1

hostname Router1

ip dhcp excluded-address 88.240.12.89

!

ip dhcp pool acp1

network 88.240.12.88 255.255.255.248

default-router 88.240.12.89

interface FastEthernet0/0

no ip address

duplex auto

speed auto

!

interface FastEthernet0/0.10

encapsulation dot1Q 10

ip address 88.240.12.89 255.255.255.248

!

interface FastEthernet0/1

no ip address

duplex auto

speed auto

shutdown

!

interface Vlan1

no ip address

shutdown

!

router ospf 1

log-adjacency-changes

network 0.0.0.0 0.0.0.0 area 0

Router 2

hostname Router2

ip dhcp excluded-address 88.240.12.97

!

ip dhcp pool AP2

network 88.240.12.96 255.255.255.248

default-router 88.240.12.97

interface FastEthernet0/0

no ip address

duplex auto

speed auto

!

interface FastEthernet0/0.20

encapsulation dot1Q 20

ip address 88.240.12.97 255.255.255.248

!

interface FastEthernet0/1

no ip address

duplex auto

speed auto

shutdown

!

interface Vlan1

no ip address

shutdown

!

router ospf 1

log-adjacency-changes

network 0.0.0.0 0.0.0.0 area 0

Switch 

hostname Switch

ip routing

interface FastEthernet0/1

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface FastEthernet0/2

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface FastEthernet0/3

!

interface FastEthernet0/4

!

interface FastEthernet0/5

!

interface FastEthernet0/6

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

interface FastEthernet0/11

switchport access vlan 10

switchport mode access

!

interface FastEthernet0/12

switchport access vlan 20

switchport mode access

!

interface FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22

!

interface FastEthernet0/23

!

interface FastEthernet0/24

2 Replies 2

acampbell
VIP Alumni
VIP Alumni

Hi,

At layer 3 your 2 routers are in different subnets so they will NEVER form an adjacency.

Router 1

ip address 88.240.12.89 255.255.255.248
(So that is addresses 89 - 94)

Router 2

ip address 88.240.12.97 255.255.255.248
(So that is addresses 89 - 102)

The are both in different Vlans too
They need to be the same subnet & vlan

Regards
Alex

Regards, Alex. Please rate useful posts.

Hello

R1
ip route 0.0.0.0 0.0.0.0 88.240.12.94

R2
ip route 0.0.0.0 0.0.0.0 88.240.12.102

Switch
interface Vlan10
 ip address 88.240.12.94 255.255.255.248

interface Vlan20
 ip address 88.240.12.102 255.255.255.248

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
Review Cisco Networking products for a $25 gift card