cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2858
Views
5
Helpful
2
Replies

OSPF AND DHCP

Sanjay916
Level 1
Level 1

Hello, I am trying to solve this network. I have 3 routers which is R0, R1, and R2, and 3 switches and 3 PC. R1 one is hosting a dhcp that is giving ip address to all 3 PC. The routing protocol that I am using is OSPF. I cannot get my ospf routing to work. I am not sure what I am doing wrong. These are all my config script and also included a screenshot of the topology. Please help. 

 

OSPF AND DHCP CONFIGURATIONS

ROUTER0
G0/0:195.165.85.17 255.255.255.252
G0/1: 195.165.85.254 255.255.255.224

ROUTER1
G0/0:195.165.85.18 255.255.255.252
G0/1: 195.165.85.21 255.255.255.252
G0/2: 195.165.85.94 255.255.255.224

ROUTER2
G0/0:195.165.85.22 255.255.255.252
G0/1: 195.165.85.126 255.255.255.224


OSPF CONFIG

 

ROUTER0
Router ospf 1
network 195.165.85.20 0.0.0.3 area 0
network 195.165.85.64 0.0.0.31 area 0
network 195.165.85.96 0.0.0.31 area 0

 

ROUTER1
Router ospf 1
network 195.165.85.96 0.0.0.31 area 0
network 195.165.85.224 0.0.0.31 area 0

ROUTER2
Router ospf 1
network 195.165.85.16 0.0.0.3 area 0
network 195.165.85.64 0.0.0.31 area 0
network 195.165.85.21 0.0.0.31 area 0

 


ROUTER0 DHCP CONFIG

ip dhcp pool net32
network 195.165.85.224 255.255.255.224
default-router 195.165.85.254
ip dhcp pool net64
network 195.165.85.64 255.255.255.224
default-router 195.165.85.94
ip dhcp pool net96
network 195.165.85.96 255.255.255.224
default-router 195.165.85.126


ip dhcp excluded-address 195.165.85.254
ip dhcp excluded-address 195.165.85.94
ip dhcp excluded-address 195.165.85.126

 

1 Accepted Solution

Accepted Solutions

Tyson Joachims
Spotlight
Spotlight

The issue lies in your OSPF statements on each router. When you enter the "network" command, you need to be specifying networks that are on that same router that you both

1. Want to advertise to other OSPF speaking routers

2. Encompass the IP address of the interface IP address that you want to connect to other OSPF routers and create OSPF neighbor relationships. For example, if you want Router0 to form an OSPF neighbor relationship with directly connected Router1, then you must have a network statement using the subnet (195.165.85.16/30) that both directly connected interfaces use (R0=195.165.85.17, R1=195.165.85.18)

Here's what you actually want on each router:

Router0

router ospf 1
 passive-interface GigabitEthernet0/1
 network 195.165.85.16 0.0.0.3 area 0
 network 195.165.85.224 0.0.0.31 area 0

Router1

router ospf 1
 passive-interface GigabitEthernet0/2
 network 195.165.85.16 0.0.0.3 area 0
 network 195.165.85.20 0.0.0.3 area 0
 network 195.165.85.65 0.0.0.31 area 0

Router3

router ospf 1
 passive-interface G0/1
 network 195.165.85.20 0.0.0.3 area 0
 network 195.165.85.96 0.0.0.31 area 0

Notice that we are using the networks of the directly connected links between routers in our OSPF commands. This is because we want to form OSPF neighborships between them to exchange route information. You can always verify that you've typed your network commands correctly by performing the following command:

show ip ospf interface brief

That will list all the interfaces that are a member of the OSPF process and thus if you have an OSPF speaking router attached to it, will be able to form neighborship with them.

View solution in original post

2 Replies 2

Tyson Joachims
Spotlight
Spotlight

The issue lies in your OSPF statements on each router. When you enter the "network" command, you need to be specifying networks that are on that same router that you both

1. Want to advertise to other OSPF speaking routers

2. Encompass the IP address of the interface IP address that you want to connect to other OSPF routers and create OSPF neighbor relationships. For example, if you want Router0 to form an OSPF neighbor relationship with directly connected Router1, then you must have a network statement using the subnet (195.165.85.16/30) that both directly connected interfaces use (R0=195.165.85.17, R1=195.165.85.18)

Here's what you actually want on each router:

Router0

router ospf 1
 passive-interface GigabitEthernet0/1
 network 195.165.85.16 0.0.0.3 area 0
 network 195.165.85.224 0.0.0.31 area 0

Router1

router ospf 1
 passive-interface GigabitEthernet0/2
 network 195.165.85.16 0.0.0.3 area 0
 network 195.165.85.20 0.0.0.3 area 0
 network 195.165.85.65 0.0.0.31 area 0

Router3

router ospf 1
 passive-interface G0/1
 network 195.165.85.20 0.0.0.3 area 0
 network 195.165.85.96 0.0.0.31 area 0

Notice that we are using the networks of the directly connected links between routers in our OSPF commands. This is because we want to form OSPF neighborships between them to exchange route information. You can always verify that you've typed your network commands correctly by performing the following command:

show ip ospf interface brief

That will list all the interfaces that are a member of the OSPF process and thus if you have an OSPF speaking router attached to it, will be able to form neighborship with them.

I have one more questions. I have another network. Similar to the pervious one. 3 routers, 3 computers and 3 switch. Router0 is hosting the dhcp and it is giving ip address to all PC's the protocol that i am using is eigrp. I notice that i cant get my 3rd to aquire an ip address. This the config script. I cant figure out what the problem is. 

 

ROUTER0
G0/0:195.165.85.9 255.255.255.252
G0/1:195.165.85.158 255.255.255.224

ROUTER1
G0/0:195.165.85.10 255.255.255.252
G0/1: 195.165.85.13 255.255.255.252
G0/2: 195.165.85.190 255.255.255.224
G0/2: ip helper-address 195.165.85.158

 

ROUTER2
G0/0:195.165.85.14 255.255.255.252
G0/1: 195.165.85.222 255.255.255.224
G0/1: ip helper-address 195.165.85.158


EIGRP 100 CONFIG

ROUTER0
Router eigrp 100
network 195.165.85.128 0.0.0.31
network 195.165.85.8 0.0.0.3


ROUTER1
Router eigrp 100
network 195.165.85.160 0.0.0.31
network 195.165.85.8 0.0.0.3
network 195.165.85.12 0.0.0.3

ROUTER2
Router eigrp 100
network 195.165.85.192 0.0.0.31
network 195.165.85.12 0.0.0.3


ROUTER0 DHCP CONFIG

ip dhcp pool net128
network 195.165.85.128 255.255.255.224
default-router 195.165.85.158
ip dhcp pool net160
network 195.165.85.160 255.255.255.224
default-router 195.165.85.190
ip dhcp pool net192
network 195.165.85.192 255.255.255.224
default-router 195.165.85.222


ip dhcp excluded-address 195.165.85.158
ip dhcp excluded-address 195.165.85.190
ip dhcp excluded-address 195.165.85.222