Monday, 14 May 2018

TCP Server Processes

All application processes running on the server are configured to use a different port number. The port can be configured by default or manually, by a network administrator. On the same server cannot have two services assigned the same port number within the same transport layer services. For example, a host running FTP server and a web server cannot have both configured to use the same port (for example, TCP port 80 for both or port 21 FTP server port for both).


An active server application assigned a specific port, mean that port is considered to be open, which means that the transport layer accepts and processes segments addressed to that specific port number. Every incoming client request addressed to the correct socket is accepted, and the data is passed to the application on the server. There may be many ports open at the same time on a server, one for each active server application.


TCP Connection Establishment


Shake Hands!  When two persons meet each other, they often welcome each other by shaking hands. This act of hands shake is understood by both as a sign for a friendly welcoming. Connections on the network are similar to the handshaking.




A TCP connection between host and server or between two hosts is established in three steps:


Step 1 - The initiating client send requests a client-to-server communication session with the server.


Step 2 – After receiving the request the server acknowledges the client-to-server communication session and requests a server-to-client communication session.


Step 3 – Then the initiating client acknowledges the server-to-client communication session.




[caption id="attachment_7930" align="alignnone" width="569"]tcp TCP Connection Establishment[/caption]


In the figure, you can see the TCP connection establishment.   


TCP Session Termination


For connection closing, the FIN control flag must be set in the segment header. To end each one-way TCP session, a two-way handshake, with a FIN segment and an Acknowledgment (ACK) segment, is used. So, to terminate a single TCP conversation, four exchanges are required to end both sessions.


Step 1 - When the Host-A Send All data and no more data remain to send in the stream, it sends a segment with the FIN flag set to Host-B.


Step 2 - The Host-B sends an ACK to acknowledge the receipt of the FIN to finish the session from Host- A to Host-B.


Step 3 - The Host-B sends a FIN to the Host-A to finish the Host-B to Host-A session.


Step 4 - The Host-A responds with an ACK to acknowledge the FIN from the Host-B.


When all segments have been acknowledged, the session is closed.


The Figure below illustrates the TCP session termination process.




[caption id="attachment_7931" align="alignleft" width="504"]tcp TCP Session Termination[/caption]

Tuesday, 8 May 2018

The netstat Command

Unexplained TCP connections can create a major security risk. They can show that something or someone is connected to the local host. Sometimes it is necessary to know which active TCP connections are open and running on a networked host. Netstat is a useful network tool for checking and verifying those connections.


The netstat command can show particulars about individual network connections, overall and protocol-specific networking statistics, all listening ports, along with incoming and outgoing network connections and much more, all of which could help troubleshoot certain kinds of networking issues. By default, the netstat command will try to resolve IP addresses to domain names and port numbers to well-known applications.


There are various ways that a system administrator might use the assortment of switches with netstat command. I will give you a complete detail in this article.




Open the Command Prompt and execute the netstat command alone to show a comparatively simple list of all active TCP connections which, for each one, will show the local IP address, the foreign IP address, along with their relevant port numbers, as well as the TCP state.


 Netstat Command Syntax


netstat [-a] [-b] [-e] [-f] [-n] [-o] [-p protocol] [-r] [-s] [-t] [-x] [-y] [time_interval] [/?]





























































Switches for Netstat command



Switch



Description



-a



The -a switch displays all active TCP connections and the TCP and UDP ports on which the computer is listening.



-b



The -b switch displays the executable concerned in creating each connection or listening port. This switch is added in XP SP2.



-e



The -e switch displays Ethernet statistics, such as the data includes the number of bytes and packet sent and received  including  unicast packets, non-unicast packets, discards, errors, and unknown protocols since the connection was established.



-f



The -f switch will force the netstat command to display the (FQDN ) Fully Qualified Domain Name  for each foreign host IP addresses when possible.



-n



The -n switch could significantly decrease the time it takes for netstat to fully execute. The switch will show active TCP connections, but, addresses and port numbers are expressed numerically.



