Here is what I got to work. (Update: see my comment below; this stopped working the next day.)
I had to configure the subnets. What worked for me was only allowing 1 IP address:
Next, I had to configure the firewall to allow IP Passthrough:
At this point, I rebooted the AT&T router modem.
While that was going on, I used my wireless network card to configure my Netgear router. I had to change the IP address, Default Gateway and Primary DNS:
By the time I was doing all of that, the Motorola router modem was through rebooting, and HERE I AM! :)
That was a lot of work for me!
Hopefully, someone comes along later and gets some good out of it.
A subnet mask divides an IP address into network address and host address.
Correct. Apply the mask and you can see which part belongs to the network, and the reminder is the host address.
e.g. mask 255.255.255.0 and 1.2.3.4 would yield
IP: 00000001.00000010.00000011.0000100 (1.2.3.4. in binary)
Mask: 11111111.11111111.11111111.0000000 (mask in binary)
-----------------------------------
Net: 00000001.00000010.00000011.0 (1.2.3.0)
A network address always ends with a series of 0's like (mostly for
all subnets) such as 123.0.0.0, 123.45.0.0 and 123.45.67.0.
It often does, but part of that is habitual. I could use a netmask of 255.255.255.128 (Binary 11111111.11111111.11111111.1000000) to get smaller subnets. And 10.20.30.128 would be a network address, with 10.20.30.129 the first possible IP on it, 10.20.30.130 the second possible etc etc.
And for 10.20.30.0 to 10.20.30.127 the broadcast IP would be 10.20.30.127.
Routers act as intermediate stations to transfer data to the correct
network.
Correct. They look at their routing table. If know have a specific route then they apply it. If not they forward it to their standard place. This is where the default gateway comes in.
Now, I have the following questions- What actually is network address ?
Does it identify any real world host or Router?
i.e. are addresses like 123.0.0.0, 123.45.0.0 or 123.45.67.0 actually
assigned to any routers or hosts.
No. Network address are usually not assigned. They could be but then things would break down in most cases because the network address used to be used as the broadcast address before this got changed to the highest address in the network. Different implementations of IP stack would make using the network adress fun.
You might get away with it in very specific circumstances. E.g. on a specifc OS and with specific routers. But once you start to mix things, upgrade drivers or send things outside of your control (e.g. onto the Internet) you are going to have job security while debugging...
If they are assigned to routers then why is my local lan router
identified as 192.168.0.1 which is not a network address
That is merely a normal IP. 192.168.0.0/16 is usually used as a /24, with usuable IPs from 192.168.0.1 though 192.168.255.254 (65536-2 IPs). With the first IP usually reserved and the last IP reserved (as broadcast address).
Most SoHo setups take the RFC1918 range of 192.168.0.0/16, split in into 256 smaller subnets (/24) and assign the router the first or the last usable IP.
This makes a lot of sense when you design a network. One of the first things you need to plan the a way off the local network, and giving that the first IP got to be custom. But that is pure custom. Giving the router and IP of 192.168.1.42 is equally valid.
Suppose a request for 123.23.45.27 comes to a router, the router applies the subnet mask to it and suppose comes out with the network address as 123.23.0.0, so now it will check it's routing table for network address as 123.23.0.0 and refer to the corresponding routing table entry that is capable of handle this request and that router further handles the requests.
Are my following assumptions true?
A router finds the network address from the IP address and checks its
routing table.
True.
The routing table contains entries in the form of network address vs Router address and then a matched router address is picked up for forwarding the request.
Not sure about the versus. It contains network addresses. Briefly it does this:
- If the routers was the destination then the packet is handled up.
- If the router was not the destination then a router will check if it has a specific entry for a that host. Of it has it will forward it based on that.
- If the router was not the destination then a router will check if it has a specific entry for a network. If it has then it will forward it based on that.
- If the router was not the destination and it has neither of those then it will forward it to the default gateway as set on that router
All request's for IP address in the range 123.23.0.1 to 123.23.255.255
will be mapped to network address 123.23.0.0 and will be sent to the same
router for further routing.
Only for a /16. There are 30 possible network masks (excluding 0.0.0.0 and host-to-host specific ones) and only 3 of those end on the common round .0's
Best Answer
No, switches are not just simplified routers. Although many devices combine functions of both routing and switching, the two functions are distinct. Switches create networks, routers connect distinct networks together. Switches operate using only MAC-addresses, while routers also use IP addresses. Switches have many ports in the same subnet, while routers can only have one port per subnet. Devices that combine these functions still maintain a distinction between routing and switching, as they will separate 'switched' ports from 'routed' ports due to the requirements of the different functions and hardware.
To show some of the nuances: professional grade routers will perform internal switching functions (such as CEF), and some 'layer 3' switches Route (if they are layer-3 switches), but the operations are distinct.
It is useful for anyone interested in networking to become familiar with the OSI Model, which describes how computers and other devices talk to each other. The OSI Model breaks communication into seven layers, including the Application layer, which is the program you, the human, are working with, the Network layer or Layer-3, which deals with IP addresses and Routing, and the Data Link layer, or Layer-2, which deals with physical hardware addresses. Also, when you hear terms like TCP, ports, sockets, sessions, etc., these are also represented by the OSI model, so it's useful to learn.
Routers operate with IP addresses at the OSI Layer-3 or Network Layer and Switches operate with MAC addresses at the OSI Layer 2 or Data Link Layer.
Some devices, such as consumer wifi-routers, combine both a switch and a router in the same device (for instance a wifi router with 5 extra ports on the back). Other devices, such as cable or DSL modems, still function as a router because they route packets between your local network, and the remote network, and perform layer-3 functions such as NAT.
The operations of Routing and Switching are distinct however, and operate on different layers of encapsulation, different OSI layers, and with different addresses, as described below:
In detail:
Switching
We will start with a Layer-2 Switch. This is your standard switch, that includes all un-managed switches, and even managed switches that only operate at the Data-Link layer. This switch receives frames and compares them to a MAC-Address-Table (which is distinct from the ARP table in that it has MAC Addresses and Ports, rather than MACs and IPs). It uses this information to forward frames either to one, many, or all ports depending on whether it is a unicast, multicast, or broadcast frame. If it is a unicast frame, but it does not know which port to send it to, it floods it to ALL ports, except the port the switch received the frame on. Of course there is more detail with CAM tables and VLANS, but in short: Switching moves frames based on hardware addresses, switching can only move frames within the same subnet.
Routing
A router routes between subnets. In fact, on a router, you cannot put multiple routed interfaces on the same subnet - because a routers function is to move packets between layer-3 subnets. The router thus receives frames, containing packets off a port. If frame's destination (mac-address) matches the router (either as unicast or broadcast), the router will then look at the IP-packet contained inside the frame, and make a routing decision based on the IP and subnets. Once the routing decision is made, a switching decision is made to determine which port and layer-2 destination to send the packet to, so it can be re-encapsulated at Layer-2. For more information about the switching conducted by the router, see Cisco Express Forwarding, for example.
How the computer gets through the gateway:
So how does the computer reach its gateway? The computer itself has a route to its gateway. It knows that "if an IP is not on my subnet, I need to send the packet to this gateway address to get out," Thus, since all devices process top-down through the OSI-model, the computer will do an internal routing lookup first (layer-3) to decide wither a device is within its subnet. If not, it will arp (layer-2) to find the mac-address of the default gateway, and will encapsulate the IP packet for the remote host within a frame addressed to the router. The frame will be switched across the network using layer-2 headers and MAC addresses, within the same subnet, until it reaches the router, where its layer-3 IP addresses are looked at, and the decapsulated packet is routed between subnets.
Layer-3 Switches
The other scenario I haven't covered is the Layer 3 switch. These switches operate the same way as described above. They are switches, but they can have specific ports, physical or virtual, designated as routed ports. These routed ports operate as gateways between subnets, (often VLANs within a switch) while the switched ports continue to only operate at Layer-2.
Part of the distinction between layer-2 and layer-3 devices is reflected in the hardware and memory of the devices. As Cisco explains, layer-2 only devices have a CAM (content addressable memory) table containing the MAC-Address-table. Layer-3 devices additionaly have a TCAM table, which handles mapping between routing, layer-2 and layer-3 addresses. Because of the physical hardware differences, you will see price differences in hardware that is a pure layer-2 switch, a layer-3 switch, and a router.