How to Configuring an IP Address on Router Interface
You don't have to use IP on your routers; however, IP is typically used on all routers. To configure IP addresses on an interface.
1. Configure the Ethernet 0 interface with the IP address of 172.16.10.2/24.
Router(config-if)#ip address 172.16.10.2 255.255.255.0
Router(config-if)#no shutdown
Notice to turn on an interface with the no shut command. Remember to look at the command
show interface e0, for example, which will show you if it administratively shut down or not.
Show running-config will also show you if the interface is shut down.
2. If you want to add a second subnet address to an interface, then you must use the
secondary command. If you type another IP address and press enter, it will replace the
existing IP address and mask. To add a secondary IP address, use the secondary
command.
Router(config-if)#ip address 172.16.20.2 255.255.255.0 secondary
Router(config-if)#^Z
You can verify both addresses are configured on the interface with the show runningconfig
command (sh run for short).
Router#sh run
Building configuration...
Current configuration:
[output cut]
!
interface Ethernet0
ip address 172.16.20.2 255.255.255.0 secondary
ip address 172.16.10.2 255.255.255.0
!
0 comments:
Post a Comment
Please do not enter any spam link in the comment box.