-o



This switch displays active TCP connections and includes the process ID (PID) for all connections. You can find the application based on the PID on the Processes tab in Windows Task Manager. This parameter can be combined with -a-n, and -p.



-p proto



Using the -p switch to show connections or statistics only for a particular protocol. You can’t define more than one protocol at once, nor can you execute netstat with -p switch without defining a protocol. proto may be any of TCP, UDP, TCPv6, or UDPv6. If you use -s with -p to view statistics by protocol, you can use icmpIPicmpv6, or ipv6 in addition to the first four I mentioned.



-r



The -r switch displays the contents of the IP routing table. This is equivalent to the route print command.



-s



The -s switch displays statistics per-protocol. By default, statistics are shown for the TCP, UDP, ICMP, and IP protocols. If the IPv6 is installed, statistics are shown for the TCP over IPv6, UDP over IPv6, ICMPv6, and IPv6 protocols. The -p parameter can be used to specify a set of protocols, but be sure to use -s before -p protocol when using the switches together.



-t



Using -t switch will show the current TCP pipe offload state in place of the typically displayed TCP state.



[interval]



An integer used to display results multiple times with a specified number of seconds between displays. Continues until stopped by command ctrl+c. The default setting is to display once.



/?



? is Used to show details about the netstat command's several options.



 


Netstat Command Examples


netstat -f


This is the example of a netstat with -f switch. I execute netstat to show all active TCP connections. but, I do want to see the computers I'm connected to in FQDN format [-f] instead of a simple IP address.


Here's an example of what you might see:









C:\User\Muhammad>netstat -f


Active Connections


  Proto  Local Address          Foreign Address        State


  TCP    127.0.0.1:49216        Muhammad-PC:49328      ESTABLISHED


  TCP    127.0.0.1:49328        Muhammad-PC:49216      ESTABLISHED


  TCP    192.168.58.101:49273   .:https                CLOSE_WAIT


  TCP    192.168.58.101:49322   wo-in-f188.1e100.net:5228  ESTABLISHED


  TCP    192.168.58.101:49726   51.143.22.239:http     SYN_SENT


  TCP    192.168.58.101:49727   xx-fbcdn-shv-02-sin6.fbcdn.net:https  ESTABLISHED


  TCP    192.168.58.101:49728   edge-star-mini-shv-02-sin6.facebook.com:https  ESTABLISHED


  TCP    192.168.58.101:49729   edge-star-mini-shv-02-sin6.facebook.com:https  TIME_WAIT


  TCP    192.168.58.101:49730   182.176.35.18:https    TIME_WAIT


  TCP    192.168.58.101:49731   182.176.35.18:https    ESTABLISHED


  TCP    192.168.58.101:49736   xx-fbcdn-shv-02-sin6.fbcdn.net:https  TIME_WAIT


  TCP    192.168.58.101:49737   182.176.35.17:https    ESTABLISHED


  TCP    192.168.58.101:49739   18.55.c0ad.ip4.static.sl-reverse.com:https  ESTABLISHED


  TCP    192.168.58.101:49740   18.55.c0ad.ip4.static.sl-reverse.com:https  ESTABLISHED


  TCP    192.168.58.101:49741   edge-star-shv-02-sin6.facebook.com:https  SYN_SENT


  TCP    192.168.58.101:49742   edge-star-shv-02-sin6.facebook.com:https  ESTABLISHED



 


The command shows that there are 16 active TCP connections at the time of execution. The only protocol (in the Proto column) listed is TCP, if udp is required then you can use -a switch with n switch to reduce the execution time.


netstat  -an








  C:\User\Muhammad> netstat -an 

