Unlike a switch, each physical interface of a router belongs to a different network and carries its own IP address. That address is what the connected hosts use as their gateway.
Key points
- One IPv4 address and a mask per interface.
- Optionally an IPv6 address on the same interface (dual stack).
- Always bring the interface up with no shutdown.
R1> enable
R1# configure terminal
R1(config)# interface gigabitEthernet 0/0
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# ipv6 address 2001:db8:acad:1::1/64
R1(config-if)# no shutdown
R1(config-if)# exit
R1# show ip interface brief
By default a router interface is administratively shut down: without no shutdown, nothing passes. The show ip interface brief command confirms the state, and what you want to see is up / up. In dual stack, IPv4 and IPv6 coexist on the same interface, which makes the move to IPv6 easier.
Key point: every router interface sits in its own network and acts as a gateway; never forget
no shutdown. See Lab 8 – Configuring router interfaces.