Interface

ip address <ip> <mask>

Assign an IPv4 address. Use dotted-decimal mask, not prefix length.

Works on: Router, Firewall, SwitchMode: iface

Example

R1(config-if)# ip address 10.0.0.1 255.255.255.0
Watch out

On a switch, put the address on an SVI (interface vlan 1) — that is the switch's own management address.

Run this command live

Don't just read it — type ip address <ip> <mask> in a real network simulator in your browser and watch it take effect. No install, no account needed to start.

Open the lab

Frequently asked

What does the "ip address <ip> <mask>" command do?

Assign an IPv4 address. Use dotted-decimal mask, not prefix length.

What's the common gotcha with "ip address <ip> <mask>"?

On a switch, put the address on an SVI (interface vlan 1) — that is the switch's own management address.

Example of "ip address <ip> <mask>"

R1(config-if)# ip address 10.0.0.1 255.255.255.0

More Interface commands

← Back to the full command reference

ip address <ip> <mask> — network CLI command reference · NetForge-AI