1st & 2nd CN Practical

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

SYIT PRACTICAL COMPUTER NETWORK

PRACTICAL NO 1A
An address in a block is given as 180.8.17.9. Find the number of addresses in
the block, the first address, and the last address

Solution :
The given address is a Class B address therefore n= 16

1) No of addresses:
N = 232-n
= 232-16
= 216
= 65536
Therefore the number of addresses are = 65536 addresses

2) First address:
For class B address netid = 16
Therefore network mask is 255.255.0.0
To find the first address we logically AND the given address with the
network mask

Given 180 8 17 9
address
Network 255 255 0 0
mask
AND 180 8 0 0
operation

Therefore the first address is 180.8.0.0

3) Last address:
To find the last address we logically OR the given address with the
COMPLEMENT of the network mask
Network mask = 255.255.0.0

ISMAIL H P Page 1
SYIT PRACTICAL COMPUTER NETWORK

Network 255 255 0 0


mask
Complement 0 0 255 255
of mask

Given address 180 8 17 9


Complement of 0 0 255 255
mask
OR operation 180 8 255 255

Therefore the last address is 180.8.255.255

ISMAIL H P Page 2
SYIT PRACTICAL COMPUTER NETWORK

PRACTICAL NO 1B
An organization is granted the block 130.34.12.64/26. The organization needs
four sub networks, each with an equal number of hosts. Design the sub
networks and find the information about each network.

Solution :
The given address is address of type classless addressing
with n= 26
1) No of addresses:

N = 232-n
= 232-26
= 26
= 64
Therefore the number of addresses are = 64 addresses

2) First address:

For the given case n = 26


Therefore network mask is 255.255.255.192
To find the first address we logically AND the given
address with the network mask

Given 130 34 12 64
address
Network 255 255 255 192
mask
AND 130 34 12 64
operation
Therefore the first address is 130.34.12.64

3) Creating sub-networks:
In this case we need to create 4 sub-networks with equal number of
hosts
Total number of hosts N = 64
Therefore number of hosts in each sub-network NSUB = 16

ISMAIL H P Page 3
SYIT PRACTICAL COMPUTER NETWORK

We calculate the sub-netid for each network as follows


nSUB= n + log2(N/ NSUB)
= 26 + log2(64/16)
= 28

Therefore the given sub-networks are

Sub-network First address Last address

1 130.34.12.64 130.34.12.79

2 130.34.12.80 130.34.12.95

3 130.34.12.96 130.34.12.111

4 130.34.12.112 130.34.12.127

ISMAIL H P Page 4
SYIT PRACTICAL COMPUTER NETWORK

PRACTICAL NO 2
Static Routing
Static Route
1. Static routing method is most trusted by a router.
2. Static routing is not really a routing protocol.
3. Static routes do not dynamically adapt to network changes, are not
particularly scalable, and require manual updating to reflect changes.

Static routing has the following advantages


1. There is no bandwidth usage between routers, which means you could
possibly save money on WAN links.
2. There is no overhead on the router CPU, which means you could possibly
buy a cheaper router than you would use if you were using dynamic routing.
3. It adds security because the administrator can choose to allow routing
access to certain networks only.

Static routing has the following disadvantages


1. Static routes don’t dynamically adapt to network change.
2. If a network is added to the internetwork, the administrator has to add a
route to it on all routers—by hand.
3. It’s not feasible in large networks because maintaining it would be a full-
time job in itself.
4. With static routing, as your network grows, it can be difficult just keep
adding static routes makes sure everybody can still get everything.
5. The administrator must really understand the internetwork and how each
router is connected in order to configure routes correctly.

There are two different styles to configure an “ip route” command:


1. Using a next hop IP address
2. Using an outgoing interface

ISMAIL H P Page 5
SYIT PRACTICAL COMPUTER NETWORK

Consider the following network

We configure it as follows

Step 1: (configure PC 0)

ISMAIL H P Page 6
SYIT PRACTICAL COMPUTER NETWORK

Step 2: (configure PC 1)

Step 3: (configure Router 0)

ISMAIL H P Page 7
SYIT PRACTICAL COMPUTER NETWORK

Step 4: (configure Router 1)

ISMAIL H P Page 8
SYIT PRACTICAL COMPUTER NETWORK

The routing table is configured in the following way

For router 0

ISMAIL H P Page 9
SYIT PRACTICAL COMPUTER NETWORK

For router 1

Now we can give the ping command as shown to check the connectivity

So static routing has been studied

ISMAIL H P Page 10

You might also like