Table to help Subnetting

This table has the goal to make the manual subnet calculation more easy and fast. It gives us the number of bits necessary or the number of hosts depending on the needs.

Number of necessary bits for H 8 7 6 5 4 3 2 1
Number of Hosts 256 128 64 32 16 8 4 2 NA
Number of necessary Bits for N 1 2 3 4 5 6 7 8
Value of “Subnet Mask” 0 128 192 224 240 248 252 254 255
Number of Valid Networks 1 2 4 8 16 32 64 128 N/A

 

The Number of host is the total amount of hosts, valid and invalid.

e.g.:

We want to know the value of a subnet to host 10 machines.
To meet that aim our network administrator gives us the following network 192.168.1.0 to subnet.

Classical way is:

To host 10 machines we will need to use the following calculation formula: 2^n-2=10 being N the number of bits that we will need.

N=4

2^4-2 = 14

So to meet the goal our binary octet should look like this:

NNNNHHHH

4 Bits for Networking (N) and 4 bits for Hosts (H).

Our network would have a subnet mask of: 2^7+2^6+2^5+2^4=128+64+32+16=240

Numbers translated:

2^7 is the value of the firs N from left to right.

2^6 is the Value of the second N from left to right.

2^5 is the value of the Third N from left to right

2^4 is the value of the Fourth N from left to Right

Now Lets see how the table can make this faster:

First we need 10 hosts so it is necessary to search a value that is close to 10 but bigger.

So we see the value 16 Green also we could meet the number by searching the number of necessary bits 4.

Then we just go down in the column and check the values,  “Subnet Mask” 240  and the number of networks is 16.

Number of necessary bits for H 8 7 6 5 4 3 2 1
Number of Hosts 256 128 64 32 16 8 4 2 NA
Number of necessary bits for N 1 2 3 4 5 6 7 8
Value of “Subnet Mask” 0 128 192 224 240 248 252 254 255
Number of Subnets 1 2 4 8 16 32 64 128 N/A

 

Our network would be the 192.168.1.0 with the Mask 255.255.255.240 with the Network address of 192.168.1.0, first valid ip address 192.168.1.1 and the last valid ip address 192.168.1.14, the broadcast address will be the 192.168.1.15

Hope this helps everybody in their daily work.

Network Binding

Quando montamos um sistema as placas que colocamos neles tem uma determinada ordem de inicialização.
São inicializadas pela BIOS de acordo com os recuros e o slot PCI ou a “Lane” PCIe.
Existe uma numeração nos slots que vai de “zero” a x onde x é o ultimo slot, o “Zero” seria o primeiro slot a ser inicializado pela bios e o x o ultimo.

Actualmente com as placas de rede onboard acabamos por não saber “a menos que tenhamos acesso aos dados do fabricante” qual a ordem de inicialização. Este problema agrava-se quando instalamos outro componene qualquer que nos pode alterar esta ordem. No caso de aplicações que dependem de dessa ordem ou que ficam associadas a uma placa de rede ( firewalls ) pode ser problemático.

Apesar de na fase de instalação não podermos dominar qual a ordem usada podemos controla-la no sistema operativo. (podemos desabilitar um dos bindings com uma unattended instalation).

No sistema operativo windows XP ou 2000 basta apenas fazer o seguinte:

Start -> Run -> escrever ncpa.cpl
Menu opção avançadas -> Escolher a opção de Adaptadores e Bindings.

No windows 7

Painel de Controlo -> Network and Internet -> Network and Sharing Center -> Change Adapter Settings -> Opção Organize -» Layout -» Menu e agora que já estamos a ver o menu já podemos alterar os bindings escolhendo o Menu Avançado.

Isto vai permitir-nos escolher qual a placa de rede que vai ficar como principal no windows. Se tivermos mais que uma placa de rede ligadas á mesma rede significa que a primeira da lista será a que queremos que seja a principal, ela será a placa com a metrica mais baixa e por isso todos os pedidos de saida sairão por ela.

Podemos também escolher quais os serviços instalados para cada uma das placas e escolher outras opções mas dessas irei falar mais tarde…

Protocolos alem do 06 (TCP)

Aqui estão uma lista de protocolos alem do 06 só para matar a curiosidade.
E … Estão em decimal por isso há que fazer contas… 🙂

0 HOPOPT, IPv6 Hop-by-Hop Option.RFC 1883
1 ICMP, Internet Control Message Protocol.RFC 792
2 IGAP, IGMP for user Authentication Protocol.IGMP, Internet Group Management Protocol.RGMP, Router-port Group Management Protocol.

3 GGP, Gateway to Gateway Protocol.

4 IP in IP encapsulation.

5 ST, Internet Stream Protocol.

6 TCP, Transmission Control Protocol.

7 UCL, CBT.

8 EGP, Exterior Gateway Protocol.

9 IGRP, Interior Gateway Routing Protocol.

10 BBN RCC Monitoring.

11 NVP, Network Voice Protocol.

12 PUP.

13 ARGUS.

14 EMCON, Emission Control Protocol.

