Professional Documents
Culture Documents
Diagnostic commands help you detect TCP/IP networking problems. Some of the diagnostic
commands are arp, hostname, ipconfig, netstat, ping, route, and tracert.
Syntax:
ipconfig[/all | /renew [adapter] | /release [adapter]]
Parameters:
all: Produces a full display. Without this switch, ipconfig displays only the IP address, subnet mask,
and default gateway values for each network card.
renew [adapter]:Renews DHCP configuration parameters. This option is available only on computers
running the DHCP Client service.
release [adapter]: Releases the current DHCP configuration. This option disables TCP/IP on the local
computer and is available only on DHCP clients.
3)tracert
This diagnostic utility determines the route taken to a destination by sending Internet Control
Message Protocol (ICMP) echo packets with varying time-to- live (TTL) values to the destination.
Each router along the path is required to decrement the TTL on a packet by at least 1 before
forwarding it, so the TTL is effectively a hop count.
When the TTL on a packet reaches 0, the router is supposed to send back an ICMP Time
Exceeded message to the source computer.
Syntax:
tracert[-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
Parametes:
-d : Specifies not to resolve addresses to host names.
-h maximum_hops : Specifies maximum number of hops to search for target.
-j host-list : Specifies loose source route along host-list.
-w timeout : Waits the number of milliseconds specified by timeout for each reply.
target_name : Name of the target host.
5)arp :-To displays current ARP entries by interrogating the current protocol data.
If inet_addr is specified, the IP and Physical addresses for only the specified computer are displayed.
If more than one network interface uses ARP, entries for each ARP table are displayed
Diagnostic commands help you detect TCP/IP networking problems. Some of the diagnostic
commands are arp, hostname, ipconfig, netstat, ping, route, and tracert.
This diagnostic command displays and modifies the IP-to- Ethernet or Token Ring physical address
translation tables used by the Address Resolution Protocol (ARP).
Syntax:
arp–a[inet_addr] [-N [if_addr]]
arp–dinet_addr [if_addr]
arp–sinet_addether_addr [if_addr]
Parameters:
-a : Displays current ARP entries by querying TCP/IP. If inet_addr is specified, only the IP and
physical addresses for the specified host are displayed.
-d : Deletes the entry specified by inet_addr.
-s : Adds an entry in the ARP cache to associate the IP address inet_addr with the physical
5.1)To Delete the host specified by inet_addr. inet_addr may be wildcarded with * to
delete all hosts arp -d
To check the output of above command, run
arp -a
Syntax:
route[-f] [command [destination] [MASK netmask] [gateway] [METRIC metric]]
Parameters:
-f: Clears the routing tables of all gateway entries. If this parameter is used in conjunction with
one of the commands, the tables are cleared prior to running the command.
command: Specifies one of four commands.
Command Purpose
Print Prints a route
Add Adds a route
Delete Deletes a route
Change Modifies an existing route
There are two different styles to configure static routing using an “ip route” command:
1. Using a next hop IP address
2. Using an outgoing interface
Syntax:
ip route [destination_network] [mask] [next_hop_address or exit_interface]
[administrative _ distance] [permanent]
We can break the above syntax:
ip route [destination_network] [mask] [next_hop_address]
ip route [destination_network] [mask] [exit_interface/next_hop_address]
Pc1)
PC2)
1)Router 0:
1)Router 0:
2)Router 1:
Configure Router R0
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#int fa 0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#int fa 0/1
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
Configure Router R1
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R2
R2(config)#int fa 0/0
R2(config-if)#ip address 10.0.0.2 255.0.0.0
R2(config-if)#no shut
R2(config)#int fa 0/1
R2(config-if)#ip address 30.0.0.1 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 30.0.0.0 255.0.0.0 10.0.0.2
R1(config)#^Z
Configure Static Route to router R1
Go to config mode, type ip route command, the subnet number, followed by the mask
, and next hop ip address.
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 20.0.0.0 255.0.0.0 10.0.0.1
R1(config)#^Z
1)Router 1:
Configure Router R1
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#int fa 0/1
R1(config-if)#ip address 172.16.0.1 255.255.0.0
R1(config-if)#no shut
R1(config-if)#int fa 1/0
R1(config-if)#ip address 192.168.0.1 255.255.255.0
R1(config-if)#no shut
R1(config)#int fa 0/0
R1(config-if)#ip address 100.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
Configure Router R2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R2
R2(config)#int fa 0/0
R2(config-if)#ip address 100.0.0.2 255.255.255.252
R2(config-if)#no shut
R2(config)#int fa 0/1
R2(config-if)#ip address 10.0.0.1 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 10.0.0.0 255.0.0.0 100.0.0.2
R1(config)#^Z
Note a static route added to the routing table. The character S means static route.
It references 10.0.0.0 subnet and it says to get there via100.0.0.2. via means that the next
hop router’s IP address.
PC>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PC>
However PC-1 can’t ping PC-3 right now, the ping fails.
PC>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Reply from 10.0.0.2: bytes=32 time=12ms TTL=126
PC>ping 192.168.0.2
Pinging 192.168.0.2 with 32 bytes of data:
Reply from 192.168.0.2: bytes=32 time=12ms TTL=126
Reply from 192.168.0.2: bytes=32 time=11ms TTL=126
Reply from 192.168.0.2: bytes=32 time=22ms TTL=126
Reply from 192.168.0.2: bytes=32 time=10ms TTL=126
Ping statistics for 192.168.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milliseconds:
Minimum = 10ms, Maximum = 22ms, Average = 13ms
PC>
We can reach 192.168.0.0 network.
Putting three IP addresses, subnet mask and default gateway to three PCs.
Configure Router R1
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#int fa 0/1
R1(config-if)#ip address 172.16.0.1 255.255.0.0
R1(config-if)#no shut
R1(config-if)#int fa 1/0
R1(config-if)#ip address 192.168.0.1 255.255.255.0
R1(config-if)#no shut
R1(config)#int fa 0/0
R1(config-if)#ip address 100.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
Configure Router R2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R2
R2(config)#int fa 0/0
R2(config-if)#ip address 100.0.0.2 255.255.255.252
R2(config-if)#no shut
R2(config)#int fa 0/1
R2(config-if)#ip address 10.0.0.1 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#
PC>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Reply from 10.0.0.2: bytes=32 time=12ms TTL=126
Reply from 10.0.0.2: bytes=32 time=13ms TTL=126
Reply from 10.0.0.2: bytes=32 time=12ms TTL=126
Reply from 10.0.0.2: bytes=32 time=20ms TTL=126
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milliseconds:
Minimum = 12ms, Maximum = 20ms, Average = 14ms
PC>
PC>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Reply from 10.0.0.2: bytes=32 time=12ms TTL=126
Reply from 10.0.0.2: bytes=32 time=14ms TTL=126
Reply from 10.0.0.2: bytes=32 time=24ms TTL=126
Reply from 10.0.0.2: bytes=32 time=11ms TTL=126
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milliseconds:
Minimum = 11ms, Maximum = 24ms, Average = 15ms
PC>
We can reach 10.0.0.0 network.
B) Configure RIP
add HWIC-2T for connection: [switch off->then add -> switch on]
ROUTER 0:
RIP ROUTING:
Pc configuration:
Pc 0:
Pc 1:
Router 0:
ROUTER CONFIGURATION:
ROUTER 0:
AIM:-CONFIGURING OSPF.
OSPF Commands
Define an interface on which OSPF runs and define the area ID for that interface
Syntax
Router(config-router)#network address <wildcard-mask>< area><area-id>
Configure loopback
Syntax
Router(config)#interface loopback number
DR/BDR election
Syntax
Router(config)#interface <interface>
Router(config-if)#ip ospf priority <0-255>
Modify bandwidth
Syntax
Router(config-if)#bandwidth kbps
You cannot see Process and router ID using the command show ip ospf interface .
Router#show ip ospf database
Router#debug ip ospf packet
Router#debug ip ospf hello
Router#debug ip ospf adj
Example:
Router#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.1.2 0 FULL/ - 00:00:38 192.168.1.2 Serial1/0
Router#
Neighbor ID: The neighbour ID that is the OSPF RID of the neighbour.
Pri: Short for “priority”, that’s the interface priority of the neighbour.
State: That’s the OSPF adjacency state and role of the router – DR, BDR, or DROTHER.
Dead Time: Time remaining until the adjacency is torn down. Receipt of a valid hello packet will reset
this timer.
Address: The IP address of the neighbour’s interface through which the adjacency has formed. It can be
same as the neighbour ID.
Interface: The interface through which the adjacency has formed.
Configure Router R1
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostR1
R1(config)#intf0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
Configure Router R2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostR2
R2(config)#intf0/0
R2(config-if)#ip add
R2(config-if)#ip address 192.168.1.2 255.255.255.252
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#
Router(config-if)#exit
Router(config)#router ospf 10
Router(config-router)#network 192.168.1.0 0.0.0.3 area 0
Router(config-if)#exit
Router(config)#router ospf 10
Router(config-router)#
00:30:46: %OSPF-5-ADJCHG: Process 10, Nbr 192.168.1.1 on FastEthernet0/0 from LOADING to
FULL, Loading Done
Router(config-router)#exit
Router(config)#exit
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Command Based:-
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown
Router(config)#interface FastEthernet0/1
Page | 59 Internet Technologies – Practical Manual
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
Configure Router R1
Router(config)#interface FastEthernet0/1
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
Router>enable
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router ospf 10
Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#exit
Router(config)#exit
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Router>enable
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#router ospf 10
Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
01:05:00: %OSPF-5-ADJCHG: Process 10, Nbr 192.168.2.1 on FastEthernet0/0 from LOADING to
FULL, Loading Done
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0
Router(config-router)#
Router(config-router)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Configure Router R0
Router>enable
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router ospf 10
Router(config-router)#network 20.0.0.0 0.255.255.255 area 1
Router(config-router)#
Router(config-router)#network 10.0.0.0 0.255.255.255 area 1
Router(config-router)#
Router(config-router)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Router>enable
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router ospf 10
Router(config-router)#network 20.0.0.0 0.255.255.255 area 1
Router(config-router)#
00:30:40: %OSPF-5-ADJCHG: Process 10, Nbr 20.0.0.1 on Serial0/0/0 from LOADING to FULL,
Loading Done
Router(config-router)#network 30.0.0.0 0.255.255.255 area 0
Router(config-router)#
00:33:38: %OSPF-5-ADJCHG: Process 10, Nbr 40.0.0.1 on Serial0/0/1 from LOADING to FULL,
Loading Done
Router(config-router)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Router>enable
Router#configure terminal
Router(config-if)#exit
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 40.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router ospf 10
Router(config-router)#network 30.0.0.0 0.255.255.255 area 0
Router(config-router)#
00:33:29: %OSPF-5-ADJCHG: Process 10, Nbr 30.0.0.1 on Serial0/0/0 from LOADING to FULL,
Loading Done
Router(config-router)#network 40.0.0.0 0.255.255.255 area 0
Router(config-router)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console
Router#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Router0->CLI
Router(dhcp-config)# exit
Desktop->IP Configuration select DHCP radio button and IP should be allocated dynamically.
Config->CLI
Desktop->IP Configuration
config->DHCP
Desktop->IP Configuration select DHCP radio button and IP should be allocated dynamically.
Enter a Domain Name in 'Name' field , add your Server IP Address in 'Address' field and
click add.
you can make changes in inedx.html file if you want. That's the file that will show up in on
DNS server
Give static IP address and Network mask and Default gateway of server1 in which we
configured DNS.
FTP :(File Transfer Protocol) is a protocol used to transfer files from client to server and
vice versa
2)Fa 0/1
Now we are ready to access ftp from PC0.Click PC0->Click on desktop tab->Click on
Command prompt and type the following command.
Telnet:
Configure router R1
Router>enable
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#int fa 0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#int fa 0/1
R1(config-if)#ip address 20.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
Configure router R2
R2(config)#line vty 0
R2(config-line)#login local
R2(config-line)#exit
R2(config)#username jatina password abc
R2(config)#line vty 0
R2(config-line)#enable password xyz
R2(config-line)# exit
PC>telnet 30.0.0.1
Desktop->IPConfiguartion
Desktop-> IP Configuration
Desktop->E mail
PC1->Desktop->E mail->Compose->send