0% found this document useful (0 votes)
37 views37 pages

Lecture 4

The document discusses IP addressing and basic network concepts. It defines IP addresses, subnets, default gateways, routers, workstations, switches, repeaters and hubs. It also provides examples of common network commands like ipconfig, ping, tracert and nslookup.

Uploaded by

sohail75kotb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views37 pages

Lecture 4

The document discusses IP addressing and basic network concepts. It defines IP addresses, subnets, default gateways, routers, workstations, switches, repeaters and hubs. It also provides examples of common network commands like ipconfig, ping, tracert and nslookup.

Uploaded by

sohail75kotb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Computer Network

Lecture 4
Introduction

• IP address
• An IP address is a unique network layer
numbering system that end systems use in
order to identify and communicate with each
other. It is a dotted decimal notation with four
numbers ranging from 0 to 255 separated by
periods. The numbers currently used in IP
addresses range from 1.0.0.0 to 255. 255. 255.
255, though some of these values are reserved
for specific purposes.
Introduction
• A Subnet
• A subnet (short for "subnetwork") is an
identifiably separate part of an organization's
network. Typically, a subnet may represent all
the machines at one geographic location, in one
building, or on the same local area network
(LAN).
• Having an organization's network divided into
subnets allows it to be connected to the Internet
with a single shared network address.
Introduction
Subnet
• Without subnets, an organization could get multiple
connections to the Internet, one for each of its
physically separate subnetworks, but this would require
an unnecessary use of the limited number of network
numbers the Internet has to assign.
• It would also require that Internet routing tables on
gateways outside the organization would need to know
about and have to manage routing that could and
should be handled within an organization.
Introduction
• A default gateway
• is a node on a computer network that serves as an access device to
another network. The default gateway address is usually an
interface belonging to the LAN’s border router
• Routers
• A router is a network device that forwards network traffic
along optimized paths.
• Router uses networks protocols (set of network rules, and
algorithms) to connect different network segments. A router
allows users in a network to share a single connection to the
Internet or a WAN.
Introduction
• Workstations
• This is a computer that is directly used by someone to do work
(or have fun). A workstation often acts as a server when file or
printer sharing is enabled. Workstations usually run Windows 95,
98, ME, NT Workstation, 2000 Professional, or XP, Mac OS, and
rarely Linux (NOT Windows NT Server, Windows 2000 Server,
Unix, or Novel).
• Switches
• a device that filters and forwards packets between LAN segments.
Switches operate at the data link layer (layer 2) and sometimes
the network layer (layer 3) of the OSI Reference Model and
therefore support any packet protocol. LANs that use switches to
join segments are called switched LANs or, in the case of Ethernet
networks, switched Ethernet LANs
Introduction
• Repeater
• Functioning at Physical Layer. A
repeater is an electronic device that
receives a signal and retransmits it at a
higher level and/or higher power, or onto
the other side of an obstruction, so that
the signal can cover longer distances.
Repeater have two ports ,so cannot be
use to connect for more than two devices
Introduction
• Hub
• An Ethernet hub, active hub, network hub,
repeater hub, hub or concentrator is a device
for connecting multiple twisted pair or fiber
optic Ethernet devices together and making
them act as a single network segment
• Hubs work at the physical layer (layer 1) of
the OSI model.
Basic network command
and Network configuration commands

This commands includes


• Configuring the Router commands
• General Commands to configure network
• Privileged Mode commands of a router
• Router Processes & Statistics
• IP Commands
• Other IP Commands e.g. show ip route etc.
IPCONFIG

• ipconfig
Is used to find out your current TCP/IP settings. With IPCONFIG you
can find out your IP Address, find your Default Gateway and find your
Subnet Mask. This is a very handy network tool for finding your local
IP address.
• ipconfig /all
To display all your IP information for all adapters. With ipconfig /all
you can also find out your DNS Server and MAC Address. This will
show your full TCP/IP configuration for all adapters on your Windows
machine.
You can find out your own IP Address as well as your default gateway
(router).