15 XNET, Cross Net Debugger.

16 Chaos.

17 UDP, User Datagram Protocol.

18 TMux, Transport Multiplexing Protocol.

19 DCN Measurement Subsystems.

20 HMP, Host Monitoring Protocol.

21 Packet Radio Measurement.

22 XEROX NS IDP.

23 Trunk-1.

24 Trunk-2.

25 Leaf-1.

26 Leaf-2.

27 RDP, Reliable Data Protocol.

28 IRTP, Internet Reliable Transaction Protocol.

29 ISO Transport Protocol Class 4.

30 NETBLT, Network Block Transfer.

31 MFE Network Services Protocol.

32 MERIT Internodal Protocol.

33 DCCP, Datagram Congestion Control Protocol.

34 Third Party Connect Protocol.

35 IDPR, Inter-Domain Policy Routing Protocol.

36 XTP, Xpress Transfer Protocol.

37 Datagram Delivery Protocol.

38 IDPR, Control Message Transport Protocol.

39 TP++ Transport Protocol.

40 IL Transport Protocol.

41 IPv6 over IPv4.

42 SDRP, Source Demand Routing Protocol.

43 IPv6 Routing header.

44 IPv6 Fragment header.

45 IDRP, Inter-Domain Routing Protocol.

46 RSVP, Reservation Protocol.

47 GRE, General Routing Encapsulation.

48 DSR, Dynamic Source Routing Protocol.

49 BNA.

50 ESP, Encapsulating Security Payload.

51 AH, Authentication Header.

52 I-NLSP, Integrated Net Layer Security TUBA.

53 SWIPE, IP with Encryption.

54 NARP, NBMA Address Resolution Protocol.

55 Minimal Encapsulation Protocol.

56 TLSP, Transport Layer Security Protocol using Kryptonet key management.

57 SKIP.

58 ICMPv6, Internet Control Message Protocol for IPv6.MLD, Multicast Listener Discovery.

59 IPv6 No Next Header.

60 IPv6 Destination Options.

61 Any host internal protocol.

62 CFTP.

63 Any local network.

64 SATNET and Backroom EXPAK.

65 Kryptolan.

66 MIT Remote Virtual Disk Protocol.

67 Internet Pluribus Packet Core.

68 Any distributed file system.

69 SATNET Monitoring.

70 VISA Protocol.

71 Internet Packet Core Utility.

72 Computer Protocol Network Executive.

73 Computer Protocol Heart Beat.

74 Wang Span Network.

75 Packet Video Protocol.

76 Backroom SATNET Monitoring.

77 SUN ND PROTOCOL-Temporary.

78 WIDEBAND Monitoring.

79 WIDEBAND EXPAK.

80 ISO-IP.

81 VMTP, Versatile Message Transaction Protocol.

82 SECURE-VMTP

83 VINES.

84 TTP.

85 NSFNET-IGP.

86 Dissimilar Gateway Protocol.

87 TCF.

88 EIGRP.

89 OSPF, Open Shortest Path First Routing Protocol.MOSPF, Multicast Open Shortest Path First.

90 Sprite RPC Protocol.

91 Locus Address Resolution Protocol.

92 MTP, Multicast Transport Protocol.

93 AX.25.

94 IP-within-IP Encapsulation Protocol.

95 Mobile Internetworking Control Protocol.

96 Semaphore Communications Sec. Pro.

97 EtherIP.

98 Encapsulation Header.

99 Any private encryption scheme.

100 GMTP.

101 IFMP, Ipsilon Flow Management Protocol.

102 PNNI over IP.

103 PIM, Protocol Independent Multicast.

104 ARIS.

105 SCPS.

106 QNX.

107 Active Networks.

108 IPPCP, IP Payload Compression Protocol.

109 SNP, Sitara Networks Protocol.

110 Compaq Peer Protocol.

111 IPX in IP.

112 VRRP, Virtual Router Redundancy Protocol.

113 PGM, Pragmatic General Multicast.

114 any 0-hop protocol.

115 L2TP, Level 2 Tunneling Protocol.

116 DDX, D-II Data Exchange.

117 IATP, Interactive Agent Transfer Protocol.

118 ST, Schedule Transfer.

119 SRP, SpectraLink Radio Protocol.

120 UTI.
121 SMP, Simple Message Protocol.
122 SM.
123 PTP, Performance Transparency Protocol.
124 ISIS over IPv4.
125 FIRE.
126 CRTP, Combat Radio Transport Protocol.
127 CRUDP, Combat Radio User Datagram.
128 SSCOPMCE.

129 IPLT.

130 SPS, Secure Packet Shield.

131 PIPE, Private IP Encapsulation within IP.

132 SCTP, Stream Control Transmission Protocol.

133 Fibre Channel.

134 RSVP-E2E-IGNORE.

135 Mobility Header.

136 UDP-Lite, Lightweight User Datagram Protocol.

137 MPLS in IP.

138 MANET Protocols.

139 HIP, Host Identity Protocol.

140-252

253254
Experimentation and testing.

255
reserved.