Introduction to Computer Networking

Cerf and Kahn are considered the Internet founding fathers. Cerf was a program manager for DARPA. They suggested autonomy over the control of different networks. They suggested minimalism/autonomy, with no internal changes required to interconnect networks. We also do best effort service model and stateless routers. 

Some packets may be dropped, but the network is doing its best, and nothing personal. You need to work for it to get reliability, timers, acknowledgements, etc. Stateless routers means that intermediate routers do not hold state or cache their values. The router will look at the table it has prepared. But once data is travelled, it will then forget what value sent. 

Packet switching is more effective on utilizing resources than circuit switching. This means splitting a message into chunks. Each package is inside of an envelope, which show the source and destination IP address, and set to the destination independently to the other packages, even though they belong to the same file. In the process, the packet is sharing the resources to other sources in other flows. Queueing theory shows effectiveness of packet-switching. You are also sharing the channel with others. The packets will compete with other packets being sent from other devices. 

Circuit switching, on the other hand, has the 2 ends talking to intermediate nodes on the network and let's say ask for a "guaranteed traffic rate". You got reserved resources and you're not competing with anyone. So you are guaranteed quality of service. Packet switching doesn't have quality of service, competing with others, packets can be lost but still what the internet is used. 

This is because packet switching is faster. This is because you don't have to talk to intermediate nodes to reserve the resources.  For reliability, use circuit switches. The main reason for using packet switching over circuit switching is that it turns out that packet switching will make better use of network resources. If you want your network to serve more customers, then packet switching is better. 

