Hone

Lessons · Network switches · making it reachable

The four things that make a switch reachable

An address on a VLAN interface, a default gateway, a port in that VLAN that is up, and a saved configuration. Miss any one and it is a console-only box.

Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.

What it is for

'I configured the IP and I still cannot ping it' is almost always one of the other three, and going through them in order is faster than guessing.

How to think about it

Address, gateway, path, save. Check them in that order every time, because each one is meaningless without the one before it.

Worked example

enable
The # prompt.
configure terminal
Into configuration mode.
hostname IDF4
Name it first, so you know which box you are on.
interface vlan 1
One: the management interface.
ip address 10.20.0.9 255.255.255.0
An address on the management network.
exit
Out of the interface.
ip default-gateway 10.20.0.1
Two: replies from other subnets have a way home.
interface gi0/1
Three: a port in that VLAN, for the cable to the rest of the network.
switchport mode access
Access.
switchport access vlan 1
In the management VLAN.
no shutdown
And up.
end
Out.
show ip interface brief
Vlan1 has the address and Gi0/1 is not administratively down. That is the path.
write memory
Four. Without this the whole thing is gone at the next power cut.

Your turn

Make sure the port is not administratively down.

no 

The trap

Configuring all of it on a switch whose only cable is in a different VLAN. The address is correct, the gateway is correct, and there is still no path to either.

Practise making it reachable on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.