Active Connections


  Proto  Local Address          Foreign Address        State


  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING


  TCP    127.0.0.1:49158        0.0.0.0:0              LISTENING


  TCP    127.0.0.1:49158        127.0.0.1:49214        ESTABLISHED


  TCP    192.168.58.103:49695   178.255.83.1:80        TIME_WAIT


  TCP    192.168.58.103:49696   23.46.123.27:80        ESTABLISHED


  TCP    192.168.58.103:49697   178.255.83.1:80        TIME_WAIT


  TCP    192.168.58.103:49708   93.184.220.29:80       ESTABLISHED


  TCP    192.168.58.103:49730   50.97.63.217:443       CLOSE_WAIT


  TCP    192.168.58.103:49731   50.97.63.217:443       ESTABLISHED


  TCP    192.168.58.103:49732   216.58.208.68:80       ESTABLISHED


  TCP    192.168.58.103:49733   216.58.208.68:80       TIME_WAIT


  TCP    192.168.58.103:49741   52.20.224.89:443       ESTABLISHED


  TCP    192.168.58.103:49742   52.20.224.89:443       TIME_WAIT


  TCP    192.168.58.103:49757   192.169.80.98:80       TIME_WAIT


  TCP    192.168.58.103:49758   192.169.80.98:80       ESTABLISHED


  TCP    192.168.58.103:49759   172.217.19.34:80       TIME_WAIT


  TCP    192.168.58.103:49760   172.217.19.34:80       ESTABLISHED


  TCP    192.168.58.103:49763   35.187.117.15:80       TIME_WAIT


  TCP    192.168.58.103:49838   52.221.160.235:443     ESTABLISHED


  TCP    192.168.58.103:49839   52.221.160.235:443     ESTABLISHED


  TCP    [::]:135               [::]:0                 LISTENING


  TCP    [::]:445               [::]:0                 LISTENING


  UDP    [::1]:62889            *:*


  UDP    [fe80::71dd:e26c:b955:52be%12]:546  *:*


  UDP    [fe80::71dd:e26c:b955:52be%12]:1900  *:*



 


 


The information above that is displayed in the result of the netstat –an command including protocol, the local address and port number, the foreign address and port number, and the connection status. An explanation of the different connection states is given below:


















































State



Description



LISTENING



This status shows that the server is ready to accept a connection



CLOSED



Closed status shows that the server has received an ACK signal from the client and the connection is closed now.



CLOSE_WAIT



This status shows that the server has received the first FIN from the client and the connection is in the process of being closed



ESTABLISHED



This status means that the server received the SYN signal from the client and the session is now established.



FIN_WAIT_1



This status means that the connection is still active but not currently in use.



FIN_WAIT_2



This status Indicates that the client now received acknowledgment of the first FIN signal from the server.



LAST_ACK



This status shows that the server is in the process of sending its own FIN



SYN_SEND



This means that this particular connection is open and active



SYN_RECEIVED



The status means that the server just received an SYN signal from the client



TIME_WAIT



This status means that the client recognizes the connection as still active but not currently being used


Saturday, 21 April 2018

Port Numbers

There is two types of port are being used in a transport layer, the source ports, and destination ports. The source ports are related to the originating application on the local host. The destination ports are related to the destination application on the remote host.


Source Port


The source ports are dynamic ports, generated by the originating device to identify a conversation between two devices. This process allows multiple conversations to take place at the same time. It is common for a device to send multiple HTTP service requests to a web server at the same time. Each separate HTTP conversation is tracked based on the number of source ports.


Destination Port


The client attaches a destination port number in the segment to inform the destination server what service is being requested, For example, when a client specifies port 21 in the destination port, the server that receives the message knows that FTP services are being requested. A server can offer more than one service simultaneously such as FTP services on port 21 and web services on port 80 at the same time. The figure below illustrates both requests at the same time.




Socket Pairs


Both source and destination ports are placed within the segment and then the segments are encapsulated within an IP packet. The IP packet contains both the source and destination IP addresses. The combination of the source IP address and source port number, or the destination IP address and destination port number is known as a socket. The socket is used to recognize the server and service being requested by the user. A user socket might look like this, with 1124 representing the source port number: 192.168.10.200:1124 and the socket on a web server might be: 192.168.10.50:80