ipconfig /release
To release your current IP information and obtain a new IP Address
from the DHCP server.
IPCONFIG
• ipconfig /renew
Used to renew your IP Address if you have it set to obtain IP Address
automatically.

ipconfig /displaydns
This shows your current DNS Resolver Cache Logs.
Hint.
• The DNS translates Internet domain and host names to IP addresses.
DNS automatically converts the names we type in our Web browser
address bar to the IP addresses of Web servers hosting those sites.
• DNS implements a distributed database to store this name and
address information for all public hosts on the Internet. DNS
assumes IP addresses do not change (are statically assigned rather
than dynamically assigned).
IPCONFIG
• ipconfig /flushdns
This flushes or clears your current DNS Resolver Cache
Logs.

ipconfig /registerdns
The register DNS command updates the DNS settings on the
Windows computer. It doesn't just access the local DNS cache, it
initiates communication with the DNS server and the DHCP
server so it can re-register the network address. You can use this
for troubleshooting problems with connection to the ISP (Internet
Service Provider), like failing to obtain a dynamic IP address from
the DHCP Server or failing to connect to the ISP DNS server.

Ping
• PING (Packet INternet Groper) command is the best way to
test connectivity between two nodes. Whether it is Local Area
Network (LAN) or Wide Area Network (WAN). Ping use
ICMP (Internet Control Message Protocol) to communicate to
other devices. You can ping host name of ip address using
below command.
Ping
1. Ping the host to see if its alive
ping google.com
2. Increase or Decrease the Time Interval Between Packets
• Increase Ping Time Interval
Example: Wait for 5 seconds before sending the next
packet.
• ping -i 5 google.com
Ping
• Decrease Ping Time Interval
Example: Wait 0.1 seconds before sending the next
packet.
• ping -i 0.1 google.com
3. Send N packets and stop
ping -c 4 google.com
4. Change Ping Packet Size
• Example: Change the default packet size from 56 to 100.
• ping -s 100 localhost
Ping
5. Timeout
The following example will ping for 5 seconds. i.e ping
command will exit after 5 seconds irrespective of how many
packets are sent or received.
• ping -w 5 localhost
6. Specify path for ping to send the packet
• You can also specify through which path the ping should
send the packet to destination.
• ping 192.168.3.33 192.168.7.1 192.168.4.45
tracert
• tracert site.com
With Trace route you can trace the path your packets take
across the internet from you to your destination. Along
the way you can determine the time from hop to hop. You
can identify server problems and latency with this tool. It
really helps see where the failure is between you and a
destination.
nslookup
• nslookup site.com
nslookup xxx.xxx.xxx.xxx
nslookup is a way to get the IP address for a domain name. You
can also do a reverse lookup from Domain Name to IP
Address. It can be a way to find out if your DNS is properly
working or if the site is having problems. You can obtain an IP
from a site and try to visit the IP directly, bypassing the
Domain Name Servers that would usually resolve the Domain
name to IP name.
pathping
netstat
• netstat can be used to view your active network
connections and TCP/IP connections. You can determine
what ports are open and being used, what programs are
using your ports and what kind of TCP and UDP
connections are present. Looking in here for the first time
may scare the hell out of you.

netstat Switches
netstat -a Displays all active TCP connections. And TCP /
UDP ports.
netstat -e Displays ethernet statistics.
netstat -b Displays all active programs that are listening.
Introduction to IP addressing:
• Each Network Interface Card (NIC or Network card) present in
a PC is assigned one Network address called as IP address [or
Network address]. This IP address is assigned by the
administrator of the network. No two PCs can have the same
IP address.
• A MAC (Media Access Control) address is a number that
identifies the network adapter(s) installed on your computer.
The address is composed of up to 6 pairs of characters,
separated by colons. You may need to provide your MAC
address to a router in order to successfully connect to a
network.
Introduction to IP addressing:
• The network prefix identifies a network and the host number
identifies a specific host (actually, interface on the network).
Introduction to IP addressing:
Rules of IPv4 addressing
1. Format of IP address
• IPv4 is made up of four parts, in the pattern as w.x.y.z. Each part
has 8 binary bits and the values in decimal can range from 0 to
255.
2. IP address classes
• IP addresses are divided into different classes. These classes
determine the maximum number of hosts per network ID. Only
three classes are actually used for network connectivity. The
following table lists all of the address class.
Rules of IPv4 addressing
Rules of IPv4 addressing
3. Grouping of IP addresses into different classes.

