- [Narrator] As you may already know,
switches base their forwarding decisions
on Mac addresses.
This means they build switching tables that associate
or match an incoming Mac address from a local host
to the port that traffic came in through.
You can display the Mac address table
by issuing the show Mac address table command.
I'm going to demonstrate that now.
Show
Mac
dash, I'm going to use the Tab key,
address table.
You can see from the output of this show command
that the switch has learned about one device
attached to the F0/1 port, that's west host two,
and its Mac address is displayed in the table.
That's the Mac address that is on the network card
of that host.
Hosts on a network, however, also need an IP address
so that they can send and receive packets
to remote networks.
Since a switch is considered a network host,
it should also be assigned an IP address.
That way we can manage the switch remotely and we can also
send and receive traffic to and from the switch.
IP addresses are assigned to a virtual LAN interface
on the switch, and Cisco switches
have one virtual LAN interface by default
and that's VLAN 1.
I'm going to do a show run.
You can see that the switch has interface VLAN 1,
currently it has no IP address and is shut down.
I'm going to go ahead and assign an IP address
to the switch.
I'm going to use the next usable address
from the 192_168_1.0 address space
with the 255255.0 mask.
Expand the window.
I'm going to type config from the terminal.
I'm going to go ahead and enter into my interface, VLAN 1.
I'm going to issue the IP address command
followed by the address of 192.168.1.2
with the 255.255.255.0.
I'm going to go ahead and issue my no shutdown command
to bring up that interface
and you can see I get a response that says that VLAN1
is now changed up.
I'll go ahead and exit.
Exit, CTRL+Z does the same thing.
Show run.
And you can see that interface VLAN 1 is now up
and has been assigned the IP address of 192 168 1.2.