27
Find the class of each address: a . 4.23.145.90 b. 227.34.78.7 c. 246.7.3.8 d. 129.6.8.4 e. 198.76.9.23

problemIP.pdf

Embed Size (px)

Citation preview

Page 1: problemIP.pdf

Find the class of each address:a . 4.23.145.90b. 227.34.78.7c. 246.7.3.8d. 129.6.8.4e. 198.76.9.23

Page 2: problemIP.pdf

Th e first byte de fin e s th e c lass .a . Class Ab. Class Dc . Class Ed. Class Be . Class C

Page 3: problemIP.pdf
Page 4: problemIP.pdf

Class C: Total Number of bits for Host ID is 8

So Number of Host Ids per Network ID is28-2=254

Page 5: problemIP.pdf

The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private internets (local networks):

10.0.0.0 - 10.255.255.255172.16.0.0 - 172.31.255.255192.168.0.0 – 192.168.255.255These addresses are private because they are not globally assigned, meaning they aren't allocated to a specific organization--instead, any organization needing private address space can use these addresses without needing approval from a regional Internet registry (RIR)connect to the Internet, it must use either a Network Address Translation (NAT) gateway, or a proxy server.

Page 6: problemIP.pdf
Page 7: problemIP.pdf

Find the net id and the host id for each address:a . 4.23.145.90b. 227.34.78.7c. 246.7.3.8d. 129.6.8.4e. 198.76.9.23

Page 8: problemIP.pdf

First find the class and then find the net id and host id.

a . Class A, net id: 4 host id: 23.145.90b. Class D, no host id or net idc. Class E . no host id or net idd. Class B. net id : 129.6 host id: 8.4e. ClassC, net id: 198.76.9 host id: 23

Page 9: problemIP.pdf
Page 10: problemIP.pdf

Let's break this into binary first:

11111111 11111111 11110000 00000000For a class b network, there are 16 bits available (the right 16 numbers). We see that 4 of those have been borrowed already (they have 1's) so we have 12 left.

The formula to find the maximum number of hosts is 212 - 2 (the 12 comes from the number above).

So, the answer is 4094.

255.255.240.0

Page 11: problemIP.pdf
Page 12: problemIP.pdf

● To display routing table type the following command at UNIX / Linux shell prompt:

● $ netstat -r -n ● OR

$ route -n ● If you are using Windows Server type

the following at a command prompt:c:> route print

Page 13: problemIP.pdf
Page 14: problemIP.pdf

● Flag G indicates path to route packets via a gateway

● Destination : The destination network or destination host.

● Gateway : The gateway address or ’*’ if none set.

● Genmask : The netmask for the destination net; 255.255.255.255 for a

host destination and 0.0.0.0 for the default route.

Page 15: problemIP.pdf

● Flags : Possible flags include – U (route is up) – H (target is a host) – G (use gateway) – R (reinstate route for dynamic routing) – D (dynamically installed by daemon or redirect) – M (modified from routing daemon or redirect) – A (installed by addrconf) – C (cache entry) – ! (reject route)

Page 16: problemIP.pdf

● Metric : The distance to the target (usually counted in hops). It is not used by recent kernels, but may be needed by routing daemons.

● Ref : Number of references to this route. (Not used in the Linux kernel.)

● Use : Count of lookups for the route. Depending on the use of -F and -C this will be either route cache misses (-F) or hits (-C).

● Iface : Interface to which packets for this route will be sent. ● MSS : Default maximum segment size for TCP connections over

this route. ● Window : Default window size for TCP connections over this

route. ● irtt : Initial RTT (Round Trip Time). The kernel uses this to guess

about the best TCP protocol parameters without waiting on (possibly slow) answers.

● HH (cached only) : The number of ARP entries and cached routes that refer to the hardware header cache for the cached route. This will be -1 if a hardware address is not needed for the interface of the cached route (e.g. lo).

● Arp (cached only) : Whether or not the hardware address for the cached route is up to date.

Page 17: problemIP.pdf
Page 18: problemIP.pdf
Page 19: problemIP.pdf
Page 20: problemIP.pdf
Page 21: problemIP.pdf
Page 22: problemIP.pdf
Page 23: problemIP.pdf
Page 24: problemIP.pdf
Page 25: problemIP.pdf
Page 26: problemIP.pdf
Page 27: problemIP.pdf