Let's say I bought a shoe. Shoe Utilization is fraction of time that you wear it. Let's say picking 10 from class only 1/10th of them will use the internet. What about the others? They would not be able to use the internet unless I move the reservations. This is what circuit switching is about. In switching, when you are not using it (even though you don't use the resources the same time), someone else will. In this example, you can have more than 10 people using the network or your shoes, in fact. 

In the late 60's ARPAnet became operational. ALOHAnet is simple like a cellular network, but with a hub in the middle, like one intermediate node with devices that want to come with you. You need a message, direct to ALOHANET tower, and the tower will redirect to the destination. The 80's led to the development of TCP/IP sponsored by ARPA in UC Berkeley. Later on applications came to the picture, FTP, DNS, Email Applications, TCP (congestion control), national networks, etc. in the 80s. 

In the 90's ARPAnet was decommissioned and the Web came into the mix. HTTP helps to send and receive contents of webpages, progressing over time, media, text, audio, video, along with many others. Now late 1990's is the commercialization of the Web. In the late 90's we got instant messaging, P2P file sharing, security, etc. Then cloud providers came about (Amazon, IBM, Google, etc.). Then IoT appeared where you have to sense everything around me. 

Let's now talk about the Internet Structure, remove the arbitrary stuff. Laptop is an endhost. The traffic that comes to the laptop is either sent from me or destined for me, no more, no less. The endhosts are servers and clients. The intermediate nodes include Routers, Switches, and Hubs. A network consists of some number of endhosts interconnected through these intermediate nodes. There is a long line from the east coast to the west coast to put the line in there. 


Let's say I have a gateway on the first floor, router on the second floor. There are multiple end devices that are connected through this one gateway. If you don't have very invoved network, you likely have one gateway connected to server, and you can have multiple devices through this one gateway (star shape, ish). Repeater will take the signal and send the signal as is so the main gateway will get it. Devices connect to the gateway, which connect to the service provider. Basically the home network will likely be a tree. Home network is a tree structure.

How about the University Network? It's also a Tree Structure. Let's pick one of the labs. In this lab, we have switch Ethernet Architecture. Each one is connected to an ethernet cable, to a switch somewhere somewhere in the building, and the switch is the Gateway for different devices. The whole floor is a network shaped like a tree. With 3 floors, all these "trees" connect to each other, the cable on the switch in room 3 is going to connect to the switch in floor number 0. All these networks will connect to each other with some switch. Home networks look like a tree and NC state network looks like a tree connecting to gateway. This doesn't mean every network is like a tree!

The Home and NC State network traffic originate from the end device to the internet, or vice versa. There are other networks where stuff is sent to arbitrary destinations (AT&T as a service provider scatter their traffic to arbitrary destinations that could be anywhere on the internet). Because you don't have this traffic feature, we should have multiple gateways so the structure is not like a tree, it's a mesh. As the number of customers grow, the demands for the service will grow. Edge networks like home/NC state only carry traffic on their own. But AT&T and stuff is not edge network because it's carrying traffic for its customers. 

Core network structure would typically look like a mesh and gets really dense over time. The edge network carry own traffic, core networks carry transit traffic. The edge networks is like a tree that follows the trail of the traffic. Here's the sprint network: 


Why do we have one line from east to the west? Something is fuzzy. They did not make one physical connection from east to west. It's a logical link. The Tree structure is a physical structure, but these are channels connecting nodes to each other. Let's say we have a portion of each channel dedicating sending items from the east to the west. There are multiple hubs in between with multiple cables, and sprint made a circuit between the hubs on the east coast and on the west coast (this is the logical structure). 

For every pair of nodes, we need at least 2 nodes to get there, redundancy wise. It costs more but if it goes down, people will complain. So get a grip and pay more then! With packet switching, there is better utilization of network resources. However, you can get delays and losses. 

You have n devices, and intermediate nodes. With packet switching, you split your content into packets, but because there are intermediate nodes you don't get guaranteed quality. An intermediate channel have a transmission rate of R which is bits per second. So Packet transmission delay is number of seonds, which is L bits divided by R bits pers second. Packet Transmission delay = L / R. 



It may take a long time for bits to go through communication channel, depends on the speed of light to be frank. So the transmission rate has to do with how fast you can take bits and map them into signals in the wire. If you have packet with N bits and R transmission Rate, the transmission delay is N / R. So the packet gets demodulated after arriving. Routers help forward the packets to next node, which increases transmission time every time. 

The packets will go to the next hub. Can the next hub Relay it or does it have to store all the signals for all the symbols of the packet in the buffer and then process the packet? Do we need to demodulate (convert the signals back into bits) before forwarding into the next hub, or can we forward these bits immediately? We have to store these to be able to decide where the next hub is. 

This holds for routers, and switches, but hubs are layer one devices, which doesn't have to store in buffer, they take the signal on one interface and they forward it to every other interface. Repeater takes the signal and just sends it over its outgoing interface to magnify the signal. They simply propagate the signal. The internet; however, is routers and switches. 




The below is a setup of buffering. There are 2 devices A and B, they connect to a router. For A and B to connect to this router, there should be 2 networks, one to connect to A and the other to connect to B. If this was a WiFi connection, A and B will connect through the air. The green packets will be incoming, buffer and yellow packets will income from B. Both green and yellow are going to be sent to the outgoing buffer towards the other router. We will risk queueing delay and possiblility of packet drop.


There is transmission delay, propagation delay, queueing delay and processing delay. Add them up and we get the total end-to-end delay. One final point is that the Queueing Delay Could be measured. The Queueing Delay can be dramatic if you have lots of congestion. This delay can add up and can be intense. You can take this example just to show you the idea. R is link bandwidth, L is packet length and a is average packet arrival rate. Take La/R ~ 0 means that the queueing delay is small. If equal to 1, the queuing delay is large and if La/R > 1 then more work arrives that can be serviced which means infinite delay. 

 Traceroute provides delay measurement from source to router. You can use the program to find out the IP address of every router from a source to a destination. IP packets, containing data + header has a TTL Feed (time delay). If packet has a TTL to 2 the first router decrements packet and makes it 1, and then forwards it 1 more hub towards the destination. 


As I get the error messages, when I send the packet, I start the timer. You can use traceroute to get the IP addresses of packets. For all i, this traceroute sends packets that reaches router i, returns packets to sender, and then times the intervals between transmission and reply. Here's an example:


Now let's briefly go to circuit switching. We aren't going to compete for resources, we will talk to intermmediate nodes, make reservations, with no competition and then you can get estimates on the quality of service. End to end resources are reserved and there is dedicated resources, which means NO SHARING. It's commonly used for traditional telephone networks. Since resources are yours, you can guarentee quality of service. 





Consider a segment, and I have N users. The outgoing link is the Mbps link. Let's assume for simplicity that we have for these N users, each one of them is active only 10% of its time, after that it's sleeping. But when it is active, it's constantly using 100kb/s (kb is kilobits). If I use circuit switching, I will be able to accommodate 10. Circuit switching is in sequence, package switching isn't. Internet is based on TCP/IP, phone lines based on circuit switching. 

What about packet switching? You can easily show that with 35 users the probability of having more than 10 active at the same time is minor, less than 0.0004 or 0.04%. If more than 10 are active at the same time, I might get losses yes but 99.96% of time, it is not the case and packet switching is much more reasonable. For circuit switching you need to talk to every device on the way. Packet switching is much simpler setup. Congestion may happen but it won't be super frequent. The fraction of packet losses is really minor. 

Comments

Popular Posts