Hello everybody!I have got a network with 20 PC.I want to use the OSPF with DHCP.
It sounds to me like your talking about a local area network. OSPF is a dynamic routing protocol. Unless you need to route different subnets dynamically you don't need OSPF. If you need a multi-path network on a layer 2 network (LAN) then you probably want the MESH feature not OSPF.
DHCP runs on a single layer 2 network (LAN) to configure the IP settings on devices and OSPF connects different layer 2 networks together through layer 3 networks dynamically. OSPF is also only helpful when you have a large number of routes needed for your network. If you only have a few LAN networks to connect then I'd recommend static routing rather then OSPF, static routing is no more complicated and you have fewer points of failure.
OSFP and DHCP don't really relate to one another in that either can exist without regard to the other... OSPF and DHCP relate to each other kind of like a GPS map (dynamic routing table) vs a paper map and apartment numbers (dynamic address) vs a house number.
As long as the address exists, regardless of how it is acquired (assigned by the government or by the landowner), you can find it.
Also, regardless of the nature of your routing table you can find the address... a paper map (static routing table) or a GPS (dynamic routing table)
I realize my analogy is not perfect but the point is that the two factors are routing and IP addressing. OSPF is a type of dynamic routing (ie maps connecting distant locations) and DHCP is a type of dynamic IP addressing (addressing within a subnet).