Together, these two sockets combine to form a socket pair: 192.168.10.200:1124, 192.168.10.50:80. The Figure below illustrates the connection and socket of web and FTP ports.


socket and port


The sockets are enabled multiple processes, running on a client, to differentiate themselves from each other, and multiple connections to a server process to be differentiated from each other. The source port number used as a return address for the requesting application. The transport layer keeps a track record of this port and the application that initiated the request so that when a reply is returned, it can be forwarded to the right application.


Ports Number Groups


The Internet Assigned Numbers Authority (IANA) is the authority for assigning various addressing standards and ports numbers. There are three different types of ports.



  • Well-known Ports (Numbers 0 to 1023) – These are the ports reserved for services and applications. These ports are generally used for applications such as web browsers, email clients, and remote access clients. These well-known ports can be programmed for server applications and client applications to request a connection to that specific ports and its associated service.

  • Registered Ports (Numbers 1024 to 49151)- These ports are assigned by Internet Assigned Numbers Authority (IANA) to a requesting person to use with particular processes or applications. These processes are mostly individual applications that a user has selected to install and use; rather than common applications that would receive a well-known port number.

  • Dynamic or Private Ports (Numbers 49152 to 65535)– These ports are also known as ephemeral ports; these are generally assigned dynamically by the client’s operating system when a connection to a service is initiated. The dynamic ports are then used to identify the client application during communication. Some client operating systems may be used registered port numbers instead of dynamic ports numbers for assigning source ports.

Introduction to UDP

UDP is a connectionless protocol Which is not a reliable protocol. it means that it has no guarantee to get its destination. Example of this protocol is that when you are sending a non-registered letter or postcard, you put it in the mailbox. Now you are not aware of the availability of the receiver to receive the letter and chances are good that it will get where it's supposed to go but there is no guarantee. There is always a possibility of loss in the way. The post office is not responsible for tracking the letter or informing the sender if the letter does not arrive at the final destination. The UDP is working Just like the above example.


 

UDP provides the basic functions for delivering data segments between the right applications, with very small overhead and data checking. It is recognized as an unreliable protocol because there is no acknowledgment that the data is received at the destination. With User Datagram, there are no transport layer processes that inform the sender of a successful delivery.
While the TCP reliability functions provide more vigorous communication among applications, they also gain extra overhead and possible delays in transmission.


UDP Features


User Datagram Protocol is a best-effort transport protocol. It is a lightweight transport protocol that offers the same data segmentation and reassembly as TCP; but with no TCP reliability and flow control. UDP is a simple protocol that it is usually described in terms of what it does not do compared to TCP.
No Ordered Data Reconstruction – Data is reconstructed in the order of that it is received.
Unreliable Delivery – Any segments lost are not resent in this protocol like TCP.
Connectionless – No session are established with the source and destination.
No Flow Control – Does not inform the sender about the resource availability.


UDP Header


It is a stateless protocol because it does not inform the source and destination about the packets receiving and it does not give any state of the communication session to client and server. If reliability is required when using UDP as the transport protocol, it must be handled by the application.
An application can accept some loss of data during transmission over the network, but delays in transmission are unacceptable. UDP is the choice for these applications because less network overhead is required. It is preferable for streaming live audio, live video, and Voice over IP (VoIP).
UDP header is called datagrams, as shown in the figure. These datagrams are sent as best-effort by the transport layer protocol. UDP has a low overhead of 8 bytes.


udp

Tuesday, 16 January 2018

Transport Layer Responsibilities

The fourth layer of OSI model is called Transport Layer. This layer is responsible for end-to-end connectivity, Process to process delivery, error control, flow control etc. It is also called as an end-to-end layer because it provides a point-to-point connection rather than hop-to-hop, between the source host and destination host to transport the services reliably. The unit of data encapsulation in Transport Layer is a segment.
The protocols used by Transport Layer to improve its functionalities are TCP(Transmission Control Protocol), UDP( User Datagram Protocol), DCCP(Datagram Congestion Control Protocol), SCTP (Stream Control Transmission Protocol) etc.
Different responsibilities of a Transport Layer are following:


The process of process delivery


 

The data link layer is responsible for delivery of frames between two neighboring nodes over a link. Data Link Layer requires the MAC address (48 bits address contained inside the Network Interface Card of every host machine) of source-destination hosts to correctly deliver a frame. This is called node-to-node delivery. The network layer is responsible for delivery of datagrams between two hosts. The Network layer requires the IP address for right routing of packets, in a similar way and this is called host-to-host delivery.


Communication on the Internet is not defined as the exchange of data between two nodes or between two hosts. Real communication takes place between two processes. So that we need process-to-process delivery.
The transport layer is responsible for process-to-process delivery. The delivery of a packet, part of a message, from one process to another.


But, at any moment, several processes may be running on the source host and several on the destination host. To complete the delivery, we need a mechanism to deliver data from one of these processes running on the source host to the corresponding process running on the destination host.


So the port number is the mechanism which made it possible to deliver the segments of data correctly amongst the multiple processes running on a particular host. A port number is a 16-bit address used to identify any client-server program uniquely.The figure illustrates the data delivery over a network. 


flow control 


 End-to-end Connection between hosts


End-to-end connection happening between two applications (maybe you and your friend using a messenger like skype or any other). It doesn't care what's in the middle, it just considers that the two ends are taking with one another. It generally is a Layer 4 responsibility.




For end-to-end connection layer 4 generally uses TCP and UDP protocols. TCP is a secure and connection- orientated protocol which uses a handshake to establish a connection between two end- hosts. TCP ensures reliable delivery of data and is used in many applications.
On the other hand, UDP is a stateless and unreliable protocol which ensures best-effort delivery. It is suitable for the applications which have little concern with flow or error control and requires to send a bulk of data like video conferencing. It is an often used in multicasting protocols.


Tracking Individual Conversations


At this layer, all set of data flowing between a source and destination applications are known as a conversation. A host may have several applications that are communicating across the network simultaneously. All of these applications communicate with one or more applications on one or more remote hosts. It is the task of the transport layer to maintain and track these multiple conversations.


Multiplexing and Demultiplexing


Gathering data from several application processes of the sender, enveloping that data with a header and sending them as a whole to the intended receiver is called as multiplexing. Multiplexing allows the real-time use of different applications over a network which is running on a host. The transport layer provides this mechanism which enables us to send packet streams from various applications simultaneously over a network.
Transport layer accepts these data packets from different processes differentiated by their port numbers and passes them to network layer after adding proper headers. in the same way; Delivering received segments at the receiver side to the correct app layer processes is called as demultiplexing. Demultiplexing is required at the receiver side to obtain the data coming from various processes. Transport receives the segments of data from network layer and delivers it to the appropriate process running on the receiver’s machine.


Segmenting Data and Reassembling Segments


Data should be set to be sent through the media in suitable pieces. The majority of networks have a restriction on the amount of data that can be included in a single packet. The transport layer protocols have services that segment the data into blocks that are a suitable size. This service includes the encapsulation requirement on all piece of data. A header necessary for racking and resembling the data stream.


At the destination side, the transport layer should be able to reconstruct the pieces of data into a complete data stream that is useful to the application layer. The protocols at the transport layer explain how the transport layer header information is used to rebuild the data pieces into streams to be passed to the application layer.


Identifying the Applications


To pass data to the correct applications, the transport layer has to recognize the target application. To do this, the transport layer assigns all application a port number. Each process that needs to access the network is assigned a unique port number to that host.


Congestion Control


Congestion occurring in network layer when the message traffic is so heavy and too many that it slows down network response time. Due to heavy and many sources over a network attempt to send data and the router buffers start overflowing due to which loss of packets occurs. As a result retransmission of packets from the sources increases the congestion further. In this situation, Transport layer provides Congestion Control in different ways. It uses open-loop congestion control to prevent the congestion and closed-loop congestion control to remove the congestion in a network once it occurred. TCP provides AIMD- additive increase multiplicative decrease, leaky bucket technique for congestion control.



