Can you plug the computer directly into the wall to access the Internet? [closed]

Solution 1:

If your "wall" output is really Ethernet which is possible if your "wall" is a fibre media convertor or Ethernet wired apartment (and not dsl for example) then it is technically possible to plug a PC into it directly, but, if you need to ask the question, doing so is probably a bad idea because -

  1. It can directly expose your computer to the Internet, allowing remote computers to scan, fingerprint and likely exploit it - one side effect of NAT in routers is that it largely prevents this.

  2. It prevents more than one device getting online (unless you turn your PC into a router.)

  3. It may well not work without tricky configuration depending on the ISP configuration - for example PPPoE encapsulates the Internet connection in a PPP connection to provide the ISP more control, and/or Ethernet may be delivered on a tagged port.

Solution 2:

wall -> ethernet -> router -> wifi -> computer

This makes sense if your computer connects using WiFi.

wall -> ethernet -> router -> ethernet -> computer

That will work so long as your computer doesn't require a WiFi connection.

I'm wondering why you can't just plug the computer straight into the wall:

wall -> ethernet -> computer

That would be fine if you only wanted to connect one computer to your Internet connection. But if you want to connect more than one, something has to take the arriving packets and figure out which of your computers to send them to. It makes great practical sense to design a machine specifically for this purpose and include all the needed functionality in a purpose-built device.

Solution 3:

Because you most likely actually have....

wall -> [tcp/ip over ADSL]-> [ADSL modem + TCP/IP router in one box] -> ethernet/wifi -> computer 

There are of course exceptions (rare for consumer ISP) as mentioned by the other answers

The ADSL modem listens to the signal on the wire from your ISP and converts it to digital signals (which contain TCP/IP data) in much the same way that the NIC circuit in your computer listens to the signal on the ethernet cable and converts it to digital signals (which contain TCP/IP data).

If your NIC in your computer could understand ADSL then in theory you would not need the [ADSL modem + TCP/IP router in one box]

Solution 4:

The answer fundamentally depends on what the "wall" is, which usually depends on how you connect to the Internet Service Provider.

1) If the "wall" is an RJ45 jack connected directly to an Ethernet switch or a router (say in an apartment or office building) that is expecting to connect to and hand out an IP address (via DHCP) to a host computer, then direct connection will work but may not be very secure.

2) If the "wall" is an RJ11 (phone) jack, then you'll need an ADSL modem first to connect to the wall which will provide an RJ45 jack and provide an IP address via DHCP.

3) If the "wall" is a cable connection (usually a coax or "F" connector), then you will need a cable modem first that terminates the coax and provides an RJ45 jack and an IP address via DHCP.

4) If the "wall" is an RJ45 plug or a Cat 5 or Cat 6 Ethernet cable from a microwave setup (more common in rural areas), then usually the provider will require a router to terminate their interface. This router will then provide an RJ46 jack, an IP address via DHCP, and often an incorporated WiFi access point.

Sometimes the DSL modem, cable modem, or router will have a firewall built in, but sometimes they don't and often the basic configurations they come with are not very secure, so it would be wise to either configure the firewall on these devices or install a firewall before you connect your host computer(s).

Solution 5:

I'll try to fill in the theory you're missing. This is going to play a bit "hard and loose" with analogies, and simplify a lot, but it should help. After that, I'll come back to your actual question with concrete answers.

One thing - you are asking about "virtual routers" and at the same time, basic theory like "what is a router anyway". I'm going to assume no knowledge (or very basic only) and start from the beginning, because it sounds like that's what you are actually trying to learn.

How your computer connects to the internet

You can imagine your computer's connection to the internet as being a bit like you talking on a landline telephone. Somewhere "out there", a company (or multiple companies) have put together a tangle of cables that connect all homes and offices. You don't really need to know about that side of it, because as far as you're concerned, you can pick up your home phone, dial a number, and if it's a valid number, you can speak to who you want - your main concern is the landline within your own home (handsets, base unit if you have one, master socket, sockets in other rooms, phone connections etc).

Similarly with the internet, many companies have put together the infrastructure outside your home. Your computer can "call" any "number" and if it's a valid "number", it can "speak" to any other computer it wants to. That could be, say, Google, Facebook, Spotify, or StackExchange.

That part is pretty automatic, so your question is mainly about what happens inside your house.

Inside the house

If we go back to the landline analogy, say you're using AT&T (USA) or British Telecom/BT (UK). They provide a master socket in your hallway (say), and link it to the external phone network. Within the home, you have a lot of choices, but in all cases, you have to link your landline handsets to that master socket, then they work.

You can do that in a lot of ways. For example:

  • You can plug a phone directly into the master socket

  • You can attach a wire to the master socket, with a second socket at the other end, in the bedroom or kitchen. Then you can connect your handset to that socket as well

  • You can attach a base unit to the master socket, or the bedroom socket, and then use a cordless landline handset. The cordless landline handset finds the base unit and "speaks" to it using radio; the base unit forwards that, going through the master socket, to the external landline phone network