a. Class A, B, C, D, E
b. Class A: first bit in w is 0 and others can be
anything
-i. 0.0.0.0 to 127.255.255.255
• ii. First bits are used for network part and the
remaining for host part.
c. Class B: First bit in w is 1 and second bit is 0.
Rules of IPv4 addressing
• i. 128.0.0.0 to 191.255.255.255
• ii. First 16 bits for network part and remaining host part
d. Class C: first bit in w is 1, second bit in w is 1 and third bit is 0
• i. 192.0.0.0 to 223.255.255.255
• ii. First 24 bits for network part and last 8 bits for host part.
Rules of IPv4 addressing
e. Class D: first, second, third bits in w are 1 and fourth bit is 0;
used for multicast.

i. 224.0.0.0 to 247.255.255.255
f. Class E: future use or experimental purposes.
Rules of IPv4 addressing
4. Default Subnet mask
• it is used to identify the network part from the host part. Put
binary one for the parts that represent network part and zero
for the part that represent host part.
a. Class A: 255.0.0.0
b. Class B: 255.255.0.0
c. Class C: 255.255.255.0
d. We can’t have mix of 1s and 0s in subnet mask. Only
consecutive 1s is followed by consecutive 0s
Invalid IP address.
a. If the network part is all 0s, the address belongs to class A. But
this is an invalid ip address because for an ip address all the
network or host part should not be all 1s or all 0s.
• i. 0.0.0.0 is not valid. Routers use it internally.
b. If the network part is all 1s, this address belongs to class E. But
due to presence of all 1s, it is not valid. This represent broadcast
to all networks.
• i. 255.255.255.255 is not valid.
Invalid IP address.
c. If the host part is all 0s, this represents network address. This is
not a valid ip address.
d. If the host part is all 1s, this represents broadcast address. This
is not a valid ip address.
e. We can’t use the ip address represented within private address
range as part of public ip address.
• i. Class A: 10.0.0.0 to 10.255.255.255
Invalid IP address.
ii. Class B: 172.16.0.0 to 172.31.255.255
iii. Class C: 192.168.0.0 to 192.168.255.255
f. 127.0.0.0 network address is used for loop-back testing. This
will help you to check the network card of your own PC
[localhost].
g. The validity of the IP address is also based on the subnet mask
used provided.
Number of hosts/networks per
classes
Examples
1. prove that we have 2,147,483,648 addresses in class A?
• In class A, only 1 bit defines the class.
• The remaining 31 bits are available
• for the address. With 31 bits,
• we can have 2 POWER 31or 2,147,483,648 addresses.
2. Find the class of the address:
• 11000001 10000011 00011011 11111111
• The first 2 bits are 1; the third bit is 0.
• This is a class C address.
Examples
3. Find the class of the address:
• 227.12.14.87
• The first byte is 227 (between 224 and 239); the class is D. or
227=11100011, the first 4 bit 1110 is class |D
Examples
• Given the address 23.56.7.91 and the default class A mask,
find the beginning address (network address).
• The default mask is 255.0.0.0, which means
• that only the first byte is preserved
• and the other 3 bytes are set to 0s.
• The network address is 23.0.0.0.
Examples
• Given the address 132.6.17.85 and the default class B mask,
find the beginning address (network address).
• Solution
• The default mask is 255.255.0.0, which means
• that the first 2 bytes are preserved
• and the other 2 bytes are set to 0s.
• The network address is 132.6.0.0.

You might also like