Data integrity and Error correction


The transport layer is also responsible for checking errors in the messages coming from application layer by using error detection codes; computing checksums; it checks whether the received data is free of errors and uses the ACK and NACK services to inform; the sender if the data arrives or not and checks for the integrity of data.


Flow control


The transport layer also provides a flow control mechanism between the source and destination. The flow control ensures the rate at which a sender is transmitting is in proportion to the receiver’s receiving capabilities.
Flow control is utilized in data communications to manage the flow of data/packets among two different nodes; especially in cases where the sending device can send data much faster than the receiver can take in.


TCP prevents the data loss due to a fast sender and slow receiver by imposing flow control techniques. It uses the method of sliding window protocol which is accomplished; by the receiver, by sending a window back to the sender informing the size of data it can receive.


Conversation Multiplexing


To send some types of data across a network, as one complete stream can consume all of the existing bandwidth. This will prevent other communications from occurring at the same time and this will also make difficult error recovery and also retransmission of damaged data.


The transport layer segmenting the data into many smaller chunks enables many different communications, from many different users, to be multiplexed on the same network.


So, to recognize each segment of data, the transport layer adds a header contain binary data organized into several fields. It is the values in these fields that enable various transport layer protocols to perform different functions in managing data communication.


Reliability


The transport layer is also liable for managing reliability. Different applications have different transport reliability requirements.


The IP address is only concerned with the structure, addressing, and routing of packets. It does not specify the delivery and transportation of the packets.


The transport layer protocols specify how to transfer data between hosts. TCP/IP model provides two transport layer protocols:-



  • Transmission Control Protocol (TCP)

  • User Datagram Protocol (UDP)


The figure illustrates the TCP and UDP. IP address uses these transport protocols to allow hosts to communicate and transfer data with each other.


TCP is a reliable, full-featured transport protocol, which ensures that all of the data arrives at the destination side. In other hands, UDP is a simple transport protocol that does not provide any reliability.



[caption id="attachment_7887" align="alignnone" width="680"]TCP and UDP TCP/IP protocols[/caption]

Monday, 20 November 2017

Transport Layer

Today single device can run multiple applications and provide multiple services such as email, web, video, audio and instant messaging. Data from each of these applications are packaged, transported and delivered to the right application on the destination device



 The transport layer (Layer 4) of the OSI model accepts data from the application layer and prepare it for addressing at the network layer. A sending device communicates with a receiving device to make a decision how to split data into segments, how to make possible data sending without losing any segment, how to confirm all the segments arrived at receiving the device.


The transport layer is responsible for end-to-end communication over a network. It provides logical communication between application processes running on different hosts within a layered architecture of protocols and other network components.


Functions of the Transport Layer


Following are the functions of the transport layers.



  • Connection management

  • Segmentation

  • Reliable and unreliable data delivery

  • Flow control

  • Connection multiplexing

  • It makes possible to allow multiple applications work at the same time send and receive data.

  • Data transmission method can be connection-oriented or connectionless according to requirement. Connectionless uses UDP and connection-oriented uses TCP.

  • The sequence numbers and acknowledgments (ACKs) are used for reliability.

  • Reliable connection controls flow through the uses of windowing or acknowledgments.


In the next, lesson we will discuss the above functions in depth.


 


Friday, 17 November 2017

Subnetting IPv6 Addresses

As I say in my previous IPv6 lessons that IPv6 addresses are going to replace IPv4 addresses?  The reason is that IPv4 address space is running out. So, the 32-bit IPv4 addresses are not enough to link every device which wants connectivity to the Internet. The IPv6 is 128 bit address which allows approximately, 340,282,366,920,938,463,463,374,607,431,768,211,456, or 340 undecillion addresses, almost equivalent to each particle of sand on the Earth. Basically, the addresses are too large for the human being to seize.