Similarly, and simplifying it all, the things you are asking about are all just "things that help your computer to reach the external internet". It's very similar.

What those parts are doing

I'll leave the word "Ethernet" to the end, but here are the other things you might have:

  1. Your house has one external connection that the internet is linked through. Depending on your supplier and setup, it could be a satellite plug in the wall, a cable socket in the wall, or the same landline master phone socket as your landline telephone uses.

  2. There may also be a "modem" or another box, that directly connects to the external connection, and acts as a "translator". For example:

    - if your external connection is a satellite downlink, it might need a box from the satellite company to "translate" to/from satellite downlink signals, and computer data signals.

    - If you have a fibre or other connection that uses the external phone network, you might need an ADSL or VDSL modem, to translate to/from the external signals sent over the local copper wiring your phone company uses, and computer data signals.

    - If you use a cable company, they might use encryption on their external network to prevent fraud, and they might provide a box and some kind of smart card that translates to/from encrypted external cable signals, to "normal" computer data signals.

  3. You probably have a router. This is a box that, like a landline base unit, allows multiple computers to share a single external internet connection. When many computers or cellphones have to talk to each other, the router is the device that tracks which ones are talking to which, so that when "replies" arrive, they get sent to the right computer/cellphone. So the router will always be a box that multiple other computers can connect to.

    As a bonus, the router often does some security stuff, like blocking "fake" replies or inquiries from outside, when a device in your home didn't ask for anything. (Called a "firewall": most routers also do some kind of firewall too). It also makes sure every device gets a "fair share", so one device can't use all the internet blocking others from access. Some routers can operate parental controls. You might have a separate firewall on your computer - it doesn't hurt to have both.

    In some cases, the router also does the "translator" job above, in which case you'll have one box doing both things. For example, if you use ADSL, a home router can often connect straight to your master phone socket, pick up the external ADSL signal, "translate" it to normal computer data signals, and THEN act as a router to work out which computer those data signals need to be sent to.

  4. Last, you will have cables or WiFi to connect your actual computer/cellphone/devices to the router. The router has to be able to talk to your devices, to relay data between them and the external internet (or each other!). Like your home phone system, this can be done by adding wires between them (called a "wired connection"), or by using radio to link them (called "wifi"). If it's a wifi connection, it works almost the same as your cordless landline - the wifi equivalent of a cordless landline "base unit" is usually built into the router, and it sorts out what data is meant to be sent to and from each device.

Hopefully that's clear so far...

Some more info on how WiFi works

This isn't strictly relevant, so you can ignore it, but might help you get a basic idea "how this stuff works".

Any device that wants to connect to the internet by radio [wifi], must have a standard way it can use, to send a signal to everything in its wifi radio range, that says roughly: "hey, any wifi base units out there? I'd like to be allowed to use you!" Usually the wifi "base unit" in the router replies _"I am managing an internet connection called JOHNS_HOUSE and here is how to reach me directly, instead of shouting at everyone, but you can only use the internet connection called JOHNS_HOUSE if you know the password"_ Your device says _"Yes, JOHNS_HOUSE is the one I want"_, and sends the password (or asks you to enter it, if needed), then the router says "okay, you're allowed", and will begin allowing your device to send data over radio to and from it, and from there to the external internet.

Your cellphone might also get other replies that say "I manage ANNES_HOUSE" or "I manage STARBUCKS_CUSTOMER_WIFI"_, but when itnlists them all, the user chooses which wifi "base unit" should be used, because that's the one they know the password for!

"Ethernet"

The other term you used, "Ethernet", is a word with multiple meanings, that's why I left it till last.

Ethernet really means, the way that typical home computers as well as the wider internet, package up data to send to other computers. It's a "protocol" - a clearly set out definition that says exactly how one computer should send data to another computer, so the other computer can understand it, and exactly how they talk. It's a bit like a written definition of a very strict kind of electrical conversation. Ethernet and other common standards cover everything like this:

  • What do the electrical signals look like, that are sent on all these wires? How should electrical signals be converted to data, and vice-versa?
  • What "addresses" do computers use? How does my computer figure out how to talk to "google" or facebook" when I could be anywhere on the world and using any connection? How does the data get from me to Facebook and how do replies make their way back again?
  • What does data look like, when it's being sent? (People talk using words, but computers need to know how to send data in bunches, called "packets", and how a packet is made up). How does a computer know if a packet it sent is received properly? How can the other computer tell it to slow down or wait a bit, if it's "speaking" too quickly for it?
  • How does a computer track which packets are in the same conversation, if it's talking to lots of other computers? What happens if packets don't arrive in order? What should a computer do, if it thinks some data is missing, or got "mangled" in transit, and wants to request a re-send, or thinks there's an error?
  • When a computer wants to start talking to another computer, what is the computer version of "hello"? What should the other computer reply, if it is happy to talk, or doesn't want to talk?

