Ethernet and OSI Model - networking

I have a dumb question, first of all sorry for that. i am learning now 7 OSI Layer models and i stumble across one thing. The Ethernet which is in the second Data Link Layer provides the end-to-end connection via LANs, right? Does it mean that even if i connect to Internet thru WiFi, somewhere my connection is running thru LANs?
Thanks

I am going to break my answer into points:
1.Lan is not necessary to connect to internet. You can have cable internet or internet through DSL connection etc. in which though the wire that comes and connect to your pc is the same cat5(for example) cable, there is no lan involved.
2.Internet through wireless router an be accessed in two ways:
(a)The ethernet cable from (say) a cable modem connects to your wireless router WAN port and then wireless router sends out radio waves which your laptop catches.
(b)There are many wireless routers and one cable internet connection. So the WAN port of one of the routers will connect to the cable modem(same as (a)) and from that router's ethernet ports(usually there are 4 ethernet ports on a wireless router ), ethernet cables will connect to other routers' ethernet ports and now these routers will send out radio waves which your pc catches.
3.Ethernet is one of the IEEE protocols(IEEE 802.3) for the data link layer. The wifi uses IEEE 802.11 standards to communicate through wireless media.

Short answer is: most likely
In your case, you only know your direct connectivity is made possible thru WiFi. From your perspective, it's just a WiFi network. But behind WiFi network, it could be Ethernet, DSL, Cable, etc. And behind those, it could be T1, frame relay, ATM, 10G or maybe 100G Ethernet, etc.
For example, I can have a small LAN at my home while my company office building can have a much bigger enterprise LAN. And both can provide me with the same kind of WiFi access.

Your connection to the nearest router is using a wifi data link protocol (in the IEEE 802.11 family). But the connections to other routers and (eventually) hosts will use other data link protocols, likely including ethernet at least at the far end.

Related

Connecting 2 USB ports together over a "Null Modem" like in the old days with COM ports?

I was curious if anybody knows a way to connect two different computers together over a USB line and what API's exist to program this interface.
For Serial Ports its common to buy a "Null Modem" adapter to cross over the Transmit and Receive lines of the UART so that the computers can talk together. And then You would read and write them like normal windows files over special system files called "COM1", "COM2", etc.
I was wondering if there was an Adapter of some kind that could emulate this same behavior except for native USB protocol. I realize they have USB-to-UART adapters. That's not really what i'm interested in because the baud rate is very slow for uarts. I was looking for something with USB speeds to transfer from one computer to another that is not going over a network link such as ethernet or wifi.
This is what I have:
COMPUTER A<-->USB<-->UART<-->NULL_MODEM<-->UART<--->USB<-->COMPUTER B
Speed 110,000 Baud, whatever... to slow to transfer files... ok for text...
This is what I want:
COMPUTER A<-->USB<-->Crossover_Adapter<--->USB<-->COMPUTER B
Speed 480 megabits per second
Assuming this beast exists, how do you program it and where do you buy it?
The only solution that I know of is the "FTDI Chip USB-to-USB Null modem cable" that can transfer between computers two computers using USB ports at a rate of 3 MBaud (384 kbytes/s) That's a lot faster than using older serial ports with null modem cable that maxs out at say 115200 baud (14 kbytes/s). The FTDI chip cable can be programed in c/c++/c# just like a standard windows serial port by way of a virtual serial port.
http://shop.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=92&title=Null+Modem+Cables
From Their Website:
USB NMC-2.5m
NMC In the era of legacy PCs with onboard RS232 COM Ports, it was
common practice to establish a simple communications network between
PCs using a cable popularly known as a Null-Modem cable. Typically,
such a cable would have DB9 female connectors on each end with the TX
/ RX and handshaking signals cross-connected so that the PCs could
communicate with each other via legacy COM ports.
On modern PCs the legacy COM Port connector is rapidly disappearing as
USB becomes the multi-function communication port of choice. However,
this presents a dilemma in application areas that previously relied on
legacy COM Ports for inter-PC communication.
A convenient solution to the problem is the FTDI USB NMC cable. From
the outside, this cable appears to be two USB type “A” sockets wired
together, however each of the USB sockets conceal a small PCB with a
FT232RQ based USB-UART converter IC plus support components inside.
The interconnect cable cross-connects the TXD / RXD data signals, RTS
/ CTS handshaking signals and interconnects the common GND reference
rail betwen the two converter PCBs.
When used together with FTDI’s supplied Virtual COM Port ( VCP )
drivers, the USB NMC cable may be used to establish inter-PC COM Port
based communication at baud rates of up to 3M baud. The standard USB
NMC cable p/n USB NMC-2.5m comes with an interconnect length of 2.5m (
8.2ft ) - other lengths may be available on request. Multiple operating systems are supported including Windows, Linux, Mac OS etc.
single cable
Another Alternative is to use Bluetooth which is also programmable just like a the older serial port.
I think I found the solution: Avnet Spartan-6 LX9 MicroBoard.
It has a USB on one end and an ethernet port on the other end.
http://www.xilinx.com/products/boards-and-kits/1-3i2dfk.html
I can put the fpga/microblaze-cpu in the middle to filter out traffic to make sure the link doesn't get hacked and maybe encrypted it as well.
Easy Computer Sync sells the null modem cable plus the data transfer software. The SW is versatile and easy to use. https://www.bravurasoftware.com/easy-computer-sync/ (I have no connection with other than being a satisfied user.)

TCP/UDP over cell network

