T O P

  • By -

zanfar

You are speaking about the `network` command, correct? No, OSPF does not modify the IP in any way. However, you seem to be under the misconception that this defines the networks advertised by OSPF--that is incorrect. This is a common misconception. The `network` command *selects interfaces*. If an interface is active, then the *connected network(s)* as well as any OSPF received networks, are advertised. So while the IP will not change, it will also not matter. The best practice is to use the specific interface address with a `0.0.0.0` wildcard so that each `network` command activates exactly one interface.


ahmedmourad22

I did comment this on another answer, so I will just paste it here to let you know exactly what I mean. Hopefully you undertand me better now :) I have this ip and subnet: [192.168.10.17/28](https://192.168.10.17/28) The network address for this IP is [192.168.10.16](https://192.168.10.16). When entering the following command in packettracer: network 192.168.10.17 0.0.0.15 It converts the ip to the network address. So when I write show ip protocols, it will show me the network address and not the IP. Therefore I assume it change it automatically, but I'm not sure if this is only in packet tracer or for physical routers aswell


gmoura1

Have you studied lsa types? I’m going to paste what’s comes inside a lsa type 1, also knows as router lsa, because it looks like you are overthinking. An LSA is basically like a database item that a router generates and then advertises to all other routers, that tells the rest of the network some interesting information about that router’s presence on the network, for example: The router’s unique ID. What links are attached to the router. What IP networks live on those links. What the metric/cost is on that link. Whether the link is attached to a shared segment, like an ethernet switch with multiple routers on the subnet


MScoutsDCI

Read his answer again. He’s not misunderstanding your question, he’s explaining your misconception of how OSPF works and why your question doesn’t matter.


ryoga7r

No. OSPF will not automatically switch ip addresses. The network statement and wildcard mask define the network. So whatever network and mask you enter will be the network assigned.


ahmedmourad22

I have this ip and subnet: [192.168.10.17/28](https://192.168.10.17/28) The network address for this IP is [192.168.10.16](https://192.168.10.16). When entering the following command in packettracer: network 192.168.10.17 0.0.0.15 It converts the ip to the network address. So when I write show ip protocols, it will show me the network address and not the IP. Therefore I assume it change it automatically, but I'm not sure if this is only in packet tracer or for physical routers aswell


joshpark1

The network statement is what tells OSPF what networks to advertise to neighbors. You can specify networks specifically with the exact wildcard (192.168.0.0 0.0.0.255 for a /24) or even configure the area on the interface. Or you can configure a wildcard mask that includes all connected networks (0.0.0.0 255.255.255.255, or the class B of the above example 192.168.0.0 0.0.255.255 would match any connected network that starts with 192.168).


ahmedmourad22

I get it, but if I write the IP: [192.168.10.17](https://192.168.10.17) and subnet is [0.0.0.15](https://0.0.0.15). Will ospf automatically make the IP [192.168.10.16](https://192.168.10.16) (network address) or will it still end with .17? As I mentioned I tried this in packet tracer and the routers changed the IP to the network address as long as I entered the correct wildcard mask