So that's what Ethernet actually is. Ethernet (and a bunch of other protocols) are written down standards that everyone follows, so that whoever makes or uses a computer, or a cellphone, knows exactly what to make it do, so it can find, connect with, and talk to other devices and websites.

But because Ethernet is so common, the word is also used as a shorthand for other things. For example, the cable between a computer and a router, or the router and a separate modem, is a computer data cable that specifically carries data that's been "bundled up" into Ethernet packets, so it's usually just called an Ethernet cable. Also the computer software (Windows/Linux/whatever) may identify the connection as an "ethernet port", meaning "the RJ45 connector for an ethernet cable at the back of your computer".

The plugs at each end of an Ethernet cable also have a name - they are called RJ45 plugs (and they go into RJ45 sockets). The term RJ45 defines their exact size and shape, and the exact shape of the plugs and sockets and their connectors, so when you plug in a cable, it actually works. But sometimes they could be called Ethernet plugs and sockets.

Other terms for Ethernet cables are "Cat4/Cat5/Cat6/Cat7 cable". "Cat" stands for "category" and means its a cable capable of carrying data that's bundled up according to the Ethernet standard, up to a particular speed and distance. So a cat7 cable can carry data faster than a cat5 cable, all other things being equal. Ethernet itself is closely related to TCP/IP, a protocol that defines much of how the Internet works. TCP/IP stands for Transmission Control Protocol /Internet Protocol, and describes a lot of the actual way that data is sent between computers.

There's a ton more, but hopefully that's most of the basics. If any of it is confusing, read it again, or ask.

Getting back to your original question

So let's go back to your diagrams and question:

My system is essentially: wall -> ethernet -> router -> wifi -> computer

You will need to say what kind of signal comes into your house. "Wall" could mean anything. It sounds like there is a wall plate with a phone/satellite/cable/fibre socket of some kind, that you plug things into, but it just isn't clear. After that, there's a cable linking that to your router, which also acts as a wifi base unit and might also be acting as an ADSL modem, and your computer connects to that. But it's really unclear, so its hard to comment.

Can you add photos or model numbers to your post, to make clear what you actually have, and what kind of internet connection you're using g?

But I'd like to simplify it for this purpose and just do: wall -> ethernet -> router -> ethernet -> computer

(or if that's incorrect, whatever the correct cord system is).

Your router needs to connect to the computer. But it doesn't matter how. Some people prefer wifi, some prefer wired (an ethernet cable). Both work just as well as each other, it's completely your own preference. The router should recognise either, if it has the correct RJ45 sockets at the back - and most of them do.

Pros and cons might be: wired can be more reliable (fewer disconnects), and more secure (can't accidentally use a weak wifi password because its an actual cable). Its also faster than wifi historically, but very new wifi can be almost as fast or faster. On the other hand, it needs a cable - more computers, more cables - so portability is a real issue, and many devices don't have a cable connection these days. Wifi is cable free however many devices connect.

I'm wondering why you can't just plug the computer straight into the wall: wall -> ethernet -> computer

I wonder why I can't just open the terminal and write some code that listens for the ethernet device/interface, and then reads/writes stuff "to the internet". Maybe this is possible, not sure. Would like to know if this is possible, and if so, what is happening at a more granular level, or if not, why not.

At a minimum, almost all domestic internet requires an external connection socket of some kind, a modem that translates normal data packets to and from "whatever your supplier uses external to your house", almost always a router, to protect the network somewhat, and handle multiple devices sharing the same connection (strictly this is optional but it's almost always used), and connections between these, and from the router to your computer, which could be wired (Ethernet cables) or wifi, whichever you prefer.

The external connection (only) may need a different cable to connect to the modem (or a router with internal modem), like a phone wire or satellite coax cable.

Because this combination/setup is so very common, many/most consumer routers these days handle all of these tasks - they contain an ADSL modem, a router, and both kinds of connectors (a wifi base unit as well as Ethernet sockets, so you can choose).

If your internet isn't ADSL, you may haveva second box that goes between the router and the external connection, and only connects those two - that'll be a modem. If you only have one computer, and a supplier modem, you can plug the computer directly into the modem, and skip on the router, but it isn't recommended - the other things most router do, like firewalling/basic protection, are too useful to skip.

You can make it more complicated, but that's the basics of what is usually done in many houses.

I'm in the process of understanding virtual routers, and am wondering how a router is actually playing a part in getting the internet, and if it can be removed from the equation for this example.

Don't even go to "virtual routers" yet. You aren't ready, judging from the question, and to be honest, it doesn't sound like you need it. What's the purpose, or what do you imagine it will help with? The odds are good it needs more tech, and will complicate things, for no benefit at all.

You should now understand what a router does.

Hope this helps!