Presently CIDR, VLSM, and NAT are being used to save IPv4 address space as much as possible. These tools are not available in IPv6 addresses. The subnetting of IPv6 requires a different approach than IPv4 subnetting. The main reason is that with IPv6 there are so many addresses, so the reason for subnetting is totally different.


IPv4 subnetting limiting the broadcast domains and it is also required for managing IP addresses shortage. The VLSM and subnet mask helps to keep IPv4 addresses. The IPv6 subnetting is not concerned with keeping address space. The /64 is the smallest recommended subnet in IPv6. This means that even if you have few devices on your subnet you must use /64 that has 264 IP addresses. The important thing that IPv6 does not use network and broadcast addresses. An address where the host bits are all 0s or all 1s is still valid!



There are two types of assignable IPv6 addresses



  1. link-local

  2. Global Unicast Addresses


Each IPv6 enabled device can create a unique link-local address based on the MAC address of that device. The method of link-local address already describes in the previous article. The method changes the MAC address to 64-bits from 48-bits.


The IPv6 Global Unicast Addresses


The IPv6 global unicast address normally consists of a /48 global routing prefix, a 16-bit subnet ID, and a 64-bit interface ID. The figure illustrates the global unicast address.



The subnet ID includes more than enough subnets. IPv6 subnetting is about building an addressing hierarchy based on the number of sub-networks needed.


Subnetting IPv6 addresses Using Subnet ID


The 16-bit subnet ID section of IPv6 global unicast address can be used to create internal subnets. The subnet ID provides enough subnets and hosts support for any organization.  The 16-bit section can create 65536/64 subnets without borrowing any bit from the interface ID section of the address. Each subnet support 18,000,000,000,000,000,000 or 18 quintillion host IPv6 address per subnet. Subnetting of IPv6 subnetting is much easier than IPv4 because there is no binary conversion required. It is just required counting in hexadecimal.



Example of Subnetting IPv6 Addresses


Suppose there are IPv6 address 2001:AD10:110B::/48 has been assigned to an organization with 16-bit subnet ID. The network administrator can subnet the IP address just counting /16 bit in hexadecimal upward. This would allow the administrator to create 65,536 /64 subnets. The table below illustrates the subnetting procedure of IPv6 address.


 














































































2001:AD10:110B::/48



Subnets



2001:AD10:110B:0000::/64



2001:AD10:110B:0001::/64



2001:AD10:110B:0002::/64



2001:AD10:110B:0003::/64



2001:AD10:110B:0003::/64



2001:AD10:110B:0004::/64



2001:AD10:110B:0005::/64



2001:AD10:110B:0006::/64



2001:AD10:110B:0007::/64



2001:AD10:110B:0008::/64



2001:AD10:110B:0009::/64



2001:AD10:110B:000A::/64



2001:AD10:110B:000B::/64



2001:AD10:110B:000C::/64



2001:AD10:110B:000D::/64



2001:AD10:110B:000E::/64



2001:AD10:110B:000F::/64



2001:AD10:110B:0010::/64



2001:AD10:110B:0011::/64



2001:AD10:110B:0012::/64



UPTO



2001:AD10:110B:FFFF::/64



 



IPv6 Subnet Allocation


Any IPv6 based network required subnets for each LAN as well as for the WAN link. Unlike IPv4, the


 


 IPv6 WAN link subnet will not be subnetted further. Although this may “waste” addresses, that is not a concern when using IPv6.


subnetting ipv6 addresses


As shown in Figure 1, there is 5 subnetwork which allotted first five subnets, with the subnet IDs 0000 through 0004 and for four WAN links which allotted subnet from IDs 0005 through to 0008. for this example. Each /64 subnet will provide more addresses than will ever be needed. As shown in the Figure, each LAN segment and the WAN link is assigned a /64 subnet.  Similar to configuring IPv4, the Figure 2 displays that every router interfaces have been configured to be on a different IPv6 subnet.