Ad space (banner)
📡Networking Lessons
Lesson 9 / 39

Assigning an IP Address with ip address

When you want to give a port an IP address it can communicate on, use ip address. It is used in interface configuration mode and assigns an IP address and subnet mask to the port.

The syntax is ip address ip-address subnet-mask — the address in a form like 192.168.1.1 and the mask like 255.255.255.0.

Running ip address 192.168.1.1 255.255.255.0 assigns 192.168.1.1 to the port, letting it communicate with devices on the same network.

A common stumble is a mistake in the subnet mask, which silently changes the range of addresses the port can reach. Check against your IP addressing plan.

In real work, this is a mandatory setting wherever a network device itself needs to communicate — router ports, layer-3 switch ports, management interfaces.

Networking
Try it (type this into the pseudo terminal)
ip address 192.168.1.1 255.255.255.0

🧑‍💻 You can type this command into the Networking pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)