Serial Ports Vs Parallel Ports From Linux
Serial Direct Cable Connection, DB9, DB2. COM Ports and Pinouts. This article covers the popular serial ports on workstations, servers and laptop computers. We cover serial data transfer, port pinouts, port speeds, serial interface types (DB9 & DB2. The Serial Direct Connection is the one which utilizes the COM ports of your computers. Every computer has at least two COM ports, COM1 and COM2. Its pinouts are a lot simpler when compared to the parallel port, but the speed is also a lot slower.
To give you an idea of how fast (or slow) a serial port is, at its best you will get around 1. KB per second. That's pretty slow when you're used to a network connection, but let me show you how serial data is transferred so you can also understand why it's a lot slower: Figure 1.
Here are the latest articles published on Tom’s Hardware. See the latest news, reviews and roundups and access our tech archives.
Transfer of data via serial port. The above picture gives you an idea on how serial data is transferred. Each colored block that is numbered is sent from PC 1 to PC 2. PC 2 will receive the data in the same order it was sent, in other words it will receive data block 1 first and then 2, all the way to block 7. This is a pretty good representation of data flow in a serial cable. Serial ports transmit data sequentially over one pair of wires (the rest of the wires are used to control the transfer).
Another way you can think of it is like a one lane road where the road is wide enough to only fit one car at a time (one data block at a time in our example above) so you would imagine that the road cannot process several cars at one time. The Serial Port. Most new computers have two COM ports with 9 pins each; these are DB- 9 male connectors. Older computers would have one DB- 9 male connector and one DB- 2. The 2. 5 pin male connector is pretty much the same as the 9 pin, it's just bigger.
Well I know all about serial ports. I run a DOS app that accesses the serial port and it just blazes, in DOS. But I have tried unsuccessfully to run this DOS app. Serial Direct Cable Connection, DB9, DB25, COM Ports and Pinouts. Written by Administrator. Posted in Network Cabling. Parallel Port Programming (PART 1): with C. By HarshaPerla. Parallel port is a very commonly known port, widely used to connect the printer to the PC.
A Perle Serial Card will enable you to easily add RS232, RS422, RS485 serial or parallel ports to your PC or server. Serial ports have been an important I/O tool for decades. Learn how they work! Tabtight professional, free when you need it, VPN service. Serial Port Devices /dev/ttyS2, etc. 10.1 Serial Port Names: ttyS4, etc. Common serial port names are /dev/ttyS0, /dev/ttyS1, etc. Then around the year 2000 came. Linux Kernel Boot Parameters. Derived from kernel-parameters.txt in the Linux source.
Let's have a look at a serial port to see what we are talking about: Figure 2. Physical Serial interface - DB- 9 (usually COM1) and DB- 2.
COM2)Different pinouts are used for the DB- 9 and DB- 2. Let's just have another quick look at the COM ports of a new computer: Figure 3. Serial ports (COM1 & COM2)Notice the COM ports, they are both DB- 9 connectors, there is no more DB- 2. The connector above the two blue COM ports is an LPT or Parallel port. The serial port of a computer is able to run at different speeds, thus allowing us to connect different devices which communicate at different speeds with the computer. The following table shows the speeds at which most computers' serial ports are able to run and how many KB/sec they translate to: Figure 4. Serial port speeds (bits/second) and data transfer speeds.
Now we will have a look at the pinouts of both DB- 9 and DB- 2. Figure 5. Serial COM port pinouts for both DB- 9 & DB- 2. Serial Data Transfer Cable. All that's left now is the pinouts required to allow us to use the serial cable for direct connection. There is a special term for this type of a cable, its call a . Because you can have different configurations, e. DB- 9 to DB- 9, DB- 9 to DB- 2.
DB- 2. 5 to DB- 2. I have created different tables to show you the pinouts for each one: 1) DB- 9 to DB- 9. You use this configuration when you need a cable with a DB- 9 connector on each end: Figure 6. DB- 9 to DB- 9 Null Modem (serial) Cable. DB- 9 to DB- 2. 5. You use this configuration when you need a cable with one DB- 9 and one DB- 2. Figure 7. DB- 9 to DB- 2.
Null Modem (serial) Cable. DB- 2. 5 to DB- 2. You use this configuration when you need a cable with a DB- 2. Figure 8. DB- 2. 5 to DB- 2.
Null Modem (serial) Cable. Well, that pretty much covers everything about serial direct connection via a null modem cable. If you're using third party software to connect your computers, you probably won't stumble into big problems, but if you're using Windows software be sure you have unique names for each of your computers because Windows will treat the direct connection as a . This means you will be able to see the other computer via Network Neighborhood. Next - LPT Ports - Parallel Direct Cable Connection and pinouts or Back to Network Cabling Section.
Linux Network Configuration. Linux TCP/IP Network Configuration Files.
File. Description/etc/resolv. List DNS servers for internet domain name resolution. Manual page for: /etc/resolv. Lists hosts to be resolved locally (not by DNS). Manual page for: /etc/hosts/etc/nsswitch.
List order of host name search. Typically look at local files, then NIS server, then DNS server. Manual page for: /etc/nsswitch. Red Hat/Fedora/Cent. OS: /etc/sysconfig/network.
Specify network configuration. Static IP, DHCP, NIS, etc. Red Hat/Fedora/Cent. OS: /etc/sysconfig/network- scripts/ifcfg- device.
Specify TCP network information. Ubuntu/Debian: /etc/network/interfaces. Specify network configuration and devices. Static IP and info, DHCP, etc. If using DHCP client, this will automatically.
ISP and loaded into this file as part of the DHCP protocol. If using a static. IP address, ask the ISP or check another machine on your network.
Your. second port is eth. Choose one of three options. Direct internet connection. Manual proxy configuration (specify proxy and port). Automatic proxy configuration (give URL). Assigning an IP address.
Computers may be assigned a static IP address or assigned one dynamically. Handles all interfaces. Configure for Static IP or DHCP client. See format below. Implied if IP addresses are specified.
Shut down interfacearp. Enable ARP protocol on this interface. Allow ARP to detect the addresses of computer hosts attached to the network.- arp. Disable ARP protocol on this interfacepromisc. Enable promiscuous mode. Receive all packets on the network not just those destined for this interface.- promisc. Disable promiscuous mode.
Specify the Maximum Transfer Unit (MTU) of the interface. The MTU is the maximum number of octets the interface is able to handle in a single transaction. Defaults: Ethernet: 1. SLIP: 2. 96broadcast XXX.
XXX. XXX. XXXSet the network broadcast address for this interface. XXX. XXX. XXX. XXXSet the IP network mask for this interface.
Gateway not defined here for DHCP client. Loopback. (1. 27. C 1. 92. 1. 68. XXX. XXX, reserved class B. XXX. XXX and reserved class A 1. XXX. XXX. XXX. For historical reference the network classes are defined as follows.
Class A: Defined by the first 8 bits with a range of 0 - 1. XXX. XXX. XXX. One class A network can define 1. XXX. XXX. One class B network can define 6. XXX. One class B network can define 2. Ip. Tables firewall rules can be used.
IP masquerading (NAT) can be used to connect private local. LAN) to the internet or load balance servers.
One can add firewall rules by using iptables (or ipchains). This example uses 2. Fedora Core 3: /lib/modules/2. The configuration will be stored so that it will be utilized.
In this case the device must be defined. Use the Red Hat GUI tool /usr/bin/netcfg. ORDefine network parameters in configuration files. Define new device in file (Red Hat/Fedora) /etc/sysconfig/network- scripts/ifcfg- eth. S. u. s. e 9. 2: /etc/sysconfig/network/ifcfg- eth- id- XX: XX: XX: XX: XX).
BOOTPROTO=static. IPADDR=1. 92. 1. 68. NETMASK=2. 55. 2. GATEWAY=XXX. XXX. XXX. XXX. HOSTNAME=node- name. DOMAIN=name- of- domain. Special routing information may be specified, if necessary, in the.
Red Hat/Fedora): /etc/sysconfig/static- routes(S. XXX. XXX. XXX. 0 netmask 2. XXX. XXX. XXX. XXXORDefine network parameters using Unix command line interface. Define IP address. XXX. XXX. XXX. XXX netmask 2.
XXX. XXX. XXX. 2. If necessary, define route with with the. XXX. XXX. XXX. XXX dev eth. XXX. XXX. XXX. 0 netmask 2.
XXX. XXX. XXX. XXX dev eth. Where XXX. XXX. XXX. XXX is the gateway to the internet as defined. ISP or network operator. The destination host must be reached through one or more IP gateways. The first gateway is the only one which is known by the host system. First the packet is examined to see if its'.
If it is to be sent to a. See command: /etc/sysconfig/network- scripts/ifup- routes eth. Dynamic routes: RIP (Routing Information Protocol) is used to define dynamic routes. Do not resolve host names for faster results.- e.
Print more extensive information about routes.- v. Verbose.- -help. Route command information. If not specified then print route table information.- host XXX. XXX. XXX. XXXAdd a single computer host identified by the IP address.- net XXX. XXX. XXX. XXXAdd a network identified by the network address, to the route.
XXX. XXX. XXX. XXXSpecify the network gateway. XXX. XXX. XXX. XXXSpecify the network netmask.
Of all the routes specified, identify one as the default network route. Two routers/gateways. Add internet gateway as before: route add default gw 2.
Add second private network: route add - net 1. Show which processes are using a particular file/directory: fuser file- name.
This command will list the process ID and a descriptor indicating the following. Durrent directory.
Executable. f: a file open for reading. F: a file open for writing. Roo directory. m: Memory Mapped File/Directory. List processes using a specified TCP/UDP socket: fuser - v - n tcp 8. Kill a process using a specified TCP/UDP socket: fuser - i - k 8. Any signal can be sent to the process, not just . Older packages such as routed and gated are no longer supported.
Don't resolve host names- g: Show multi- cast group membership info- c: Continuous mode - update info every second- v: Verbose- e: Extended information- o: show network timer information. List all connected processes: netstat - nap. List all processes with a TCP connection: netstat - tlnp. Best Free Cad Software For Mechanical Design Drawings on this page. This will list open TCP ports. TCP. - l: listening ports only. ID. one can also use the command: lsof - i - PShow network statistics: netstat - s. Display routing table info: netstat - rn$ netstat - nr.
Kernel IP routing table. Destination Gateway Genmask Flags MSS Window irtt Iface. U 0 0 0 eth. U 0 0 0 eth. UG 0 0 0 eth. Flags. G: route uses gateway.
U: Interface is . Use Cntl- C to stop ping.
One can install traceroute: apt- get install traceroute). IP- address- of- servertraceroute domain- name- of- servermtr. Fedora - Like traceroute. Leave. running to get real time stats. Reports best and worst round trip times.
Unlike nslookup, the host command will use both /etc/hosts as well as DNS. Also see. Testing your DNS (Yo.
Linux Tutorial) Note that nslookup does not use the /etc/hosts file. The listener handles the. Matches the name given in the file /etc/servicessocket- type. TCP). dgram: datagram protocols (UDP). Transport protocol name which matches a name in the file /etc/protocols. Often. nobody, root or a special restricted id for that service.
This includes argument 0 (argv. The best source of information is the man page and its many examples.
I have no explanation as to why this occurs or how to fix it other. Instead of telnet, rsh or rlogin, one should use the encrypted connection ssh. If you wish to use rwhod. Allow broadcast capabilities. Edit /etc/init. d/rwhodchange from: daemon rwhodto: daemon rwhod - b. Set service to start with system boot: chkconfig - -level 3. Start rwhod service: service rwhod start(or: service rwhod restart).
Man pages: rwho: who is logged in on local network machines. RPC: Remote Procedure Calls with rpcbind (current) / portmapper (older RHEL5- ). Rpcbind or portmapper are required to manage RPC (Remote Procedure Call) requests from services like NFS (file sharing services), NIS (Network Information Services) and SAMBA. This is logged to /var/log/secure. Advanced PAM: More specific access can be assigned and controlled by. Rules and modules are stacked to. Can track and force password changes.
This is often done to avoid exceeding the bandwidth when sending traffic to a particular device such as a wireless modem during peak network bursts. The rest of the man pages describe specific uses of the command. Tcng takes input from a script to be parsed and actions delegated to lower level components and to eventual kernel module directives.
See discussion below. Lowest used by default. Report IP addresses.- t. Don't print a timestamp on each dump line. Filter expressions. Descriptionhost host- name. If host has multiple IP's, all will be checked.