I'm a novice in this area looking for clarification. I believe that CDMA would be classified as part of the physical layer, so what is used for the data link layer (according to the OSI model) in cellular networks? Is TCP/UDP used in cellular networks? If so, in what capacity?
On a CDMA network (and some others, such as GPRS and HSPA), PPP is used at the Data Link Layer (layer 2).
TCP/UDP (or more generally, IP) is indeed used in CDMA networks to mostly for connection to the CMDA providers ISP network for Internet access by phones and "data sticks".
These data sticks usually provide an emulated modem on a serial port over USB, which is used in a very similar manner to dial-up modems of days gone by. You'd use the same "AT commands" to establish a connection, the only difference being the relatively high speed of the emulated serial port.

Gigabit switch in 10/100 router network

I have a 10/100 router. I bought gigabit switch. One port is connected to routers, others to my home hosts. Speed between hosts is 12mbps.
So, is it possible to have gigabit connection between hosts, connected to gigabit switch, if switch also connected to 100mb router?
Thank's for your answers!
Yes you should be able to do theoretically 1Gbps between any devices as long as they're plugged directly into the gigabit switch and they have Gig NICs (Network Cards).
With networking you're restricted to the weakest link in the path. As long as the router isn't in the path between the host on the network the speed of It's interface won't affect anything else.
Also if you're not seeing what you think you should be seeing you may want to look at the properties on the computer's NIC to see what speed it's autonegotiation is coming up at. A damaged rj-45 cable(ethernet cable) can work fine and 100mbps but not function for a gig connection.
All of this is of course before network overhead and other things along that line.

Create connection based on usb cable between 2 computers

I have 2 linux computers. For security, I want to setup a link between them, then program a library for sending/receiving data over this connection. I know that we can use USB networking cable for connection. But I am not sure is it possible to send and receive data on this link, does it depend on cable manufacturer? And Can I program library without using cable driver?
You can't use a USB cable to connect two computers with standard USB interfaces. Standard USB interfaces on computers are host interfaces and you can only connect a host to a device, not another host.
The "cable" described in the article it's not just a cable, the correct name would be USB host-host bridge controller and it powered by a chip designed and manufactured by Prolific - PL 2501. It's described also in the article.
As David Schwarz said with dumb cable (only the wires) you cannot setup a link between two PCs, because USB it's master/slave bus, where a device it's the slave and other the host. The PC it's designed to always be the host (the master).
The response it is that you cannot setup a link or do networking between two PCs using a dumb USB cable. You can do this only using a bridge like the one described in the article.

What kind of port is the USB port?

I am developing a serial port communication java-J2ME-J2SE application. There is a mobile phone and a computer ( running Windows XP ). These two machines are communicating through the phone mobile's cable. And the phone mobile's cable is a USB cable. So what is the type of the port : is it COM1 or something else ?
I looked the device manager and I found that the mobile phone ( Alcatel OT-806D ) is in port COM4. Here is a captured image of the device manager:
An USB port is a kind of serial port that computers and devices can use to communicate. It defines the connectors and cables, as well as the physical and link layer protocols that devices must use to communicate over USB. In this sense, it's similar to Ethernet, Firewire or other communication protocols.
At a physical level, USB is a serial protocol, meaning that bits are sent in a serial fashion. Old serial RS-232 ports (traditionally named COMx under Windows) are not related to modern USB architecture. Old serial ports used a simpler and slower communication protocol (RS-232) that was usually handled by a family of chips called UARTs, whereas USB communication requires more complex hardware.
So, the physical and link-layer characteristics of these two protocols are very different. While both are serial protocols, USB allows for several devices to share the same bus (traditional serial ports don't) and communication speed is much higher in USB. Error detection and correction, flow control and other data transfer concerns are better handled in USB.
COM ports are a Windows abstraction to represent any communication port. In other operating systems other names are used. In Linux, the COM1 port is represented by the device /dev/ttyS0.
Note that this is no more than an abstraction. It is possible (and often done) to use serial ports that are not using the traditional, physical, serial port. In fact, you can create operating system drivers that provide serial ports that are in fact communicating over Ethernet, USB, IP or any other communication layer. The COM port at operating system level is no more than an abstraction to represent a communications port.
Mobile phones offer a variety of services through their USB port. This often includes raw serial communication (which you can use in your application), but in many other cases the USB port provides other "profiles" (usb mass storage, headphones, or whatever). All those profiles are standarized so you can plug your phone to a computer and establish a "serial communication" channel, among other things, without having to code communication drivers for the computer or the phone.
So, to answer your question, no, an USB port is not a COM port. It is an USB port. You can use it for serial communications, but you can also use it for other things.
USB means Universal Serial Bus. Generally all os the USB connections on PC will be linked on the same bus. All devices connected to the bus are assigned virtual port numbers. These port numbers will change depending on what is connected to the bus.
However, you won't be communicating with the phone directly but with any driver that is installed for it, unless you're writing the driver itself.
Some phones are not controllable in any way, others may appear as a modem, because that is the functionality that their manufacturer has assigned them through the drive.
My current phone installs as a device in itself (for use with a manufacturers piece of software), a modem and a storage device.
Have a look here for some more information.
um, depends what you mean by "type of port". I think you want to know the name of the port, but what you really need to know is what protocol your phone will understand.
You need to know what protocol (if any) the phone can communicate with over USB. Just because you can connect the phone to a USB cable doesn't mean that you can control the phone. This depends on the phone. Not all phones are built to understand the same protocols.
Also, USB is a serial bus because it transmits data serially on a single line (as opposed to transmitting in parallel over multiple lines), but it doesn't (necessarily) use the same RS-232 protocol as a computer's serial port. If you had a RS-232 device connected to a USB port, then you would connect to it using COM1 (or COM2 or COM3, your operating system assigns this port name).

Resources