This is the first in a series of posts that will show how you can learn about networking by using the free Cisco Packet Tracer software program. C:\>tracert 172.16.1.51 Tracing route to 172.16.1.51 over a maximum of 30 hops: 1…
Category: Networking
Cloudflare – Adding DNS TXT record
A DNS TXT record is used to associate arbitrary text with a given domain. Often, it is used to validate that a given domain is who they claim to be. For example, when signing up for google services, and you…
How to map host IP, gateway, and broadcast address to troubleshoot
Get the following: IP address of host IP address of gateway (usually router or firewall) get subnet mask on host Get network CIDR (can be calculated) For example, assume we have the following output of ifconfig… [root@CMHLDORLGRD01 ~]# ifconfig eth0…
What does web service do when client has socket timeout exceeded?
It should throw a broken pipe exception. Below shows an strace of a server socket when the client has timed out after not receiving a response in the time period it specified (setTimeout() method)… 13125 12:19:13.666786 ) = 1 ([{fd=7,…
Setting up a simple linux DNS server
yum install bind service named start sample zone file is shown below. This must be located in /etc/named $TTL 3600 ; 1 hour default TTL mydomain.com. IN SOA ns1.mydomain.com. admin.mydomain.com. ( 2006051501 ; Serial 10800 ; Refresh 600 ; Retry…
DNS server address cached in java?
We found that an old DNS address was used until we restarted the JVM. I need to review the class used to perform this activity.. Test this with a simple class. import java.net.*; public class test { static { java.security.Security.setProperty…
Unexpected end of file from server
The “java.net.SocketException: Unexpected end of file from server” exception is thrown in the HTTPClient class, as well as others. This article simply provides an example of how to generate it for testing purposes. We start with a client class that…
Simulating a connection reset in java
We start with a class that simply creates a server and a client. The server class is configured to accept a connection and then exit, forcing of course, all connections to terminate. The client class connects, then sleeps two seconds…
Simulating SocketTimeoutException
A SocketTimeoutException occurs when a socket object instance has been configured to throw the exception if it receives no data in the prescribed number of milliseconds. The default is 0, which disables the timeout. Reasons you may want to use…
Impact of socket.SO_REUSEADDR
This is often used to get around an “address already in use” error. If you know the previous server program has been shutdown, you can set this socket option prior to the initial server bind, and then restart your program.…