Upload
majid-shaikh
View
1
Download
0
Embed Size (px)
Citation preview
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
Th e first byte de fin e s th e c lass .a . Class Ab. Class Dc . Class Ed. Class Be . Class C
Class C: Total Number of bits for Host ID is 8
So Number of Host Ids per Network ID is28-2=254
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.
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
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
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
● 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
● 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.
● 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)
● 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.