Friday, January 17, 2014

Assign IP in Router Interface

Assign IP in Router Interface on Cisco Packet Tracer

This tutorials is about to create a small network by assigning IP in Router Interface. Beside IP assigning in Router Interface, I change hostname of the router, assign IP in the PCs statically to create the network here.

At first create the following topology in Cisco Packet Tracer. You can add more PCs, even one more switch in this topology.


ip-assign-topology 

You can see in the topology, the Router is connected to the Switch with Straight Through cable in Interface Fastethernet 0/0 and from Switch end It's Interface Fastethernet 0/1. And the PC0 is connected to the switch with Interface Fastethernet 0/2, PC1 is Interface Fastethernet 0/3 and PC2 is Interface Fastethernet 0/4. We are going to assign the full network(full ip-range[0-255]) of 192.168.0.0 in this small network. You can see we assign 192.168.0.1 in the router Interface Fastethernet 0/0. And in PC0 - 192.168.0.10, in PC1 - 192.168.0.20 and in PC2 - 192.168.0.30. Now click on the router and go to CLI(Command Line Interface). Type the following commands to start.

Router#en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos
Router(config)#hostname vInfoSpot
vInfoSpot(config)#in
vInfoSpot(config)#interface fv
vInfoSpot(config)#interface fastEthernet 0/0
vInfoSpot(config-if)#ip address 192.168.0.1 255.255.255.0
vInfoSpot(config-if)#no shut

vInfoSpot(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

vInfoSpot(config-if)#exit
vInfoSpot(config)#


N.B. All the configure related tasks must be done in Configure mode.

Using above commands I assigned IP 192.168.0.1 with the subnet mask of 255.255.255.0 in Interface Fastethernet 0/0
If you like to add another switch in this network, that would be in Interface Fastethernet 0/1 from Router end. Then you've assign IP in Interface Fastethernet 0/1

Now assign IPs in Connected PCs. I assign Gateway in the PC IP Configuration. Gateway is that IP you assign in router interface the PC's are connected in. I assign 192.168.0.1 in Router Interface Fastethernet 0/0. So I've asign 192.168.0.1 as gateway in PCs. If you add another switch, That will be another network. So in that case you'll have to assign that Interface IP of Router as gateway in the PCs connected to that network.

IP Assign into PCs  

N.B. I use a Class C IP here. So subnet Mask will be 255.255.255.0 as common.

Now ping from one PC to another, to check If your configuration is OK or NOT.

Ping from One PC to Another

Thank you! :-)

1 comment:

  1. It was so nice article.I was really satisified by seeing this article and we are also giving CCNA CCNP online training.The ccna ccnp online training is one of the best ccna ccnp online training institute in worldwide.

    ReplyDelete